From: Jens Axboe <axboe@kernel.dk>
To: Thomas Bertschinger <tahbertschinger@gmail.com>,
io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk, brauner@kernel.org,
linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org,
cem@kernel.org, chuck.lever@oracle.com, jlayton@kernel.org,
amir73il@gmail.com
Subject: Re: [PATCH v3 02/10] io_uring: add support for IORING_OP_NAME_TO_HANDLE_AT
Date: Wed, 17 Sep 2025 08:14:48 -0600 [thread overview]
Message-ID: <eed1186c-4213-4bc3-9529-42a213083019@kernel.dk> (raw)
In-Reply-To: <20250912152855.689917-3-tahbertschinger@gmail.com>
On 9/12/25 9:28 AM, Thomas Bertschinger wrote:
> +#if defined(CONFIG_FHANDLE)
> +int io_name_to_handle_at_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
> +{
> + struct io_name_to_handle *nh = io_kiocb_to_cmd(req, struct io_name_to_handle);
> +
> + nh->dfd = READ_ONCE(sqe->fd);
> + nh->flags = READ_ONCE(sqe->name_to_handle_flags);
> + nh->path = u64_to_user_ptr(READ_ONCE(sqe->addr));
> + nh->ufh = u64_to_user_ptr(READ_ONCE(sqe->addr2));
> + nh->mount_id = u64_to_user_ptr(READ_ONCE(sqe->addr3));
> +
> + return 0;
> +}
Should probably include a:
if (sqe->len)
return -EINVAL;
to allow for using that field in the future, should that become
necessary.
Outside of that, this patch looks fine to me.
--
Jens Axboe
next prev parent reply other threads:[~2025-09-17 14:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 15:28 [PATCH v3 00/10] add support for name_to, open_by_handle_at() to io_uring Thomas Bertschinger
2025-09-12 15:28 ` [PATCH v3 01/10] fhandle: create helper for name_to_handle_at(2) Thomas Bertschinger
2025-09-12 15:28 ` [PATCH v3 02/10] io_uring: add support for IORING_OP_NAME_TO_HANDLE_AT Thomas Bertschinger
2025-09-17 14:14 ` Jens Axboe [this message]
2025-09-12 15:28 ` [PATCH v3 03/10] fhandle: helper for allocating, reading struct file_handle Thomas Bertschinger
2025-09-12 15:28 ` [PATCH v3 04/10] fhandle: create do_file_handle_open() helper Thomas Bertschinger
2025-09-12 15:28 ` [PATCH v3 05/10] fhandle: make do_file_handle_open() take struct open_flags Thomas Bertschinger
2025-09-12 15:28 ` [PATCH v3 06/10] exportfs: allow VFS flags in struct file_handle Thomas Bertschinger
2025-09-12 15:28 ` [PATCH v3 07/10] exportfs: new FILEID_CACHED flag for non-blocking fh lookup Thomas Bertschinger
2025-09-12 16:28 ` Amir Goldstein
2025-09-12 15:28 ` [PATCH v3 08/10] io_uring: add __io_open_prep() helper Thomas Bertschinger
2025-09-17 14:18 ` Jens Axboe
2025-09-12 15:28 ` [PATCH v3 09/10] io_uring: add support for IORING_OP_OPEN_BY_HANDLE_AT Thomas Bertschinger
2025-09-17 14:18 ` Jens Axboe
2025-09-12 15:28 ` [PATCH v3 10/10] xfs: add support for non-blocking fh_to_dentry() Thomas Bertschinger
2025-09-12 22:51 ` Dave Chinner
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=eed1186c-4213-4bc3-9529-42a213083019@kernel.dk \
--to=axboe@kernel.dk \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=io-uring@vger.kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=tahbertschinger@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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