[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6eab7373-3c7f-fccf-8a6f-b02519258d23@toxicpanda.com>
Date: Tue, 19 Jan 2021 10:00:59 -0500
From: Josef Bacik <josef@...icpanda.com>
To: Chaitanya Kulkarni <chaitanya.kulkarni@....com>,
linux-block@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
drbd-dev@...ts.linbit.com, linux-bcache@...r.kernel.org,
linux-raid@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
cluster-devel@...hat.com
Cc: jfs-discussion@...ts.sourceforge.net, dm-devel@...hat.com,
axboe@...nel.dk, philipp.reisner@...bit.com,
lars.ellenberg@...bit.com, efremov@...ux.com, colyli@...e.de,
kent.overstreet@...il.com, agk@...hat.com, snitzer@...hat.com,
song@...nel.org, hch@....de, sagi@...mberg.me,
martin.petersen@...cle.com, viro@...iv.linux.org.uk, clm@...com,
dsterba@...e.com, tytso@....edu, adilger.kernel@...ger.ca,
rpeterso@...hat.com, agruenba@...hat.com, darrick.wong@...cle.com,
shaggy@...nel.org, damien.lemoal@....com, naohiro.aota@....com,
jth@...nel.org, tj@...nel.org, osandov@...com, bvanassche@....org,
gustavo@...eddedor.com, asml.silence@...il.com,
jefflexu@...ux.alibaba.com
Subject: Re: [RFC PATCH 00/37] block: introduce bio_init_fields()
On 1/19/21 12:05 AM, Chaitanya Kulkarni wrote:
> Hi,
>
> This is a *compile only RFC* which adds a generic helper to initialize
> the various fields of the bio that is repeated all the places in
> file-systems, block layer, and drivers.
>
> The new helper allows callers to initialize various members such as
> bdev, sector, private, end io callback, io priority, and write hints.
>
> The objective of this RFC is to only start a discussion, this it not
> completely tested at all.
It would help to know what you're trying to accomplish here. I'd echo Mike's
comments about how it makes it annoying to update things in the future. In
addition, there's so many fields that I'm not going to remember what each one is
without having to look it up, which makes it annoying to use and to review. If
it's simply to make sure fields are initialized then you could add debug sanity
checks to submit_bio(). If it's to clean up duplication, well I'd argue that
the duplication is much clearer than positional arguments in a giant function
call. If you are wanting to change a particular part of the bio to be
initialized properly, like Dennis's work to make sure the bi_blkg was
initialized at bi_bdev set time, then a more targeted patch series with a
specific intent will be more useful and more successful. Thanks,
Josef
Powered by blists - more mailing lists