aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-09 20:40:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-09 20:40:27 -0500
commit6cdc577a18a616c331f57e268c97466171cfc45f (patch)
tree95fba928918a06b32ed59efb2de7e8ba1513e78b /include
parent92fff53b7191cae566be9ca6752069426c7f8241 (diff)
parent225557446856448039a9e495da37b72c20071ef2 (diff)
Merge tag 'for-5.1/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper updates from Mike Snitzer: - Update bio-based DM core to always call blk_queue_split() and update DM targets to properly advertise discard limits that blk_queue_split() looks at when dtermining to split discard. Whereby allowing DM core's own 'split_discard_bios' to be removed. - Improve DM cache target to provide support for discard passdown to the origin device. - Introduce support to directly boot to a DM mapped device from init by using dm-mod.create= module param. This eliminates the need for an elaborate initramfs that is otherwise needed to create DM devices. This feature's implementation has been worked on for quite some time (got up to v12) and is of particular interest to Android and other more embedded platforms (e.g. ARM). - Rate limit errors from the DM integrity target that were identified as the cause for recent NMI hangs due to console limitations. - Add sanity checks for user input to thin-pool and external snapshot creation. - Remove some unused leftover kmem caches from when old .request_fn request-based support was removed. - Various small cleanups and fixes to targets (e.g. typos, needless unlikely() annotations, use struct_size(), remove needless .direct_access method from dm-snapshot) * tag 'for-5.1/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm integrity: limit the rate of error messages dm snapshot: don't define direct_access if we don't support it dm cache: add support for discard passdown to the origin device dm writecache: fix typo in name for writeback_wq dm: add support to directly boot to a mapped device dm thin: add sanity checks to thin-pool and external snapshot creation dm block manager: remove redundant unlikely annotation dm verity fec: remove redundant unlikely annotation dm integrity: remove redundant unlikely annotation dm: always call blk_queue_split() in dm_process_bio() dm: fix to_sector() for 32bit dm switch: use struct_size() in kzalloc() dm: remove unused _rq_tio_cache and _rq_cache dm: eliminate 'split_discard_bios' flag from DM target interface dm: update dm_process_bio() to split bio if in ->make_request_fn()
Diffstat (limited to 'include')
-rw-r--r--include/linux/device-mapper.h17
-rw-r--r--include/uapi/linux/dm-ioctl.h4
2 files changed, 12 insertions, 9 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index e528baebad69..b0672756d056 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -10,6 +10,7 @@
10 10
11#include <linux/bio.h> 11#include <linux/bio.h>
12#include <linux/blkdev.h> 12#include <linux/blkdev.h>
13#include <linux/dm-ioctl.h>
13#include <linux/math64.h> 14#include <linux/math64.h>
14#include <linux/ratelimit.h> 15#include <linux/ratelimit.h>
15 16
@@ -315,12 +316,6 @@ struct dm_target {
315 * whether or not its underlying devices have support. 316 * whether or not its underlying devices have support.
316 */ 317 */
317 bool discards_supported:1; 318 bool discards_supported:1;
318
319 /*
320 * Set if the target required discard bios to be split
321 * on max_io_len boundary.
322 */
323 bool split_discard_bios:1;
324}; 319};
325 320
326/* Each target can link one of these into the table */ 321/* Each target can link one of these into the table */
@@ -431,6 +426,14 @@ void dm_remap_zone_report(struct dm_target *ti, sector_t start,
431 struct blk_zone *zones, unsigned int *nr_zones); 426 struct blk_zone *zones, unsigned int *nr_zones);
432union map_info *dm_get_rq_mapinfo(struct request *rq); 427union map_info *dm_get_rq_mapinfo(struct request *rq);
433 428
429/*
430 * Device mapper functions to parse and create devices specified by the
431 * parameter "dm-mod.create="
432 */
433int __init dm_early_create(struct dm_ioctl *dmi,
434 struct dm_target_spec **spec_array,
435 char **target_params_array);
436
434struct queue_limits *dm_get_queue_limits(struct mapped_device *md); 437struct queue_limits *dm_get_queue_limits(struct mapped_device *md);
435 438
436/* 439/*
@@ -609,7 +612,7 @@ do { \
609 */ 612 */
610#define dm_target_offset(ti, sector) ((sector) - (ti)->begin) 613#define dm_target_offset(ti, sector) ((sector) - (ti)->begin)
611 614
612static inline sector_t to_sector(unsigned long n) 615static inline sector_t to_sector(unsigned long long n)
613{ 616{
614 return (n >> SECTOR_SHIFT); 617 return (n >> SECTOR_SHIFT);
615} 618}
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h
index d1e49514977b..f396a82dfd3e 100644
--- a/include/uapi/linux/dm-ioctl.h
+++ b/include/uapi/linux/dm-ioctl.h
@@ -270,9 +270,9 @@ enum {
270#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) 270#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
271 271
272#define DM_VERSION_MAJOR 4 272#define DM_VERSION_MAJOR 4
273#define DM_VERSION_MINOR 39 273#define DM_VERSION_MINOR 40
274#define DM_VERSION_PATCHLEVEL 0 274#define DM_VERSION_PATCHLEVEL 0
275#define DM_VERSION_EXTRA "-ioctl (2018-04-03)" 275#define DM_VERSION_EXTRA "-ioctl (2019-01-18)"
276 276
277/* Status bits */ 277/* Status bits */
278#define DM_READONLY_FLAG (1 << 0) /* In/Out */ 278#define DM_READONLY_FLAG (1 << 0) /* In/Out */