btrfs: move fs wide helpers out of ctree.h
authorJosef Bacik <josef@toxicpanda.com>
Wed, 19 Oct 2022 14:50:47 +0000 (10:50 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:41 +0000 (18:00 +0100)
We have several fs wide related helpers in ctree.h.  The bulk of these
are the incompat flag test helpers, but there are things such as
btrfs_fs_closing() and the read only helpers that also aren't directly
related to the ctree code.  Move these into a fs.h header, which will
serve as the location for file system wide related helpers.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
26 files changed:
fs/btrfs/Makefile
fs/btrfs/backref.c
fs/btrfs/block-group.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/file-item.c
fs/btrfs/file.c
fs/btrfs/free-space-tree.c
fs/btrfs/fs.c [new file with mode: 0644]
fs/btrfs/fs.h [new file with mode: 0644]
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/props.c
fs/btrfs/qgroup.c
fs/btrfs/relocation.c
fs/btrfs/scrub.c
fs/btrfs/space-info.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/tree-checker.c
fs/btrfs/tree-log.c
fs/btrfs/uuid-tree.c
fs/btrfs/verity.c
fs/btrfs/volumes.c
fs/btrfs/zoned.c

index fa9ddcc9eb0bce968f79b980e2a21ba12c16cd2d..eebb45c0648526b6809573f8f81095c17f481742 100644 (file)
@@ -31,7 +31,7 @@ btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
           backref.o ulist.o qgroup.o send.o dev-replace.o raid56.o \
           uuid-tree.o props.o free-space-tree.o tree-checker.o space-info.o \
           block-rsv.o delalloc-space.o block-group.o discard.o reflink.o \
-          subpage.o tree-mod-log.o extent-io-tree.o
+          subpage.o tree-mod-log.o extent-io-tree.o fs.o
 
 btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o
 btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o
index 232f49415ab93d6f2d19dc6bd00c0dce91c31ec8..f76db317c43720b155f26e81870fec31a6d3cfeb 100644 (file)
@@ -15,6 +15,7 @@
 #include "locking.h"
 #include "misc.h"
 #include "tree-mod-log.h"
+#include "fs.h"
 
 /* Just arbitrary numbers so we can be sure one of these happened. */
 #define BACKREF_FOUND_SHARED     6
index 47461fd2197535488cc46dc881beca61109be440..bf8d1e1101367564e1f97b73e6521aef18157d0c 100644 (file)
@@ -17,6 +17,7 @@
 #include "discard.h"
 #include "raid56.h"
 #include "zoned.h"
+#include "fs.h"
 
 #ifdef CONFIG_BTRFS_DEBUG
 int btrfs_should_fragment_free_space(struct btrfs_block_group *block_group)
index 3485f60efa330e6137235ba8e79b3477ffd34d17..1b2a1dcb60dda91792c2d154dcb7f484b3a04895 100644 (file)
@@ -2857,44 +2857,6 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
                        struct btrfs_root *root,
                        struct extent_buffer *node,
                        struct extent_buffer *parent);
