diff mbox series

[blktests,03/13] common/null_blk: respect RUN_FOR_ZONED in _configure_null_blk

Message ID 20220603045558.466760-4-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [blktests,01/13] common/null_blk: remove explicit queue_mode=2 parameters | expand

Commit Message

Christoph Hellwig June 3, 2022, 4:55 a.m. UTC
Create zoned devices in _configure_null_blk when RUN_FOR_ZONED is
set, just like it is done in _init_null_blk

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/null_blk | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/common/null_blk b/common/null_blk
index 381f6b8..c82327d 100644
--- a/common/null_blk
+++ b/common/null_blk
@@ -38,6 +38,11 @@  _configure_null_blk() {
 
 	shift
 	mkdir "$nullb" || return $?
+
+	if (( RUN_FOR_ZONED )); then
+		echo "1" > "$nullb/zoned" || return $?
+	fi
+
 	while [[ $# -gt 0 ]]; do
 		param="${1%%=*}"
 		val="${1#*=}"