linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] btrfs-progs: find-root: Fix wrong generation for log tree
@ 2018-10-12  6:42 Qu Wenruo
  2018-10-12  6:42 ` [PATCH 2/2] btrfs-progs: Deprecate unused super block member log_root_transid Qu Wenruo
  0 siblings, 1 reply; 10+ messages in thread
From: Qu Wenruo @ 2018-10-12  6:42 UTC (permalink / raw)
  To: linux-btrfs

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 <wqu@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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-10-25 20:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12  6:42 [PATCH 1/2] btrfs-progs: find-root: Fix wrong generation for log tree Qu Wenruo
2018-10-12  6:42 ` [PATCH 2/2] btrfs-progs: Deprecate unused super block member log_root_transid Qu Wenruo
2018-10-12  6:53   ` Nikolay Borisov
2018-10-12  8:46     ` Qu Wenruo
2018-10-12  9:13       ` Nikolay Borisov
2018-10-12  9:57         ` Qu Wenruo
2018-10-24 14:30           ` David Sterba
2018-10-24 14:48             ` Nikolay Borisov
2018-10-25 11:18               ` David Sterba
2018-10-25 20:40                 ` Nikolay Borisov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).