aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2006-10-03 04:15:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:04:13 -0400
commitaa129a2247b164173d45da8ad43cca5de9211403 (patch)
tree8adecb4d15d49b0a1fd4b459a24dff22a961d71c /include/linux/device-mapper.h
parent70abac6e4f4bfb05a8198e22225f9e066239c7a2 (diff)
[PATCH] dm: support ioctls on mapped devices
Extend the core device-mapper infrastructure to accept arbitrary ioctls on a mapped device provided that it has exactly one target and it is capable of supporting ioctls. [We can't use unlocked_ioctl because we need 'inode': 'file' might be NULL. Is it worth changing this?] Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Arnd Bergmann <arnd@arndb.de> wrote: > Am Wednesday 21 June 2006 21:31 schrieb Alasdair G Kergon: > > static struct block_device_operations dm_blk_dops = { > > .open = dm_blk_open, > > .release = dm_blk_close, > > +.ioctl = dm_blk_ioctl, > > .getgeo = dm_blk_getgeo, > > .owner = THIS_MODULE > > I guess this also needs a ->compat_ioctl method, otherwise it won't > work for ioctl numbers that have a compat_ioctl implementation in the > low-level device driver. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index e3d1c33d1558..d44a99650af3 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -64,6 +64,10 @@ typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
64 64
65typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv); 65typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
66 66
67typedef int (*dm_ioctl_fn) (struct dm_target *ti, struct inode *inode,
68 struct file *filp, unsigned int cmd,
69 unsigned long arg);
70
67void dm_error(const char *message); 71void dm_error(const char *message);
68 72
69/* 73/*
@@ -91,6 +95,7 @@ struct target_type {
91 dm_resume_fn resume; 95 dm_resume_fn resume;
92 dm_status_fn status; 96 dm_status_fn status;
93 dm_message_fn message; 97 dm_message_fn message;
98 dm_ioctl_fn ioctl;
94}; 99};
95 100
96struct io_restrictions { 101struct io_restrictions {