aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-12-08 16:03:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-08 16:03:02 -0500
commit7267212c80ce4c946940ec9de4900851d1170d76 (patch)
treef2b4f9b575badf8f43b8554d9c323f38829aca41 /drivers/md/raid1.c
parent78d9b048446c3c0a83313444fb706f8f3bccdae7 (diff)
parent18022a1bd3709b74ca31ef0b28fccd52bcd6c504 (diff)
Merge tag 'md/4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull md fixes from Shaohua Li: "Some MD fixes. The notable one is a raid5-cache deadlock bug with dm-raid, others are not significant" * tag 'md/4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid1/10: add missed blk plug md: limit mdstat resync progress to max_sectors md/r5cache: move mddev_lock() out of r5c_journal_mode_set() md/raid5: correct degraded calculation in raid5_error
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index cc9d337a1ed3..6df398e3a008 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -809,11 +809,15 @@ static void flush_pending_writes(struct r1conf *conf)
809 spin_lock_irq(&conf->device_lock); 809 spin_lock_irq(&conf->device_lock);
810 810
811 if (conf->pending_bio_list.head) { 811 if (conf->pending_bio_list.head) {
812 struct blk_plug plug;
812 struct bio *bio; 813 struct bio *bio;
814
813 bio = bio_list_get(&conf->pending_bio_list); 815 bio = bio_list_get(&conf->pending_bio_list);
814 conf->pending_count = 0; 816 conf->pending_count = 0;
815 spin_unlock_irq(&conf->device_lock); 817 spin_unlock_irq(&conf->device_lock);
818 blk_start_plug(&plug);
816 flush_bio_list(conf, bio); 819 flush_bio_list(conf, bio);
820 blk_finish_plug(&plug);
817 } else 821 } else
818 spin_unlock_irq(&conf->device_lock); 822 spin_unlock_irq(&conf->device_lock);
819} 823}