From: Greg Freemyer <greg.freemyer@gmail.com>
To: djwong@us.ibm.com
Cc: "Theodore Ts'o" <tytso@mit.edu>, linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: EXT4_IOC_MOVE_EXT file corruption!
Date: Fri, 9 Apr 2010 13:15:44 -0400 [thread overview]
Message-ID: <q2o87f94c371004091015ud3b91710o58f2ce050255084a@mail.gmail.com> (raw)
In-Reply-To: <20100409162028.GV29604@tux1.beaverton.ibm.com>
On Fri, Apr 9, 2010 at 12:20 PM, Darrick J. Wong <djwong@us.ibm.com> wrote:
> On Mon, Apr 05, 2010 at 03:02:20PM -0700, Darrick J. Wong wrote:
>> Hi all,
>>
>> I wrote a program called e4frag that deliberately tries to fragment an ext4
>> filesystem via EXT4_IOC_MOVE_EXT so that I could run e4defrag through its
>> paces. While running e4frag and e4defrag concurrently on a kernel source tree,
>> I discovered ongoing file corruption. It appears that if e4frag and e4defrag
>> hit the same file at same time, the file ends up with a 4K data block from
>> somewhere else. "Somewhere else" seems to be a small chunk of binary gibberish
>> followed by contents from other files(!) Obviously this isn't a good thing to
>
> It seems that if you mount the filesystem with -o sync this problem goes away.
>
> --D
That implies to me that there is a missing block flush prior to a lock
being released. That should not be too hard to find by code
inspection.
As conceptually interested as I am in ext4_ioc_move_ext, I have not
really gone through the code with any detail. Maybe I'll contribute
by doing that.
Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-04-09 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 22:02 EXT4_IOC_MOVE_EXT file corruption! Darrick J. Wong
2010-04-09 16:20 ` Darrick J. Wong
2010-04-09 17:15 ` Greg Freemyer [this message]
2010-04-15 8:27 ` Akira Fujita
2010-04-15 19:17 ` Darrick J. Wong
2010-04-15 19:25 ` Greg Freemyer
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=q2o87f94c371004091015ud3b91710o58f2ce050255084a@mail.gmail.com \
--to=greg.freemyer@gmail.com \
--cc=djwong@us.ibm.com \
--cc=linux-ext4@vger.kernel.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).