Skip to content

Commit cf2c0f8

Browse files
committed
zbd/006: reset only the test target zone
The test case zbd/006 performs random writes to the first sequential write required zone of the test target zoned block device. To prepare for this operation, it invokes the blkzone reset command, specifying the offset of the test target zone. However, the zone count option is not specified to the command. This resulted in reset of all sequential write required zones on the device. This zone reset operation is unnecessary for zones other than the first one and significantly increases the operation time. To address this issue, add the zone count option to the blkzone reset command. Additionally, use long option names for better readability and clarity. Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent b1bf6ee commit cf2c0f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/zbd/006

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ test_device() {
3636
offset=$((ZONE_STARTS[zone_idx] * 512))
3737
size=$((ZONE_LENGTHS[zone_idx] * 512))
3838

39-
blkzone reset -o "${ZONE_STARTS[zone_idx]}" "${TEST_DEV}"
39+
blkzone reset --offset "${ZONE_STARTS[zone_idx]}" --count 1 \
40+
"${TEST_DEV}"
4041

4142
_test_dev_set_scheduler deadline
4243

0 commit comments

Comments
 (0)