From: "Theodore Ts'o" <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Fix data corruption caused by overlapping unaligned and aligned IO
Date: Fri, 10 May 2019 21:53:04 -0400 [thread overview]
Message-ID: <20190511015304.GE2534@mit.edu> (raw)
In-Reply-To: <20190506134952.26070-1-lczerner@redhat.com>
On Mon, May 06, 2019 at 03:49:52PM +0200, Lukas Czerner wrote:
> Unaligned AIO must be serialized because the zeroing of partial blocks
> of unaligned AIO can result in data corruption in case it's overlapping
> another in flight IO.
>
> Currently we wait for all unwritten extents before we submit unaligned
> AIO which protects data in case of unaligned AIO is following overlapping
> IO. However if a unaligned AIO is followed by overlapping aligned AIO we
> can still end up corrupting data.
>
> To fix this, we must make sure that the unaligned AIO is the only IO in
> flight by waiting for unwritten extents conversion not just before the
> IO submission, but right after it as well.
>
> This problem can be reproduced by xfstest generic/538
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Many thanks, applied.
- Ted
prev parent reply other threads:[~2019-05-11 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 13:49 [PATCH] ext4: Fix data corruption caused by overlapping unaligned and aligned IO Lukas Czerner
2019-05-11 1:53 ` Theodore Ts'o [this message]
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=20190511015304.GE2534@mit.edu \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.