From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Keith Busch <kbusch@kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: Keith Busch <Keith.Busch@wdc.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Hans Holmberg <Hans.Holmberg@wdc.com>,
Dmitry Fomichev <Dmitry.Fomichev@wdc.com>,
Ajay Joshi <Ajay.Joshi@wdc.com>,
Aravind Ramesh <Aravind.Ramesh@wdc.com>,
Niklas Cassel <Niklas.Cassel@wdc.com>,
Matias Bjorling <Matias.Bjorling@wdc.com>,
Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: [PATCHv3 5/5] nvme: support for zoned namespaces
Date: Mon, 22 Jun 2020 16:48:07 +0000 [thread overview]
Message-ID: <SN4PR0401MB3598FCE2EED54F51902754779B970@SN4PR0401MB3598.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200622162530.1287650-6-kbusch@kernel.org
On 22/06/2020 18:25, Keith Busch wrote:
[...]
> +static void *nvme_zns_alloc_report_buffer(struct nvme_ns *ns,
> + unsigned int nr_zones, size_t *buflen)
> +{
> + struct request_queue *q = ns->disk->queue;
> + size_t bufsize;
> + void *buf;
> +
> + const size_t min_bufsize = sizeof(struct nvme_zone_report) +
> + sizeof(struct nvme_zone_descriptor);
> +
> + nr_zones = min_t(unsigned int, nr_zones,
> + get_capacity(ns->disk) >> ilog2(ns->zsze));
> +
> + bufsize = sizeof(struct nvme_zone_report) +
> + nr_zones * sizeof(struct nvme_zone_descriptor);
> + bufsize = min_t(size_t, bufsize,
> + queue_max_hw_sectors(q) << SECTOR_SHIFT);
> + bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
> +
> + while (bufsize >= min_bufsize) {
> + buf = __vmalloc(bufsize,
> + GFP_KERNEL | __GFP_ZERO | __GFP_NORETRY);
Nit: The __GFP_ZERO flag isn't needed as nvme_ns_report_zones()
calls memset() on the report buffer before submitting it.
[...]
> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index 95cd03e240a1..d862e5d70818 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -1,6 +1,7 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> /*
> - * Definitions for the NVM Express interface
> + * Definitions for the NVM Ex
> + * ress interface
Accidental line break.
Otherwise:
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
next prev parent reply other threads:[~2020-06-22 16:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 16:25 [PATCHv3 0/5] nvme support for zoned namespace command set Keith Busch
2020-06-22 16:25 ` [PATCHv3 1/5] block: add capacity field to zone descriptors Keith Busch
2020-06-23 6:15 ` Hannes Reinecke
2020-06-23 8:44 ` Sagi Grimberg
2020-06-26 12:17 ` Jens Axboe
2020-06-22 16:25 ` [PATCHv3 2/5] null_blk: introduce zone capacity for zoned device Keith Busch
2020-06-23 6:16 ` Hannes Reinecke
2020-06-23 8:45 ` Sagi Grimberg
2020-06-22 16:25 ` [PATCHv3 3/5] nvme: implement I/O Command Sets Command Set support Keith Busch
2020-06-23 6:20 ` Hannes Reinecke
2020-06-23 9:20 ` Niklas Cassel
2020-06-23 14:25 ` Keith Busch
2020-06-23 8:53 ` Sagi Grimberg
2020-06-23 11:25 ` Niklas Cassel
2020-06-23 14:59 ` Keith Busch
2020-06-23 22:10 ` Keith Busch
2020-06-23 23:17 ` Sagi Grimberg
2020-06-24 17:25 ` Keith Busch
2020-06-24 17:46 ` Sagi Grimberg
2020-06-24 18:03 ` Keith Busch
2020-06-24 18:28 ` Sagi Grimberg
2020-06-24 18:33 ` Sagi Grimberg
2020-06-24 18:40 ` Keith Busch
2020-06-24 19:03 ` Sagi Grimberg
2020-06-24 21:49 ` Keith Busch
2020-06-24 22:54 ` Sagi Grimberg
2020-06-24 23:54 ` Keith Busch
2020-06-23 23:20 ` Sagi Grimberg
2020-06-26 8:54 ` Christoph Hellwig
2020-06-22 16:25 ` [PATCHv3 4/5] nvme: support for multi-command set effects Keith Busch
2020-06-23 6:21 ` Hannes Reinecke
2020-06-23 17:43 ` Sagi Grimberg
2020-06-22 16:25 ` [PATCHv3 5/5] nvme: support for zoned namespaces Keith Busch
2020-06-22 16:48 ` Johannes Thumshirn [this message]
2020-06-23 6:23 ` Hannes Reinecke
2020-06-23 17:45 ` Sagi Grimberg
2020-06-24 9:11 ` Javier González
2020-06-29 13:53 ` Johannes Thumshirn
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=SN4PR0401MB3598FCE2EED54F51902754779B970@SN4PR0401MB3598.namprd04.prod.outlook.com \
--to=johannes.thumshirn@wdc.com \
--cc=Ajay.Joshi@wdc.com \
--cc=Aravind.Ramesh@wdc.com \
--cc=Damien.LeMoal@wdc.com \
--cc=Dmitry.Fomichev@wdc.com \
--cc=Hans.Holmberg@wdc.com \
--cc=Keith.Busch@wdc.com \
--cc=Matias.Bjorling@wdc.com \
--cc=Niklas.Cassel@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=sagi@grimberg.me \
/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).