-static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info)
-{
-       /*
-        * Do it this way so we only ever do one test_bit in the normal case.
-        */
-       if (test_bit(BTRFS_FS_CLOSING_START, &fs_info->flags)) {
-               if (test_bit(BTRFS_FS_CLOSING_DONE, &fs_info->flags))
-                       return 2;
-               return 1;
-       }
-       return 0;
-}
-
-/*
- * If we remount the fs to be R/O or umount the fs, the cleaner needn't do
- * anything except sleeping. This function is used to check the status of
- * the fs.
- * We check for BTRFS_FS_STATE_RO to avoid races with a concurrent remount,
- * since setting and checking for SB_RDONLY in the superblock's flags is not
- * atomic.
- */
-static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info)
-{
-       return test_bit(BTRFS_FS_STATE_RO, &fs_info->fs_state) ||
-               btrfs_fs_closing(fs_info);
-}
-
-static inline void btrfs_set_sb_rdonly(struct super_block *sb)
-{
-       sb->s_flags |= SB_RDONLY;
-       set_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state);
-}
-
-static inline void btrfs_clear_sb_rdonly(struct super_block *sb)
-{
-       sb->s_flags &= ~SB_RDONLY;
-       clear_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state);
-}
 
 /* root-item.c */
 int btrfs_add_root_ref(struct btrfs_trans_handle *trans, u64 root_id,
@@ -3529,132 +3491,6 @@ do {                                                                    \
 } while (0)
 
 
-/* compatibility and incompatibility defines */
-
-#define btrfs_set_fs_incompat(__fs_info, opt) \
-       __btrfs_set_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt, \
-                               #opt)
-
-static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info,
-                                          u64 flag, const char* name)
-{
-       struct btrfs_super_block *disk_super;
-       u64 features;
-
-       disk_super = fs_info->super_copy;
-       features = btrfs_super_incompat_flags(disk_super);
-       if (!(features & flag)) {
-               spin_lock(&fs_info->super_lock);
-               features = btrfs_super_incompat_flags(disk_super);
-               if (!(features & flag)) {
-                       features |= flag;
-                       btrfs_set_super_incompat_flags(disk_super, features);
-                       btrfs_info(fs_info,
-                               "setting incompat feature flag for %s (0x%llx)",
-                               name, flag);
-               }
-               spin_unlock(&fs_info->super_lock);
-       }
-}
-
-#define btrfs_clear_fs_incompat(__fs_info, opt) \
-       __btrfs_clear_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt, \
-                                 #opt)
-
-static inline void __btrfs_clear_fs_incompat(struct btrfs_fs_info *fs_info,
-                                            u64 flag, const char* name)
-{
-       struct btrfs_super_block *disk_super;
-       u64 features;
-
-       disk_super = fs_info->super_copy;
-       features = btrfs_super_incompat_flags(disk_super);
-       if (features & flag) {
-               spin_lock(&fs_info->super_lock);
-               features = btrfs_super_incompat_flags(disk_super);
-               if (features & flag) {
-                       features &= ~flag;
-                       btrfs_set_super_incompat_flags(disk_super, features);
-                       btrfs_info(fs_info,
-                               "clearing incompat feature flag for %s (0x%llx)",
-                               name, flag);
-               }
-               spin_unlock(&fs_info->super_lock);
-       }
-}
-
-#define btrfs_fs_incompat(fs_info, opt) \
-       __btrfs_fs_incompat((fs_info), BTRFS_FEATURE_INCOMPAT_##opt)
-
-static inline bool __btrfs_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag)
-{
-       struct btrfs_super_block *disk_super;
-       disk_super = fs_info->super_copy;
-       return !!(btrfs_super_incompat_flags(disk_super) & flag);
-}
-
-#define btrfs_set_fs_compat_ro(__fs_info, opt) \
-       __btrfs_set_fs_compat_ro((__fs_info), BTRFS_FEATURE_COMPAT_RO_##opt, \
-                                #opt)
-
-static inline void __btrfs_set_fs_compat_ro(struct btrfs_fs_info *fs_info,
-                                           u64 flag, const char *name)
-{
-       struct btrfs_super_block *disk_super;
-       u64 features;
-
-       disk_super = fs_info->super_copy;
-       features = btrfs_super_compat_ro_flags(disk_super);
-       if (!(features & flag)) {
-               spin_lock(&fs_info->super_lock);
-               features = btrfs_super_compat_ro_flags(disk_super);
-               if (!(features & flag)) {
-                       features |= flag;
-                       btrfs_set_super_compat_ro_flags(disk_super, features);
-                       btrfs_info(fs_info,
-                               "setting compat-ro feature flag for %s (0x%llx)",
-                               name, flag);
-               }
-               spin_unlock(&fs_info->super_lock);
-       }
-}
-
-#define btrfs_clear_fs_compat_ro(__fs_info, opt) \
-       __btrfs_clear_fs_compat_ro((__fs_info), BTRFS_FEATURE_COMPAT_RO_##opt, \
-                                  #opt)
-
-static inline void __btrfs_clear_fs_compat_ro(struct btrfs_fs_info *fs_info,
-                                             u64 flag, const char *name)
-{
-       struct btrfs_super_block *disk_super;
-       u64 features;
-
-       disk_super = fs_info->super_copy;
-       features = btrfs_super_compat_ro_flags(disk_super);
-       if (features & flag) {
-               spin_lock(&fs_info->super_lock);
-               features = btrfs_super_compat_ro_flags(disk_super);
-               if (features & flag) {
-                       features &= ~flag;
-                       btrfs_set_super_compat_ro_flags(disk_super, features);
-                       btrfs_info(fs_info,
-                               "clearing compat-ro feature flag for %s (0x%llx)",
-                               name, flag);
-               }
-               spin_unlock(&fs_info->super_lock);
-       }
-}
-
-#define btrfs_fs_compat_ro(fs_info, opt) \
-       __btrfs_fs_compat_ro((fs_info), BTRFS_FEATURE_COMPAT_RO_##opt)
-
-static inline int __btrfs_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag)
-{
-       struct btrfs_super_block *disk_super;
-       disk_super = fs_info->super_copy;
-       return !!(btrfs_super_compat_ro_flags(disk_super) & flag);
-}
-
 /* acl.c */
 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
 struct posix_acl *btrfs_get_acl(struct inode *inode, int type, bool rcu);
index cf59d8f14a056869613423d64cdb15fca6ca6c2e..5e20b191b1080a7bdad23b6cc95c5bde0df9e7d4 100644 (file)
@@ -43,6 +43,7 @@
 #include "space-info.h"
 #include "zoned.h"
 #include "subpage.h"
+#include "fs.h"
 
 #define BTRFS_SUPER_FLAG_SUPP  (BTRFS_HEADER_FLAG_WRITTEN |\
                                 BTRFS_HEADER_FLAG_RELOC |\
index 2801c991814f573e33977c17eb32205852eb2192..bc010dbcb6b1cb53930743b287573178c799ad9b 100644 (file)
@@ -36,6 +36,7 @@
 #include "rcu-string.h"
 #include "zoned.h"
 #include "dev-replace.h"
+#include "fs.h"
 
 #undef SCRAMBLE_DELAYED_REFS
 
index 6bb9fa961a6a10347e69cb643154855274395f41..824ff54d8155eeb89ef6575052db643ae8a23d90 100644 (file)
@@ -16,6 +16,7 @@
 #include "volumes.h"
 #include "print-tree.h"
 #include "compression.h"
+#include "fs.h"
 
 #define __MAX_CSUM_ITEMS(r, size) ((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \
                                   sizeof(struct btrfs_item) * 2) / \
index 19b41b5fe6c0c81b916ff33322f634ed4787b82f..a352c7cacc9921ec11aba49da7ac98064cd2983a 100644 (file)
@@ -30,6 +30,7 @@
 #include "delalloc-space.h"
 #include "reflink.h"
 #include "subpage.h"
+#include "fs.h"
 
 static struct kmem_cache *btrfs_inode_defrag_cachep;
 /*
index 367bcfcf68f51eb085f669d989ba98b7885cdd26..bfc21eb8ec63b47d2ae9e1397f7c73ab4f2e0cf6 100644 (file)
@@ -11,6 +11,7 @@
 #include "free-space-tree.h"
 #include "transaction.h"
 #include "block-group.h"
+#include "fs.h"
 
 static int __add_block_group_free_space(struct btrfs_trans_handle *trans,
                                        struct btrfs_block_group *block_group,
diff --git a/fs/btrfs/fs.c b/fs/btrfs/fs.c
new file mode 100644 (file)
index 0000000..d4ba948
--- /dev/null
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include "ctree.h"
+#include "fs.h"
+
+void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag,
+                            const char *name)
+{
+       struct btrfs_super_block *disk_super;
+       u64 features;
+
+       disk_super = fs_info->super_copy;
+       features = btrfs_super_incompat_flags(disk_super);
+       if (!(features & flag)) {
+               spin_lock(&fs_info->super_lock);
+               features = btrfs_super_incompat_flags(disk_super);
+               if (!(features & flag)) {
+                       features |= flag;
+                       btrfs_set_super_incompat_flags(disk_super, features);
+                       btrfs_info(fs_info,
+                               "setting incompat feature flag for %s (0x%llx)",
+                               name, flag);
+               }
+               spin_unlock(&fs_info->super_lock);
+       }
+}
+
+void __btrfs_clear_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag,
+                              const char *name)
+{
+       struct btrfs_super_block *disk_super;
+       u64 features;
+
+       disk_super = fs_info->super_copy;
+       features = btrfs_super_incompat_flags(disk_super);
+       if (features & flag) {
+               spin_lock(&fs_info->super_lock);
+               features = btrfs_super_incompat_flags(disk_super);
+               if (features & flag) {
+                       features &= ~flag;
+                       btrfs_set_super_incompat_flags(disk_super, features);
+                       btrfs_info(fs_info,
+                               "clearing incompat feature flag for %s (0x%llx)",
+                               name, flag);
+               }
+               spin_unlock(&fs_info->super_lock);
+       }
+}
+
+void __btrfs_set_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag,
+                             const char *name)
+{
+       struct btrfs_super_block *disk_super;
+       u64 features;
+
+       disk_super = fs_info->super_copy;
+       features = btrfs_super_compat_ro_flags(disk_super);
+       if (!(features & flag)) {
+               spin_lock(&fs_info->super_lock);
+               features = btrfs_super_compat_ro_flags(disk_super);
+               if (!(features & flag)) {
+                       features |= flag;
+                       btrfs_set_super_compat_ro_flags(disk_super, features);
+                       btrfs_info(fs_info,
+                               "setting compat-ro feature flag for %s (0x%llx)",
+                               name, flag);
+               }
+               spin_unlock(&fs_info->super_lock);
+       }
+}
+
+void __btrfs_clear_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag,
+                               const char *name)
+{
+       struct btrfs_super_block *disk_super;
+       u64 features;
+
+       disk_super = fs_info->super_copy;
+       features = btrfs_super_compat_ro_flags(disk_super);
+       if (features & flag) {
+               spin_lock(&fs_info->super_lock);
+               features = btrfs_super_compat_ro_flags(disk_super);
+               if (features & flag) {
+                       features &= ~flag;
+                       btrfs_set_super_compat_ro_flags(disk_super, features);
+                       btrfs_info(fs_info,
+                               "clearing compat-ro feature flag for %s (0x%llx)",
+                               name, flag);
+               }
+               spin_unlock(&fs_info->super_lock);
+       }
+}
diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h
new file mode 100644 (file)
index 0000000..8eda9ce
--- /dev/null
@@ -0,0 +1,85 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef BTRFS_FS_H
+#define BTRFS_FS_H
+
+/* Compatibility and incompatibility defines */
+void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag,
+                            const char *name);
+void __btrfs_clear_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag,
+                              const char *name);
+void __btrfs_set_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag,
+                             const char *name);
+void __btrfs_clear_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag,
+                               const char *name);
+
+#define btrfs_set_fs_incompat(__fs_info, opt)                          \
+       __btrfs_set_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt, #opt)
+
+#define btrfs_clear_fs_incompat(__fs_info, opt)                                \
+       __btrfs_clear_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt, #opt)
+
+#define btrfs_fs_incompat(fs_info, opt)                                        \
+       __btrfs_fs_incompat((fs_info), BTRFS_FEATURE_INCOMPAT_##opt)
+
+#define btrfs_set_fs_compat_ro(__fs_info, opt)                         \
+       __btrfs_set_fs_compat_ro((__fs_info), BTRFS_FEATURE_COMPAT_RO_##opt, #opt)
+
+#define btrfs_clear_fs_compat_ro(__fs_info, opt)                       \
+       __btrfs_clear_fs_compat_ro((__fs_info), BTRFS_FEATURE_COMPAT_RO_##opt, #opt)
+
+#define btrfs_fs_compat_ro(fs_info, opt)                               \
+       __btrfs_fs_compat_ro((fs_info), BTRFS_FEATURE_COMPAT_RO_##opt)
+
+static inline bool __btrfs_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag)
+{
+       struct btrfs_super_block *disk_super;
+       disk_super = fs_info->super_copy;
+       return !!(btrfs_super_incompat_flags(disk_super) & flag);
+}
+
+static inline int __btrfs_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag)
+{
+       struct btrfs_super_block *disk_super;
+       disk_super = fs_info->super_copy;
+       return !!(btrfs_super_compat_ro_flags(disk_super) & flag);
+}
+
+static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info)
+{
+       /* Do it this way so we only ever do one test_bit in the normal case. */
+       if (test_bit(BTRFS_FS_CLOSING_START, &fs_info->flags)) {
+               if (test_bit(BTRFS_FS_CLOSING_DONE, &fs_info->flags))
+                       return 2;
+               return 1;
+       }
+       return 0;
+}
+
+/*
+ * If we remount the fs to be R/O or umount the fs, the cleaner needn't do
+ * anything except sleeping. This function is used to check the status of
+ * the fs.
+ * We check for BTRFS_FS_STATE_RO to avoid races with a concurrent remount,
+ * since setting and checking for SB_RDONLY in the superblock's flags is not
+ * atomic.
+ */
+static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info)
+{
+       return test_bit(BTRFS_FS_STATE_RO, &fs_info->fs_state) ||
+               btrfs_fs_closing(fs_info);
+}
+
+static inline void btrfs_set_sb_rdonly(struct super_block *sb)
+{
+       sb->s_flags |= SB_RDONLY;
+       set_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state);
+}
+
+static inline void btrfs_clear_sb_rdonly(struct super_block *sb)
+{
+       sb->s_flags &= ~SB_RDONLY;
+       clear_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state);
+}
+
+#endif
index 50584b93a66f95f7d844809b97f9a248b2465b6f..60b3162c035d0e3b3cc6b1f9b04456067b0fad1b 100644 (file)
@@ -55,6 +55,7 @@
 #include "zoned.h"
 #include "subpage.h"
 #include "inode-item.h"
