From: NeilBrown <neilb@cse.unsw.edu.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md - 2 of 4 - Honour the read-ahead for for reads in raid5.
Date: Tue, 26 Aug 2003 09:26:06 +1000 [thread overview]
Message-ID: <E19rQis-0002Br-00@notabene> (raw)
### Comments for ChangeSet
If we get a failure trying to allocate a stripe_head for a read-ahead
request (the only time we can get a failure), we skip the rest of the
request and fail the whole bio.
----------- Diffstat output ------------
./drivers/md/raid5.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
diff ./drivers/md/raid5.c~current~ ./drivers/md/raid5.c
--- ./drivers/md/raid5.c~current~ 2003-08-24 07:03:43.000000000 +1000
+++ ./drivers/md/raid5.c 2003-08-24 08:07:16.000000000 +1000
@@ -1326,7 +1326,7 @@ static int make_request (request_queue_t
(unsigned long long)new_sector,
(unsigned long long)logical_sector);
- sh = get_active_stripe(conf, new_sector, pd_idx, 0/*(bi->bi_rw&RWA_MASK)*/);
+ sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
if (sh) {
add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
@@ -1334,7 +1334,12 @@ static int make_request (request_queue_t
raid5_plug_device(conf);
handle_stripe(sh);
release_stripe(sh);
+ } else {
+ /* cannot get stripe for read-ahead, just give-up */
+ clear_bit(BIO_UPTODATE, &bi->bi_flags);
+ break;
}
+
}
spin_lock_irq(&conf->device_lock);
if (--bi->bi_phys_segments == 0) {
reply other threads:[~2003-08-25 23:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E19rQis-0002Br-00@notabene \
--to=neilb@cse.unsw.edu.au \
--cc=linux-raid@vger.kernel.org \
--cc=torvalds@osdl.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).