All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Lu Fengqi <lufq.fnst@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 1/3] btrfs-progs: check/lowmem: Fix the incorrect error message of check_extent_data_item
Date: Fri, 9 Mar 2018 17:18:53 +0100	[thread overview]
Message-ID: <20180309161852.GX23693@twin.jikos.cz> (raw)
In-Reply-To: <b96bc384-c98f-0351-7c0e-8e7326c92f00@gmx.com>

On Thu, Mar 08, 2018 at 04:13:27PM +0800, Qu Wenruo wrote:
> 
> 
> On 2018年02月28日 18:13, Lu Fengqi wrote:
> > Instead of the disk_bytenr and disk_num_bytes of the extent_item which the
> > file extent references, we should output the objectid and offset of the
> > file extent. And the leaf may be shared by the file trees, we should print
> > the objectid of the root and the owner of the leaf.
> > 
> > Fixes: b0d360b541f0 ("btrfs-progs: check: introduce function to check data backref in extent tree")
> > Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
> > ---
> > V2: Output the objectid of the root and the owner of the leaf.
> > 
> >  check/mode-lowmem.c | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
> > index 62bcf3d2e126..f37b1b2c1571 100644
> > --- a/check/mode-lowmem.c
> > +++ b/check/mode-lowmem.c
> > @@ -2631,9 +2631,9 @@ static int check_extent_data_item(struct btrfs_root *root,
> >  
> >  	if (!(extent_flags & BTRFS_EXTENT_FLAG_DATA)) {
> >  		error(
> > -		    "extent[%llu %llu] backref type mismatch, wanted bit: %llx",
> > -		    disk_bytenr, disk_num_bytes,
> > -		    BTRFS_EXTENT_FLAG_DATA);
> > +"file extent[%llu %llu] root %llu owner %llu backref type mismatch, wanted bit: %llx",
> > +			fi_key.objectid, fi_key.offset, root->objectid, owner,
> 
> Indeed this is much easier to identify the problem.
> 
> Reviewed-by: Qu Wenruo <wqu@suse.com>

1-3 applied, thanks.

      reply	other threads:[~2018-03-09 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 10:13 [PATCH v2 1/3] btrfs-progs: check/lowmem: Fix the incorrect error message of check_extent_data_item Lu Fengqi
2018-02-28 10:13 ` [PATCH 2/3] btrfs-progs: check/lowmem: Fix false alert of data extent backref lost for snapshot Lu Fengqi
2018-03-08  8:11   ` Qu Wenruo
2018-02-28 10:13 ` [PATCH 3/3] btrfs-progs: fsck-tests: Introduce test case with keyed data backref with the extent offset Lu Fengqi
2018-03-08  8:12   ` Qu Wenruo
2018-03-08  8:13 ` [PATCH v2 1/3] btrfs-progs: check/lowmem: Fix the incorrect error message of check_extent_data_item Qu Wenruo
2018-03-09 16:18   ` David Sterba [this message]

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=20180309161852.GX23693@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lufq.fnst@cn.fujitsu.com \
    --cc=quwenruo.btrfs@gmx.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 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.