From nobody Wed Jun 15 15:05:43 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D3080850329; Wed, 15 Jun 2022 15:05:43 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LNTBv5b74z4hXs; Wed, 15 Jun 2022 15:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655305543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=On4CVnlPpHp9FWbQ542Msw+l2ugLQTwrDBVB0VGRB3c=; b=s2NYlMwTbbqe3K+nmakqMeGF1YBSpQP8l97NnQ5TxNOv2ZNEtqUIPj1bjUXjQNZvF1vgh4 ptpmKpT5lDsUBeSXyUMFWGD0rvn6VUDc4K8K8eMenGJt66zgPQGst7NlO6p0Wvsy5CMUxl k2XkxN/pR0rjymmpSZqH0tsiZXhxRLNxiRsvzIxr27dPDx/gX791W/gLkzkH3NRSDzSW48 DLAvKn33A3x5M4LEeaZiAOZbECtnlqZG+nAt8MpH9zqozFh7TVQsuTgjGSvxVK7PAStmtW 6emJlLQ/yYms1Pc8FfPSaM5xdmPtNTDn0VsCgzYkih2mOrKNA29/Pq53rGfqDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CD8920D97; Wed, 15 Jun 2022 15:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25FF5hth044963; Wed, 15 Jun 2022 15:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25FF5hva044962; Wed, 15 Jun 2022 15:05:43 GMT (envelope-from git) Date: Wed, 15 Jun 2022 15:05:43 GMT Message-Id: <202206151505.25FF5hva044962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Ambrisko Subject: git: ce00b11940ab - main - mount: revert the active vnode reporting feature List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ambrisko X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce00b11940aba80f0bd5fd712d77263194290d57 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655305543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=On4CVnlPpHp9FWbQ542Msw+l2ugLQTwrDBVB0VGRB3c=; b=ODSzIpqfIKJOifU+Li/d18HAgZl4kqi/8z2kvVARuo570wNdny2H1CYf6QYxR23a72u2LA T0uVBL9cAM5FRPPSlpl5tdjcgN5NNQe/vyW/zaTvZX2wp0eKwuo2rzWgUXPRKtB9dEHcvv FMMefdrmojqFp9o49/nkEsNv4iEoq8+Rea9bhlOaYU+EeofsoAQd6twy9FT001Ih49/V8T pv89iBt2bw82pWcUfjyKCC+jNtm4zUNbbmFnvnhEja+i08bAN2WvlScVooH5m9Dq6b2F0j Bs+eKckzY+Zr2EGJ95+h6X+5z6xCN0Pc83AxrTWfKXbUhFYmjwpsTue4zxafjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655305543; a=rsa-sha256; cv=none; b=quF1O061/Ib06T/XLeB7+5D1s+n97UJURyLO6leFGIAWEGxup3ODOmYWt7FNDA4qzq6Alb SqTlUZ0DKYgyFm5eL5ckDZ3bb0QkmB6qZND1gBiZjRJjs1eGr0vmmPX5RFL3DHugeKyRw7 gYjsIjfq2/6rK0UDGzCZFpDsD+yjdttijeLkCZek80I29Z3vwy4aQbNVYkRu2oh6SGPnl7 cBXLX6w7jVPEMJB99iMtj1x9K4marbgcLZrR7a+JFeklZLYwAZhjXeEdyUXz3c8c2fTka5 GlSiqTnIDtn7VdN4XHqgJqyGdxl1LiXJTZtvpfHdmvSdD5tjSUDovmeCSZSMeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ambrisko: URL: https://cgit.FreeBSD.org/src/commit/?id=ce00b11940aba80f0bd5fd712d77263194290d57 commit ce00b11940aba80f0bd5fd712d77263194290d57 Author: Doug Ambrisko AuthorDate: 2022-06-14 21:37:27 +0000 Commit: Doug Ambrisko CommitDate: 2022-06-15 14:24:55 +0000 mount: revert the active vnode reporting feature Revert the computing of active vnode reporting since statfs is used by a lot of tools. Only report the vnodes used. Reported by: mjg --- sbin/mount/mount.c | 7 +++---- sys/kern/vfs_mount.c | 12 ------------ sys/sys/mount.h | 2 +- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index bd3d0073c474..6c986907bcda 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -692,11 +692,10 @@ prmount(struct statfs *sfp) xo_emit("{D:, }{Lw:fsid}{:fsid}", fsidbuf); free(fsidbuf); } - if (sfp->f_nvnodelistsize != 0 || sfp->f_avnodecount != 0) { + if (sfp->f_nvnodelistsize != 0) { xo_open_container("vnodes"); - xo_emit("{D:, }{Lwc:vnodes}{Lw:count}{w:count/%ju}{Lw:active}{:active/%ju}", - (uintmax_t)sfp->f_nvnodelistsize, - (uintmax_t)sfp->f_avnodecount); + xo_emit("{D:, }{Lwc:vnodes}{Lw:count}{w:count/%ju}", + (uintmax_t)sfp->f_nvnodelistsize); xo_close_container("vnodes"); } } diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index e33492cd8367..155e397b7f5e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -2610,9 +2610,6 @@ vfs_copyopt(struct vfsoptlist *opts, const char *name, void *dest, int len) int __vfs_statfs(struct mount *mp, struct statfs *sbp) { - struct vnode *vp; - uint32_t count; - /* * Filesystems only fill in part of the structure for updates, we * have to read the entirety first to get all content. @@ -2628,15 +2625,6 @@ __vfs_statfs(struct mount *mp, struct statfs *sbp) sbp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; sbp->f_nvnodelistsize = mp->mnt_nvnodelistsize; - count = 0; - MNT_ILOCK(mp); - TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { - if (vrefcnt(vp) > 0) /* racy but does not matter */ - count++; - } - MNT_IUNLOCK(mp); - sbp->f_avnodecount = count; - return (mp->mnt_op->vfs_statfs(mp, sbp)); } diff --git a/sys/sys/mount.h b/sys/sys/mount.h index edac64171f9a..ffb2676258f3 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -92,7 +92,7 @@ struct statfs { uint64_t f_syncreads; /* count of sync reads since mount */ uint64_t f_asyncreads; /* count of async reads since mount */ uint32_t f_nvnodelistsize; /* # of vnodes */ - uint32_t f_avnodecount; /* # of active vnodes */ + uint32_t f_spare0; /* unused spare */ uint64_t f_spare[9]; /* unused spare */ uint32_t f_namemax; /* maximum filename length */ uid_t f_owner; /* user that mounted the filesystem */