From: Pavel Begunkov <asml.silence@gmail.com>
To: Sidong Yang <sidong.yang@furiosa.ai>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
Mark Harmstone <maharmstone@fb.com>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 6.14] btrfs: ioctl: error on fixed buffer flag for io-uring cmd
Date: Thu, 27 Mar 2025 14:58:11 +0000 [thread overview]
Message-ID: <411a996d-8e47-4b30-8782-4418cf701f69@gmail.com> (raw)
In-Reply-To: <20250326155736.611445-1-sidong.yang@furiosa.ai>
On 3/26/25 15:57, Sidong Yang wrote:
> Currently, the io-uring fixed buffer cmd flag is silently dismissed,
> even though it does not work. This patch returns an error when the flag
> is set, making it clear that operation is not supported.
IIRC, the feature where you use the flag hasn't been merged
yet and is targeting 6.16. In this case you need to send this
patch for 6.15, and once merged stable will try to pick it up
from there.
> Fixes: 34310c442e17 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
> Cc: stable@vger.kernel.org
> Signed-off-by: Sidong Yang <sidong.yang@furiosa.ai>
> ---
> fs/btrfs/ioctl.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 6c18bad53cd3..62bb9e11e8d6 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -4823,6 +4823,12 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
> ret = -EPERM;
> goto out_acct;
> }
> +
> + if (cmd->flags & IORING_URING_CMD_FIXED) {
> + ret = -EOPNOTSUPP;
> + goto out_acct;
> + }
> +
> file = cmd->file;
> inode = BTRFS_I(file->f_inode);
> fs_info = inode->root->fs_info;
> @@ -4959,6 +4965,11 @@ static int btrfs_uring_encoded_write(struct io_uring_cmd *cmd, unsigned int issu
> goto out_acct;
> }
>
> + if (cmd->flags & IORING_URING_CMD_FIXED) {
> + ret = -EOPNOTSUPP;
> + goto out_acct;
> + }
> +
> file = cmd->file;
> sqe_addr = u64_to_user_ptr(READ_ONCE(cmd->sqe->addr));
>
--
Pavel Begunkov
next prev parent reply other threads:[~2025-03-27 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 15:57 Sidong Yang
2025-03-27 14:58 ` Pavel Begunkov [this message]
2025-03-27 15:32 ` Sidong Yang
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=411a996d-8e47-4b30-8782-4418cf701f69@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maharmstone@fb.com \
--cc=sidong.yang@furiosa.ai \
--cc=stable@vger.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®