From: Liu Bo <bo.li.liu@oracle.com>
To: dsterba@suse.cz
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: kill BUG_ON in do_relocation
Date: Mon, 19 Sep 2016 16:11:44 -0700 [thread overview]
Message-ID: <20160919231144.GA28802@localhost.localdomain> (raw)
In-Reply-To: <20160919180105.GQ16983@twin.jikos.cz>
On Mon, Sep 19, 2016 at 08:01:05PM +0200, David Sterba wrote:
> On Thu, Sep 15, 2016 at 02:58:12PM -0400, Chris Mason wrote:
> >
> >
> > On 09/15/2016 03:01 PM, Liu Bo wrote:
> > > On Wed, Sep 14, 2016 at 11:19:04AM -0700, Liu Bo wrote:
> > >> On Wed, Sep 14, 2016 at 01:31:31PM -0400, Josef Bacik wrote:
> > >>> On 09/14/2016 01:29 PM, Chris Mason wrote:
> > >>>>
> > >>>>
> > >>>> On 09/14/2016 01:13 PM, Josef Bacik wrote:
> > >>>>> On 09/14/2016 12:27 PM, Liu Bo wrote:
> > >>>>>> While updating btree, we try to push items between sibling
> > >>>>>> nodes/leaves in order to keep height as low as possible.
> > >>>>>> But we don't memset the original places with zero when
> > >>>>>> pushing items so that we could end up leaving stale content
> > >>>>>> in nodes/leaves. One may read the above stale content by
> > >>>>>> increasing btree blocks' @nritems.
> > >>>>>>
> > >>>>>
> > >>>>> Ok this sounds really bad. Is this as bad as I think it sounds? We
> > >>>>> should probably fix this like right now right?
> > >>>>
> > >>>> He's bumping @nritems with a fuzzer I think? As in this happens when someone
> > >>>> forces it (or via some other bug) but not in normal operations.
> > >>>>
> > >>>
> > >>> Oh ok if this happens with a fuzzer than this is fine, but I'd rather do
> > >>> -EIO so we know this is something bad with the fs.
> > >>
> > >> -EIO may be more appropriate to be given while reading btree blocks and
> > >> checking their validation?
> > >
> > > Looks like EIO doesn't fit into this case, either, do we have any errno
> > > representing 'corrupted filesystem'?
> >
> > That's EIO. Sometimes the EIO is big enough we have to abort, but
> > really the abort is just adding bonus.
>
> I think we misuse the EIO where we should really return EFSCORRUPTED
> that's an alias for EUCLEAN, looking at xfs or ext4. EIO should be
> really a message that the hardware is bad.
I love this idea, but one quick question, when returning EUCLEAN, what
message do users get?
"#define EUCLEAN 117 /* Structure needs cleaning */"
Thanks,
-liubo
next prev parent reply other threads:[~2016-09-19 23:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 16:27 [PATCH] Btrfs: kill BUG_ON in do_relocation Liu Bo
2016-09-14 17:13 ` Josef Bacik
2016-09-14 17:29 ` Chris Mason
2016-09-14 17:31 ` Josef Bacik
2016-09-14 18:19 ` Liu Bo
2016-09-15 19:01 ` Liu Bo
2016-09-15 18:58 ` Chris Mason
2016-09-19 18:01 ` David Sterba
2016-09-19 23:11 ` Liu Bo [this message]
2016-09-20 8:03 ` David Sterba
2016-09-20 17:59 ` Liu Bo
2016-09-21 8:14 ` David Sterba
2016-09-14 18:16 ` Liu Bo
2016-09-23 21:05 ` [PATCH v2] " Liu Bo
2016-10-11 14:25 ` 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=20160919231144.GA28802@localhost.localdomain \
--to=bo.li.liu@oracle.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).