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 <[email protected]> --- drivers/nvme/host/ioctl.c | 9 +++++++++ drivers/nvme/host/multipath.c | 2 ++ drivers/nvme/host/nvme.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index 7f0bd38f8c24e..773c819cde52a 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -701,6 +701,15 @@ static int nvme_mpath_device_ctrl_ioctl(struct mpath_device *mpath_device, return ret; } +int nvme_mpath_chr_uring_cmd(struct mpath_device *mpath_device, + struct io_uring_cmd *ioucmd, + unsigned int issue_flags) +{ + struct nvme_ns *ns = nvme_mpath_to_ns(mpath_device); + + return nvme_ns_uring_cmd(ns, 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 513d73e589a58..12386f9caa72a 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -1492,4 +1492,6 @@ static const struct mpath_head_template mpdt = { .get_access_state = nvme_mpath_get_access_state, .bdev_ioctl = nvme_mpath_bdev_ioctl, .cdev_ioctl = nvme_mpath_cdev_ioctl, + .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 11b63e92502ad..bc0ad0bbb68fd 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -1053,6 +1053,8 @@ int nvme_mpath_bdev_ioctl(struct block_device *bdev, int nvme_mpath_cdev_ioctl(struct mpath_head *mpath_device, struct mpath_device *mpath_head, blk_mode_t mode, unsigned int cmd, unsigned long arg, int srcu_idx); +int nvme_mpath_chr_uring_cmd(struct mpath_device *mpath_device, + struct io_uring_cmd *ioucmd, unsigned int issue_flags); static inline bool nvme_is_mpath_request(struct request *req) { -- 2.43.5

