diff options
author | NeilBrown <neilb@suse.de> | 2006-03-27 04:18:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:45:03 -0500 |
commit | 2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb (patch) | |
tree | 78d9d9ceb070d92eb8c53cf6d683526e2447d7bc /drivers | |
parent | 8ddeeae51f2f197b4fafcba117ee8191b49d843e (diff) |
[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')
-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) | |||
1402 | clear_bit(R1BIO_BarrierRetry, &r1_bio->state); | 1402 | clear_bit(R1BIO_BarrierRetry, &r1_bio->state); |
1403 | clear_bit(R1BIO_Barrier, &r1_bio->state); | 1403 | clear_bit(R1BIO_Barrier, &r1_bio->state); |
1404 | for (i=0; i < conf->raid_disks; i++) | 1404 | for (i=0; i < conf->raid_disks; i++) |
1405 | if (r1_bio->bios[i]) | ||
1406 | atomic_inc(&r1_bio->remaining); | ||
1407 | for (i=0; i < conf->raid_disks; i++) | ||
1405 | if (r1_bio->bios[i]) { | 1408 | if (r1_bio->bios[i]) { |
1406 | struct bio_vec *bvec; | 1409 | struct bio_vec *bvec; |
1407 | int j; | 1410 | int j; |