+#include "fs.h"
 
 struct btrfs_iget_args {
        u64 ino;
index a482739c1d82e7724e4864b2fe2bf22ac83f7d75..564a4ae9c285b27c0121b08b0d570ae24ec718e6 100644 (file)
@@ -50,6 +50,7 @@
 #include "delalloc-space.h"
 #include "block-group.h"
 #include "subpage.h"
+#include "fs.h"
 
 #ifdef CONFIG_64BIT
 /* If we have a 32-bit userspace and 64-bit kernel, then the UAPI
index e04289347775fca9a39c173a00d9a69a7979c5ab..d2c699c9aa5128de99e0404d42d51b28596983ec 100644 (file)
@@ -11,6 +11,7 @@
 #include "xattr.h"
 #include "compression.h"
 #include "space-info.h"
+#include "fs.h"
 
 #define BTRFS_PROP_HANDLERS_HT_BITS 8
 static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS);
index b74105a10f16c10de23ec0a9b1ab1f4d561a01b3..e87a2f066f4dd346de279681e368e4045591fffb 100644 (file)
@@ -24,6 +24,7 @@
 #include "block-group.h"
 #include "sysfs.h"
 #include "tree-mod-log.h"
+#include "fs.h"
 
 /*
  * Helpers to access qgroup reservation
index 216a4485d9141fd190338c2c500d86d556cf1da5..977afbb4cd45a6c6eca73915af201b9853f84713 100644 (file)
@@ -28,6 +28,7 @@
 #include "zoned.h"
 #include "inode-item.h"
 #include "space-info.h"
+#include "fs.h"
 
 /*
  * Relocation overview
index cdda4b2f20f2850317b71da88a13368201886395..6871c1c54f8c3cab87e32c548c52db7433979498 100644 (file)
@@ -21,6 +21,7 @@
 #include "raid56.h"
 #include "block-group.h"
 #include "zoned.h"
+#include "fs.h"
 
 /*
  * This is only the first step towards a full-features scrub. It reads all
index af2e133aaa5c0924a085c75d4d0d9b2466b38d43..af1538c2685d470fa5040d9872d0b12a48c6e11a 100644 (file)
@@ -10,6 +10,7 @@
 #include "transaction.h"
 #include "block-group.h"
 #include "zoned.h"
+#include "fs.h"
 
 /*
  * HOW DOES SPACE RESERVATION WORK
index 42e0d2fcc4073ae62008afcbab3769dc329bb935..ef646a1d9bc26b6a2cb70d6ff583de07db03bb67 100644 (file)
@@ -49,6 +49,7 @@
 #include "discard.h"
 #include "qgroup.h"
 #include "raid56.h"
+#include "fs.h"
 #define CREATE_TRACE_POINTS
 #include <trace/events/btrfs.h>
 
index ae7d4aca771d7246e069a36b029b8245a122b4a4..bae77fb05e2b65f0623421158c303dc21a78f769 100644 (file)
@@ -23,6 +23,7 @@
 #include "block-group.h"
 #include "space-info.h"
 #include "zoned.h"
+#include "fs.h"
 
 static struct kmem_cache *btrfs_trans_handle_cachep;
 
index 43f905ab0a18d97cdec6d1255536b043891949f0..862d67798de59350e2be1a6a7d583ae33226a666 100644 (file)
@@ -25,6 +25,7 @@
 #include "volumes.h"
 #include "misc.h"
 #include "btrfs_inode.h"
+#include "fs.h"
 
 /*
  * Error message should follow the following format:
index c3cf3dabe0b1b625c1229bcb5a922f6d66bcc86b..e294c38f9b1995a2c6210864a4a8f41fb4b934b3 100644 (file)
@@ -21,6 +21,7 @@
 #include "space-info.h"
 #include "zoned.h"
 #include "inode-item.h"
+#include "fs.h"
 
 #define MAX_CONFLICT_INODES 10
 
index b458452a1aaf8eeb4fe52fd94e0e6b9d6a5d96e2..2d7eb290fb9caa075b16e7206b04d05bc2f0b23d 100644 (file)
@@ -9,6 +9,7 @@
 #include "transaction.h"
 #include "disk-io.h"
 #include "print-tree.h"
+#include "fs.h"
 
 
 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key)
index ee00e33c309e0f821fe4bd0602b3c867c4504ccf..ab0b39badbbe3b8e636a17813e8cd67874b6de30 100644 (file)
@@ -15,6 +15,7 @@
 #include "transaction.h"
 #include "disk-io.h"
 #include "locking.h"
+#include "fs.h"
 
 /*
  * Implementation of the interface defined in struct fsverity_operations.
index 796e9f5ff8f84876c21fe5baf46705c7ea933641..d65d5d7835fe9733f721cfe981dfeed947fc46bb 100644 (file)
@@ -33,6 +33,7 @@
 #include "block-group.h"
 #include "discard.h"
 #include "zoned.h"
+#include "fs.h"
 
 static struct bio_set btrfs_bioset;
 
index c9e2b0c85309971b016704150361f2994afb2f4b..2a7d856c232c3f985b655634f45fde09b6e691c7 100644 (file)
@@ -15,6 +15,7 @@
 #include "transaction.h"
 #include "dev-replace.h"
 #include "space-info.h"
+#include "fs.h"
 
 /* Maximum number of zones to report per blkdev_report_zones() call */
 #define BTRFS_REPORT_NR_ZONES   4096