Re: [PATCH 01/15] dm: support ioctls on mapped devices

From: Kevin Corry
Date: Thu Jun 22 2006 - 23:31:58 EST


On Thu June 22 2006 11:55 am, Andrew Morton wrote:
> On Thu, 22 Jun 2006 16:17:21 +0100 Alasdair G Kergon <agk@xxxxxxxxxx> wrote:
> > On Thu, Jun 22, 2006 at 01:29:57AM -0700, Andrew Morton wrote:
> > See also block/scsi_ioctl.c:201 verify_command() [scsi_cmd_ioctl]
> > * file can be NULL from ioctl_by_bdev()...
> >
> > Or should we be working towards eliminating interfaces that use device
> > numbers?
>
> If possible. I guess that would require DM to track the devices with
> file*'s or inode*'s or bdev*'s. Which, I assume, would be non-trivial.

There already is a bdev pointer available. Each "consumed" device get a struct
dm_dev, which has a *bdev field. From the bdev, it looks like we should be
able to get to the gendisk, then the block_device_operations, and then the
ioctl routine (if it exists). Correct?

--
Kevin Corry
kevcorry@xxxxxxxxxx
http://www.ibm.com/linux/
http://evms.sourceforge.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/