diff options
author | Omar Sandoval <osandov@fb.com> | 2016-11-14 10:43:20 -0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-23 11:07:05 +0100 |
commit | 441d8aea8ff939dcd4e37286831d42c91610b5eb (patch) | |
tree | 2f83558caf75ee1c80abc43915351730488bc31b /disk-io.h | |
parent | 9e02fbfcd3c269246ea2ca2454b103374bae4067 (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.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); |