All of lore.kernel.org
 help / color / mirror / Atom feed
From: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH 1/2] btrfs-progs: ins: dump-tree: Use %lld for extent data backref offset
Date: Wed, 30 May 2018 13:55:19 +0900	[thread overview]
Message-ID: <7f63f4b1c4c08652ad9bb77ff95b26597e92ded7.1527655420.git.misono.tomohiro@jp.fujitsu.com> (raw)
In-Reply-To: <cover.1527655420.git.misono.tomohiro@jp.fujitsu.com>

Offset of extent data backref in extent item can be negative.
So, let's use %lld insteand of %llu to output readable value.

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
---
 print-tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/print-tree.c b/print-tree.c
index a1a7954a..90173c2b 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -480,10 +480,10 @@ void print_extent_item(struct extent_buffer *eb, int slot, int metadata)
 		case BTRFS_EXTENT_DATA_REF_KEY:
 			dref = (struct btrfs_extent_data_ref *)(&iref->offset);
 			printf("\t\textent data backref root %llu "
-			       "objectid %llu offset %llu count %u\n",
+			       "objectid %llu offset %lld count %u\n",
 			       (unsigned long long)btrfs_extent_data_ref_root(eb, dref),
 			       (unsigned long long)btrfs_extent_data_ref_objectid(eb, dref),
-			       (unsigned long long)btrfs_extent_data_ref_offset(eb, dref),
+			       btrfs_extent_data_ref_offset(eb, dref),
 			       btrfs_extent_data_ref_count(eb, dref));
 			break;
 		case BTRFS_SHARED_DATA_REF_KEY:
-- 
2.14.3



  reply	other threads:[~2018-05-30  4:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  4:55 [PATCH 0/2] btrfs-progs: ins: dump-tree: Small updates for extent tree output Misono Tomohiro
2018-05-30  4:55 ` Misono Tomohiro [this message]
2018-05-30  4:55 ` [PATCH 2/2] btrfs-progs: ins: dump-tree: Print tree name for tree block backref Misono Tomohiro
2018-05-30  6:28   ` Nikolay Borisov
2018-05-30  6:55     ` Misono Tomohiro
2018-05-30  7:01       ` Nikolay Borisov
2018-05-30  7:25   ` [PATCH v2 2/2] btrfs-progs: ins: dump-tree: Print tree name for extent data/tree " Misono Tomohiro
2018-05-30  7:29     ` Nikolay Borisov
2018-05-31 12:06 ` [PATCH 0/2] btrfs-progs: ins: dump-tree: Small updates for extent tree output David Sterba

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=7f63f4b1c4c08652ad9bb77ff95b26597e92ded7.1527655420.git.misono.tomohiro@jp.fujitsu.com \
    --to=misono.tomohiro@jp.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.