Re: Fwd: [PATCH] btrfs: Add more details while checking tree block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Nikolay Borisov <nborisov@xxxxxxxx>
> Date: Fri, Jun 22, 2018 at 7:49 PM
> Subject: Re: [PATCH] btrfs: Add more details while checking tree block
> To: Su Yue <suy.fnst@xxxxxxxxxxxxxx>, <linux-btrfs@xxxxxxxxxxxxxxx>
> 
> 
> 
> 
> On 22.06.2018 04:52, Su Yue wrote:
> > For easier debug, print eb->start if level is invalid.
> > Also make print clear if bytenr found is not expected.
> >
> > Signed-off-by: Su Yue <suy.fnst@xxxxxxxxxxxxxx>
> > ---
> >  fs/btrfs/disk-io.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> > index c3504b4d281b..a90dab84f41b 100644
> > --- a/fs/btrfs/disk-io.c
> > +++ b/fs/btrfs/disk-io.c
> > @@ -615,8 +615,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
> >
> >       found_start = btrfs_header_bytenr(eb);
> >       if (found_start != eb->start) {
> > -             btrfs_err_rl(fs_info, "bad tree block start %llu %llu",
> > -                          found_start, eb->start);
> > +             btrfs_err_rl(fs_info, "bad tree block start want %llu have %llu",
> 
> nit: I'd rather have the want/have in brackets (want %llu have% llu)
> 
Hmmm... Here the output message is short enough, so I think there is no
need for brackets. 
And searching for word "want" in disk_io.c , there are no brackets too.

Thanks,
Su
> > +                          eb->start, found_start);
> >               ret = -EIO;
> >               goto err;
> >       }
> > @@ -628,8 +628,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
> >       }
> >       found_level = btrfs_header_level(eb);
> >       if (found_level >= BTRFS_MAX_LEVEL) {
> > -             btrfs_err(fs_info, "bad tree block level %d",
> > -                       (int)btrfs_header_level(eb));
> > +             btrfs_err(fs_info, "bad tree block level %d on %llu",
> > +                       (int)btrfs_header_level(eb), eb->start);
> >               ret = -EIO;
> >               goto err;
> >       }
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux