lkml.org 
[lkml]   [2006]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/15] dm: support ioctls on mapped devices
On Thu, Jun 22, 2006 at 01:29:57AM -0700, Andrew Morton wrote:
> OK. I do think dm needs to remember /dev/sda's file* to get this right
> though. That's where the ->ioctl methods are.

> Oh dear. raw_open() doesn't have a file* for the device.

Similar with device-mapper: in normal usage dm only sees major:minor.

Yes, the filp dm passes along is incorrect:

- return blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk, cmd, arg);
+ return blkdev_driver_ioctl(bdev->bd_inode, NULL, bdev->bd_disk, cmd, arg);

But should unlocked_ioctl become ?

- long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
+ long (*unlocked_ioctl) (struct inode *, struct file *, unsigned, unsigned long);

so it can be used for block devices?

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?

Alasdair
--
agk@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-22 17:20    [W:0.076 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site