Commit d6204f1e authored by Bart Van Assche's avatar Bart Van Assche Committed by Treehugger Robot
Browse files

ANDROID: scsi/sd_zbc: Support npo2 zone sizes



Remove the restriction that the zone size must be a power of two. This
patch has been tested with the following test script:

. tests/zbd/rc
. common/null_blk
. common/scsi_debug

DESCRIPTION="test npo2 zone size support"
QUICK=1

requires() {
	_have_fio
	_have_driver f2fs
	_have_module_param scsi_debug zone_size_mb
	_have_scsi_debug
}

test() {
	echo "Running ${TEST_NAME}"

	local scsi_debug_params=(
		delay=0
		dev_size_mb=1024
		sector_size=4096
		zbc=host-managed
		zone_nr_conv=0
		zone_size_mb=3
	)
	_init_scsi_debug "${scsi_debug_params[@]}" &&
	local zdev="/dev/${SCSI_DEBUG_DEVICES[0]}" fail &&
	ls -ld "${zdev}" >>"${FULL}" &&
	local fio_args=(
		--direct=1
		--file="${zdev}"
		--gtod_reduce=1
		--iodepth=64
		--iodepth_batch=16
		--ioengine=io_uring
		--ioscheduler=none
		--name=npo2zs
		--runtime=10
		--size=1M
		--time_based=1
		--zonemode=zbd
	) &&
	_run_fio_verify_io "${fio_args[@]}" >>"${FULL}" 2>&1 ||
	fail=true

	_exit_scsi_debug

	if [ -z "$fail" ]; then
		echo "Test complete"
	else
		echo "Test failed"
		return 1
	fi
}

Bug: 197782466
Bug: 269471019
Change-Id: I70b498ab8920b4e1a13e04b753fe176a632552b2
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 7dadc51d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment