diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-09 11:23:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-09 11:23:27 -0700 |
commit | 63b106a87dd84283e21aa2ce476732633eaab11d (patch) | |
tree | 10e87643b123bf513f76cada670f55f9f341b5ce /drivers/md/md.c | |
parent | 40bca9dbab4dd6d5a78beccdbbb1c7218136b562 (diff) | |
parent | f9a67b1182e5abfcfcec24762ea95a77332f035e (diff) | |
download | blackbird-op-linux-63b106a87dd84283e21aa2ce476732633eaab11d.tar.gz blackbird-op-linux-63b106a87dd84283e21aa2ce476732633eaab11d.zip |
Merge tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull MD fixes from Shaohua Li:
"This update mainly fixes bugs:
- fix error handling (Guoqing)
- fix a crash when a disk is hotremoved (me)
- fix a dead loop (Wei Fang)"
* tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
md/bitmap: clear bitmap if bitmap_create failed
MD: add rdev reference for super write
md: fix a trivial typo in comments
md:raid1: fix a dead loop when read from a WriteMostly disk
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index c068f171b4eb..194580fba7fd 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -718,6 +718,7 @@ static void super_written(struct bio *bio) if (atomic_dec_and_test(&mddev->pending_writes)) wake_up(&mddev->sb_wait); + rdev_dec_pending(rdev, mddev); bio_put(bio); } @@ -732,6 +733,8 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev, */ struct bio *bio = bio_alloc_mddev(GFP_NOIO, 1, mddev); + atomic_inc(&rdev->nr_pending); + bio->bi_bdev = rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev; bio->bi_iter.bi_sector = sector; bio_add_page(bio, page, size, 0); @@ -6883,7 +6886,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, case ADD_NEW_DISK: /* We can support ADD_NEW_DISK on read-only arrays - * on if we are re-adding a preexisting device. + * only if we are re-adding a preexisting device. * So require mddev->pers and MD_DISK_SYNC. */ if (mddev->pers) { |