From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>,
"Chaitanya Kulkarni" <chaitanyak@nvidia.com>
Cc: "ogeert@linux-m68k.org" <ogeert@linux-m68k.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-m68k@lists.linux-m68k.org"
<linux-m68k@lists.linux-m68k.org>,
"drbd-dev@lists.linbit.com" <drbd-dev@lists.linbit.com>,
"nbd@other.debian.org" <nbd@other.debian.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"philipp.reisner@linbit.com" <philipp.reisner@linbit.com>,
"lars.ellenberg@linbit.com" <lars.ellenberg@linbit.com>,
"efremov@linux.com" <efremov@linux.com>,
"josef@toxicpanda.com" <josef@toxicpanda.com>,
"tim@cyberelk.net" <tim@cyberelk.net>,
"haris.iqbal@ionos.com" <haris.iqbal@ionos.com>,
"jinpu.wang@ionos.com" <jinpu.wang@ionos.com>,
"richard@nod.at" <richard@nod.at>,
"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
"vigneshr@ti.com" <vigneshr@ti.com>,
"mcgrof@kernel.org" <mcgrof@kernel.org>,
"hare@suse.de" <hare@suse.de>,
"damien.lemoal@opensource.wdc.com"
<damien.lemoal@opensource.wdc.com>,
"johannes.thumshirn@wdc.com" <johannes.thumshirn@wdc.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"ming.lei@redhat.com" <ming.lei@redhat.com>,
"vincent.fu@samsung.com" <vincent.fu@samsung.com>,
"shinichiro.kawasaki@wdc.com" <shinichiro.kawasaki@wdc.com>
Subject: Re: [RFC PATCH 05/18] drbd: use init disk helper
Date: Wed, 5 Oct 2022 17:24:22 +0000 [thread overview]
Message-ID: <1e2cbfd0-6136-df9e-58fb-60f1375b2e79@nvidia.com> (raw)
In-Reply-To: <e23e94f8-13ad-4a10-62de-33e63a62831f@linbit.com>
>> 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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2022-10-05 17:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 5:00 [RFC PATCH 00/18] block: add and use init disk helper Chaitanya Kulkarni
2022-10-05 5:00 ` [RFC PATCH 01/18] " Chaitanya Kulkarni
2022-10-10 7:59 ` Christoph Hellwig
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 [this message]
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=1e2cbfd0-6136-df9e-58fb-60f1375b2e79@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=drbd-dev@lists.linbit.com \
--cc=efremov@linux.com \
--cc=hare@suse.de \
--cc=haris.iqbal@ionos.com \
--cc=jinpu.wang@ionos.com \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mcgrof@kernel.org \
--cc=ming.lei@redhat.com \
--cc=miquel.raynal@bootlin.com \
--cc=nbd@other.debian.org \
--cc=ogeert@linux-m68k.org \
--cc=philipp.reisner@linbit.com \
--cc=richard@nod.at \
--cc=shinichiro.kawasaki@wdc.com \
--cc=tim@cyberelk.net \
--cc=vigneshr@ti.com \
--cc=vincent.fu@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).