From: "Richard W.M. Jones" <rjones@redhat.com>
To: Chris Mason <clmason@fusionio.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Anyone seeing lots of "Check tree block failed" and other errors with latest kernel?
Date: Mon, 8 Oct 2012 22:22:30 +0100 [thread overview]
Message-ID: <20121008212230.GA13692@rhmail.home.annexia.org> (raw)
In-Reply-To: <20121008151513.GE24071@rhmail.home.annexia.org>
On Mon, Oct 08, 2012 at 04:15:14PM +0100, Richard W.M. Jones wrote:
> On Mon, Oct 08, 2012 at 11:04:19AM -0400, Chris Mason wrote:
> > On Mon, Oct 08, 2012 at 08:57:30AM -0600, Richard W.M. Jones wrote:
> > > On Mon, Oct 08, 2012 at 10:27:57AM -0400, Chris Mason wrote:
> > > > On Mon, Oct 08, 2012 at 08:16:42AM -0600, Richard W.M. Jones wrote:
> > > > >
> > > > > I'm tracking this bug here:
> > > > >
> > > > > https://bugzilla.redhat.com/show_bug.cgi?id=863978
> > > > >
> > > > > Since approx. last week I'm seeing lots of failures in btrfs. The
> > > > > common factor seems to be that the filesystem is created (mkfs.btrfs
> > > > > /dev/sda1) and then it is immediately used -- eg. mounted or some
> > > > > btrfs subtool is run on it. There is no pause or sync between the
> > > > > operations.
> > > >
> > > > This was a problem on older btrfs-progs, but this commit:
> > > >
> > > > btrfs-progs-0.19.20120817git043a639-1.fc19.i686
> > > >
> > > > (043a639) has long had the fixes to flush things after mkfs. Is there
> > > > any change the guest you're testing had an ancient progs on it?
> > >
> > > We have a couple of guests where this fails. One has
> > > btrfs-progs-0.19.20120817git043a639-1.fc19.i686. The other has
> > > btrfs-progs-0.19-20.fc18 which appears to be based on
> > > btrfs-progs-0.19.20120817git043a639.tar.bz2 plus some upstream
> > > patches.
> > >
> > > What is the commit which we need? I can't see anything related to
> > > this in the btrfs-progs git log.
> >
> > Sorry, I was remembering wrong. I fixed this up in the kernel by
> > running invalidate_bdev during mount. I just double checked and the
> > invalidates look right, so something strange must be going on.
> >
> > If it is possible to reproduce this reliably, could you please check and
> > see if syncs do fix it? We saw this often with xfstests in the past,
> > but haven't seen it since the invalidates were added.
>
> Unfortunately I'm struggling to reproduce this outside of our build
> system (Koji). I will keep you informed if I do manage to reproduce
> it locally. Adding fsync /dev/sda1 was also my first instinct :-)
I have now reproduced this bug locally.
Adding sync() + fsync of each /dev/sd* device after the mkfs command
does appear to fix the problem.
However it's a little bit difficult to know for sure because I might
just be changing the timing of things by adding these calls.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
next prev parent reply other threads:[~2012-10-08 21:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 14:16 Anyone seeing lots of "Check tree block failed" and other errors with latest kernel? Richard W.M. Jones
2012-10-08 14:27 ` Chris Mason
2012-10-08 14:57 ` Richard W.M. Jones
2012-10-08 15:04 ` Chris Mason
2012-10-08 15:15 ` Richard W.M. Jones
2012-10-08 15:18 ` Chris Mason
2012-10-08 16:42 ` David Sterba
2012-10-08 17:01 ` Richard W.M. Jones
2012-10-08 21:22 ` Richard W.M. Jones [this message]
2012-10-09 0:00 ` Chris Mason
2012-10-09 7:20 ` Richard W.M. Jones
2012-10-09 7:33 ` Richard W.M. Jones
2012-10-09 9:00 ` David Sterba
2012-10-10 12:38 ` Chris Mason
2012-10-10 19:38 ` Richard W.M. Jones
2012-10-10 19:41 ` Chris Mason
2012-10-10 19:46 ` Richard W.M. Jones
2012-10-11 7:28 ` Richard W.M. Jones
2012-10-11 11:26 ` Chris Mason
2012-10-29 14:52 ` Richard W.M. Jones
2012-10-09 9:16 ` David Sterba
2012-10-09 9:26 ` Richard W.M. Jones
2012-10-10 11:49 ` Richard W.M. Jones
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=20121008212230.GA13692@rhmail.home.annexia.org \
--to=rjones@redhat.com \
--cc=clmason@fusionio.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).