nvme: Remove SCSI translations
PATCH 1/1 nvme: Remove SCSI translations
The SCSI-to-NVMe translations were added to assist storage applications utilizing SG_IO transitioning to NVMe. It was always recommended, however, to use native NVMe for device management: too much is lost in translation and the maintenance burden in keeping this kludgey layer around has been neglected such that much of the translations are completely broken.
This patch removes SG_IO handling from NVMe. The config option has been disabled by default for quite some time now, so hopefully it's safe to remove. If not, this will force people to do the right thing.
--- drivers/nvme/host/Kconfig | 12 - drivers/nvme/host/core.c | 11 - drivers/nvme/host/scsi.c | 2460 --------------------------------------------- 3 files changed, 2483 deletions(-) delete mode 100644 drivers/nvme/host/scsi.c
drivers/nvme/host/Kconfig +0 -12
@@ -13,18 +13,6 @@ config BLK_DEV_NVME To compile this driver as a module, choose M here: the module will be called nvme. -config BLK_DEV_NVME_SCSI - bool "SCSI emulation for NVMe device nodes" - depends on NVME_CORE - ---help--- - This adds support for the SG_IO ioctl on the NVMe character - and block devices nodes, as well as a translation for a small - number of selected SCSI commands to NVMe commands to the NVMe - driver. If you don't know what this means you probably want - to say N here, unless you run a distro that abuses the SCSI - emulation to provide stable device names for mount by id, like - some OpenSuSE and SLES versions. - config NVME_FABRICS tristate
drivers/nvme/host/core.c +0 -11
@@ -27,7 +27,6 @@#include <linux/nvme_ioctl.h> #include <linux/t10-pi.h> #include <linux/pm_qos.h> -#include <scsi/sg.h> #include <asm/unaligned.h> #include "nvme.h"
@@ -936,12 +935,6 @@ static int nvme_ioctl(struct block_device *bdev, fmode_t mode,return nvme_user_cmd (ns->ctrl, ns, (void __user *)arg);case NVME_IOCTL_SUBMIT_IO :return nvme_submit_io (ns, (void __user *)arg); -#ifdef CONFIG_BLK_DEV_NVME_SCSI -case SG_GET_VERSION_NUM : -return nvme_sg_get_version_num ((void __user *)arg); -case SG_IO : -return nvme_sg_io (ns, (void __user *)arg); -#endif default :#ifdef CONFIG_NVM if (ns->ndev)
@@ -958,10 +951,6 @@ static int nvme_ioctl(struct block_device *bdev, fmode_t mode,static int nvme_compat_ioctl (struct block_device *bdev,fmode_t mode,unsigned int cmd,unsigned long arg) { -switch (cmd) { -case SG_IO : -return -ENOIOCTLCMD ; - }return nvme_ioctl (bdev, mode, cmd, arg); }#else
drivers/nvme/host/scsi.c deleted +0 -2460
2,460 lines not on this page · raw message
Signature · 1 line
2.5.5
Jens Axboe
maintainerPATCH 1/1 nvme: Remove SCSI translations
Quoted 11 lines · Keith Busch
The SCSI-to-NVMe translations were added to assist storage applications utilizing
SG_IOtransitioning to NVMe. It was always recommended, however, to use native NVMe for device management: too much is lost in translation and the maintenance burden in keeping this kludgey layer around has been neglected such that much of the translations are completely broken.This patch removes
SG_IOhandling from NVMe. The config option has been disabled by default for quite some time now, so hopefully it's safe to remove. If not, this will force people to do the right thing.Signed-off-by Keith Busch <keith.busch at intel.com>
Signature · 1 line
Jens Axboe
PATCH 1/1 nvme: Remove SCSI translations
In reply to Keith BuschKeith,
Quoted 10 lines
The SCSI-to-NVMe translations were added to assist storage applications utilizing
SG_IOtransitioning to NVMe. It was always recommended, however, to use native NVMe for device management: too much is lost in translation and the maintenance burden in keeping this kludgey layer around has been neglected such that much of the translations are completely broken.This patch removes
SG_IOhandling from NVMe. The config option has been disabled by default for quite some time now, so hopefully it's safe to remove. If not, this will force people to do the right thing.
Good riddance!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Christoph Hellwig
maintainerPATCH 1/1 nvme: Remove SCSI translations
In reply to Keith BuschQuoted 11 lines · Keith Busch
The SCSI-to-NVMe translations were added to assist storage applications utilizing
SG_IOtransitioning to NVMe. It was always recommended, however, to use native NVMe for device management: too much is lost in translation and the maintenance burden in keeping this kludgey layer around has been neglected such that much of the translations are completely broken.This patch removes
SG_IOhandling from NVMe. The config option has been disabled by default for quite some time now, so hopefully it's safe to remove. If not, this will force people to do the right thing.Signed-off-by Keith Busch <keith.busch at intel.com>
I like this but would like to hear from the SuSE folks first as indicated in the other mail.
Also at least the nvme_get_log_page and nvme_set_features functions in core.c are unused after this patch and can be removed as well.
Sagi Grimberg
maintainerPATCH 1/1 nvme: Remove SCSI translations
In reply to Keith BuschBeautiful patch,
PATCH 1/1 nvme: Remove SCSI translations
Quoted 1 line · Sagi Grimberg
Beautiful patch,
Yes indeed.
Quoted 8 lines
Reviewed-by Sagi Grimberg <sagi at grimberg.me>_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.infradead.org%2Fmailman%2Flistinfo%2Flinux-nvme&data=02%7C01%7Cmaxg%40mellanox.com%7C64afce1fd5804a2437b808d4b3cf8510%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636331151251012970&sdata=xaCa3Lc0Pjjhk%2FdIdG21SabBBBNQIpRRac5FxULqteA%3D&reserved=0