diff options
author | Shaohua Li <shli@fb.com> | 2017-12-01 21:12:34 +0100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-12-01 21:19:48 +0100 |
commit | 18022a1bd3709b74ca31ef0b28fccd52bcd6c504 (patch) | |
tree | e3d3fe238bd4397f503adca6dac7688e8feb933e /drivers/md/raid1.c | |
parent | md: limit mdstat resync progress to max_sectors (diff) | |
download | linux-18022a1bd3709b74ca31ef0b28fccd52bcd6c504.tar.xz linux-18022a1bd3709b74ca31ef0b28fccd52bcd6c504.zip |
md/raid1/10: add missed blk plug
flush_pending_writes isn't always called with block plug, so add it, and plug
works in nested way.
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 4 |
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) spin_lock_irq(&conf->device_lock); if (conf->pending_bio_list.head) { + struct blk_plug plug; struct bio *bio; + bio = bio_list_get(&conf->pending_bio_list); conf->pending_count = 0; spin_unlock_irq(&conf->device_lock); + blk_start_plug(&plug); flush_bio_list(conf, bio); + blk_finish_plug(&plug); } else spin_unlock_irq(&conf->device_lock); } |