[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151106221727.GS10656@dastard>
Date: Sat, 7 Nov 2015 09:17:27 +1100
From: Dave Chinner <david@...morbit.com>
To: "Boylston, Brian" <brian.boylston@....com>
Cc: Jan Kara <jack@...e.com>, Ted Tso <tytso@....edu>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>
Subject: Re: [PATCH 0/9 v3] ext4: Punch hole and DAX fixes
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@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists