From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 003 of 3] md: Restore 'remaining' count when retrying an write operation.
Date: Fri, 24 Mar 2006 17:00:36 +1100 [thread overview]
Message-ID: <1060324060036.2474@suse.de> (raw)
In-Reply-To: 20060324165531.2372.patches@notabene
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>
### Diffstat output
./drivers/md/raid1.c | 3 +++
1 file changed, 3 insertions(+)
diff ./drivers/md/raid1.c~current~ ./drivers/md/raid1.c
--- ./drivers/md/raid1.c~current~ 2006-03-24 14:01:30.000000000 +1100
+++ ./drivers/md/raid1.c 2006-03-24 14:06:49.000000000 +1100
@@ -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;
prev parent reply other threads:[~2006-03-24 6:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 5:58 [PATCH 000 of 3] md: Introduction - 3 assorted md fixes NeilBrown
2006-03-24 5:59 ` [PATCH 001 of 3] md: Remove bi_end_io call out from under a spinlock NeilBrown
2006-03-24 6:00 ` [PATCH 002 of 3] md: Fix md grow/size code to correctly find the maximum available space NeilBrown
2006-03-24 6:00 ` NeilBrown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1060324060036.2474@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).