Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127719
b: refs/heads/master
c: a471200
h: refs/heads/master
i:
  127717: 00c2eba
  127715: a68c519
  127711: a18e85e
v: v3
  • Loading branch information
Andre Noll authored and NeilBrown committed Jan 8, 2009
1 parent 3d7833f commit 5b51249
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b7fdf8ff7c0e3fba9c679def4e98d5701d2949e
refs/heads/master: a471200595b24fb1907ad12107a6a66db02c63f2
7 changes: 3 additions & 4 deletions trunk/drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static int raid0_stop (mddev_t *mddev)
static int raid0_make_request (struct request_queue *q, struct bio *bio)
{
mddev_t *mddev = q->queuedata;
unsigned int sect_in_chunk, chunksect_bits, chunk_size, chunk_sects;
unsigned int sect_in_chunk, chunksect_bits, chunk_sects;
raid0_conf_t *conf = mddev_to_conf(mddev);
struct strip_zone *zone;
mdk_rdev_t *tmp_dev;
Expand All @@ -407,7 +407,6 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
bio_sectors(bio));
part_stat_unlock();

chunk_size = mddev->chunk_size >> 10;
chunk_sects = mddev->chunk_size >> 9;
chunksect_bits = ffz(~chunk_sects);
block = bio->bi_sector >> 1;
Expand Down Expand Up @@ -442,7 +441,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
while (block >= (zone->zone_offset + zone->size))
zone++;

sect_in_chunk = bio->bi_sector & ((chunk_size<<1) -1);
sect_in_chunk = bio->bi_sector & (chunk_sects - 1);


{
Expand All @@ -467,7 +466,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)

bad_map:
printk("raid0_make_request bug: can't convert block across chunks"
" or bigger than %dk %llu %d\n", chunk_size,
" or bigger than %dk %llu %d\n", chunk_sects / 2,
(unsigned long long)bio->bi_sector, bio->bi_size >> 10);

bio_io_error(bio);
Expand Down

0 comments on commit 5b51249

Please sign in to comment.