The patch titled dm: export blkdev_driver_ioctl has been added to the -mm tree. Its filename is dm-export-blkdev_driver_ioctl.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: dm: export blkdev_driver_ioctl From: Alasdair G Kergon <agk@xxxxxxxxxx> Export blkdev_driver_ioctl for device-mapper. If we get as far as the device-mapper ioctl handler, we know the ioctl is not a standard block layer BLK* one, so we don't need to check for them a second time and can call blkdev_driver_ioctl() directly. Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- block/ioctl.c | 5 +++-- drivers/md/dm-linear.c | 2 +- drivers/md/dm-mpath.c | 3 ++- include/linux/fs.h | 3 +++ 4 files changed, 9 insertions(+), 4 deletions(-) diff -puN block/ioctl.c~dm-export-blkdev_driver_ioctl block/ioctl.c --- a/block/ioctl.c~dm-export-blkdev_driver_ioctl +++ a/block/ioctl.c @@ -199,8 +199,8 @@ static int blkdev_locked_ioctl(struct fi return -ENOIOCTLCMD; } -static int blkdev_driver_ioctl(struct inode *inode, struct file *file, - struct gendisk *disk, unsigned cmd, unsigned long arg) +int blkdev_driver_ioctl(struct inode *inode, struct file *file, + struct gendisk *disk, unsigned cmd, unsigned long arg) { int ret; if (disk->fops->unlocked_ioctl) @@ -215,6 +215,7 @@ static int blkdev_driver_ioctl(struct in return -ENOTTY; } +EXPORT_SYMBOL_GPL(blkdev_driver_ioctl); int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg) diff -puN drivers/md/dm-linear.c~dm-export-blkdev_driver_ioctl drivers/md/dm-linear.c --- a/drivers/md/dm-linear.c~dm-export-blkdev_driver_ioctl +++ a/drivers/md/dm-linear.c @@ -103,7 +103,7 @@ static int linear_ioctl(struct dm_target 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); + return blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk, cmd, arg); } static struct target_type linear_target = { diff -puN drivers/md/dm-mpath.c~dm-export-blkdev_driver_ioctl drivers/md/dm-mpath.c --- a/drivers/md/dm-mpath.c~dm-export-blkdev_driver_ioctl +++ a/drivers/md/dm-mpath.c @@ -1290,7 +1290,8 @@ static int multipath_ioctl(struct dm_tar spin_unlock_irqrestore(&m->lock, flags); - return r ? : blkdev_ioctl(bdev->bd_inode, filp, cmd, arg); + return r ? : blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk, + cmd, arg); } /*----------------------------------------------------------------- diff -puN include/linux/fs.h~dm-export-blkdev_driver_ioctl include/linux/fs.h --- a/include/linux/fs.h~dm-export-blkdev_driver_ioctl +++ a/include/linux/fs.h @@ -1465,6 +1465,9 @@ extern const struct file_operations bad_ extern const struct file_operations def_fifo_fops; extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); +extern int blkdev_driver_ioctl(struct inode *inode, struct file *file, + struct gendisk *disk, unsigned cmd, + unsigned long arg); extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); extern int blkdev_get(struct block_device *, mode_t, unsigned); extern int blkdev_put(struct block_device *); _ Patches currently in -mm which might be from agk@xxxxxxxxxx are git-hdrinstall2.patch dm-snapshot-unify-chunk_size.patch lib-add-idr_replace.patch lib-add-idr_replace-tidy.patch dm-fix-idr-minor-allocation.patch dm-move-idr_pre_get.patch dm-change-minor_lock-to-spinlock.patch dm-add-dmf_freeing.patch dm-fix-mapped-device-ref-counting.patch dm-add-module-ref-counting.patch dm-fix-block-device-initialisation.patch dm-mirror-sector-offset-fix.patch dm-table-get_target-fix-last-index.patch dm-support-ioctls-on-mapped-devices.patch dm-linear-support-ioctls.patch dm-mpath-support-ioctls.patch dm-export-blkdev_driver_ioctl.patch dm-mirror-log-sector-size-fix.patch dm-mirror-log-refactor-context.patch dm-mirror-log-bitset_size-fix.patch dm-mirror-log-sync_count-fix.patch dm-kcopyd-error-accumulation-fix.patch dm-table-split_args-handle-no-input.patch dm-consolidate-creation-functions.patch dm-add-exports.patch dm-create-error-table.patch dm-prevent-removal-if-open.patch dm-improve-error-message-consistency.patch md-dm-reduce-stack-usage-with-stacked-block-devices.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html