All of lore.kernel.org
 help / color / mirror / Atom feed
From: Naohiro Aota <naohiro.aota@wdc.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Naohiro Aota <naohiro.aota@wdc.com>
Subject: [PATCH 4/5] common: add zoned block device checks
Date: Fri, 21 May 2021 13:58:24 +0900	[thread overview]
Message-ID: <20210521045825.1720305-5-naohiro.aota@wdc.com> (raw)
In-Reply-To: <20210521045825.1720305-1-naohiro.aota@wdc.com>

dm-error and dm-snapshot does not have DM_TARGET_ZONED_HM nor
DM_TARGET_MIXED_ZONED_MODEL feature and does not implement
.report_zones(). So, it cannot pass the zone information from the down
layer (zoned device) to the upper layer.

Loop device also cannot pass the zone information.

This patch requires non-zoned block device for the tests using these
ones.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 common/dmerror    | 3 +++
 common/dmhugedisk | 3 +++
 common/rc         | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/common/dmerror b/common/dmerror
index 7d12e0a1843c..84d2c338df11 100644
--- a/common/dmerror
+++ b/common/dmerror
@@ -15,6 +15,9 @@ _dmerror_setup()
 	DMLINEAR_TABLE="0 $blk_dev_size linear $dm_backing_dev 0"
 
 	DMERROR_TABLE="0 $blk_dev_size error $dm_backing_dev 0"
+
+	# dm-error cannot handle zone information
+	_require_non_zoned_device "${dm_backing_dev}"
 }
 
 _dmerror_init()
diff --git a/common/dmhugedisk b/common/dmhugedisk
index 502f0243772d..715f95efde29 100644
--- a/common/dmhugedisk
+++ b/common/dmhugedisk
@@ -16,6 +16,9 @@ _dmhugedisk_init()
 	local dm_backing_dev=$SCRATCH_DEV
 	local chunk_size="$2"
 
+	# We cannot ensure sequential writes on the backing device
+	_require_non_zoned_device $dm_backing_dev
+
 	if [ -z "$chunk_size" ]; then
 		chunk_size=512
 	fi
diff --git a/common/rc b/common/rc
index 9a8458d4a3b6..55cd8e8df8f6 100644
--- a/common/rc
+++ b/common/rc
@@ -1812,6 +1812,9 @@ _require_loop()
     else
 	_notrun "This test requires loopback device support"
     fi
+
+    # loop device does not handle zone information
+    _require_non_zoned_device ${TEST_DEV}
 }
 
 # this test requires kernel support for a secondary filesystem
-- 
2.31.1


  parent reply	other threads:[~2021-05-21  4:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  4:58 [PATCH 0/5] fstests: add checks for testing zoned btrfs Naohiro Aota
2021-05-21  4:58 ` [PATCH 1/5] common/rc: introduce minimal fs size check Naohiro Aota
2021-05-21  4:58 ` [PATCH 2/5] btrfs/057: use _scratch_mkfs_sized to set filesystem size Naohiro Aota
2021-05-21  4:58 ` [PATCH 3/5] btrfs: add minimal file system size check Naohiro Aota
2021-05-21  4:58 ` Naohiro Aota [this message]
2021-05-21  4:58 ` [PATCH 5/5] shared/032: add check for zoned block device Naohiro Aota
2021-05-21 10:17 ` [PATCH 0/5] fstests: add checks for testing zoned btrfs Johannes Thumshirn
2021-05-21 11:06   ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210521045825.1720305-5-naohiro.aota@wdc.com \
    --to=naohiro.aota@wdc.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.