]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - block/blk-sysfs.c
block: Add 'zoned' queue limit
authorDamien Le Moal <damien.lemoal@hgst.com>
Tue, 18 Oct 2016 06:40:29 +0000 (15:40 +0900)
committerJens Axboe <axboe@fb.com>
Tue, 18 Oct 2016 16:02:00 +0000 (10:02 -0600)
commit797476b88bde2a6001f9552f383f147e58c1a330
tree607e6d6bea27aa9d9cb7bb86ce7da557ddee72e1
parent14155cafeadda946376260e2ad5d39a0528a332f
block: Add 'zoned' queue limit

Add the zoned queue limit to indicate the zoning model of a block device.
Defined values are 0 (BLK_ZONED_NONE) for regular block devices,
1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM)
for host-managed zone block devices. The standards defined drive managed
model is not defined here since these block devices do not provide any
command for accessing zone information. Drive managed model devices will
be reported as BLK_ZONED_NONE.

The helper functions blk_queue_zoned_model and bdev_zoned_model return
the zoned limit and the functions blk_queue_is_zoned and bdev_is_zoned
return a boolean for callers to test if a block device is zoned.

The zoned attribute is also exported as a string to applications via
sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and
BLK_ZONED_HM as "host-managed".

Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Tested-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Documentation/ABI/testing/sysfs-block
block/blk-settings.c
block/blk-sysfs.c
include/linux/blkdev.h