Message ID | 20180614024039.18229-1-suy.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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(),
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(+)