[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c3d81f0-aee5-4619-82c4-3ce72bdce317@acm.org>
Date: Tue, 18 Feb 2025 14:21:52 -0800
From: Bart Van Assche <bvanassche@....org>
To: John Garry <john.g.garry@...cle.com>,
Andreas Hindborg <a.hindborg@...nel.org>
Cc: Jens Axboe <axboe@...nel.dk>, Oliver Mangold <oliver.mangold@...me>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: set bi_vcnt when cloning bio
On 2/18/25 9:12 AM, John Garry wrote:
> On 18/02/2025 11:40, Andreas Hindborg wrote:
>> But I am genuinely curious if there is a reason for not setting
>> `bi_vcnt` during a clone.
>
> I think that it came from commit 59d276fe0 (with the addition of
> bio_clone_fast()), where we assume that the cloned bio is not having the
> bio_vec touched and so does not need to know bi_vcnt (or bi_max_vecs).
> And it is inefficient to needlessly set bi_vcnt then.
Hmm ... I prefer paying the very small performance hit caused by copying
bi_vcnt rather than having to deal with the inconsistency caused by not
copying that data structure member.
Thanks,
Bart.
Powered by blists - more mailing lists