OSDN Git Service

block: add capacity field to zone descriptors
authorMatias Bjørling <matias.bjorling@wdc.com>
Mon, 29 Jun 2020 19:06:37 +0000 (12:06 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 8 Jul 2020 14:16:19 +0000 (16:16 +0200)
commit82394db7383d33641f3f565bd79792fb41b1741f
treea7cd00ad8a1ed5588578ac4c6894fe2c582c5327
parentf5af577d553103115579b5e404070dfab4d00332
block: add capacity field to zone descriptors

In the zoned storage model, the sectors within a zone are typically all
writeable. With the introduction of the Zoned Namespace (ZNS) Command
Set in the NVM Express organization, the model was extended to have a
specific writeable capacity.

Extend the zone descriptor data structure with a zone capacity field to
indicate to the user how many sectors in a zone are writeable.

Introduce backward compatibility in the zone report ioctl by extending
the zone report header data structure with a flags field to indicate if
the capacity field is available.

Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Javier González <javier.gonz@samsung.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
block/blk-zoned.c
drivers/block/null_blk_zoned.c
drivers/scsi/sd_zbc.c
include/uapi/linux/blkzoned.h