mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
[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>
This commit is contained in:
parent
8ddeeae51f
commit
2f889129de
1 changed files with 3 additions and 0 deletions
|
@ -1401,6 +1401,9 @@ static void raid1d(mddev_t *mddev)
|
|||
int i;
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue