summaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-10-15 08:10:50 -0400
committerMike Snitzer <snitzer@redhat.com>2015-10-31 19:05:59 -0400
commite56f81e0b01ef4e45292d8c1e19edd4d09724e14 (patch)
tree68b1faed3589d00b7a473ce856532e321f9e4908 /include/linux/device-mapper.h
parent47796938c46b943d157ac8a6f9ed4e3b98b83cf4 (diff)
dm: refactor ioctl handling
This moves the call to blkdev_ioctl and the argument checking to DM core code, and only leaves a callout to find the block device to operate on in the targets. This simplifies the code and allows us to pass through ioctl-like command using other methods in the next patch. Also split out a helper around calling the prepare_ioctl method that will be reused for persistent reservation handling. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 76d23fa8c7d3..ec1c61c87d89 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -79,8 +79,8 @@ typedef void (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
79 79
80typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv); 80typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
81 81
82typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd, 82typedef int (*dm_prepare_ioctl_fn) (struct dm_target *ti,
83 unsigned long arg); 83 struct block_device **bdev, fmode_t *mode);
84 84
85/* 85/*
86 * These iteration functions are typically used to check (and combine) 86 * These iteration functions are typically used to check (and combine)
@@ -156,7 +156,7 @@ struct target_type {
156 dm_resume_fn resume; 156 dm_resume_fn resume;
157 dm_status_fn status; 157 dm_status_fn status;
158 dm_message_fn message; 158 dm_message_fn message;
159 dm_ioctl_fn ioctl; 159 dm_prepare_ioctl_fn prepare_ioctl;
160 dm_busy_fn busy; 160 dm_busy_fn busy;
161 dm_iterate_devices_fn iterate_devices; 161 dm_iterate_devices_fn iterate_devices;
162 dm_io_hints_fn io_hints; 162 dm_io_hints_fn io_hints;