Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
t/zbd: fix minimum write size to sequential write required zones
ZBC and ZAC require that writes to sequential write required zones shall be aligned to physical block size. However, the t/zbd/test-zbd-support script uses logical block size as the minimum write size. When SMR drives have the physical block size larger than the logical block size, writes with the logical block size causes unaligned write command error. To fix it, use correct value as the minimum write size. As for zoned block devices, introduce a helper function min_seq_write_size(), which checks sysfs attributes and returns the correct size. Refer the attribute zone_write_granularity when it is available, which provides the minimum write size regardless of the device type. If the attribute is not available, refer the attribute physical_block_size for SMR devices, and the logical_block_size attribute for other devices. As for SG node device, refer physical block size that zbc_info command reports. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
- Loading branch information