WSL2-Linux-Kernel/Documentation/block
Damien Le Moal a805a4fa4f block: introduce zone_write_granularity limit
Per ZBC and ZAC specifications, host-managed SMR hard-disks mandate that
all writes into sequential write required zones be aligned to the device
physical block size. However, NVMe ZNS does not have this constraint and
allows write operations into sequential zones to be aligned to the
device logical block size. This inconsistency does not help with
software portability across device types.

To solve this, introduce the zone_write_granularity queue limit to
indicate the alignment constraint, in bytes, of write operations into
zones of a zoned block device. This new limit is exported as a
read-only sysfs queue attribute and the helper
blk_queue_zone_write_granularity() introduced for drivers to set this
limit.

The function blk_queue_set_zoned() is modified to set this new limit to
the device logical block size by default. NVMe ZNS devices as well as
zoned nullb devices use this default value as is. The scsi disk driver
is modified to execute the blk_queue_zone_write_granularity() helper to
set the zone write granularity of host-managed SMR disks to the disk
physical block size.

The accessor functions queue_zone_write_granularity() and
bdev_zone_write_granularity() are also introduced.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@edc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-02-10 07:44:40 -07:00
..
bfq-iosched.rst docs: block: update and fix tiny error for bfq 2020-07-06 08:07:01 -06:00
biodoc.rst It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
biovecs.rst bvec/iter: disallow zero-length segment bvecs 2021-01-25 08:58:24 -07:00
blk-mq.rst docs: block: blk-mq.rst: get rid of :c:type 2020-10-15 07:49:43 +02:00
capability.rst block: Document genhd capability flags 2020-03-12 07:47:22 -06:00
cmdline-partition.rst docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
data-integrity.rst docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
deadline-iosched.rst docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
index.rst docs: block: Create blk-mq documentation 2020-06-22 07:03:33 -06:00
inline-encryption.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
ioprio.rst docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
kyber-iosched.rst docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
null_blk.rst docs: block: null_blk: enhance document style 2019-09-11 16:04:22 -06:00
pr.rst Documentation: block: eliminate duplicated word 2020-07-13 09:44:05 -06:00
queue-sysfs.rst block: introduce zone_write_granularity limit 2021-02-10 07:44:40 -07:00
request.rst docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
stat.rst block: add iostat counters for flush requests 2019-11-21 09:06:47 -07:00
switching-sched.rst Documenation: switching-sched: Remove notes about elevator argument 2019-09-03 08:04:02 -06:00
writeback_cache_control.rst block: move ->make_request_fn to struct block_device_operations 2020-07-01 07:27:24 -06:00