[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e2cbfd0-6136-df9e-58fb-60f1375b2e79@nvidia.com>
Date: Wed, 5 Oct 2022 17:24:22 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Christoph Böhmwalder
<christoph.boehmwalder@...bit.com>,
Chaitanya Kulkarni <chaitanyak@...dia.com>
CC: "ogeert@...ux-m68k.org" <ogeert@...ux-m68k.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-m68k@...ts.linux-m68k.org" <linux-m68k@...ts.linux-m68k.org>,
"drbd-dev@...ts.linbit.com" <drbd-dev@...ts.linbit.com>,
"nbd@...er.debian.org" <nbd@...er.debian.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"philipp.reisner@...bit.com" <philipp.reisner@...bit.com>,
"lars.ellenberg@...bit.com" <lars.ellenberg@...bit.com>,
"efremov@...ux.com" <efremov@...ux.com>,
"josef@...icpanda.com" <josef@...icpanda.com>,
"tim@...erelk.net" <tim@...erelk.net>,
"haris.iqbal@...os.com" <haris.iqbal@...os.com>,
"jinpu.wang@...os.com" <jinpu.wang@...os.com>,
"richard@....at" <richard@....at>,
"miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
"vigneshr@...com" <vigneshr@...com>,
"mcgrof@...nel.org" <mcgrof@...nel.org>,
"hare@...e.de" <hare@...e.de>,
"damien.lemoal@...nsource.wdc.com" <damien.lemoal@...nsource.wdc.com>,
"johannes.thumshirn@....com" <johannes.thumshirn@....com>,
"bvanassche@....org" <bvanassche@....org>,
"ming.lei@...hat.com" <ming.lei@...hat.com>,
"vincent.fu@...sung.com" <vincent.fu@...sung.com>,
"shinichiro.kawasaki@....com" <shinichiro.kawasaki@....com>
Subject: Re: [RFC PATCH 05/18] drbd: use init disk helper
>> diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
>> index f3e4db16fd07..58fae122de16 100644
>> --- a/drivers/block/drbd/drbd_main.c
>> +++ b/drivers/block/drbd/drbd_main.c
>> @@ -2706,13 +2706,9 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
>>
>> set_disk_ro(disk, true);
>>
>> - disk->major = DRBD_MAJOR;
>> - disk->first_minor = minor;
>> - disk->minors = 1;
>> - disk->fops = &drbd_ops;
>> disk->flags |= GENHD_FL_NO_PART;
>> sprintf(disk->disk_name, "drbd%d", minor);
>> - disk->private_data = device;
>> + init_disk(disk, DRBD_MAJOR, minor, 1, 0, device, &drbd_ops);
>>
>> blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, disk->queue);
>> blk_queue_write_cache(disk->queue, true, true);
>
> This now does a set_capacity(..., 0), which it did not do before.
> I'm guessing this does not have any side effects as the capacity should
> already be initialized to 0? Do you know this for sure?
>
I think I'll move the call to set_capcity out of the caller,
Will resend the series shortly.
-ck
Powered by blists - more mailing lists