All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: print bytenr of tree block in print_tree_block_error()
@ 2018-06-14  2:40 Su Yue
  2018-07-05 16:04 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Su Yue @ 2018-06-14  2:40 UTC (permalink / raw)
  To: linux-btrfs; +Cc: suy.fnst

For easier debug, let print_tree_block_error() print bytenr of
tree block.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
---
 disk-io.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/disk-io.c b/disk-io.c
index 4a609a892be7..6ee65190f251 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -94,6 +94,9 @@ static void print_tree_block_error(struct btrfs_fs_info *fs_info,
 	char found_uuid[BTRFS_UUID_UNPARSED_SIZE] = {'\0'};
 	u8 buf[BTRFS_UUID_SIZE];
 
+	if (!err)
+		return;
+	fprintf(stderr, "bad tree block %llu, ", eb->start);
 	switch (err) {
 	case BTRFS_BAD_FSID:
 		read_extent_buffer(eb, buf, btrfs_header_fsid(),
-- 
2.17.1




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

* Re: [PATCH] btrfs-progs: print bytenr of tree block in print_tree_block_error()
  2018-06-14  2:40 [PATCH] btrfs-progs: print bytenr of tree block in print_tree_block_error() Su Yue
@ 2018-07-05 16:04 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2018-07-05 16:04 UTC (permalink / raw)
  To: Su Yue; +Cc: linux-btrfs

On Thu, Jun 14, 2018 at 10:40:39AM +0800, Su Yue wrote:
> For easier debug, let print_tree_block_error() print bytenr of
> tree block.
> 
> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>

Applied, thanks.

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

end of thread, other threads:[~2018-07-05 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-14  2:40 [PATCH] btrfs-progs: print bytenr of tree block in print_tree_block_error() Su Yue
2018-07-05 16:04 ` David Sterba

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.