diff options
author | Steve French <sfrench@us.ibm.com> | 2005-06-23 01:26:47 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-06-23 01:26:47 (GMT) |
commit | ea0daab4ae4a2f853f06c76961c0ed324fd0804c (patch) | |
tree | f6fbe2db5772695181b7a7257b05e43343bd8d75 /drivers/md/raid5.c | |
parent | 58aab753de605c14b9878a897e7349c3063afeff (diff) | |
parent | 1bdf7a78c2b21fb94dfe7994dbe89310b18479d2 (diff) | |
download | linux-ea0daab4ae4a2f853f06c76961c0ed324fd0804c.tar.xz |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 3cb11ac..93a9726 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -1411,6 +1411,8 @@ static int make_request (request_queue_t *q, struct bio * bi) sector_t logical_sector, last_sector; struct stripe_head *sh; + md_write_start(mddev, bi); + if (bio_data_dir(bi)==WRITE) { disk_stat_inc(mddev->gendisk, writes); disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi)); @@ -1423,8 +1425,7 @@ static int make_request (request_queue_t *q, struct bio * bi) last_sector = bi->bi_sector + (bi->bi_size>>9); bi->bi_next = NULL; bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ - if ( bio_data_dir(bi) == WRITE ) - md_write_start(mddev); + for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { DEFINE_WAIT(w); @@ -1475,7 +1476,7 @@ static int make_request (request_queue_t *q, struct bio * bi) } /* FIXME go_faster isn't used */ -static int sync_request (mddev_t *mddev, sector_t sector_nr, int go_faster) +static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) { raid5_conf_t *conf = (raid5_conf_t *) mddev->private; struct stripe_head *sh; @@ -1498,8 +1499,8 @@ static int sync_request (mddev_t *mddev, sector_t sector_nr, int go_faster) * nothing we can do. */ if (mddev->degraded >= 1 && test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { - int rv = (mddev->size << 1) - sector_nr; - md_done_sync(mddev, rv, 1); + sector_t rv = (mddev->size << 1) - sector_nr; + *skipped = 1; return rv; } @@ -1546,7 +1547,6 @@ static void raid5d (mddev_t *mddev) PRINTK("+++ raid5d active\n"); md_check_recovery(mddev); - md_handle_safemode(mddev); handled = 0; spin_lock_irq(&conf->device_lock); |