linux-stable/Documentation/block
Damien Le Moal 6b4bb49e34 block: introduce zone_write_granularity limit
[ Upstream commit a805a4fa4f ]

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>
Stable-dep-of: c8f6f88d25 ("block: Clear zone limits for a non-zoned stacked queue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 12:58:07 +02:00
..
bfq-iosched.rst
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
blk-mq.rst docs: block: blk-mq.rst: get rid of :c:type 2020-10-15 07:49:43 +02:00
capability.rst
cmdline-partition.rst
data-integrity.rst
deadline-iosched.rst
index.rst
inline-encryption.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
ioprio.rst
kyber-iosched.rst
null_blk.rst
pr.rst
queue-sysfs.rst block: introduce zone_write_granularity limit 2024-04-13 12:58:07 +02:00
request.rst
stat.rst
switching-sched.rst
writeback_cache_control.rst