Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Dec 2014 10:10:11 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Paul Koch <paul.koch@akips.com>, freebsd-stable@FreeBSD.org
Subject:   Re: 10.1 mmap on zfs not updating mtime
Message-ID:  <547C2263.3000001@FreeBSD.org>
In-Reply-To: <20141125142302.1199041c@akips.com>
References:  <20141125142302.1199041c@akips.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25/11/2014 06:23, Paul Koch wrote:
> 
> Hi,
> 
> we have observed some odd behaviour with the mtime of a mmap'ed file
> when it has been updated on a zfs pool.  The mtime does not appear to
> be updated.  Seems to work ok on UFS.

Could you please test the following simple patch?
Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
===================================================================
--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	(revision 275036)
+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	(working copy)
@@ -5969,6 +5969,7 @@ top:
 		    &zp->z_pflags, 8);
 		zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime,
 		    B_TRUE);
+		(void)sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
 		zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, 0);

 		zfs_vmobject_wlock(object);

> Test program below...
> 
> On 10.0, the following works ok:
> 
>  dd bs=1k if=/dev/zero of=mdata count=1
>  ls -lT mdata; /tmp/mmap-mtime mdata; ls -lT mdata
> 
> but on 10.1 the mtime stays at its creation time.
[snip]

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?547C2263.3000001>