Merge branch 'md-next' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.7/drivers

Pull MD fixes from Song.

* 'md-next' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/song/md:
  block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices
  md: check arrays is suspended in mddev_detach before call quiesce operations
This commit is contained in:
Jens Axboe 2020-03-17 15:15:34 -06:00
commit fcc43a5156
2 changed files with 4 additions and 1 deletions

View File

@ -664,6 +664,9 @@ void disk_stack_limits(struct gendisk *disk, struct block_device *bdev,
printk(KERN_NOTICE "%s: Warning: Device %s is misaligned\n",
top, bottom);
}
t->backing_dev_info->io_pages =
t->limits.max_sectors >> (PAGE_SHIFT - 9);
}
EXPORT_SYMBOL(disk_stack_limits);

View File

@ -6184,7 +6184,7 @@ EXPORT_SYMBOL_GPL(md_stop_writes);
static void mddev_detach(struct mddev *mddev)
{
md_bitmap_wait_behind_writes(mddev);
if (mddev->pers && mddev->pers->quiesce) {
if (mddev->pers && mddev->pers->quiesce && !mddev->suspended) {
mddev->pers->quiesce(mddev, 1);
mddev->pers->quiesce(mddev, 0);
}