On Wed, 21 Jun 2006 20:33:08 +0100
Alasdair G Kergon <[email protected]> wrote:
> From: Milan Broz <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Alasdair G Kergon <[email protected]>
>
> Index: linux-2.6.17/drivers/md/dm-linear.c
> ===================================================================
> --- linux-2.6.17.orig/drivers/md/dm-linear.c 2006-06-21 17:45:16.000000000 +0100
> +++ linux-2.6.17/drivers/md/dm-linear.c 2006-06-21 18:32:07.000000000 +0100
> @@ -96,14 +96,25 @@ static int linear_status(struct dm_targe
> 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);
> +}
but, but.. the blockdev's driver may have decided to use a different ioctl
handler.
We should go through file_operations.ioctl/unlocked_ioctl.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]