Commit 035c3dc4 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

nvme/cuse: don't ERRLOG for NVME_IOCTL_ID in controller ioctl path



nvme-cli will often send this IOCTL to controller device nodes. For example,
some commands such as get_features *may* take a namespace ID, so nvme-cli
just sends this IOCTL to the device node to get the namespace ID if it exists.

So add a case for this ioctl cmd, so that we still return ENOTTY but without
the ERRLOG.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: Id80ab6cf41da1783adb2a749f8dc492d075039a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22594


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
parent a42bc1d2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -799,6 +799,13 @@ cuse_ctrlr_ioctl(fuse_req_t req, int cmd, void *arg,
		cuse_nvme_rescan(req, cmd, arg, fi, flags, in_buf, in_bufsz, out_bufsz);
		break;

	case NVME_IOCTL_ID:
		/* Return error but don't ERRLOG - nvme-cli will frequently send this
		 * IOCTL to controller devices.
		 */
		fuse_reply_err(req, ENOTTY);
		break;

	case SPDK_CUSE_GET_TRANSPORT:
		SPDK_DEBUGLOG(nvme_cuse, "SPDK_CUSE_GET_TRANSPORT\n");
		cuse_get_transport(req, cmd, arg, fi, flags, in_buf, in_bufsz, out_bufsz);