* PATCH - md 4 of 22 - Make raid5 work for big bios
@ 2002-06-19 0:50 Neil Brown
0 siblings, 0 replies; only message in thread
From: Neil Brown @ 2002-06-19 0:50 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-raid
----------- 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;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-19 0:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-19 0:50 PATCH - md 4 of 22 - Make raid5 work for big bios Neil Brown
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).