All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: fstests@vger.kernel.org
Cc: Josef Bacik <josef@toxicpanda.com>
Subject: [PATCH 2/5] btrfs/131,btrfs/172,btrfs/206: add check for block-group-tree feature in btrfs
Date: Tue, 19 Mar 2024 19:12:03 +0100	[thread overview]
Message-ID: <7e5a4dbefa3edb834560891feec6ecf3382bb9e0.1710871719.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1710871719.git.dsterba@suse.com>

From: Josef Bacik <josef@toxicpanda.com>

A new disk format option will make the no-holes option a requirement, so
add a helper to make sure that we aren't creating a fs with
BLOCK_GROUP_TREE by default, and skip the tests that require turning off
no-holes.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 common/btrfs    | 10 ++++++++++
 tests/btrfs/131 |  2 ++
 tests/btrfs/172 |  3 +++
 tests/btrfs/206 |  3 +++
 4 files changed, 18 insertions(+)

diff --git a/common/btrfs b/common/btrfs
index aa344706cd5f81..c1c3c4683a6fe6 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -148,6 +148,16 @@ _require_btrfs_free_space_tree()
 	fi
 }
 
+_require_btrfs_no_block_group_tree()
+{
+	_scratch_mkfs > /dev/null 2>&1
+	if $BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | \
+		grep -q "BLOCK_GROUP_TREE"
+	then
+		_notrun "This test requires no block-group-tree"
+	fi
+}
+
 _check_btrfs_filesystem()
 {
 	device=$1
diff --git a/tests/btrfs/131 b/tests/btrfs/131
index 529ee3e80f87eb..d34fc8d53801b3 100755
--- a/tests/btrfs/131
+++ b/tests/btrfs/131
@@ -20,6 +20,8 @@ _require_btrfs_command inspect-internal dump-super
 _require_btrfs_fs_feature free_space_tree
 # Zoned btrfs does not support space_cache(v1)
 _require_non_zoned_device "${SCRATCH_DEV}"
+# Block group tree does not support space_cache(v1)
+_require_btrfs_no_block_group_tree
 
 _scratch_mkfs >/dev/null 2>&1
 [ "$(_get_page_size)" -gt "$(_scratch_btrfs_sectorsize)" ] && \
diff --git a/tests/btrfs/172 b/tests/btrfs/172
index f2997c047effb0..964251b449de20 100755
--- a/tests/btrfs/172
+++ b/tests/btrfs/172
@@ -32,6 +32,9 @@ _require_scratch
 _require_log_writes
 _require_xfs_io_command "sync_range"
 
+# block-group-tree requires no-holes
+_require_btrfs_no_block_group_tree
+
 _log_writes_init $SCRATCH_DEV
 _log_writes_mkfs "-O ^no-holes" >> $seqres.full 2>&1
 
diff --git a/tests/btrfs/206 b/tests/btrfs/206
index 6ac3d27bbde375..02a5082046f4a5 100755
--- a/tests/btrfs/206
+++ b/tests/btrfs/206
@@ -33,6 +33,9 @@ _require_log_writes
 _require_xfs_io_command "falloc" "-k"
 _require_xfs_io_command "fpunch"
 
+# block-group-tree requires no-holes
+_require_btrfs_no_block_group_tree
+
 _log_writes_init $SCRATCH_DEV
 _log_writes_mkfs "-O ^no-holes" >> $seqres.full 2>&1
 
-- 
2.42.1


  parent reply	other threads:[~2024-03-19 18:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 18:11 [PATCH 0/5] Btrfs fstests fixups and updates David Sterba
2024-03-19 18:12 ` [PATCH 1/5] common/verity: use the correct options for btrfs-corrupt-block David Sterba
2024-03-20  9:58   ` Anand Jain
2024-03-20 15:23     ` David Sterba
2024-03-24  7:56       ` Anand Jain
2024-03-19 18:12 ` David Sterba [this message]
2024-03-20 10:01   ` [PATCH 2/5] btrfs/131,btrfs/172,btrfs/206: add check for block-group-tree feature in btrfs Anand Jain
2024-03-19 18:12 ` [PATCH 3/5] btrfs/330: add test to validate ro/rw subvol mounting David Sterba
2024-03-20 11:33   ` Anand Jain
2024-03-20 17:01     ` Filipe Manana
2024-03-21  3:51       ` Anand Jain
2024-03-19 18:12 ` [PATCH 4/5] common/rc: use proper temporary file path in _repair_test_fs() David Sterba
2024-03-20 11:35   ` Anand Jain
2024-03-19 18:12 ` [PATCH 5/5] generic/733: disable for btrfs David Sterba
2024-03-19 21:01   ` Christoph Hellwig
2024-03-19 21:10     ` Darrick J. Wong
2024-03-19 21:16       ` Christoph Hellwig
2024-03-20 15:58     ` David Sterba
2024-03-21 21:36       ` Christoph Hellwig
2024-03-21 21:52         ` Kent Overstreet
2024-03-22 15:08           ` Josef Bacik
2024-03-22 15:45             ` Darrick J. Wong
2024-03-22 18:28             ` Kent Overstreet
2024-03-20  9:49 ` [PATCH 0/5] Btrfs fstests fixups and updates Anand Jain
2024-03-20 15:26   ` David Sterba
2024-03-21  4:09 ` [PATCH] common/btrfs: set BTRFS_CORRUPT_BLOCK_OPT_<VALUE|OFFSET> Anand Jain
2024-03-21 11:13   ` Filipe Manana
2024-03-21 12:34     ` Anand Jain
2024-03-24  8:35 ` [PATCH 0/5] Btrfs fstests fixups and updates Anand Jain

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=7e5a4dbefa3edb834560891feec6ecf3382bb9e0.1710871719.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    /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.