From owner-svn-src-head@freebsd.org Mon Oct 26 08:17:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7FD143E547; Mon, 26 Oct 2020 08:17:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKSPf4tSdz3dQR; Mon, 26 Oct 2020 08:17:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C26417B81; Mon, 26 Oct 2020 08:17:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09Q8HgAA074670; Mon, 26 Oct 2020 08:17:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09Q8Hgel074668; Mon, 26 Oct 2020 08:17:42 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010260817.09Q8Hgel074668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 26 Oct 2020 08:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367054 - head/sys/contrib/openzfs/module/os/freebsd/zfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/contrib/openzfs/module/os/freebsd/zfs X-SVN-Commit-Revision: 367054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 08:17:42 -0000 Author: mjg Date: Mon Oct 26 08:17:41 2020 New Revision: 367054 URL: https://svnweb.freebsd.org/changeset/base/367054 Log: zfs: remove unused support for zfs_znode_move Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Mon Oct 26 05:22:52 2020 (r367053) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Mon Oct 26 08:17:41 2020 (r367054) @@ -1118,21 +1118,10 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting) return (0); } -extern krwlock_t zfsvfs_lock; /* in zfs_znode.c */ - void zfsvfs_free(zfsvfs_t *zfsvfs) { int i; - - /* - * This is a barrier to prevent the filesystem from going away in - * zfs_znode_move() until we can safely ensure that the filesystem is - * not unmounted. We consider the filesystem valid before the barrier - * and invalid after the barrier. - */ - rw_enter(&zfsvfs_lock, RW_READER); - rw_exit(&zfsvfs_lock); zfs_fuid_destroy(zfsvfs); Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c Mon Oct 26 05:22:52 2020 (r367053) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c Mon Oct 26 08:17:41 2020 (r367054) @@ -91,14 +91,7 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, znode, CTLFLAG_RD, * (such as VFS logic) that will not compile easily in userland. */ #ifdef _KERNEL -/* - * Needed to close a small window in zfs_znode_move() that allows the zfsvfs to - * be freed before it can be safely accessed. - */ -krwlock_t zfsvfs_lock; - -#if defined(_KERNEL) && !defined(KMEM_DEBUG) && \ - __FreeBSD_version >= 1300102 +#if !defined(KMEM_DEBUG) && __FreeBSD_version >= 1300102 #define _ZFS_USE_SMR static uma_zone_t znode_uma_zone; #else @@ -200,7 +193,6 @@ zfs_znode_init(void) /* * Initialize zcache */ - rw_init(&zfsvfs_lock, NULL, RW_DEFAULT, NULL); ASSERT(znode_uma_zone == NULL); znode_uma_zone = uma_zcreate("zfs_znode_cache", sizeof (znode_t), zfs_znode_cache_constructor_smr, @@ -228,7 +220,6 @@ zfs_znode_init(void) /* * Initialize zcache */ - rw_init(&zfsvfs_lock, NULL, RW_DEFAULT, NULL); ASSERT(znode_cache == NULL); znode_cache = kmem_cache_create("zfs_znode_cache", sizeof (znode_t), 0, zfs_znode_cache_constructor, @@ -267,7 +258,6 @@ zfs_znode_fini(void) znode_cache = NULL; } #endif - rw_destroy(&zfsvfs_lock); } @@ -449,10 +439,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int b ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs)); zp->z_moved = 0; - /* - * Defer setting z_zfsvfs until the znode is ready to be a candidate for - * the zfs_znode_move() callback. - */ zp->z_sa_hdl = NULL; zp->z_unlinked = 0; zp->z_atime_dirty = 0; @@ -529,11 +515,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int b mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); zfsvfs->z_nr_znodes++; - membar_producer(); - /* - * Everything else must be valid before assigning z_zfsvfs makes the - * znode eligible for zfs_znode_move(). - */ zp->z_zfsvfs = zfsvfs; mutex_exit(&zfsvfs->z_znodes_lock);