From nobody Thu Mar 14 00:47:36 2024 X-Original-To: dev-commits-src-branches@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 4Tw7yJ4GdDz5DnDn; Thu, 14 Mar 2024 00:47:36 +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 4Tw7yJ2tpnz4HcV; Thu, 14 Mar 2024 00:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377256; 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=3aSuQzXlD5fA1liuU7AsVVYzxDyb8Hk21KbW6mteZB4=; b=Gn1aQQ3iMmy4f3rZA25dECczcxXEuE5nlh8xYWiY9PS7qfJvU6dhTr4QTg1nemhPFgepIq wNObiX7SIoNE4yd1W+W0RJ6mOPI7NKWYTu+rvC8P/1y7Eoj77jUzsSAGZ9Daf9Iz+NVBqX MKcS3iq45mPN3ESUdE8p9xj/vt6xdMaYDNgke7k4L5CJRDyntdoV9N4c14/Dq4oFVAzMal bn8Xc9ddx7VcMzNXgXZHQ3Y0Cf2zGfte/hhbigEzN857Wed3Pdft/kByk90lfPnMuCscc3 KxsAChrgTFOvWP9fGMw5o7aC0syBv+w5EfuvPPeiDlyMMZcSfUe6kWqMNa8CcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377256; a=rsa-sha256; cv=none; b=ZOhY1oJ9Zr6QIc6+Y6WdjW2e969W3dYcrB3r6lFbmM8V/BRPvXjKnmxn4IP3liYdxhDcDP 5hWYbycZE8euFUD+YSO5US8zJ38PkNzz3bbRJMp0lH5a3O6P4tTaFRhMndp9tPdAA8ygXC ME6Ddlei8MOahXcH7J0f2HGRAhbGnmWE18IHlW0u4VR71TPU5/vn4t2D6XPF0HfToLGDym xHl8dlBrFHDFNc/ks8ze1C9YVIBVQvsqy53rHd2QFlVQ0+zHQmDm5ZONKSgpNPiiZn4MnK kxnZozK0yjbApRRse6Y3XCFn5G5qPkHgbVwsMWYCNpLgfA2CPcFrD0/GT0GF3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377256; 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=3aSuQzXlD5fA1liuU7AsVVYzxDyb8Hk21KbW6mteZB4=; b=WUQnp0FeupDvfaeT6+LwGG8Uf4kTTfVzrnfU1vagwI8qRoREJkp3+aksnWsXASfa7FNMds OBfmlldjxANCUf1T2zrsUQQsKUHdM4WQOpcl6IRZZM127ejWEPZ379Bw0QelAryr7jwJNj youpQKPrLSGhQAyDrcNOuriVJbKQDfta4qbnfUVhg8phu0s4zftvjHayIiq7yVb2YF7Iek 4hGBpjBymW5AptK9t3Mp+s7A4753mou64hkqDos4f0uk0uS7+Ol0p9If0yauHj2a+kRBP9 /hJgadndBH/NU9JadsLsG8IqSkCJYnzM9s2HSXKttVpq1a1B+DvGiR6G4AnkzQ== 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 4Tw7yJ2VKtz15Jt; Thu, 14 Mar 2024 00:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0laun029258; Thu, 14 Mar 2024 00:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0laYm029255; Thu, 14 Mar 2024 00:47:36 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:36 GMT Message-Id: <202403140047.42E0laYm029255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d119f5a194fe - stable/13 - nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d119f5a194fe0dd81e43f8ab7470b1b0a51b932d Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d119f5a194fe0dd81e43f8ab7470b1b0a51b932d commit d119f5a194fe0dd81e43f8ab7470b1b0a51b932d Author: Seigo Tanimura AuthorDate: 2024-03-04 13:50:25 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default (cherry picked from commit c849eb8f1925f95ebfb8dbbe00672d902486a973) --- sys/fs/nullfs/null_vfsops.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 500352338f6d..0285a5e45e51 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -67,6 +68,13 @@ static vfs_unmount_t nullfs_unmount; static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; +SYSCTL_NODE(_vfs, OID_AUTO, nullfs, CTLFLAG_RW, 0, "nullfs"); + +static bool null_cache_vnodes = true; +SYSCTL_BOOL(_vfs_nullfs, OID_AUTO, cache_vnodes, CTLFLAG_RWTUN, + &null_cache_vnodes, 0, + "cache free nullfs vnodes"); + /* * Mount null layer */ @@ -195,7 +203,8 @@ nullfs_mount(struct mount *mp) } xmp->nullm_flags |= NULLM_CACHE; - if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || + if (!null_cache_vnodes || + vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0) xmp->nullm_flags &= ~NULLM_CACHE;