linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Boaz Harrosh <boaz@plexistor.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Jan Kara <jack@suse.cz>, Hugh Dickins <hughd@google.com>,
	Mel Gorman <mgorman@suse.de>,
	linux-mm@kvack.org, linux-nvdimm <linux-nvdimm@ml01.01.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/3] xfstests: generic/080 test that mmap-write updates c/mtime
Date: Thu, 5 Mar 2015 11:13:12 +1100	[thread overview]
Message-ID: <20150305001312.GA4251@dastard> (raw)
In-Reply-To: <54F734C4.7080409@plexistor.com>

On Wed, Mar 04, 2015 at 06:37:24PM +0200, Boaz Harrosh wrote:
> From: Yigal Korman <yigal@plexistor.com>
> 
> when using mmap() for file i/o, writing to the file should update
> it's c/mtime. Specifically if we first mmap-read from a page, then
> memap-write to the same page.
> 
> This test was failing for the initial submission of DAX because
> pfn based mapping do not have an page_mkwrite called for them.
> The new Kernel patches that introduce pfn_mkwrite fixes this test.

This is a lot more complex than it needs to be - xfs_io does
everything we already need, so the test really just needs to
follow the template set out by generic/309. i.e:


# pattern the file.
$XFS_IO_PROG -f -c "pwrite 0 64k" -c fsync $testfile | _filter_xfs_io

# sample timestamps.
mtime1=`stat -c %Y $testfile`
ctime1=`stat -c %Z $testfile`

# map read followed by map write to trigger timestamp change
sleep 2
$XFS_IO_PROG -c "mmap 0 64k" -c "mread 0 64k" -c "mwrite 0 4k" $testfile |_filter_xfs_io

# sample and check timestamps have changed.
mtime2=`stat -c %Y $testsfile`
ctime2=`stat -c %Z $testsfile`

if [ "$mtime1" == "$mtime2" ]; then
        echo "mtime not updated"
        let status=$status+1
fi
if [ "$ctime1" == "$ctime2" ]; then
        echo "ctime not updated"
        let status=$status+1
fi

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2015-03-05  0:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 16:33 [PATCH 0/3] DAX: Fix mmap-write not updating c/mtime Boaz Harrosh
2015-03-04 16:37 ` [PATCH 1/3] xfstests: generic/080 test that mmap-write updates c/mtime Boaz Harrosh
2015-03-05  0:13   ` Dave Chinner [this message]
2015-03-05 14:02     ` [PATCH 1/3 v2] xfstest: " Boaz Harrosh
2015-03-05 14:12       ` Boaz Harrosh
2015-03-19  9:53     ` [PATCH 1/3 v2 resend] " Boaz Harrosh
2015-03-19 10:44       ` Eryu Guan
2015-03-19 11:46         ` [PATCH v3] " Boaz Harrosh
2015-03-19 11:49           ` Boaz Harrosh
2015-03-19 15:30           ` Eryu Guan
2015-03-19 15:58             ` [PATCH v4] " Boaz Harrosh
2015-03-19 16:02             ` [PATCH v3] " Boaz Harrosh
2015-03-04 16:41 ` [PATCH 2/3] mm: New pfn_mkwrite same as page_mkwrite for VM_PFNMAP Boaz Harrosh
2015-03-04 16:48 ` [PATCH 3/3] DAX: use pfn_mkwrite to update c/mtime Boaz Harrosh
2015-03-04 17:19   ` Jan Kara
2015-03-05  9:24     ` [PATCH 3/3 v2] dax: use pfn_mkwrite to update c/mtime + freeze protection Boaz Harrosh
2015-03-05  9:32       ` Boaz Harrosh
2015-03-05 10:35         ` Jan Kara
2015-03-05 10:47           ` Boaz Harrosh
2015-03-05 10:56             ` 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=20150305001312.GA4251@dastard \
    --to=david@fromorbit.com \
    --cc=akpm@linux-foundation.org \
    --cc=boaz@plexistor.com \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=matthew.r.wilcox@intel.com \
    --cc=mgorman@suse.de \
    /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).