diff options
Diffstat (limited to 'drivers/md/raid6main.c')
-rw-r--r-- | drivers/md/raid6main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c index 908edd78a792..f62ea1a73d0d 100644 --- a/drivers/md/raid6main.c +++ b/drivers/md/raid6main.c | |||
@@ -1570,6 +1570,8 @@ static int make_request (request_queue_t *q, struct bio * bi) | |||
1570 | sector_t logical_sector, last_sector; | 1570 | sector_t logical_sector, last_sector; |
1571 | struct stripe_head *sh; | 1571 | struct stripe_head *sh; |
1572 | 1572 | ||
1573 | md_write_start(mddev, bi); | ||
1574 | |||
1573 | if (bio_data_dir(bi)==WRITE) { | 1575 | if (bio_data_dir(bi)==WRITE) { |
1574 | disk_stat_inc(mddev->gendisk, writes); | 1576 | disk_stat_inc(mddev->gendisk, writes); |
1575 | disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi)); | 1577 | disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi)); |
@@ -1583,8 +1585,7 @@ static int make_request (request_queue_t *q, struct bio * bi) | |||
1583 | 1585 | ||
1584 | bi->bi_next = NULL; | 1586 | bi->bi_next = NULL; |
1585 | bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ | 1587 | bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ |
1586 | if ( bio_data_dir(bi) == WRITE ) | 1588 | |
1587 | md_write_start(mddev); | ||
1588 | for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { | 1589 | for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { |
1589 | DEFINE_WAIT(w); | 1590 | DEFINE_WAIT(w); |
1590 | 1591 | ||
@@ -1634,7 +1635,7 @@ static int make_request (request_queue_t *q, struct bio * bi) | |||
1634 | } | 1635 | } |
1635 | 1636 | ||
1636 | /* FIXME go_faster isn't used */ | 1637 | /* FIXME go_faster isn't used */ |
1637 | static int sync_request (mddev_t *mddev, sector_t sector_nr, int go_faster) | 1638 | static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) |
1638 | { | 1639 | { |
1639 | raid6_conf_t *conf = (raid6_conf_t *) mddev->private; | 1640 | raid6_conf_t *conf = (raid6_conf_t *) mddev->private; |
1640 | struct stripe_head *sh; | 1641 | struct stripe_head *sh; |
@@ -1657,8 +1658,8 @@ static int sync_request (mddev_t *mddev, sector_t sector_nr, int go_faster) | |||
1657 | * nothing we can do. | 1658 | * nothing we can do. |
1658 | */ | 1659 | */ |
1659 | if (mddev->degraded >= 2 && test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { | 1660 | if (mddev->degraded >= 2 && test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { |
1660 | int rv = (mddev->size << 1) - sector_nr; | 1661 | sector_t rv = (mddev->size << 1) - sector_nr; |
1661 | md_done_sync(mddev, rv, 1); | 1662 | *skipped = 1; |
1662 | return rv; | 1663 | return rv; |
1663 | } | 1664 | } |
1664 | 1665 | ||
@@ -1705,7 +1706,6 @@ static void raid6d (mddev_t *mddev) | |||
1705 | PRINTK("+++ raid6d active\n"); | 1706 | PRINTK("+++ raid6d active\n"); |
1706 | 1707 | ||
1707 | md_check_recovery(mddev); | 1708 | md_check_recovery(mddev); |
1708 | md_handle_safemode(mddev); | ||
1709 | 1709 | ||
1710 | handled = 0; | 1710 | handled = 0; |
1711 | spin_lock_irq(&conf->device_lock); | 1711 | spin_lock_irq(&conf->device_lock); |