From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 50981] ext4 : DATA CORRUPTION read and write on same 4096 page range
Date: Mon, 26 Nov 2012 10:16:20 +0000 (UTC) [thread overview]
Message-ID: <20121126101620.32D0911FB81@bugzilla.kernel.org> (raw)
In-Reply-To: <bug-50981-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=50981
Zheng Liu <gnehzuil.liu@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gnehzuil.liu@gmail.com
--- Comment #3 from Zheng Liu <gnehzuil.liu@gmail.com> 2012-11-26 10:16:19 ---
IMHO, the reason seems to be that no any locking is taken by
generic_file_aio_read(). When ext4 does a buffered write, it will take i_mutex
to ensure that there is no other writer. But ext4 (ext3, btrfs, and vfat) uses
generic_file_aio_read() to do a buffered read, and it doesn't take i_mutex. So
it is easy to read a inconsistent data while doing a write. I am not very
familiar with xfs, but a rwlock will be taken when a read and/or a write is
being done. So that is why xfs hasn't this problem.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
next prev parent reply other threads:[~2012-11-26 10:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 16:31 [Bug 50981] New: ext4 : DATA CORRUPTION read and write on same 4096 page range bugzilla-daemon
2012-11-26 5:55 ` [Bug 50981] " bugzilla-daemon
2012-11-26 8:34 ` bugzilla-daemon
2012-11-26 10:16 ` bugzilla-daemon [this message]
2012-11-26 10:30 ` bugzilla-daemon
2012-11-26 11:18 ` bugzilla-daemon
2012-11-26 11:27 ` bugzilla-daemon
2012-11-26 11:32 ` bugzilla-daemon
2012-11-26 12:17 ` bugzilla-daemon
2012-11-26 12:17 ` bugzilla-daemon
2012-11-26 12:22 ` bugzilla-daemon
2012-11-26 12:26 ` [Bug 50981] generic_file_aio_read ?: No locking means " bugzilla-daemon
2012-11-26 13:21 ` Theodore Ts'o
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=20121126101620.32D0911FB81@bugzilla.kernel.org \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@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).