From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Jan Kara <jack@suse.com>
Cc: Ted Tso <tytso@mit.edu>,
linux-ext4@vger.kernel.org,
Ross Zwisler <ross.zwisler@linux.intel.com>,
dan.j.williams@intel.com
Subject: Re: [PATCH 0/9 v3] ext4: Punch hole and DAX fixes
Date: Wed, 4 Nov 2015 11:51:02 -0700 [thread overview]
Message-ID: <20151104185102.GA26753@linux.intel.com> (raw)
In-Reply-To: <1446653920-23127-1-git-send-email-jack@suse.com>
On Wed, Nov 04, 2015 at 05:18:31PM +0100, Jan Kara wrote:
> Hello,
>
> Another version of my ext4 fixes. I've fixed up all the failures Ted reported
> except for ext4/001 failures which are false positive (will send fixes for that
> test shortly) and generic/269 in nodelalloc mode which I just wasn't able to
> reproduce.
>
> Note that testing with 1 KB blocksize on ramdisk is broken since brd has
> buggy discard implementation. It took me quite some time to figure this out.
> Fix is submitted but bear this in mind just in case.
>
> Changes since v2:
> * Fixed collaps range to truncate pagecache properly with blocksize < pagesize
> * Fixed assertion in ext4_get_blocks_overwrite
>
> Patch set description
>
> This series fixes a long standing problem of racing punch hole and page fault
> resulting in possible filesystem corruption or stale data exposure. We fix the
> problem by using a new inode-private rw_semaphore i_mmap_sem to synchronize
> page faults with truncate and punch hole operations.
>
> When having this exclusion, the only remaining problem with DAX implementation
> are races between two page faults zeroing out same block concurrently (where
> the data written after the first fault finishes are possibly overwritten by
> the second fault still doing zeroing).
>
> Patch 1 introduces i_mmap_sem lock in ext4 inode and uses it to properly
> serialize extent manipulation operations and page faults.
>
> Patch 2 is mostly a preparatory cleanup patch which also avoids double lock /
> unlock in unlocked DIO protections (currently harmless but nasty surprise).
>
> Patches 3-4 fix further races of extent manipulation functions (such as zero
> range, collapse range, insert range) with buffered IO, page writeback
>
> Patch 5 documents locking order of ext4 filesystem locks.
>
> Patch 6 removes locking abuse of i_data_sem from the get_blocks() path when
> dioread_nolock is enabled since it is not needed anymore.
>
> Patches 7-9 implement allocation of pre-zeroed blocks in ext4_map_blocks()
> callback and use such blocks for allocations from DAX page faults.
>
> The patches survived xfstests run both in dax and non-dax mode.
>
> Honza
This passed all my testing as well.
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
next prev parent reply other threads:[~2015-11-04 18:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 16:18 [PATCH 0/9 v3] ext4: Punch hole and DAX fixes Jan Kara
2015-11-04 16:18 ` [PATCH 1/9] ext4: Fix races between page faults and hole punching Jan Kara
2015-11-04 16:18 ` [PATCH 2/9] ext4: Move unlocked dio protection from ext4_alloc_file_blocks() Jan Kara
2015-11-04 16:18 ` [PATCH 3/9] ext4: Fix races between buffered IO and collapse / insert range Jan Kara
2015-11-04 16:18 ` [PATCH 4/9] ext4: Fix races of writeback with punch hole and zero range Jan Kara
2015-11-04 16:18 ` [PATCH 5/9] ext4: Document lock ordering Jan Kara
2015-11-04 16:18 ` [PATCH 6/9] ext4: Get rid of EXT4_GET_BLOCKS_NO_LOCK flag Jan Kara
2015-11-04 16:18 ` [PATCH 7/9] ext4: Provide ext4_issue_zeroout() Jan Kara
2015-11-04 16:18 ` [PATCH 8/9] ext4: Implement allocation of pre-zeroed blocks Jan Kara
2015-11-04 16:18 ` [PATCH 9/9] ext4: Use pre-zeroed blocks for DAX page faults Jan Kara
2015-11-04 18:51 ` Ross Zwisler [this message]
2015-11-06 17:57 ` [PATCH 0/9 v3] ext4: Punch hole and DAX fixes Boylston, Brian
2015-11-06 22:17 ` Dave Chinner
2015-11-09 16:22 ` Jan Kara
2015-11-09 16:51 ` Jan Kara
2015-11-10 0:00 ` Dave Chinner
2015-11-10 10:02 ` Jan Kara
2015-11-10 22:31 ` Dave Chinner
2015-11-11 15:25 ` Jan Kara
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=20151104185102.GA26753@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=jack@suse.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 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.