Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull md updates from Shaohua Li: "Mainly fixes bugs and improves performance: - Improve scalability for raid1 from Coly - Improve raid5-cache read performance, disk efficiency and IO pattern from Song and me - Fix a race condition of disk hotplug for linear from Coly - A few cleanup patches from Ming and Byungchul - Fix a memory leak from Neil - Fix WRITE SAME IO failure from me - Add doc for raid5-cache from me" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: (23 commits) md/raid1: fix write behind issues introduced by bio_clone_bioset_partial md/raid1: handle flush request correctly md/linear: shutup lockdep warnning md/raid1: fix a use-after-free bug RAID1: avoid unnecessary spin locks in I/O barrier code RAID1: a new I/O barrier implementation to remove resync window md/raid5: Don't reinvent the wheel but use existing llist API md: fast clone bio in bio_clone_mddev() md: remove unnecessary check on mddev md/raid1: use bio_clone_bioset_partial() in case of write behind md: fail if mddev->bio_set can't be created block: introduce bio_clone_bioset_partial() md: disable WRITE SAME if it fails in underlayer disks md/raid5-cache: exclude reclaiming stripes in reclaim check md/raid5-cache: stripe reclaim only counts valid stripes MD: add doc for raid5-cache Documentation: move MD related doc into a separate dir md: ensure md devices are freed before module is unloaded. md/r5cache: improve journal device efficiency md/r5cache: enable chunk_aligned_read with write back cache ...
This commit is contained in:
@@ -190,16 +190,6 @@ struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bio_alloc_mddev);
|
||||
|
||||
struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask,
|
||||
struct mddev *mddev)
|
||||
{
|
||||
if (!mddev || !mddev->bio_set)
|
||||
return bio_clone(bio, gfp_mask);
|
||||
|
||||
return bio_clone_bioset(bio, gfp_mask, mddev->bio_set);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bio_clone_mddev);
|
||||
|
||||
/*
|
||||
* We have a system wide 'event count' that is incremented
|
||||
* on any 'interesting' event, and readers of /proc/mdstat
|
||||
@@ -5228,8 +5218,11 @@ int md_run(struct mddev *mddev)
|
||||
sysfs_notify_dirent_safe(rdev->sysfs_state);
|
||||
}
|
||||
|
||||
if (mddev->bio_set == NULL)
|
||||
if (mddev->bio_set == NULL) {
|
||||
mddev->bio_set = bioset_create(BIO_POOL_SIZE, 0);
|
||||
if (!mddev->bio_set)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
spin_lock(&pers_lock);
|
||||
pers = find_pers(mddev->level, mddev->clevel);
|
||||
@@ -8980,7 +8973,14 @@ static __exit void md_exit(void)
|
||||
|
||||
for_each_mddev(mddev, tmp) {
|
||||
export_array(mddev);
|
||||
mddev->ctime = 0;
|
||||
mddev->hold_active = 0;
|
||||
/*
|
||||
* for_each_mddev() will call mddev_put() at the end of each
|
||||
* iteration. As the mddev is now fully clear, this will
|
||||
* schedule the mddev for destruction by a workqueue, and the
|
||||
* destroy_workqueue() below will wait for that to complete.
|
||||
*/
|
||||
}
|
||||
destroy_workqueue(md_misc_wq);
|
||||
destroy_workqueue(md_wq);
|
||||
|
Reference in New Issue
Block a user