diff options
author | NeilBrown <neilb@suse.de> | 2006-03-27 11:18:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 18:45:03 +0200 |
commit | 2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb (patch) | |
tree | 78d9d9ceb070d92eb8c53cf6d683526e2447d7bc /drivers/md | |
parent | [PATCH] md: Fix md grow/size code to correctly find the maximum available space (diff) | |
download | linux-2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb.tar.xz linux-2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb.zip |
[PATCH] md: Restore 'remaining' count when retrying an write operation
When retrying a write due to barrier failure, we don't reset 'remaining', so
it goes negative and never hits 0 again.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 04418e10d1dc..3cb0872a845d 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1402,6 +1402,9 @@ static void raid1d(mddev_t *mddev) clear_bit(R1BIO_BarrierRetry, &r1_bio->state); clear_bit(R1BIO_Barrier, &r1_bio->state); for (i=0; i < conf->raid_disks; i++) + if (r1_bio->bios[i]) + atomic_inc(&r1_bio->remaining); + for (i=0; i < conf->raid_disks; i++) if (r1_bio->bios[i]) { struct bio_vec *bvec; int j; |