From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, io-uring@vger.kernel.org,
Caleb Sander Mateos <csander@purestorage.com>,
huang-jl <huang-jl@deepseek.com>,
Nitesh Shetty <nj.shetty@samsung.com>
Subject: Re: [PATCH 1/3] block: fix bio_may_need_split() by using bvec iterator way
Date: Thu, 18 Dec 2025 17:45:16 +0800 [thread overview]
Message-ID: <aUPNLNHVz2-Y-Z4C@fedora> (raw)
In-Reply-To: <aUPLYcAx2dh-DvuP@infradead.org>
On Thu, Dec 18, 2025 at 01:37:37AM -0800, Christoph Hellwig wrote:
> On Thu, Dec 18, 2025 at 05:31:42PM +0800, Ming Lei wrote:
> > ->bi_vcnt doesn't make sense for cloned bio, which is perfectly fine
> > passed to bio_may_need_split().
> >
> > So fix bio_may_need_split() by not taking ->bi_vcnt directly, instead
> > checking with help from bio size and bvec->len.
> >
> > Meantime retrieving the 1st bvec via __bvec_iter_bvec().
>
> That totally misses the point. The ->bi_vcnt is a fast and lose
> check to see if we need the fairly expensive iterators to do the
> real check.
It is just __bvec_iter_bvec(), whatever it should be in cache sooner or
later.
Thanks,
Ming
next prev parent reply other threads:[~2025-12-18 9:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 9:31 [PATCH 0/3] block: fix bi_vcnt misuse for cloned bio Ming Lei
2025-12-18 9:31 ` [PATCH 1/3] block: fix bio_may_need_split() by using bvec iterator way Ming Lei
2025-12-18 9:37 ` Christoph Hellwig
2025-12-18 9:45 ` Ming Lei [this message]
2025-12-18 15:16 ` Nitesh Shetty
2025-12-18 16:08 ` Ming Lei
2025-12-20 8:16 ` Nitesh Shetty
2025-12-20 8:19 ` Nitesh Shetty
2025-12-18 9:31 ` [PATCH 2/3] block: don't initialize bi_vcnt for cloned bio in bio_iov_bvec_set() Ming Lei
2025-12-18 9:38 ` Christoph Hellwig
2025-12-18 9:48 ` Ming Lei
2025-12-18 9:31 ` [PATCH 3/3] io_uring: don't re-calculate iov_iter nr_segs in io_import_kbuf() Ming Lei
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=aUPNLNHVz2-Y-Z4C@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=hch@infradead.org \
--cc=huang-jl@deepseek.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=nj.shetty@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.