From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
Josef Bacik <jbacik@fb.com>, Eryu Guan <eguan@redhat.com>,
fstests <fstests@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Alasdair Kergon <agk@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Dave Chinner <david@fromorbit.com>, Jan Kara <jack@suse.cz>,
Mike Snitzer <snitzer@redhat.com>, Shaohua Li <shli@kernel.org>,
dm-devel@redhat.com, linux-nvdimm@lists.01.org,
linux-raid@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Ext4 <linux-ext4@vger.kernel.org>,
linux-xfs <linux-xfs@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [fstests PATCH v3] generic: add test for DAX MAP_SYNC support
Date: Thu, 16 Nov 2017 15:59:47 -0700 [thread overview]
Message-ID: <20171116225947.GA23070@linux.intel.com> (raw)
In-Reply-To: <CAOQ4uxjAnMed7-BTZWe6JUC4Fa-nApKvx9-_PzewmfcZ48cP7g@mail.gmail.com>
On Thu, Oct 26, 2017 at 07:59:39AM +0300, Amir Goldstein wrote:
> On Wed, Oct 25, 2017 at 11:47 PM, Ross Zwisler
> <ross.zwisler@linux.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@linux.intel.com>
> >
> > ---
> >
> > Changes since v2:
> > - Fixed _require_log_writes() so that DAX will be disallowed if the
> > version of the dm-log-writes target is older than v1.1.0. (Amir)
>
> It seems like your kernel patch bumped the version to 1.0.1...
Ah, yep, that's the version number that I submitted but Mike changed it to
v1.1.0 in his tree. Here's the patch that was merged for v4.15-rc1:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers?id=98d82f48f1983ceef5c8d2f6c87bfee2918790ee
> >
> > ---
> > .gitignore | 1 +
> > common/dmlogwrites | 4 ++-
> > common/rc | 6 ++--
> > src/Makefile | 3 +-
> > src/t_map_sync.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
> > tests/generic/466 | 76 ++++++++++++++++++++++++++++++++++++++++++
> > tests/generic/466.out | 3 ++
> > tests/generic/group | 1 +
> > 8 files changed, 182 insertions(+), 4 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..71d008d 100644
> > --- a/common/dmlogwrites
> > +++ b/common/dmlogwrites
> > @@ -23,8 +23,10 @@ _require_log_writes()
> > [ -z "$LOGWRITES_DEV" -o ! -b "$LOGWRITES_DEV" ] && \
> > _notrun "This test requires a valid \$LOGWRITES_DEV"
> >
> > - _exclude_scratch_mount_option dax
> > _require_dm_target log-writes
> > + if [[ ${DMTARGET_VER[0]} == 1 && ${DMTARGET_VER[1]} < 1 ]]; then
> > + _exclude_scratch_mount_option dax
> > + fi
>
> IMO, this would be better as:
>
> local z=0
> _scratch_has_mount_option dax && z=1
> _require_dm_target log-writes 1 0 $z
>
> Or something like that
Yep, this is nicer. Fixed.
Thanks for the review.
next prev parent reply other threads:[~2017-11-16 22:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 5:24 [PATCH 1/2] dm log writes: Add support for inline data buffers Ross Zwisler
2017-10-20 5:24 ` [PATCH 2/2] dm log writes: add support for DAX Ross Zwisler
2017-10-23 17:34 ` Josef Bacik
2017-10-23 18:59 ` Ross Zwisler
2017-10-24 19:22 ` Mike Snitzer
2017-10-24 19:30 ` Ross Zwisler
2017-10-20 5:29 ` [fstests PATCH] generic: add test for DAX MAP_SYNC support Ross Zwisler
2017-10-20 6:51 ` Amir Goldstein
2017-10-20 21:25 ` [fstests PATCH v2] " Ross Zwisler
2017-10-22 6:56 ` Amir Goldstein
2017-10-25 12:19 ` Amir Goldstein
2017-10-25 17:12 ` Ross Zwisler
2017-10-25 20:47 ` [fstests PATCH v3] " Ross Zwisler
2017-10-25 21:56 ` Dave Chinner
2017-11-16 21:28 ` Ross Zwisler
2017-11-16 21:31 ` Ross Zwisler
2017-10-26 4:59 ` Amir Goldstein
2017-11-16 22:59 ` Ross Zwisler [this message]
2017-10-24 19:14 ` [PATCH 1/2] dm log writes: Add support for inline data buffers Mike Snitzer
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=20171116225947.GA23070@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=agk@redhat.com \
--cc=amir73il@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=dm-devel@redhat.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jbacik@fb.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=shli@kernel.org \
--cc=snitzer@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).