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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 22 Jun 2006 22:31:16 -0500
Kevin Corry <[email protected]> wrote:

> On Thu June 22 2006 11:55 am, Andrew Morton wrote:
> > On Thu, 22 Jun 2006 16:17:21 +0100 Alasdair G Kergon <[email protected]> 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?
> 

My head is spinning in a twisty maze of ioctls.  What _should_ we call? 
file_operations.foo_ioctl() or block_device_operations.foo_ioctl() or
blkdev_ioctl()?

I think as far as the user is concerned, file_operations.foo_ioctl(),
because that's what the user would end up calling against /dev/sda. 
Whether that's always, reliably, equivalent to
block_device_operations.foo_ioctl() I am presently disinclined to spare
time to discover.
-
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]
  Powered by Linux