summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-11-14 10:43:20 -0800
committerDavid Sterba <dsterba@suse.com>2016-11-23 11:07:05 +0100
commit441d8aea8ff939dcd4e37286831d42c91610b5eb (patch)
tree2f83558caf75ee1c80abc43915351730488bc31b /disk-io.h
parent9e02fbfcd3c269246ea2ca2454b103374bae4067 (diff)
btrfs-progs: add OPEN_CTREE_INVALIDATE_FST flag
If this flag is passed to open_ctree(), we'll clear the FREE_SPACE_TREE_VALID compat_ro bit. The kernel will then reconstruct the free space tree the next time the filesystem is mounted. Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.h')
-rw-r--r--disk-io.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/disk-io.h b/disk-io.h
index 8ab36aac..d4a0e7fc 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -74,6 +74,12 @@ enum btrfs_open_ctree_flags {
/* Allow to open a partially created filesystem */
OPEN_CTREE_FS_PARTIAL = (1U << 12),
+
+ /*
+ * Invalidate the free space tree (i.e., clear the FREE_SPACE_TREE_VALID
+ * compat_ro bit).
+ */
+ OPEN_CTREE_INVALIDATE_FST = (1U << 13),
};
/*
@@ -128,7 +134,8 @@ int clean_tree_block(struct btrfs_trans_handle *trans,
void btrfs_free_fs_info(struct btrfs_fs_info *fs_info);
struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr);
-int btrfs_check_fs_compatibility(struct btrfs_super_block *sb, int writable);
+int btrfs_check_fs_compatibility(struct btrfs_super_block *sb,
+ unsigned int flags);
int btrfs_setup_all_roots(struct btrfs_fs_info *fs_info, u64 root_tree_bytenr,
unsigned flags);
void btrfs_release_all_roots(struct btrfs_fs_info *fs_info);