linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/4] btrfs-progs: print-tree: Skip deprecated blockptr / nodesize output
Date: Wed, 5 Sep 2018 10:42:10 +0300	[thread overview]
Message-ID: <16b92c63-360a-7d72-527d-aa0104fccebd@suse.com> (raw)
In-Reply-To: <20180905062924.23836-2-wqu@suse.com>



On  5.09.2018 09:29, Qu Wenruo wrote:
> When printing tree nodes, we output slots like:
> key (EXTENT_TREE ROOT_ITEM 0) block 73625600 (17975) gen 16
> 
> The number in the parentheses is blockptr / nodesize.
> 
> However this number doesn't really do any thing useful.
> And in fact for unaligned metadata block group (block group start bytenr
> is not aligned to 16K), the number doesn't even make sense as it's
> rounded down.
> 
> In factor kernel doesn't ever output such divided result in its
> print-tree.c
> 
> Remove it so later reader won't wonder what the number means.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> ---
>  print-tree.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/print-tree.c b/print-tree.c
> index a09ecfbb28f0..31f6fa12522f 100644
> --- a/print-tree.c
> +++ b/print-tree.c
> @@ -1420,9 +1420,8 @@ void btrfs_print_tree(struct extent_buffer *eb, int follow)
>  		btrfs_disk_key_to_cpu(&key, &disk_key);
>  		printf("\t");
>  		btrfs_print_key(&disk_key);
> -		printf(" block %llu (%llu) gen %llu\n",
> +		printf(" block %llu gen %llu\n",
>  		       (unsigned long long)blocknr,
> -		       (unsigned long long)blocknr / eb->len,
>  		       (unsigned long long)btrfs_node_ptr_generation(eb, i));
>  		fflush(stdout);
>  	}
> 

  reply	other threads:[~2018-09-05 12:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05  6:29 [PATCH 0/4] btrfs-progs: print-tree: breadth-first tree print order Qu Wenruo
2018-09-05  6:29 ` [PATCH 1/4] btrfs-progs: print-tree: Skip deprecated blockptr / nodesize output Qu Wenruo
2018-09-05  7:42   ` Nikolay Borisov [this message]
2018-09-05  6:29 ` [PATCH 2/4] btrfs-progs: Replace root parameter using fs_info for reada_for_search() Qu Wenruo
2018-09-05  7:42   ` Nikolay Borisov
2018-09-05  6:29 ` [PATCH 3/4] btrfs-progs: Introduce function to find next sibling tree block Qu Wenruo
2018-09-05  8:46   ` Nikolay Borisov
2018-09-05  6:29 ` [PATCH 4/4] btrfs-progs: print-tree: Use breadth-first search for btrfs_print_tree() Qu Wenruo
2018-09-05 12:46   ` Nikolay Borisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16b92c63-360a-7d72-527d-aa0104fccebd@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).