lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Oct 2017 11:12:24 -0600
From:   Ross Zwisler <ross.zwisler@...ux.intel.com>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     Ross Zwisler <ross.zwisler@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Josef Bacik <jbacik@...com>, Eryu Guan <eguan@...hat.com>,
        fstests <fstests@...r.kernel.org>,
        Alasdair Kergon <agk@...hat.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Dave Chinner <david@...morbit.com>, Jan Kara <jack@...e.cz>,
        Mike Snitzer <snitzer@...hat.com>,
        Shaohua Li <shli@...nel.org>, dm-devel@...hat.com,
        linux-nvdimm@...ts.01.org, linux-raid@...r.kernel.org,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Ext4 <linux-ext4@...r.kernel.org>,
        linux-xfs <linux-xfs@...r.kernel.org>,
        Christoph Hellwig <hch@...radead.org>
Subject: Re: [fstests PATCH v2] generic: add test for DAX MAP_SYNC support

On Wed, Oct 25, 2017 at 03:19:22PM +0300, Amir Goldstein wrote:
> On Sun, Oct 22, 2017 at 9:56 AM, Amir Goldstein <amir73il@...il.com> wrote:
> > On Sat, Oct 21, 2017 at 12:25 AM, Ross Zwisler
> > <ross.zwisler@...ux.intel.com> wrote:
> >> Add a test that exercises DAX's new MAP_SYNC flag.
> >>
> >> This test creates a file and writes to it via an mmap(), but never syncs
> >> via fsync/msync.  This process is tracked via dm-log-writes, then replayed.
> >>
> >> If MAP_SYNC is working the dm-log-writes replay will show the test file
> >> with 1MiB of on-media block allocations.  This is because each allocating
> >> page fault included an implicit metadata sync.  If MAP_SYNC isn't working
> >> (which you can test by fiddling with the parameters to mmap()) the file
> >> will be smaller or missing entirely.
> >>
> >> Note that dm-log-writes doesn't track the data that we write via the
> >> mmap(), so we can't do any data integrity checking.  We can only verify
> >> that the metadata writes for the page faults happened.
> >>
> >> Signed-off-by: Ross Zwisler <ross.zwisler@...ux.intel.com>
> >>
> >> ---
> >>
> >> Changes since v1:
> >>  - Addressed review feedback from Amir.  Thank you for the review!
> >
> > Looks good.
> >
> >>
> >> ---
> >>  .gitignore            |  1 +
> >>  common/dmlogwrites    |  1 -
> >>  src/Makefile          |  3 +-
> >>  src/t_map_sync.c      | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >>  tests/generic/466     | 76 ++++++++++++++++++++++++++++++++++++++++++
> >>  tests/generic/466.out |  3 ++
> >>  tests/generic/group   |  1 +
> >>  7 files changed, 175 insertions(+), 2 deletions(-)
> >>  create mode 100644 src/t_map_sync.c
> >>  create mode 100755 tests/generic/466
> >>  create mode 100644 tests/generic/466.out
> >>
> >> diff --git a/.gitignore b/.gitignore
> >> index 2014c08..9fc0695 100644
> >> --- a/.gitignore
> >> +++ b/.gitignore
> >> @@ -119,6 +119,7 @@
> >>  /src/t_getcwd
> >>  /src/t_holes
> >>  /src/t_immutable
> >> +/src/t_map_sync
> >>  /src/t_mmap_cow_race
> >>  /src/t_mmap_dio
> >>  /src/t_mmap_fallocate
> >> diff --git a/common/dmlogwrites b/common/dmlogwrites
> >> index 247c744..5b57df9 100644
> >> --- a/common/dmlogwrites
> >> +++ b/common/dmlogwrites
> >> @@ -23,7 +23,6 @@ _require_log_writes()
> >>         [ -z "$LOGWRITES_DEV" -o ! -b "$LOGWRITES_DEV" ] && \
> >>                 _notrun "This test requires a valid \$LOGWRITES_DEV"
> >>
> >> -       _exclude_scratch_mount_option dax
> 
> Wait. It this really ok to relax no dax from _require_log_writes()?
> Shouldn't you check log-write target version or something to verify
> that log-writes+dax is really supported?
> I think you should.

Ah, yep, that makes sense.  I'll update for v3.

Powered by blists - more mailing lists