summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-03-27 01:18:19 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:45:03 -0800
commit2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb (patch)
tree78d9d9ceb070d92eb8c53cf6d683526e2447d7bc /drivers/md/raid1.c
parent8ddeeae51f2f197b4fafcba117ee8191b49d843e (diff)
downloadblackbird-op-linux-2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb.tar.gz
blackbird-op-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/raid1.c')
-rw-r--r--drivers/md/raid1.c3
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;
OpenPOWER on IntegriCloud