]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
zonefs: use zone write granularity as block size
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 28 Jan 2021 04:47:31 +0000 (13:47 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:44:41 +0000 (07:44 -0700)
commit0f1ba5f5d80f84b605e70cf4661cb1a44a3c02a6
treed6af60d42bc17bd961561e4ce88a9fac3c12db10
parenta805a4fa4fa376bbc145762bb8b09caa2fa8af48
zonefs: use zone write granularity as block size

Zoned block devices have different granularity constraints for write
operations into sequential zones. E.g. ZBC and ZAC devices require that
writes be aligned to the device physical block size while NVMe ZNS
devices allow logical block size aligned write operations. To correctly
handle such difference, use the device zone write granularity limit to
set the block size of a zonefs volume, thus allowing the smallest
possible write unit for all zoned device types.

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>
fs/zonefs/super.c