summaryrefslogtreecommitdiff
path: root/kernel/reboot.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-21 15:43:38 +0900
committerJens Axboe <axboe@kernel.dk>2018-01-05 09:22:17 -0700
commit6cc77e9cb08041627fe1d32ac3a743249deb8167 (patch)
tree66303b9eb83c696b900fafc4f0c446acd6e2d72e /kernel/reboot.c
parent882d4171a8950646413b1a3cbe0e4a6a612fe82e (diff)
downloadlwn-6cc77e9cb08041627fe1d32ac3a743249deb8167.tar.gz
lwn-6cc77e9cb08041627fe1d32ac3a743249deb8167.zip
block: introduce zoned block devices zone write locking
Components relying only on the request_queue structure for accessing block devices (e.g. I/O schedulers) have a limited knowledged of the device characteristics. In particular, the device capacity cannot be easily discovered, which for a zoned block device also result in the inability to easily know the number of zones of the device (the zone size is indicated by the chunk_sectors field of the queue limits). Introduce the nr_zones field to the request_queue structure to simplify access to this information. Also, add the bitmap seq_zone_bitmap which indicates which zones of the device are sequential zones (write preferred or write required) and the bitmap seq_zones_wlock which indicates if a zone is write locked, that is, if a write request targeting a zone was dispatched to the device. These fields are initialized by the low level block device driver (sd.c for ZBC/ZAC disks). They are not initialized by stacking drivers (device mappers) handling zoned block devices (e.g. dm-linear). Using this, I/O schedulers can introduce zone write locking to control request dispatching to a zoned block device and avoid write request reordering by limiting to at most a single write request per zone outside of the scheduler at any time. Based on previous patches from Damien Le Moal. Signed-off-by: Christoph Hellwig <hch@lst.de> [Damien] * Fixed comments and identation in blkdev.h * Changed helper functions * Fixed this commit message Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/reboot.c')
0 files changed, 0 insertions, 0 deletions