On Wed, 6 Dec 2006, James Bottomley wrote: > On Wed, 2006-12-06 at 13:58 -0500, Alan Stern wrote: > > I'd love to do that -- but blkdev_ioctl() wants inode->i_bdev to be set, > > and blkdev_locked_ioctl() uses it as the argument to bdev_get_queue(). So > > it won't work with sg, which uses character device nodes. > > Well, even sg has the queue ... and what we're looking for are the queue > parameters. In block/ioctl.c the bdev is just used for getting the > queue parameters (mainly via bdev->bd_disk->queue), That's true for several of the ioctls but not all of them. > so I could see if > Jens might be amenable to refactoring the queue ioctls so we can get at > them simply with a struct request_queue parameter. That would be fine with me. Could you go ahead and ask Jens? > > How about adding BLKSECTGET to the list of commands accepted by > > sg_ioctl()? > > That's certainly a possible hack ... although I'd prefer to see the full > queue ioctls exposed. I agree; it's better to keep things in one place rather than to duplicate them. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html