@@ -11538,7 +11538,7 @@ again:
offset = btrfs_item_ptr_offset(leaf, path.slots[0]);
read_extent_buffer(leaf, &ri, offset, sizeof(ri));
- last_snapshot = btrfs_root_last_snapshot(&ri);
+ last_snapshot = btrfs_stack_root_last_snapshot(&ri);
if (btrfs_stack_disk_key_objectid(&ri.drop_progress)
== 0) {
level = btrfs_stack_root_level(&ri);
@@ -151,7 +151,7 @@ static int btrfs_block_can_be_shared(struct btrfs_root *root,
if (root->ref_cows &&
buf != root->node && buf != root->commit_root &&
(btrfs_header_generation(buf) <=
- btrfs_root_last_snapshot(&root->root_item) ||
+ btrfs_stack_root_last_snapshot(&root->root_item) ||
btrfs_header_flag(buf, BTRFS_HEADER_FLAG_RELOC)))
return 1;
#ifdef BTRFS_COMPAT_EXTENT_TREE_V0
@@ -2063,7 +2063,7 @@ BTRFS_SETGET_STACK_FUNCS(stack_root_used, struct btrfs_root_item, bytes_used,
64);
BTRFS_SETGET_STACK_FUNCS(stack_root_limit, struct btrfs_root_item, byte_limit,
64);
-BTRFS_SETGET_STACK_FUNCS(root_last_snapshot, struct btrfs_root_item,
+BTRFS_SETGET_STACK_FUNCS(stack_root_last_snapshot, struct btrfs_root_item,
last_snapshot, 64);
BTRFS_SETGET_STACK_FUNCS(root_generation_v2, struct btrfs_root_item,
generation_v2, 64);
@@ -594,7 +594,7 @@ static void print_root_item(struct extent_buffer *leaf, int slot)
btrfs_stack_root_level(&root_item),
btrfs_stack_root_refs(&root_item));
printf("\t\tlastsnap %llu byte_limit %llu bytes_used %llu flags 0x%llx(%s)\n",
- (unsigned long long)btrfs_root_last_snapshot(&root_item),
+ (unsigned long long)btrfs_stack_root_last_snapshot(&root_item),
(unsigned long long)btrfs_stack_root_limit(&root_item),
(unsigned long long)btrfs_stack_root_used(&root_item),
(unsigned long long)btrfs_stack_root_flags(&root_item),
The root_last_snapshot 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 | 2 +- ctree.c | 2 +- ctree.h | 2 +- print-tree.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)