@@ -8646,9 +8646,10 @@ static int check_space_cache(struct btrfs_root *root)
int ret;
int error = 0;
- if (btrfs_super_cache_generation(root->fs_info->super_copy) != -1ULL &&
+ if (btrfs_stack_super_cache_generation(root->fs_info->super_copy) !=
+ -1ULL &&
btrfs_stack_super_generation(root->fs_info->super_copy) !=
- btrfs_super_cache_generation(root->fs_info->super_copy)) {
+ btrfs_stack_super_cache_generation(root->fs_info->super_copy)) {
printf("cache and super generation don't match, space cache "
"will be invalidated\n");
return 0;
@@ -14552,7 +14553,7 @@ static int clear_free_space_cache(struct btrfs_fs_info *fs_info)
error("failed to update super block cache generation");
return PTR_ERR(trans);
}
- btrfs_set_super_cache_generation(fs_info->super_copy, (u64)-1);
+ btrfs_set_stack_super_cache_generation(fs_info->super_copy, (u64)-1);
btrfs_commit_transaction(trans, fs_info->tree_root);
return ret;
@@ -414,7 +414,7 @@ static void dump_superblock(struct btrfs_super_block *sb, int full)
(unsigned long long)btrfs_stack_super_incompat_flags(sb));
print_readable_incompat_flag(btrfs_stack_super_incompat_flags(sb));
printf("cache_generation\t%llu\n",
- (unsigned long long)btrfs_super_cache_generation(sb));
+ (unsigned long long)btrfs_stack_super_cache_generation(sb));
printf("uuid_tree_generation\t%llu\n",
(unsigned long long)btrfs_super_uuid_tree_generation(sb));
@@ -133,7 +133,7 @@ static int setup_temp_super(int fd, struct btrfs_mkfs_config *cfg,
btrfs_set_stack_super_stripesize(super, cfg->stripesize);
btrfs_set_stack_super_csum_type(super, BTRFS_CSUM_TYPE_CRC32);
btrfs_set_stack_super_chunk_root(super, chunk_bytenr);
- btrfs_set_super_cache_generation(super, -1);
+ btrfs_set_stack_super_cache_generation(super, -1);
btrfs_set_stack_super_incompat_flags(super, cfg->features);
if (cfg->label)
__strncpy_null(super->label, cfg->label, BTRFS_LABEL_SIZE - 1);
@@ -2206,7 +2206,7 @@ BTRFS_SETGET_STACK_FUNCS(stack_super_incompat_flags, struct btrfs_super_block,
incompat_flags, 64);
BTRFS_SETGET_STACK_FUNCS(stack_super_csum_type, struct btrfs_super_block,
csum_type, 16);
-BTRFS_SETGET_STACK_FUNCS(super_cache_generation, struct btrfs_super_block,
+BTRFS_SETGET_STACK_FUNCS(stack_super_cache_generation, struct btrfs_super_block,
cache_generation, 64);
BTRFS_SETGET_STACK_FUNCS(super_uuid_tree_generation, struct btrfs_super_block,
uuid_tree_generation, 64);
@@ -1185,7 +1185,7 @@ static int update_super(struct mdrestore_struct *mdres, u8 *buffer)
}
if (mdres->clear_space_cache)
- btrfs_set_super_cache_generation(super, 0);
+ btrfs_set_stack_super_cache_generation(super, 0);
flags |= BTRFS_SUPER_FLAG_METADUMP_V2;
btrfs_set_stack_super_flags(super, flags);
@@ -172,7 +172,7 @@ int make_btrfs(int fd, struct btrfs_mkfs_config *cfg)
btrfs_set_stack_super_stripesize(&super, cfg->stripesize);
btrfs_set_stack_super_csum_type(&super, BTRFS_CSUM_TYPE_CRC32);
btrfs_set_stack_super_chunk_root_generation(&super, 1);
- btrfs_set_super_cache_generation(&super, -1);
+ btrfs_set_stack_super_cache_generation(&super, -1);
btrfs_set_stack_super_incompat_flags(&super, cfg->features);
if (cfg->label)
__strncpy_null(super.label, cfg->label, BTRFS_LABEL_SIZE - 1);
The super_cache_generation set/get function defined by BTRFS_SETGET_STACK_FUNCS macro is missing the prefix stack. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> --- cmds-check.c | 7 ++++--- cmds-inspect-dump-super.c | 2 +- convert/common.c | 2 +- ctree.h | 2 +- image/main.c | 2 +- mkfs/common.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-)