Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2009 13:28:29 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197351 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200909201328.n8KDST3f057869@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sun Sep 20 13:28:29 2009
New Revision: 197351
URL: http://svn.freebsd.org/changeset/base/197351

Log:
  Purge namecache in the same place OpenSolaris does.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Sun Sep 20 13:28:19 2009	(r197350)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Sun Sep 20 13:28:29 2009	(r197351)
@@ -2354,9 +2354,6 @@ zfs_ioc_rollback(zfs_cmd_t *zc)
 		if (error == 0) {
 			int resume_err;
 
-#ifdef FREEBSD_NAMECACHE
-			cache_purgevfs(zfsvfs->z_vfs);
-#endif
 			ASSERT(strcmp(osname, zc->zc_name) == 0);
 			error = dmu_objset_rollback(os);
 			resume_err = zfs_resume_fs(zfsvfs, osname, mode);
@@ -2543,9 +2540,6 @@ zfs_ioc_recv(zfs_cmd_t *zc)
 		if (error == 0) {
 			int resume_err;
 
-#ifdef FREEBSD_NAMECACHE
-			cache_purgevfs(zfsvfs->z_vfs);
-#endif
 			error = dmu_recv_end(&drc);
 			resume_err = zfs_resume_fs(zfsvfs, osname, mode);
 			error = error ? error : resume_err;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sun Sep 20 13:28:19 2009	(r197350)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sun Sep 20 13:28:29 2009	(r197351)
@@ -898,6 +898,9 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea
 		 * 'z_parent' is self referential for non-snapshots.
 		 */
 		(void) dnlc_purge_vfsp(zfsvfs->z_parent->z_vfs, 0);
+#ifdef FREEBSD_NAMECACHE
+		cache_purgevfs(zfsvfs->z_parent->z_vfs);
+#endif
 	}
 
 	/*



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