All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] Enhanced error messages for btrfs-convert
Date: Fri, 14 Sep 2018 15:25:03 +0800	[thread overview]
Message-ID: <20180914072505.15916-1-wqu@suse.com> (raw)

This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/convert_error_messages
As usual, it's based on latest stable tag (v4.17.1).

There is one error report of btrfs-convert, the error message looks
pretty meaningless:

  create btrfs filesystem:
      blocksize: 4096
      nodesize:  16384
      features:  extref, skinny-metadata (default)
  creating ext2 image file
  ERROR: failed to create ext2_saved/image: -1
  WARNING: an error occurred during conversion, filesystem is partially
  created but not finalized and not mountable

After some investigation, the problem turns out to be read failure.
But the error number is intermediate number (-1) returned from
read_disk_extent().

This patchset will first fix the intermediate return number of
read_disk_extent(), then add more error messages for btrfs-convert (at
least convert part) to makes it easier to identify the problem.

In this particular case, it should output things like:

  create btrfs filesystem:
      blocksize: 4096
      nodesize:  16384
      features:  extref, skinny-metadata (default)
  creating ext2 image file
  ERROR: failed to calculate csum for bytenr 2732765184 len 4096, Input/output error
  ERROR: failed to create ext2_saved/image: -5
  WARNING: an error occurred during conversion, filesystem is partially
  created but not finalized and not mountable


Qu Wenruo (2):
  btrfs: convert: Make read_disk_extent() return more meaningful -EIO
    other -1
  btrfs-progs: convert: Output meaningful error messages for
    create_image()

 convert/main.c      | 37 ++++++++++++++++++++++++++++++-------
 convert/source-fs.c |  2 +-
 2 files changed, 31 insertions(+), 8 deletions(-)

-- 
2.19.0

             reply	other threads:[~2018-09-14 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14  7:25 Qu Wenruo [this message]
2018-09-14  7:25 ` [PATCH 1/2] btrfs: convert: Make read_disk_extent() return more meaningful -EIO other -1 Qu Wenruo
2018-09-14  7:30   ` Nikolay Borisov
2018-09-14  7:25 ` [PATCH 2/2] btrfs-progs: convert: Output meaningful error messages for create_image() Qu Wenruo
2018-09-14  7:36   ` Nikolay Borisov
2018-10-24 15:14 ` [PATCH 0/2] Enhanced error messages for btrfs-convert 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=20180914072505.15916-1-wqu@suse.com \
    --to=wqu@suse.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.