提交 ab17ffa4 编写于 作者: M Milan Broz 提交者: Linus Torvalds

[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: NMilan Broz <mbroz@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 aa129a22
......@@ -98,14 +98,25 @@ static int linear_status(struct dm_target *ti, status_type_t type,
return 0;
}
static int linear_ioctl(struct dm_target *ti, struct inode *inode,
struct file *filp, unsigned int cmd,
unsigned long arg)
{
struct linear_c *lc = (struct linear_c *) ti->private;
struct block_device *bdev = lc->dev->bdev;
return blkdev_ioctl(bdev->bd_inode, filp, cmd, arg);
}
static struct target_type linear_target = {
.name = "linear",
.version= {1, 0, 1},
.version= {1, 0, 2},
.module = THIS_MODULE,
.ctr = linear_ctr,
.dtr = linear_dtr,
.map = linear_map,
.status = linear_status,
.ioctl = linear_ioctl,
};
int __init dm_linear_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册