@@ -2065,7 +2065,7 @@ BTRFS_SETGET_STACK_FUNCS(stack_root_limit, struct btrfs_root_item, byte_limit,
64);
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,
+BTRFS_SETGET_STACK_FUNCS(stack_root_generation_v2, struct btrfs_root_item,
generation_v2, 64);
BTRFS_SETGET_STACK_FUNCS(root_ctransid, struct btrfs_root_item,
ctransid, 64);
@@ -121,7 +121,8 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
* Update generation_v2 so at the next mount we know the new root
* fields are valid.
*/
- btrfs_set_root_generation_v2(item, btrfs_stack_root_generation(item));
+ btrfs_set_stack_root_generation_v2(item,
+ btrfs_stack_root_generation(item));
write_extent_buffer(l, item, ptr, sizeof(*item));
btrfs_mark_buffer_dirty(path->nodes[0]);
@@ -139,7 +140,8 @@ int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root
/*
* Make sure generation v1 and v2 match. See update_root for details.
*/
- btrfs_set_root_generation_v2(item, btrfs_stack_root_generation(item));
+ btrfs_set_stack_root_generation_v2(item,
+ btrfs_stack_root_generation(item));
ret = btrfs_insert_item(trans, root, key, item, sizeof(*item));
return ret;
}
@@ -153,7 +153,8 @@ static int btrfs_read_root_item(int mnt_fd, u64 root_id,
return ret;
if (read_len < sizeof(*item) ||
- btrfs_stack_root_generation(item) != btrfs_root_generation_v2(item))
+ btrfs_stack_root_generation(item) !=
+ btrfs_stack_root_generation_v2(item))
memset(&item->generation_v2, 0,
sizeof(*item) - offsetof(struct btrfs_root_item,
generation_v2));
The root_generation_v2 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> --- ctree.h | 2 +- root-tree.c | 6 ++++-- send-utils.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-)