Linux block layer
 help / color / mirror / Atom feed
From: "Javier González" <javier@javigon.com>
To: "Matias Bjørling" <mb@lightnvm.io>
Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, axboe@kernel.dk,
	SelvaKumar S <selvakuma.s1@samsung.com>,
	Kanchan Joshi <joshi.k@samsung.com>,
	Nitesh Shetty <nj.shetty@samsung.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: [PATCH 5/6] block: add zone attr. to zone mgmt IOCTL struct
Date: Thu, 25 Jun 2020 21:51:25 +0200	[thread overview]
Message-ID: <20200625195125.ccertaiuilofpn6c@MacBook-Pro.localdomain> (raw)
In-Reply-To: <9ac40166-5731-692a-d476-0da9aad2a9aa@lightnvm.io>

On 25.06.2020 17:13, Matias Bjørling wrote:
>On 25/06/2020 14.21, Javier González wrote:
>>From: Javier González <javier.gonz@samsung.com>
>>
>>Add zone attributes field to the blk_zone structure. Use ZNS attributes
>>as base for zoned block devices in general.
>>
>>Signed-off-by: Javier González <javier.gonz@samsung.com>
>>Signed-off-by: SelvaKumar S <selvakuma.s1@samsung.com>
>>Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
>>Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
>>---
>>  drivers/nvme/host/zns.c       |  1 +
>>  include/uapi/linux/blkzoned.h | 13 ++++++++++++-
>>  2 files changed, 13 insertions(+), 1 deletion(-)
>>
>>diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c
>>index 258d03610cc0..7d8381fe7665 100644
>>--- a/drivers/nvme/host/zns.c
>>+++ b/drivers/nvme/host/zns.c
>>@@ -195,6 +195,7 @@ static int nvme_zone_parse_entry(struct nvme_ns *ns,
>>  	zone.capacity = nvme_lba_to_sect(ns, le64_to_cpu(entry->zcap));
>>  	zone.start = nvme_lba_to_sect(ns, le64_to_cpu(entry->zslba));
>>  	zone.wp = nvme_lba_to_sect(ns, le64_to_cpu(entry->wp));
>>+	zone.attr = entry->za;
>>  	return cb(&zone, idx, data);
>>  }
>>diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
>>index 0c49a4b2ce5d..2e43a00e3425 100644
>>--- a/include/uapi/linux/blkzoned.h
>>+++ b/include/uapi/linux/blkzoned.h
>>@@ -82,6 +82,16 @@ enum blk_zone_report_flags {
>>  	BLK_ZONE_REP_CAPACITY	= (1 << 0),
>>  };
>>+/**
>>+ * Zone Attributes
>>+ */
>>+enum blk_zone_attr {
>>+	BLK_ZONE_ATTR_ZFC	= 1 << 0,
>>+	BLK_ZONE_ATTR_FZR	= 1 << 1,
>>+	BLK_ZONE_ATTR_RZR	= 1 << 2,
>
>The RZR bit is equivalent to the RESET bit accessible through the 
>reset byte in struct blk_zone.
>
>ZFC is tied to Zone Active Excursions, as there is no support in the 
>kernel zone model for that. This should probably not be added until 
>there is generic support.
>
>Damien, could we overload the struct blk_zine reset variable for FZR? 
>I don't believe we can due to backward compatibility. Is that your 
>understanding as well?
>
>>+	BLK_ZONE_ATTR_ZDEV	= 1 << 7,
>
>There is not currently an equivalent for zone descriptor extensions in 
>ZAC/ZBC. The addition of this field should probably be in a patch that 
>adds generic support for zone descriptor extensions.

The intention was to just report the values on the IOCTL and make sure
that changes to struct blk_zone are OK.

>>+};
>>+
>>  /**
>>   * struct blk_zone - Zone descriptor for BLKREPORTZONE ioctl.
>>   *
>>@@ -108,7 +118,8 @@ struct blk_zone {
>>  	__u8	cond;		/* Zone condition */
>>  	__u8	non_seq;	/* Non-sequential write resources active */
>>  	__u8	reset;		/* Reset write pointer recommended */
>>-	__u8	resv[4];
>>+	__u8	attr;		/* Zone attributes */
>>+	__u8	resv[3];
>>  	__u64	capacity;	/* Zone capacity in number of sectors */
>>  	__u8	reserved[24];
>>  };
>
>

  reply	other threads:[~2020-06-25 19:51 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 12:21 [PATCH 0/6] ZNS: Extra features for current patches Javier González
2020-06-25 12:21 ` [PATCH 1/6] block: introduce IOCTL for zone mgmt Javier González
2020-06-26  1:17   ` Damien Le Moal
2020-06-26  6:01     ` Javier González
2020-06-26  6:37       ` Damien Le Moal
2020-06-26  6:51         ` Javier González
2020-06-26  7:03           ` Damien Le Moal
2020-06-26  7:08             ` Javier González
2020-06-25 12:21 ` [PATCH 2/6] block: add support for selecting all zones Javier González
2020-06-26  1:27   ` Damien Le Moal
2020-06-26  5:58     ` Javier González
2020-06-26  6:35       ` Damien Le Moal
2020-06-26  6:52         ` Javier González
2020-06-26  7:06           ` Damien Le Moal
2020-06-25 12:21 ` [PATCH 3/6] block: add support for zone offline transition Javier González
2020-06-25 14:12   ` Matias Bjørling
2020-06-25 19:48     ` Javier González
2020-06-26  1:14       ` Damien Le Moal
2020-06-26  6:18         ` Javier González
2020-06-26  9:11         ` hch
2020-06-26  9:15           ` Damien Le Moal
2020-06-26  9:17             ` hch
2020-06-26 10:02               ` Javier González
2020-06-26  9:07     ` Christoph Hellwig
2020-06-26  1:34   ` Damien Le Moal
2020-06-26  6:08     ` Javier González
2020-06-26  6:42       ` Damien Le Moal
2020-06-26  6:58         ` Javier González
2020-06-26  7:17           ` Damien Le Moal
2020-06-26  7:26             ` Javier González
2020-06-25 12:21 ` [PATCH 4/6] block: introduce IOCTL to report dev properties Javier González
2020-06-25 13:10   ` Matias Bjørling
2020-06-25 19:42     ` Javier González
2020-06-25 19:58       ` Matias Bjørling
2020-06-26  6:24         ` Javier González
2020-06-25 20:25       ` Keith Busch
2020-06-26  6:28         ` Javier González
2020-06-26 15:52           ` Keith Busch
2020-06-26 16:25             ` Javier González
2020-06-26  0:57       ` Damien Le Moal
2020-06-26  6:27         ` Javier González
2020-06-26  1:38   ` Damien Le Moal
2020-06-26  6:22     ` Javier González
2020-06-25 12:21 ` [PATCH 5/6] block: add zone attr. to zone mgmt IOCTL struct Javier González
2020-06-25 15:13   ` Matias Bjørling
2020-06-25 19:51     ` Javier González [this message]
2020-06-26  1:45   ` Damien Le Moal
2020-06-26  6:03     ` Javier González
2020-06-26  6:38       ` Damien Le Moal
2020-06-26  6:49         ` Javier González
2020-06-26  9:14   ` Christoph Hellwig
2020-06-26 10:01     ` Javier González
2020-06-25 12:21 ` [PATCH 6/6] nvme: Add consistency check for zone count Javier González
2020-06-25 13:16   ` Matias Bjørling
2020-06-25 19:45     ` Javier González
2020-06-25 21:49   ` Keith Busch
2020-06-26  0:04     ` Damien Le Moal
2020-06-26  6:13       ` Javier González
2020-06-26  6:49         ` Damien Le Moal
2020-06-26  6:55           ` Javier González
2020-06-26  7:09             ` Damien Le Moal
2020-06-26  7:29               ` Javier González
2020-06-26  7:42                 ` Damien Le Moal
2020-06-26  9:16   ` Christoph Hellwig
2020-06-26 10:03     ` Javier González
2020-06-25 13:04 ` [PATCH 0/6] ZNS: Extra features for current patches Matias Bjørling
2020-06-25 14:48   ` Matias Bjørling
2020-06-25 19:39     ` Javier González
2020-06-25 19:53       ` Matias Bjørling
2020-06-26  6:26         ` Javier González

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=20200625195125.ccertaiuilofpn6c@MacBook-Pro.localdomain \
    --to=javier@javigon.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mb@lightnvm.io \
    --cc=nj.shetty@samsung.com \
    --cc=sagi@grimberg.me \
    --cc=selvakuma.s1@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