From: Neil Brown <neilb@cse.unsw.edu.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-raid@vger.kernel.org
Subject: PATCH - md 4 of 22 - Make raid5 work for big bios
Date: Wed, 19 Jun 2002 10:50:12 +1000 (EST) [thread overview]
Message-ID: <15631.54596.562654.994996@notabene.cse.unsw.edu.au> (raw)
----------- Diffstat output ------------
./drivers/md/raid5.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
--- ./drivers/md/raid5.c 2002/06/18 03:26:36 1.4
+++ ./drivers/md/raid5.c 2002/06/18 03:32:06 1.5
@@ -633,7 +633,6 @@
else
page_offset = (signed)(sector - bio->bi_sector) * -512;
bio_for_each_segment(bvl, bio, i) {
- char *ba = __bio_kmap(bio, i);
int len = bio_iovec_idx(bio,i)->bv_len;
int clen;
int b_offset = 0;
@@ -648,13 +647,16 @@
clen = STRIPE_SIZE - page_offset;
else clen = len;
- if (len > 0) {
+ if (clen > 0) {
+ char *ba = __bio_kmap(bio, i);
if (frombio)
memcpy(pa+page_offset, ba+b_offset, clen);
else
memcpy(ba+b_offset, pa+page_offset, clen);
- }
- __bio_kunmap(bio, i);
+ __bio_kunmap(bio, i);
+ }
+ if (clen < len) /* hit end of page */
+ break;
page_offset += len;
}
}
reply other threads:[~2002-06-19 0:50 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=15631.54596.562654.994996@notabene.cse.unsw.edu.au \
--to=neilb@cse.unsw.edu.au \
--cc=linux-raid@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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).