From: John Garry <john.g.garry@oracle.com>
To: hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, axboe@fb.com,
martin.petersen@oracle.com,
james.bottomley@hansenpartnership.com, hare@suse.com
Cc: jmeneghi@redhat.com, linux-nvme@lists.infradead.org,
linux-scsi@vger.kernel.org, michael.christie@oracle.com,
snitzer@kernel.org, bmarzins@redhat.com,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
nilay@linux.ibm.com, john.garry@linux.dev,
John Garry <john.g.garry@oracle.com>
Subject: [PATCH v3 06/10] nvme-multipath: add uring_cmd support
Date: Fri, 3 Jul 2026 10:32:00 +0000 [thread overview]
Message-ID: <20260703103204.3724406-7-john.g.garry@oracle.com> (raw)
In-Reply-To: <20260703103204.3724406-1-john.g.garry@oracle.com>
Add callback nvme_mpath_chr_uring_cmd, which is equivalent to
nvme_ns_head_chr_uring_cmd().
Also fill in chr_uring_cmd_iopoll with same function as currently used,
chr_uring_cmd_iopoll().
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
drivers/nvme/host/ioctl.c | 8 ++++++++
drivers/nvme/host/multipath.c | 2 ++
drivers/nvme/host/nvme.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
index 14ac86b8b1a8a..d9eee6e685f96 100644
--- a/drivers/nvme/host/ioctl.c
+++ b/drivers/nvme/host/ioctl.c
@@ -718,6 +718,14 @@ void nvme_mpath_ioctl_finish(void *opaque)
nvme_put_ctrl(opaque);
}
+int nvme_mpath_chr_uring_cmd(struct mpath_device *mpath_device,
+ struct io_uring_cmd *ioucmd,
+ unsigned int issue_flags)
+{
+ return nvme_ns_uring_cmd(nvme_mpath_to_ns(mpath_device), ioucmd,
+ issue_flags);
+}
+
static int nvme_ns_head_ctrl_ioctl(struct nvme_ns *ns, unsigned int cmd,
void __user *argp, struct nvme_ns_head *head, int srcu_idx,
bool open_for_write)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 9a1703f01ef60..b27b45c59c883 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -1554,4 +1554,6 @@ static const struct mpath_head_template mpdt = {
.cdev_ioctl = nvme_mpath_cdev_ioctl,
.ioctl_begin = nvme_mpath_ioctl_begin,
.ioctl_finish = nvme_mpath_ioctl_finish,
+ .chr_uring_cmd = nvme_mpath_chr_uring_cmd,
+ .chr_uring_cmd_iopoll = nvme_ns_chr_uring_cmd_iopoll,
};
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 4405e47bfe1d9..35618285caf89 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -1069,6 +1069,8 @@ void nvme_mpath_clear_ctrl_paths(struct nvme_ctrl *ctrl);
void nvme_mpath_remove_disk(struct nvme_ns_head *head);
void nvme_mpath_start_request(struct request *rq);
void nvme_mpath_end_request(struct request *rq);
+int nvme_mpath_chr_uring_cmd(struct mpath_device *mpath_device,
+ struct io_uring_cmd *ioucmd, unsigned int issue_flags);
long nvme_mpath_cdev_ioctl(struct mpath_device *mpath_device, unsigned int cmd,
unsigned long arg, bool open_for_write);
--
2.43.7
next prev parent reply other threads:[~2026-07-03 10:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 10:31 [PATCH v3 00/10] nvme: switch to libmultipath John Garry
2026-07-03 10:31 ` [PATCH v3 01/10] nvme-multipath: add initial support for using libmultipath John Garry
2026-07-03 10:31 ` [PATCH v3 02/10] nvme-multipath: add nvme_mpath_available_path() John Garry
2026-07-03 10:31 ` [PATCH v3 03/10] nvme-multipath: add nvme_mpath_{add, remove}_cdev() John Garry
2026-07-03 10:31 ` [PATCH v3 04/10] nvme-multipath: add nvme_mpath_is_{disabled, optimised} John Garry
2026-07-03 10:31 ` [PATCH v3 05/10] nvme-multipath: add nvme_mpath_cdev_ioctl() John Garry
2026-07-03 10:32 ` John Garry [this message]
2026-07-03 10:32 ` [PATCH v3 07/10] nvme-multipath: add nvme_mpath_synchronize() John Garry
2026-07-03 10:32 ` [PATCH v3 08/10] nvme-multipath: add nvme_{add,delete}_ns() John Garry
2026-07-03 10:32 ` [PATCH v3 09/10] nvme-multipath: add nvme_mpath_head_queue_if_no_path() John Garry
2026-07-03 10:32 ` [PATCH v3 10/10] nvme-multipath: switch to use libmultipath John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260703103204.3724406-7-john.g.garry@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@fb.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=jmeneghi@redhat.com \
--cc=john.garry@linux.dev \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
--cc=snitzer@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®