On Thu, 2022-10-27 at 15:01 +0900, Shin'ichiro Kawasaki wrote: > When zonemode is zbd and block size is not divisor of zone size, write target > zone selection does not work as expected. First four patches in this series fix > the issue by introducing zone finish operation. First three patches do > preparation and the 4th patch does the fix. > > This series also fix four more issues related to verify with zonemode zbd. The > first issue is that verify is allowed only when block size is divisor of zone > size. The 5th patch removes this limitation. The second and third issue are > caused by zone reset, which erases data pattern for verify. The 6th and 7th > patches adjust verify and zone reset timing to avoid verify errors by the > erased > data pattern. The last issue is experimental verify, which does not work with > zonemode=zbd. The 8th patch checks options to error out when experimental > verify is specified together with zonemode=zbd. > > Five more patches follow to make test cases in t/zbd match with the fixes. > > Changes from v1: > * Separated zbd_zone_remainder() addition to 3rd patch and added suggested > hunks > * Added last 13th patch for a new test case to test experimental_verify option > * Reflected other comments on the list > * Added Tested-by and Reviewed-by tags > The following scripts were run to test this series: t/zbd/run-tests-against-nullb t/zbd/test-zbd-support against a WDC SMR SATA drive t/zbd/test-zbd-support against a WDC SMR SAS drive t/zbd/test-zbd-support against a WDC ZNS NVMe drive t/zbd/test-zbd-support on a VM against a null_blk device (bs=4K) created on the host and virtualized via virtio-blk method (experimental). All the tests above are passing. There is one small commit message change that I suggested in a separate email. With that, for the series, Tested-by: Dmitry Fomichev <dmitry.fomichev@xxxxxxx> Reviewed-by: Dmitry Fomichev <dmitry.fomichev@xxxxxxx> > Shin'ichiro Kawasaki (13): > oslib: blkzoned: add blkzoned_finish_zone() helper function > engines/libzbc: add libzbc_finish_zone() helper function > zbd: add zbd_zone_remainder() helper function > zbd: finish zones with remainder smaller than minimum write block size > zbd: allow block size not divisor of zone size > zbd: verify before zone reset for zone_reset_threshold option > zbd: fix zone reset condition for verify_backlog option > zbd: prevent experimental verify with zonemode=zbd > t/zbd: fix test case #33 for block size unaligned to zone size > t/zbd: modify test case #34 for block size unaligned to zone size > t/zbd: add test case to check zone_reset_threshold option with verify > t/zbd: remove experimental_verify option from test case #54 > t/zbd: add test case to check experimental_verify option > > engines/libzbc.c | 34 +++++++++ > ioengines.h | 2 + > oslib/blkzoned.h | 8 +++ > oslib/linux-blkzoned.c | 37 ++++++++++ > t/zbd/test-zbd-support | 52 ++++++++++---- > zbd.c | 158 ++++++++++++++++++++++++++--------------- > zbd.h | 2 - > 7 files changed, 222 insertions(+), 71 deletions(-) >