[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251111090755.GA12545@lst.de>
Date: Tue, 11 Nov 2025 10:07:55 +0100
From: Christoph Hellwig <hch@....de>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Jens Axboe <axboe@...nel.dk>, Damien Le Moal <dlemoal@...nel.org>,
Christoph Hellwig <hch@....de>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] zloop: use blk_rq_nr_phys_segments() instead of
iterating bvecs
On Sat, Nov 08, 2025 at 04:01:01PM -0700, Caleb Sander Mateos wrote:
> The number of bvecs can be obtained directly from struct request's
> nr_phys_segments field via blk_rq_nr_phys_segments(), so use that
> instead of iterating over the bvecs an extra time.
Same reason this doesn't work as Ming explained for ublk.
Maybe we should lift this code from loop/zloop into a well documented
common helper to make it more obvious?
Powered by blists - more mailing lists