@@ -1477,7 +1477,7 @@ open_ctree_with_broken_chunk(struct recover_control *rc)
memcpy(fs_info->fsid, &disk_super->fsid, BTRFS_FSID_SIZE);
fs_info->sectorsize = btrfs_stack_super_sectorsize(disk_super);
fs_info->nodesize = btrfs_stack_super_nodesize(disk_super);
- fs_info->stripesize = btrfs_super_stripesize(disk_super);
+ fs_info->stripesize = btrfs_stack_super_stripesize(disk_super);
ret = btrfs_check_fs_compatibility(disk_super, OPEN_CTREE_WRITES);
if (ret)
@@ -400,7 +400,7 @@ static void dump_superblock(struct btrfs_super_block *sb, int full)
printf("leafsize (deprecated)\t\t%u\n",
le32_to_cpu(sb->__unused_leafsize));
printf("stripesize\t\t%llu\n",
- (unsigned long long)btrfs_super_stripesize(sb));
+ (unsigned long long)btrfs_stack_super_stripesize(sb));
printf("root_dir\t\t%llu\n",
(unsigned long long)btrfs_super_root_dir(sb));
printf("num_devices\t\t%llu\n",
@@ -130,7 +130,7 @@ static int setup_temp_super(int fd, struct btrfs_mkfs_config *cfg,
btrfs_set_stack_super_sectorsize(super, cfg->sectorsize);
super->__unused_leafsize = cpu_to_le32(cfg->nodesize);
btrfs_set_stack_super_nodesize(super, cfg->nodesize);
- btrfs_set_super_stripesize(super, cfg->stripesize);
+ btrfs_set_stack_super_stripesize(super, cfg->stripesize);
btrfs_set_super_csum_type(super, BTRFS_CSUM_TYPE_CRC32);
btrfs_set_stack_super_chunk_root(super, chunk_bytenr);
btrfs_set_super_cache_generation(super, -1);
@@ -2192,7 +2192,7 @@ BTRFS_SETGET_STACK_FUNCS(stack_super_sectorsize, struct btrfs_super_block,
sectorsize, 32);
BTRFS_SETGET_STACK_FUNCS(stack_super_nodesize, struct btrfs_super_block,
nodesize, 32);
-BTRFS_SETGET_STACK_FUNCS(super_stripesize, struct btrfs_super_block,
+BTRFS_SETGET_STACK_FUNCS(stack_super_stripesize, struct btrfs_super_block,
stripesize, 32);
BTRFS_SETGET_STACK_FUNCS(super_root_dir, struct btrfs_super_block,
root_dir_objectid, 64);
@@ -1164,7 +1164,7 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
memcpy(fs_info->fsid, &disk_super->fsid, BTRFS_FSID_SIZE);
fs_info->sectorsize = btrfs_stack_super_sectorsize(disk_super);
fs_info->nodesize = btrfs_stack_super_nodesize(disk_super);
- fs_info->stripesize = btrfs_super_stripesize(disk_super);
+ fs_info->stripesize = btrfs_stack_super_stripesize(disk_super);
ret = btrfs_check_fs_compatibility(fs_info->super_copy, flags);
if (ret)
@@ -1369,10 +1369,11 @@ static int check_super(struct btrfs_super_block *sb, unsigned sbflags)
btrfs_stack_super_bytes_used(sb));
goto error_out;
}
- if ((btrfs_super_stripesize(sb) != 4096)
- && (btrfs_super_stripesize(sb) !=
+ if ((btrfs_stack_super_stripesize(sb) != 4096)
+ && (btrfs_stack_super_stripesize(sb) !=
btrfs_stack_super_sectorsize(sb))) {
- error("invalid stripesize %u", btrfs_super_stripesize(sb));
+ error("invalid stripesize %u",
+ btrfs_stack_super_stripesize(sb));
goto error_out;
}
@@ -169,7 +169,7 @@ int make_btrfs(int fd, struct btrfs_mkfs_config *cfg)
btrfs_set_stack_super_sectorsize(&super, cfg->sectorsize);
super.__unused_leafsize = cpu_to_le32(cfg->nodesize);
btrfs_set_stack_super_nodesize(&super, cfg->nodesize);
- btrfs_set_super_stripesize(&super, cfg->stripesize);
+ btrfs_set_stack_super_stripesize(&super, cfg->stripesize);
btrfs_set_super_csum_type(&super, BTRFS_CSUM_TYPE_CRC32);
btrfs_set_stack_super_chunk_root_generation(&super, 1);
btrfs_set_super_cache_generation(&super, -1);
@@ -938,7 +938,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
return -ENOSPC;
min_stripes = 2;
stripe_len = find_raid56_stripe_len(num_stripes - 1,
- btrfs_super_stripesize(info->super_copy));
+ btrfs_stack_super_stripesize(info->super_copy));
}
if (type & (BTRFS_BLOCK_GROUP_RAID6)) {
num_stripes = btrfs_super_num_devices(info->super_copy);
@@ -948,7 +948,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
return -ENOSPC;
min_stripes = 3;
stripe_len = find_raid56_stripe_len(num_stripes - 2,
- btrfs_super_stripesize(info->super_copy));
+ btrfs_stack_super_stripesize(info->super_copy));
}
/* we don't want a chunk larger than 10% of the FS */
The super_stripesize 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> --- chunk-recover.c | 2 +- cmds-inspect-dump-super.c | 2 +- convert/common.c | 2 +- ctree.h | 2 +- disk-io.c | 9 +++++---- mkfs/common.c | 2 +- volumes.c | 4 ++-- 7 files changed, 12 insertions(+), 11 deletions(-)