All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Boylston, Brian" <brian.boylston@hpe.com>
Cc: Jan Kara <jack@suse.com>, Ted Tso <tytso@mit.edu>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>
Subject: Re: [PATCH 0/9 v3] ext4: Punch hole and DAX fixes
Date: Sat, 7 Nov 2015 09:17:27 +1100	[thread overview]
Message-ID: <20151106221727.GS10656@dastard> (raw)
In-Reply-To: <80B02B5F638F054B8B1358323FECDE0A5EA64CCF@G1W3650.americas.hpqcorp.net>

On Fri, Nov 06, 2015 at 05:57:04PM +0000, Boylston, Brian wrote:
> Hi,
> 
> I've written a test tool (included below) that exercises page faults on
> hole-y portions of an mmapped file.  The file is created, sized using
> various methods, mmapped, and then two threads race to write a marker to
> different offsets within each mapped page.  Once the threads have
> finished marking each page, the pages are checked for the presence of
> the markers.
> 
> With vanilla 4.2 and 4.3 kernels, this test easily exposes corruption on
> pmem-backed, DAX-mounted xfs and ext4 file systems.

4.2/4.3 kernels do not have a fix for this race problem in them, so
it's no surprise that they fail the test. The fixes for this problem
in XFS are currently in the for-next branch, and will be merged into
4.4 during the merge window.

And FWIW, with XFS on a ramdisk on a 4.3+for-next branch kernel,
this test passes just fine:

$ ./dax-hole-test -f /mnt/scratch/holetest 1000
holetest r0

INFO: zero-filled test...
INFO: sz = 3e800000, npages = 256000
INFO: vastart = 00007fc5a90bd000
INFO: thread 0 is 7fc5a90bc700
INFO: thread 1 is 7fc5a88bb700
INFO: 0 error(s) detected

INFO: posix_fallocate test...
INFO: sz = 3e800000, npages = 256000
INFO: vastart = 00007fc5a90bd000
INFO: thread 0 is 7fc5a88bb700
INFO: thread 1 is 7fc5a90bc700
INFO: 0 error(s) detected

INFO: fallocate test...
INFO: sz = 3e800000, npages = 256000
INFO: vastart = 00007fc5a90bd000
INFO: thread 0 is 7fc5a90bc700
INFO: thread 1 is 7fc5a88bb700
INFO: 0 error(s) detected

INFO: ftruncate test...
INFO: sz = 3e800000, npages = 256000
INFO: vastart = 00007fc5a90bd000
INFO: thread 0 is 7fc5a88bb700
INFO: thread 1 is 7fc5a90bc700
INFO: 0 error(s) detected

That tends to indicate a bug in the ext4 patchset, not that the
method we've taken to solve the problem is fundamentally wrong.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2015-11-06 22:17 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 ` [PATCH 0/9 v3] ext4: Punch hole and DAX fixes Ross Zwisler
2015-11-06 17:57 ` Boylston, Brian
2015-11-06 22:17   ` Dave Chinner [this message]
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=20151106221727.GS10656@dastard \
    --to=david@fromorbit.com \
    --cc=brian.boylston@hpe.com \
    --cc=dan.j.williams@intel.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    --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.