diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 0505452de8d6..23a38afec351 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -502,11 +502,11 @@ static inline int is_io_in_chunk_boundary(struct mddev *mddev, | |||
502 | { | 502 | { |
503 | if (likely(is_power_of_2(chunk_sects))) { | 503 | if (likely(is_power_of_2(chunk_sects))) { |
504 | return chunk_sects >= ((bio->bi_sector & (chunk_sects-1)) | 504 | return chunk_sects >= ((bio->bi_sector & (chunk_sects-1)) |
505 | + (bio->bi_size >> 9)); | 505 | + bio_sectors(bio)); |
506 | } else{ | 506 | } else{ |
507 | sector_t sector = bio->bi_sector; | 507 | sector_t sector = bio->bi_sector; |
508 | return chunk_sects >= (sector_div(sector, chunk_sects) | 508 | return chunk_sects >= (sector_div(sector, chunk_sects) |
509 | + (bio->bi_size >> 9)); | 509 | + bio_sectors(bio)); |
510 | } | 510 | } |
511 | } | 511 | } |
512 | 512 | ||
@@ -567,7 +567,7 @@ bad_map: | |||
567 | printk("md/raid0:%s: make_request bug: can't convert block across chunks" | 567 | printk("md/raid0:%s: make_request bug: can't convert block across chunks" |
568 | " or bigger than %dk %llu %d\n", | 568 | " or bigger than %dk %llu %d\n", |
569 | mdname(mddev), chunk_sects / 2, | 569 | mdname(mddev), chunk_sects / 2, |
570 | (unsigned long long)bio->bi_sector, bio->bi_size >> 10); | 570 | (unsigned long long)bio->bi_sector, bio_sectors(bio) / 2); |
571 | 571 | ||
572 | bio_io_error(bio); | 572 | bio_io_error(bio); |
573 | return; | 573 | return; |