On 1/7/25 00:25, Bernd Schubert wrote:
This adds basic support for ring SQEs (with opcode=IORING_OP_URING_CMD). For now only FUSE_IO_URING_CMD_REGISTER is handled to register queue entries. Signed-off-by: Bernd Schubert <bschubert@xxxxxxx> ---
... Apart from mentioned by others and the comment below lgtm Reviewed-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c new file mode 100644 index 0000000000000000000000000000000000000000..b44ba4033615e01041313c040035b6da6af0ee17 --- /dev/null +++ b/fs/fuse/dev_uring.c @@ -0,0 +1,333 @@
...> +/* Register header and payload buffer with the kernel and fetch a request */
+static int fuse_uring_register(struct io_uring_cmd *cmd, + unsigned int issue_flags, struct fuse_conn *fc) +{ + const struct fuse_uring_cmd_req *cmd_req = io_uring_sqe_cmd(cmd->sqe); + struct fuse_ring *ring = fc->ring; + struct fuse_ring_queue *queue; + struct fuse_ring_ent *ring_ent; + int err; + struct iovec iov[FUSE_URING_IOV_SEGS]; + unsigned int qid = READ_ONCE(cmd_req->qid); + + err = fuse_uring_get_iovec_from_sqe(cmd->sqe, iov);
Looks like leftovers? Not used, and it's repeated in fuse_uring_create_ring_ent().
+ if (err) { + pr_info_ratelimited("Failed to get iovec from sqe, err=%d\n", + err); + return err; + }
... -- Pavel Begunkov