From c57ed6ca6b1b0655bba4fff97ad10e32dba4a81d Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 11 Apr 2018 15:29:35 +0800 Subject: btrfs-progs: Rename OPEN_CTREE_FS_PARTIAL to OPEN_CTREE_TEMPORARY_SUPER The old flag OPEN_CTREE_FS_PARTIAL is in fact quite easy to be confused with OPEN_CTREE_PARTIAL, which allow btrfs-progs to open damaged filesystem (like corrupted extent/csum tree). However OPEN_CTREE_FS_PARTIAL, unlike its name, is just allowing btrfs-progs to open fs with temporary superblocks (which only has 6 basic trees on SINGLE meta/sys chunks). The usage of FS_PARTIAL is really confusing here. So rename OPEN_CTREE_FS_PARTIAL to OPEN_CTREE_TEMPORARY_SUPER, and add extra comment for its behavior. Also rename BTRFS_MAGIC_PARTIAL to BTRFS_MAGIC_TEMPORARY to keep the naming consistent. And with above comment, the usage of FS_PARTIAL in dump-tree is obviously incorrect, fix it. Fixes: 8698a2b9ba89 ("btrfs-progs: Allow inspect dump-tree to show specified tree block even some tree roots are corrupted") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils.c') diff --git a/utils.c b/utils.c index 715bab0e..d81d4980 100644 --- a/utils.c +++ b/utils.c @@ -1050,7 +1050,7 @@ int btrfs_device_already_in_root(struct btrfs_root *root, int fd, * structures. */ if (btrfs_super_magic(disk_super) != BTRFS_MAGIC && - btrfs_super_magic(disk_super) != BTRFS_MAGIC_PARTIAL) + btrfs_super_magic(disk_super) != BTRFS_MAGIC_TEMPORARY) goto brelse; if (!memcmp(disk_super->fsid, root->fs_info->super_copy->fsid, -- cgit v1.2.3