From nobody Thu Mar 14 00:45:58 2024 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 4Tw7wR0MdTz5DnGM; Thu, 14 Mar 2024 00:45:59 +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 4Tw7wQ56TKz4FhC; Thu, 14 Mar 2024 00:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377158; 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=aAlL1/oLAE4KdpO3aduQq/LdiMs1bRTAhvFNgxO+B1o=; b=YoZ7alhWS05IpkjcHIt4j0slGzolNPXqVcmAjSy77Lwd4Hlu2SO6jSopT065LD/vZpNBr6 /c9/aYxUJ3Lt1LepMPFv7qyBNeI1FRBv4gA4Lsy+2sqdJme+nK0A7tKUGzaBJXSvVZOvZx uuB1li0R1/48bHTR2z+YleYuyw9ge5i1DyzSSyuwJ9YDdTUeiuAFoX1TdBZZgvEMUM9RVX tc/hMrInDnEynZSdQIInCbwMEgv9N/IeTG9lo+C2bofC6kGzY6uNk051uaUOBnRC4aYNn0 EfiloVC4yCyoPU4eoQJhZSKYeFDExJkWS1y0E0WfDwn20wq5Fg381ozSlnOJyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377158; a=rsa-sha256; cv=none; b=HA4bmwTMLJmJZ1thSMbwnHs+zNGVePpzYEAOsnMXECj9Lh3RfxRoLMM/Tob1Utq7TpeDBZ 4w6Fc+TXqiIHKrY1kwHsZh2faYWbkLGmtzf2+awY5vjIx6biqzedLluWShJrzBPPoLYYY9 60LNYtcHKYnf1qCB8wyDQqtjsdsLSXPXutp3Y+e63ZcYETzL7vxT0DTVXdDFygj/0w66j9 aMbisa8vj2cRQhAN3cVJe/vQfHAXmnD9+lUnpVCKnNqfqmQdt0JJ/d6IRPwKkmWfFh1nho wrXJgfuJ6vhSYOPeHrTqbVHY3bz0stybp0VbZs+/ICu3FKBbnE10muNgIb/Qcw== 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=1710377158; 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=aAlL1/oLAE4KdpO3aduQq/LdiMs1bRTAhvFNgxO+B1o=; b=ZWm9UcZ7tOOYQW30FuQEq+oefof891ozkfhpNo0jK89NYJyVRq+xZjqp1KTWrjFw2rwaTC zrB/9sAePYl2vah8f9ktjDXoLdtG6tS9Vgg23veHiGf6iI2O2niaDvZ2Tz5JMUSfDKGj/M EqPXBjp5mUXXHbH9j/5e8tLN3s9k7qEZ972kyomg1rVh5d+qAXXcyYep3IUwefu5dQwOTL Qlx+C78coCGvQoXJPlhzYhGMrv9gc42ZfJLTDXqWAoZXlz9GMbSVttkzMUBPSOe3QdQY8D SByCpY1kYLBwWJPac/VqZ/F86sKWeYuzlk2OMbL6cTE4Kfm3QUaltJJpD6qlJQ== 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 4Tw7wQ4jtDz14yt; Thu, 14 Mar 2024 00:45:58 +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 42E0jwQN028562; Thu, 14 Mar 2024 00:45:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0jwUs028560; Thu, 14 Mar 2024 00:45:58 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:45:58 GMT Message-Id: <202403140045.42E0jwUs028560@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: 3ba93b50d6fa - stable/14 - nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3ba93b50d6fa7733dd80158f162faf33a216b5b0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3ba93b50d6fa7733dd80158f162faf33a216b5b0 commit 3ba93b50d6fa7733dd80158f162faf33a216b5b0 Author: Seigo Tanimura AuthorDate: 2024-03-04 13:50:25 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:40 +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 6acff89189f5..9d4a9588fed9 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 */ @@ -202,7 +210,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;