summaryrefslogtreecommitdiffstats
path: root/drivers
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
parent8ddeeae51f2f197b4fafcba117ee8191b49d843e (diff)
downloadop-kernel-dev-2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb.zip
op-kernel-dev-2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb.tar.gz
[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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 04418e1..3cb0872 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