summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-16 18:55:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-16 18:55:48 -0400
commit311f71281ff4b24f86a39c60c959f485c68a6d36 (patch)
tree05983f559c3e7eb7fc2e0cdab5d14e2ecaf1bf5a /drivers/md/dm.c
parent7878c231dae05bae9dcf2ad4d309f02e51625033 (diff)
parent8454fca4f53bbe5e0a71613192674c8ce5c52318 (diff)
Merge tag 'for-5.2/dm-changes-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper updates from Mike Snitzer: - Improve DM snapshot target's scalability by using finer grained locking. Requires some list_bl interface improvements. - Add ability for DM integrity to use a bitmap mode, that tracks regions where data and metadata are out of sync, instead of using a journal. - Improve DM thin provisioning target to not write metadata changes to disk if the thin-pool and associated thin devices are merely activated but not used. This avoids metadata corruption due to concurrent activation of thin devices across different OS instances (e.g. split brain scenarios, which ultimately would be avoided if proper device filters were used -- but not having proper filtering has proven a very common configuration mistake) - Fix missing call to path selector type->end_io in DM multipath. This fixes reported performance problems due to inaccurate path selector IO accounting causing an imbalance of IO (e.g. avoiding issuing IO to particular path due to it seemingly being heavily used). - Fix bug in DM cache metadata's loading of its discard bitset that could lead to all cache blocks being discarded if the very first cache block was discarded (thankfully in practice the first cache block is generally in use; be it FS superblock, partition table, disk label, etc). - Add testing-only DM dust target which simulates a device that has failing sectors and/or read failures. - Fix a DM init error path reference count hang that caused boot hangs if user supplied malformed input on kernel commandline. - Fix a couple issues with DM crypt target's logging being overly verbose or lacking context. - Various other small fixes to DM init, DM multipath, DM zoned, and DM crypt. * tag 'for-5.2/dm-changes-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (42 commits) dm: fix a couple brace coding style issues dm crypt: print device name in integrity error message dm crypt: move detailed message into debug level dm ioctl: fix hang in early create error condition dm integrity: whitespace, coding style and dead code cleanup dm integrity: implement synchronous mode for reboot handling dm integrity: handle machine reboot in bitmap mode dm integrity: add a bitmap mode dm integrity: introduce a function add_new_range_and_wait() dm integrity: allow large ranges to be described dm ingerity: pass size to dm_integrity_alloc_page_list() dm integrity: introduce rw_journal_sectors() dm integrity: update documentation dm integrity: don't report unused options dm integrity: don't check null pointer before kvfree and vfree dm integrity: correctly calculate the size of metadata area dm dust: Make dm_dust_init and dm_dust_exit static dm dust: remove redundant unsigned comparison to less than zero dm mpath: always free attached_handler_name in parse_path() dm init: fix max devices/targets checks ...
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 043f0761e4a0..1fb1333fefec 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -781,7 +781,8 @@ static void close_table_device(struct table_device *td, struct mapped_device *md
781} 781}
782 782
783static struct table_device *find_table_device(struct list_head *l, dev_t dev, 783static struct table_device *find_table_device(struct list_head *l, dev_t dev,
784 fmode_t mode) { 784 fmode_t mode)
785{
785 struct table_device *td; 786 struct table_device *td;
786 787
787 list_for_each_entry(td, l, list) 788 list_for_each_entry(td, l, list)
@@ -792,7 +793,8 @@ static struct table_device *find_table_device(struct list_head *l, dev_t dev,
792} 793}
793 794
794int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode, 795int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode,
795 struct dm_dev **result) { 796 struct dm_dev **result)
797{
796 int r; 798 int r;
797 struct table_device *td; 799 struct table_device *td;
798 800
@@ -1906,7 +1908,6 @@ static void cleanup_mapped_device(struct mapped_device *md)
1906static struct mapped_device *alloc_dev(int minor) 1908static struct mapped_device *alloc_dev(int minor)
1907{ 1909{
1908 int r, numa_node_id = dm_get_numa_node(); 1910 int r, numa_node_id = dm_get_numa_node();
1909 struct dax_device *dax_dev = NULL;
1910 struct mapped_device *md; 1911 struct mapped_device *md;
1911 void *old_md; 1912 void *old_md;
1912 1913
@@ -1969,11 +1970,10 @@ static struct mapped_device *alloc_dev(int minor)
1969 sprintf(md->disk->disk_name, "dm-%d", minor); 1970 sprintf(md->disk->disk_name, "dm-%d", minor);
1970 1971
1971 if (IS_ENABLED(CONFIG_DAX_DRIVER)) { 1972 if (IS_ENABLED(CONFIG_DAX_DRIVER)) {
1972 dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops); 1973 md->dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops);
1973 if (!dax_dev) 1974 if (!md->dax_dev)
1974 goto bad; 1975 goto bad;
1975 } 1976 }
1976 md->dax_dev = dax_dev;
1977 1977
1978 add_disk_no_queue_reg(md->disk); 1978 add_disk_no_queue_reg(md->disk);
1979 format_dev_t(md->name, MKDEV(_major, minor)); 1979 format_dev_t(md->name, MKDEV(_major, minor));