On Wed, Mar 04, 2015 at 06:37:24PM +0200, Boaz Harrosh wrote: > From: Yigal Korman <yigal@xxxxxxxxxxxxx> > > 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@xxxxxxxxxxxxx -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>