|author||Bart Van Assche <email@example.com>||2018-08-24 11:31:27 -0700|
|committer||Jens Axboe <firstname.lastname@example.org>||2018-08-24 12:54:36 -0600|
Add support for zoned block devices
This patch adds support for zoned block devices as follows: - After the file size has been determined, check whether the file name refers to a block device. If so, check whether that block device is a host-managed block device. If that is the case, read the zone information using the BLKREPORTZONE ioctl. That ioctl is supported by the Linux kernel since kernel version v4.10. - After all command-line options have been processed and all job files have been read, verify whether these refer to a zoned block device and also whether the specified options are compatible with a zoned block device. Complain if that is not the case. - After each get_next_block() call, verify whether the block is appropriate for a zoned block device. When writing data to a sequential zone, adjust the write offset to the zone write pointer. When reading from a sequential zone, avoid reading past the write pointer. - After I/O submission, update the variable that represents the write pointer. - When writing data and with data verification enabled, reset a zone before writing any data into a zone. Otherwise reset a zone before issuing a write if that zone is full. - Translate trim into zone resets. Zoned block devices namely do not have to support any of the SCSI commands that are used by the kernel to implement the discard ioctl (UNMAP / WRITE SAME). This work started from a patch from Masato Suzuki <email@example.com>. Some of the ideas in this patch come from Phillip Chen <firstname.lastname@example.org>. Signed-off-by: Bart Van Assche <email@example.com> Signed-off-by: Jens Axboe <firstname.lastname@example.org>
Diffstat (limited to 'HOWTO')
1 files changed, 20 insertions, 0 deletions
@@ -997,6 +997,26 @@ Target file/device
:option:`zonesize` bytes of data have been transferred. This parameter
must be zero for :option:`zonemode` =zbd.
+.. option:: read_beyond_wp=bool
+ This parameter applies to :option:`zonemode` =zbd only.
+ Zoned block devices are block devices that consist of multiple zones.
+ Each zone has a type, e.g. conventional or sequential. A conventional
+ zone can be written at any offset that is a multiple of the block
+ size. Sequential zones must be written sequentially. The position at
+ which a write must occur is called the write pointer. A zoned block
+ device can be either drive managed, host managed or host aware. For
+ host managed devices the host must ensure that writes happen
+ sequentially. Fio recognizes host managed devices and serializes
+ writes to sequential zones for these devices.
+ If a read occurs in a sequential zone beyond the write pointer then
+ the zoned block device will complete the read without reading any data
+ from the storage medium. Since such reads lead to unrealistically high
+ bandwidth and IOPS numbers fio only reads beyond the write pointer if
+ explicitly told to do so. Default: false.