From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Linux FS Devel <linux-fsdevel@vger.kernel.org>,
dm-devel@redhat.com,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Any bio_clone_slow() implementation which doesn't share bi_io_vec?
Date: Fri, 26 Nov 2021 20:33:02 +0800 [thread overview]
Message-ID: <c44de3dc-b7a6-5872-2fe5-05488e93db05@gmx.com> (raw)
In-Reply-To: <YZyiuFxAeKE/WMrR@infradead.org>
On 2021/11/23 16:13, Christoph Hellwig wrote:
> On Tue, Nov 23, 2021 at 04:10:35PM +0800, Qu Wenruo wrote:
>> Without bio_chain() sounds pretty good, as we can still utilize
>> bi_end_io and bi_private.
>>
>> But this also means, we're now responsible not to release the source bio
>> since it has the real bi_io_vec.
>
> Just call bio_inc_remaining before submitting the cloned bio, and then
> call bio_endio on the root bio every time a clone completes.
>
Does this also mean, we need to save a bi_iter before bio submission, so
that at endio time, we can iterate only the split part of the bio?
Or we have to go back to bio_chain() method, and rely on the parent bio
to iterate all bvecs...
Thanks,
Qu
prev parent reply other threads:[~2021-11-26 12:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 6:44 Any bio_clone_slow() implementation which doesn't share bi_io_vec? Qu Wenruo
2021-11-23 7:43 ` Christoph Hellwig
2021-11-23 8:10 ` Qu Wenruo
2021-11-23 8:13 ` Christoph Hellwig
2021-11-23 11:09 ` Qu Wenruo
2021-11-23 11:39 ` Johannes Thumshirn
2021-11-23 14:28 ` hch
2021-11-23 23:07 ` Qu Wenruo
2021-11-24 6:09 ` hch
2021-11-24 6:18 ` Qu Wenruo
2021-11-24 7:02 ` hch
2021-11-24 7:22 ` hch
2021-11-24 7:25 ` Naohiro Aota
2021-11-24 7:39 ` Qu Wenruo
2021-11-26 12:33 ` Qu Wenruo [this message]
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=c44de3dc-b7a6-5872-2fe5-05488e93db05@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@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