From: Jens Axboe <axboe@kernel.dk>
To: csander@purestorage.com, huang-jl <huang-jl@deepseek.com>
Cc: io-uring@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, ming.lei@redhat.com
Subject: Re: [PATCH v2] io_uring: fix nr_segs calculation in io_import_kbuf
Date: Wed, 17 Dec 2025 07:36:17 -0700 [thread overview]
Message-ID: <176598217718.7122.7321090942996172863.b4-ty@kernel.dk> (raw)
In-Reply-To: <20251217062632.113983-1-huang-jl@deepseek.com>
On Wed, 17 Dec 2025 14:26:32 +0800, huang-jl wrote:
> io_import_kbuf() calculates nr_segs incorrectly when iov_offset is
> non-zero after iov_iter_advance(). It doesn't account for the partial
> consumption of the first bvec.
>
> The problem comes when meet the following conditions:
> 1. Use UBLK_F_AUTO_BUF_REG feature of ublk.
> 2. The kernel will help to register the buffer, into the io uring.
> 3. Later, the ublk server try to send IO request using the registered
> buffer in the io uring, to read/write to fuse-based filesystem, with
> O_DIRECT.
>
> [...]
Applied, thanks!
[1/1] io_uring: fix nr_segs calculation in io_import_kbuf
commit: 114ea9bbaf7681c4d363e13b7916e6fef6a4963a
Best regards,
--
Jens Axboe
next prev parent reply other threads:[~2025-12-17 14:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 3:26 [PATCH 01/01] io_uring: fix nr_segs calculation in io_import_kbuf huang-jl
2025-12-17 5:33 ` Caleb Sander Mateos
2025-12-17 6:26 ` [PATCH v2] " huang-jl
2025-12-17 9:25 ` Ming Lei
2025-12-17 14:36 ` Jens Axboe [this message]
2025-12-17 18:08 ` Caleb Sander Mateos
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=176598217718.7122.7321090942996172863.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=huang-jl@deepseek.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
/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