diff mbox

[06/32] btrfs-progs: Refactor block sizes users in btrfs-map-logical.c

Message ID 20170518033857.15002-7-quwenruo@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Qu Wenruo May 18, 2017, 3:38 a.m. UTC
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 btrfs-map-logical.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index e856b698..e88357fc 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -82,7 +82,7 @@  again:
 	}
 	logical = key.objectid;
 	if (key.type == BTRFS_METADATA_ITEM_KEY)
-		len = fs_info->tree_root->nodesize;
+		len = fs_info->nodesize;
 	else
 		len = key.offset;
 
@@ -286,7 +286,7 @@  int main(int argc, char **argv)
 	}
 
 	if (bytes == 0)
-		bytes = root->nodesize;
+		bytes = root->fs_info->nodesize;
 	cur_logical = logical;
 	cur_len = bytes;