From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Christoph Hellwig <hch@infradead.org>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"christoph.boehmwalder@linbit.com"
<christoph.boehmwalder@linbit.com>,
"tim@cyberelk.net" <tim@cyberelk.net>,
"damien.lemoal@opensource.wdc.com"
<damien.lemoal@opensource.wdc.com>,
"johannes.thumshirn@wdc.com" <johannes.thumshirn@wdc.com>,
"bvanassche@acm.org" <bvanassche@acm.org>
Subject: Re: [RFC PATCH 01/18] block: add and use init disk helper
Date: Mon, 10 Oct 2022 16:50:33 +0000 [thread overview]
Message-ID: <798a9b0b-a157-6d66-14f6-c600a2aeffae@nvidia.com> (raw)
In-Reply-To: <Y0PQxdzmMzAAW0KF@infradead.org>
On 10/10/22 00:59, Christoph Hellwig wrote:
> On Tue, Oct 04, 2022 at 10:00:10PM -0700, Chaitanya Kulkarni wrote:
>> +void init_disk(struct gendisk *disk, int major, int first_minor,
>> + int minors, sector_t sectors, void *private_data,
>> + const struct block_device_operations *fops)
>> +{
>> + disk->major = major;
>> + disk->first_minor = first_minor;
>> + disk->minors = minors;
>> + set_capacity(disk, sectors);
>> + disk->private_data = private_data;
>> + disk->fops = fops;
>
> I don't like this at all. For one major/first_minor/minors are
> optional and discouraged for new drivers. Setting the capacity is
> a different thing and is done by helpers also used for revalidation
> in many drivers.
>
> It might make sense to pass the fops (and maybe private_data) to
> blk_mq_alloc_disk / blk_alloc_disk, but even then I'm not quite
> sure it is worth the churn.
Okay I'll drop this, and see if I can get something meaningful
with fops and private data.
-ck
next prev parent reply other threads:[~2022-10-10 16:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 5:00 [RFC PATCH 00/18] " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 01/18] " Chaitanya Kulkarni
2022-10-10 7:59 ` Christoph Hellwig
2022-10-10 16:50 ` Chaitanya Kulkarni [this message]
2022-10-05 5:00 ` [RFC PATCH 02/18] nfblock: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 03/18] amiflop: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 04/18] brd: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 05/18] drbd: " Chaitanya Kulkarni
2022-10-05 10:09 ` Christoph Böhmwalder
2022-10-05 17:24 ` Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 06/18] floppy: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 07/18] loop: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 08/18] n64cart: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 09/18] nbd: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 10/18] pcd: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 11/18] pd: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 12/18] pf: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 13/18] pktcdvd: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 14/18] rnbd-clt: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 15/18] swim: " Chaitanya Kulkarni
2022-10-05 6:54 ` Finn Thain
2022-10-05 5:00 ` [RFC PATCH 16/18] swim3: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 17/18] z2ram: " Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 18/18] ubi: " Chaitanya Kulkarni
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=798a9b0b-a157-6d66-14f6-c600a2aeffae@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=christoph.boehmwalder@linbit.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hch@infradead.org \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@cyberelk.net \
/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
all inboxes | Powered by JetHome®