diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-05-22 15:10:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-05-22 15:10:07 -0700 |
commit | a30ec4b347192f65e811b0b165ef08fa1ba379c4 (patch) | |
tree | b88a842c819c2e232bb76591f8d0f0096541d32f /drivers/md/raid0.c | |
parent | 1d82b0baf9abd59ae6f53f3102f4e442043763a4 (diff) | |
parent | 8532e3439087de69bb1b71fd6be2baa6fc196a55 (diff) | |
download | linux-a30ec4b347192f65e811b0b165ef08fa1ba379c4.tar.gz linux-a30ec4b347192f65e811b0b165ef08fa1ba379c4.tar.bz2 linux-a30ec4b347192f65e811b0b165ef08fa1ba379c4.zip |
Merge tag 'md/4.1-rc4-fixes' of git://neil.brown.name/md
Pull md bugfixes from Neil Brown:
"I have a few more raid5 bugfixes pending, but I want them to get a bit
more review first. In the meantime:
- one serious RAID0 data corruption - caused by recent bugfix that
wasn't reviewed properly.
- one raid5 fix in new code (a couple more of those to come).
- one little fix to stop static analysis complaining about silly rcu
annotation"
* tag 'md/4.1-rc4-fixes' of git://neil.brown.name/md:
md/bitmap: remove rcu annotation from pointer arithmetic.
md/raid0: fix restore to sector variable in raid0_make_request
raid5: fix broken async operation chain
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 6a68ef5246d4..efb654eb5399 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -524,6 +524,9 @@ static void raid0_make_request(struct mddev *mddev, struct bio *bio) ? (sector & (chunk_sects-1)) : sector_div(sector, chunk_sects)); + /* Restore due to sector_div */ + sector = bio->bi_iter.bi_sector; + if (sectors < bio_sectors(bio)) { split = bio_split(bio, sectors, GFP_NOIO, fs_bio_set); bio_chain(split, bio); @@ -531,7 +534,6 @@ static void raid0_make_request(struct mddev *mddev, struct bio *bio) split = bio; } - sector = bio->bi_iter.bi_sector; zone = find_zone(mddev->private, §or); tmp_dev = map_sector(mddev, zone, sector, §or); split->bi_bdev = tmp_dev->bdev; |