All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v3 5/5] btrfs-progs: mkfs: add artificial dependency for block group tree
Date: Tue,  9 Aug 2022 14:03:55 +0800	[thread overview]
Message-ID: <4b9cfb7fefd88b1943a8d630e2e34e0f439695b2.1660024949.git.wqu@suse.com> (raw)
In-Reply-To: <cover.1660024949.git.wqu@suse.com>

To reduce the test matrix and to follow the kernel behavior, make sure
for block-group-tree feature, we have no-holes and free-space-tree
features enabled.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 mkfs/main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mkfs/main.c b/mkfs/main.c
index 518ce0fd7523..54cd47a0cdc0 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1303,6 +1303,13 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
 		}
 	}
 
+	/* Block group tree feature requires no-holes and frree space tree. */
+	if (runtime_features & BTRFS_RUNTIME_FEATURE_BLOCK_GROUP_TREE &&
+	    (!(features & BTRFS_FEATURE_INCOMPAT_NO_HOLES) ||
+	     !(runtime_features & BTRFS_RUNTIME_FEATURE_FREE_SPACE_TREE))) {
+		error("block group tree feature requires no-holes and free-space-tree features");
+		exit(1);
+	}
 	if (zoned) {
 		if (source_dir_set) {
 			error("the option -r and zoned mode are incompatible");
-- 
2.37.0


  parent reply	other threads:[~2022-08-09  6:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  6:03 [PATCH v3 0/5] btrfs-progs: separate BLOCK_GROUP_TREE feature from extent-tree-v2 Qu Wenruo
2022-08-09  6:03 ` [PATCH v3 1/5] btrfs-progs: mkfs: dynamically modify mkfs blocks array Qu Wenruo
2022-08-09  6:03 ` [PATCH v3 2/5] btrfs-progs: don't save block group root into super block Qu Wenruo
2022-08-09  6:03 ` [PATCH v3 3/5] btrfs-progs: separate block group tree from extent tree v2 Qu Wenruo
2022-08-31 19:14   ` David Sterba
2022-08-31 21:43     ` Qu Wenruo
2022-09-01 12:15       ` Qu Wenruo
2022-09-02  9:21         ` David Sterba
2022-09-02  9:37           ` Qu Wenruo
2022-09-02 12:10             ` David Sterba
2022-10-03 14:48   ` Anand Jain
2022-10-03 23:28     ` Qu Wenruo
2022-10-04  0:05       ` Qu Wenruo
2022-08-09  6:03 ` [PATCH v3 4/5] btrfs-progs: btrfstune: add the ability to convert to block group tree feature Qu Wenruo
2022-08-09  6:03 ` Qu Wenruo [this message]
2022-08-31 18:26 ` [PATCH v3 0/5] btrfs-progs: separate BLOCK_GROUP_TREE feature from extent-tree-v2 David Sterba

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=4b9cfb7fefd88b1943a8d630e2e34e0f439695b2.1660024949.git.wqu@suse.com \
    --to=wqu@suse.com \
    --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.