When searching for log tree, we should use btrfs_super_generation + 1 other than log_root_transid.
Since log_root_transid is never touched and will be deprecated soon. Signed-off-by: Qu Wenruo <w...@suse.com> --- btrfs-find-root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs-find-root.c b/btrfs-find-root.c index e2d2e70c408c..376bbc4c47fa 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -73,7 +73,7 @@ static void get_root_gen_and_level(u64 objectid, struct btrfs_fs_info *fs_info, break; case BTRFS_TREE_LOG_OBJECTID: level = btrfs_super_log_root_level(super); - gen = btrfs_super_log_root_transid(super); + gen = btrfs_super_generation(super) + 1; break; case BTRFS_UUID_TREE_OBJECTID: gen = btrfs_super_uuid_tree_generation(super); -- 2.19.1