2016-10-28 18:15:55 +02:00
|
|
|
From: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
Subject: mkfs: allow site to override defaults
|
|
|
|
Patch-mainline: Never, a real solution with a config file is required
|
|
|
|
References: FATE#320615
|
|
|
|
|
|
|
|
This is a simple method to allow us to set site defaults for mkfs by
|
|
|
|
adding -include <includefile> to cflags.
|
|
|
|
|
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
---
|
|
|
|
utils.h | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
2022-11-02 12:59:24 +01:00
|
|
|
Index: btrfs-progs-v6.0/common/fsfeatures.h
|
2017-04-06 17:50:16 +02:00
|
|
|
===================================================================
|
2022-11-02 12:59:24 +01:00
|
|
|
--- btrfs-progs-v6.0.orig/common/fsfeatures.h
|
|
|
|
+++ btrfs-progs-v6.0/common/fsfeatures.h
|
|
|
|
@@ -21,7 +21,9 @@
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "kernel-lib/sizes.h"
|
2016-10-28 18:15:55 +02:00
|
|
|
|
|
|
|
+#ifndef BTRFS_MKFS_DEFAULT_NODE_SIZE
|
2017-04-06 17:50:16 +02:00
|
|
|
#define BTRFS_MKFS_DEFAULT_NODE_SIZE SZ_16K
|
2016-10-28 18:15:55 +02:00
|
|
|
+#endif
|
|
|
|
|
2022-11-02 12:59:24 +01:00
|
|
|
/*
|
|
|
|
* Since one feature can set at least one bit in either
|
|
|
|
@@ -44,11 +46,20 @@ struct btrfs_mkfs_features {
|
|
|
|
#define BTRFS_FEATURE_STRING_BUF_SIZE (160)
|
|
|
|
|
|
|
|
static const struct btrfs_mkfs_features btrfs_mkfs_default_features = {
|
2021-11-10 16:09:48 +01:00
|
|
|
+#ifndef BTRFS_MKFS_DEFAULT_RUNTIME_FEATURES
|
2022-11-02 12:59:24 +01:00
|
|
|
.compat_ro_flags = BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE |
|
|
|
|
BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID,
|
|
|
|
+#else
|
|
|
|
+ .compat_ro_flags = BTRFS_MKFS_DEFAULT_RUNTIME_FEATURES ,
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#ifndef BTRFS_MKFS_DEFAULT_FEATURES
|
|
|
|
.incompat_flags = BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF |
|
|
|
|
BTRFS_FEATURE_INCOMPAT_NO_HOLES |
|
|
|
|
BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA,
|
|
|
|
+#else
|
|
|
|
+ .incompat_flags = BTRFS_MKFS_DEFAULT_FEATURES ,
|
2021-11-10 16:09:48 +01:00
|
|
|
+#endif
|
2022-11-02 12:59:24 +01:00
|
|
|
};
|
2021-11-10 16:09:48 +01:00
|
|
|
|
2016-10-28 18:15:55 +02:00
|
|
|
/*
|