Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2017 18:38:22 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r316927 - vendor-sys/illumos/dist/uts/common/fs/zfs
Message-ID:  <201704141838.v3EIcM4G075944@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Apr 14 18:38:21 2017
New Revision: 316927
URL: https://svnweb.freebsd.org/changeset/base/316927

Log:
  5379 modifying a mmap()-ed file does not update its timestamps
  
  illumos/illumos-gate@80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6
  https://github.com/illumos/illumos-gate/commit/80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6
  
  https://www.illumos.org/issues/5379
    The following is based on a review of the illumos code and on a similar problem
    reported for FreeBSD where the relevant code is different.
    Looking at this block of code http://src.illumos.org/source/xref/illumos-gate/
    usr/src/uts/common/fs/zfs/zfs_vnops.c#4187 I see code to set up an
    sa_bulk_attr_t object, I see code to set up mtime and ctime values, but I do
    not see code to actually apply the attributes...
    I would expect there to be a call to sa_bulk_update(), there is such a call in
    zfs_write() for instance.
    mmap_write.c [Magnifier] - demo (1.42 KB) Andriy Gapon, 2015-11-11 01:53 PM
  
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
  Reviewed by: Dan McDonald <danmcd@omniti.com>
  Approved by: Gordon Ross <gordon.w.ross@gmail.com>
  Author: Andriy Gapon <andriy.gapon@clusterhq.com>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c	Fri Apr 14 18:34:03 2017	(r316926)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c	Fri Apr 14 18:38:21 2017	(r316927)
@@ -4266,6 +4266,8 @@ zfs_putapage(vnode_t *vp, page_t *pp, u_
 		    &zp->z_pflags, 8);
 		zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime,
 		    B_TRUE);
+		err = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
+		ASSERT0(err);
 		zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, 0);
 	}
 	dmu_tx_commit(tx);



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