aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-linear.c
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2006-10-03 04:15:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:04:13 -0400
commitab17ffa440cb54ca64111fa4922ba12496fcc8af (patch)
treeeda3d4c68dc6790374988772bda5fd9ba6d87651 /drivers/md/dm-linear.c
parentaa129a2247b164173d45da8ad43cca5de9211403 (diff)
[PATCH] dm linear: support ioctls
When an ioctl is performed on a device with a linear target, simply pass it on to the underlying block device. Note that the ioctl will pass through the filtering in blkdev_ioctl() twice. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r--drivers/md/dm-linear.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 47b3c62bbdb8..c58f072ccae6 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -98,14 +98,25 @@ static int linear_status(struct dm_target *ti, status_type_t type,
98 return 0; 98 return 0;
99} 99}
100 100
101static int linear_ioctl(struct dm_target *ti, struct inode *inode,
102 struct file *filp, unsigned int cmd,
103 unsigned long arg)
104{
105 struct linear_c *lc = (struct linear_c *) ti->private;
106 struct block_device *bdev = lc->dev->bdev;
107
108 return blkdev_ioctl(bdev->bd_inode, filp, cmd, arg);
109}
110
101static struct target_type linear_target = { 111static struct target_type linear_target = {
102 .name = "linear", 112 .name = "linear",
103 .version= {1, 0, 1}, 113 .version= {1, 0, 2},
104 .module = THIS_MODULE, 114 .module = THIS_MODULE,
105 .ctr = linear_ctr, 115 .ctr = linear_ctr,
106 .dtr = linear_dtr, 116 .dtr = linear_dtr,
107 .map = linear_map, 117 .map = linear_map,
108 .status = linear_status, 118 .status = linear_status,
119 .ioctl = linear_ioctl,
109}; 120};
110 121
111int __init dm_linear_init(void) 122int __init dm_linear_init(void)