From: Chris Mason <chris.mason@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>, Jan Kara <jack@suse.cz>,
"Theodore Ts'o" <tytso@mit.edu>,
Linux Kernel Developers List <linux-kernel@vger.kernel.org>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH RFC] ext3 data=guarded v3
Date: Thu, 16 Apr 2009 15:38:07 -0400 [thread overview]
Message-ID: <1239910687.21233.93.camel@think.oraclecorp.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0904161129460.4042@localhost.localdomain>
On Thu, 2009-04-16 at 11:37 -0700, Linus Torvalds wrote:
>
> On Thu, 16 Apr 2009, Chris Mason wrote:
> >
> > Ah ok, it is just a missed i_size update. Basically because file_write
> > doesn't wait for page writeback to finish, someone can be updating
> > i_size at the same time the end_io handler for the last page is running.
> >
> > Git triggers this when it does the sha1flush just before closing the
> > file.
>
> Can you say exactly what the IO pattern is?
>
> One of the original git design issues was to actually never _ever_ do
> anything even half-way strange in the filesystem patterns, exactly because
> I've seen so many filesystem bugs over the years.
>
I wish it were git doing something fancy, but this is a good old
fashioned bug in the guarded code. I was missing the on disk update
when you appended onto the end of the file without adding a new block.
The race in my code I mentioned was there too, but when doing small
appends to the file without other writes, the size of the race window is
infinite.
The bug was usually hidden because the updated i_size was usually copied
out when the orphan link was deleted, but small appends with no other
file traffic didn't trigger that code. This is the old "works fine
under load but fails when lightly used" problem.
Git made the whole thing much easier to track down. I didn't have to
read the git code to know the packed files from the good data=ordered
and bad data=guarded run were supposed to be the same, the sha was right
in the filename ;) Just a quick diff of the hexdumps made it clear
where the bug had to be.
-chris
next prev parent reply other threads:[~2009-04-16 19:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 17:22 [PATCH RFC] ext3 data=guarded v3 Chris Mason
2009-04-15 17:22 ` [PATCH 1/3] Export filemap_write_and_wait_range Chris Mason
2009-04-15 17:22 ` [PATCH 2/3] Add block_write_full_page_endio for passing endio handler Chris Mason
2009-04-15 17:22 ` [PATCH 3/3] Add ext3 data=guarded mode Chris Mason
2009-04-16 19:42 ` [PATCH] " Chris Mason
2009-04-17 11:04 ` Mike Galbraith
2009-04-17 18:09 ` Amit Shah
2009-04-17 20:13 ` Theodore Tso
2009-04-18 6:03 ` Amit Shah
[not found] ` <20090418060312.GA10943@amit-x200.pnq.redhat.com>
2009-04-18 7:28 ` Mike Galbraith
2009-04-19 6:24 ` Amit Shah
2009-04-20 9:07 ` Mike Galbraith
2009-04-20 9:26 ` Jan Kara
2009-04-20 12:15 ` Mike Galbraith
2009-04-20 12:56 ` Amit Shah
2009-04-20 13:06 ` Mike Galbraith
2009-04-20 13:44 ` Jan Kara
2009-04-20 14:18 ` Chris Mason
2009-04-20 14:42 ` Jan Kara
2009-04-20 14:58 ` Chris Mason
2009-04-20 15:50 ` Jan Kara
2009-04-15 19:10 ` [PATCH RFC] ext3 data=guarded v3 Eric Sandeen
2009-04-15 20:35 ` Linus Torvalds
2009-04-15 21:09 ` Theodore Tso
2009-04-16 8:44 ` Jan Kara
2009-04-16 18:09 ` Nick Piggin
2009-04-16 11:39 ` Mike Galbraith
2009-04-16 11:40 ` Mike Galbraith
2009-04-16 14:56 ` Chris Mason
2009-04-16 17:12 ` Chris Mason
2009-04-16 18:25 ` Mike Galbraith
2009-04-16 18:37 ` Linus Torvalds
2009-04-16 19:38 ` Chris Mason [this message]
2009-04-16 18:00 ` Mike Galbraith
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=1239910687.21233.93.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=efault@gmx.de \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/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).