@@ -402,7 +402,7 @@ static void dump_superblock(struct btrfs_super_block *sb, int full)
printf("stripesize\t\t%llu\n",
(unsigned long long)btrfs_stack_super_stripesize(sb));
printf("root_dir\t\t%llu\n",
- (unsigned long long)btrfs_super_root_dir(sb));
+ (unsigned long long)btrfs_stack_super_root_dir(sb));
printf("num_devices\t\t%llu\n",
(unsigned long long)btrfs_super_num_devices(sb));
printf("compat_flags\t\t0x%llx\n",
@@ -972,13 +972,13 @@ static int init_btrfs(struct btrfs_mkfs_config *cfg, struct btrfs_root *root,
memcpy(&location, &root->root_key, sizeof(location));
location.offset = (u64)-1;
ret = btrfs_insert_dir_item(trans, fs_info->tree_root, "default", 7,
- btrfs_super_root_dir(fs_info->super_copy),
+ btrfs_stack_super_root_dir(fs_info->super_copy),
&location, BTRFS_FT_DIR, 0);
if (ret)
goto err;
ret = btrfs_insert_inode_ref(trans, fs_info->tree_root, "default", 7,
- location.objectid,
- btrfs_super_root_dir(fs_info->super_copy), 0);
+ location.objectid,
+ btrfs_stack_super_root_dir(fs_info->super_copy), 0);
if (ret)
goto err;
btrfs_set_stack_root_dirid(&fs_info->fs_root->root_item,
@@ -2194,7 +2194,7 @@ BTRFS_SETGET_STACK_FUNCS(stack_super_nodesize, struct btrfs_super_block,
nodesize, 32);
BTRFS_SETGET_STACK_FUNCS(stack_super_stripesize, struct btrfs_super_block,
stripesize, 32);
-BTRFS_SETGET_STACK_FUNCS(super_root_dir, struct btrfs_super_block,
+BTRFS_SETGET_STACK_FUNCS(stack_super_root_dir, struct btrfs_super_block,
root_dir_objectid, 64);
BTRFS_SETGET_STACK_FUNCS(super_num_devices, struct btrfs_super_block,
num_devices, 64);
@@ -445,7 +445,7 @@ int main(int ac, char **av)
trans = btrfs_start_transaction(root, 1);
BUG_ON(IS_ERR(trans));
- dir_oid = btrfs_super_root_dir(&super);
+ dir_oid = btrfs_stack_super_root_dir(&super);
signal(SIGTERM, sigstopper);
signal(SIGINT, sigstopper);
@@ -183,7 +183,7 @@ static int make_root_dir(struct btrfs_trans_handle *trans,
location.offset = (u64)-1;
ret = btrfs_insert_dir_item(trans, root->fs_info->tree_root,
"default", 7,
- btrfs_super_root_dir(root->fs_info->super_copy),
+ btrfs_stack_super_root_dir(root->fs_info->super_copy),
&location, BTRFS_FT_DIR, 0);
if (ret)
goto err;
@@ -393,7 +393,8 @@ int btrfs_make_root_dir(struct btrfs_trans_handle *trans,
btrfs_set_stack_timespec_nsec(&inode_item.otime, 0);
if (root->fs_info->tree_root == root)
- btrfs_set_super_root_dir(root->fs_info->super_copy, objectid);
+ btrfs_set_stack_super_root_dir(root->fs_info->super_copy,
+ objectid);
ret = btrfs_insert_inode(trans, root, objectid, &inode_item);
if (ret)
The super_root_dir 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-inspect-dump-super.c | 2 +- convert/main.c | 6 +++--- ctree.h | 2 +- dir-test.c | 2 +- mkfs/main.c | 2 +- utils.c | 3 ++- 6 files changed, 9 insertions(+), 8 deletions(-)