@@ -1373,7 +1373,7 @@ static int __insert_block_group(struct btrfs_trans_handle *trans,
int ret = 0;
btrfs_set_stack_block_group_used(&bg_item, used);
- btrfs_set_block_group_chunk_objectid(&bg_item, used);
+ btrfs_set_stack_block_group_chunk_objectid(&bg_item, used);
btrfs_set_block_group_flags(&bg_item, chunk_rec->type_flags);
key.objectid = chunk_rec->offset;
key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
@@ -675,7 +675,7 @@ static void insert_temp_block_group(struct extent_buffer *buf,
btrfs_set_block_group_flags(&bgi, flag);
btrfs_set_stack_block_group_used(&bgi, used);
- btrfs_set_block_group_chunk_objectid(&bgi,
+ btrfs_set_stack_block_group_chunk_objectid(&bgi,
BTRFS_FIRST_CHUNK_TREE_OBJECTID);
write_extent_buffer(buf, &bgi, btrfs_item_ptr_offset(buf, *slot),
sizeof(bgi));
@@ -1562,7 +1562,7 @@ BTRFS_SETGET_STACK_FUNCS(stack_block_group_used, struct btrfs_block_group_item,
used, 64);
BTRFS_SETGET_FUNCS(disk_block_group_used, struct btrfs_block_group_item,
used, 64);
-BTRFS_SETGET_STACK_FUNCS(block_group_chunk_objectid,
+BTRFS_SETGET_STACK_FUNCS(stack_block_group_chunk_objectid,
struct btrfs_block_group_item, chunk_objectid, 64);
BTRFS_SETGET_FUNCS(disk_block_group_chunk_objectid,
@@ -3327,7 +3327,8 @@ btrfs_add_block_group(struct btrfs_fs_info *fs_info, u64 bytes_used, u64 type,
cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
btrfs_set_stack_block_group_used(&cache->item, bytes_used);
- btrfs_set_block_group_chunk_objectid(&cache->item, chunk_objectid);
+ btrfs_set_stack_block_group_chunk_objectid(&cache->item,
+ chunk_objectid);
cache->flags = type;
btrfs_set_block_group_flags(&cache->item, type);
@@ -3437,7 +3438,7 @@ int btrfs_make_block_groups(struct btrfs_trans_handle *trans,
cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
btrfs_set_stack_block_group_used(&cache->item, 0);
- btrfs_set_block_group_chunk_objectid(&cache->item,
+ btrfs_set_stack_block_group_chunk_objectid(&cache->item,
chunk_objectid);
btrfs_set_block_group_flags(&cache->item, group_type);
@@ -1000,7 +1000,7 @@ static void print_block_group_item(struct extent_buffer *eb,
bg_flags_to_str(btrfs_block_group_flags(&bg_item), flags_str);
printf("\t\tblock group used %llu chunk_objectid %llu flags %s\n",
(unsigned long long)btrfs_stack_block_group_used(&bg_item),
- (unsigned long long)btrfs_block_group_chunk_objectid(&bg_item),
+ (unsigned long long)btrfs_stack_block_group_chunk_objectid(&bg_item),
flags_str);
}
The block_group_chunk_objectid 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 +- convert/common.c | 2 +- ctree.h | 2 +- extent-tree.c | 5 +++-- print-tree.c | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-)