From nobody Thu Mar 14 00:47:38 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 4Tw7yM12cMz5Dmyr; Thu, 14 Mar 2024 00:47:39 +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 4Tw7yL5BWnz4HML; Thu, 14 Mar 2024 00:47:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377258; 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=sqC2qHeWcbAzAOtXgc9P+mNSBWumbcunK0KxR9Ttcu8=; b=Icn1ecD0xmzVbc2OUYj1G5THFfCy+u/s8pLpZDaeRpkxjQT5jyD/HssPezwSZ8cRh1MwiM DztTovSNzg8FOIbwekPjTq7Jeiwz9NLeT8NQ93wpP+kRq3p7V8U8Yh5n176poDxWvqB/Ae GsTA6XKld4OxMDJ5VimOrpy7B8hP+w6qEXHsm7oOSbCQ8AqP9QCoSdUnenj9ll5ygkimKd tQ8h6UDV5EQAiFXq+/WpFcawAe1sQykFvMsgcdWSX9uIjZyqvxM/Q+ktsl3ibZ4aQEK6AE NeZvNwiNE2zsoVdsx5QiVKRBlAiGEyNrfHMDJwDdOaMkVCef3fgHt595yEGMSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377258; a=rsa-sha256; cv=none; b=sSe18M0KbCoHPNPpCBgINiSm5HCPCnGOKqui9Y0Ljw3AoiOEVtqD9VNVH5ySbIh9LbO5oH QQWsklzExY3dLLVMvqUYLfHkIj0FQO97RIqRos/M0f0JK2IgwAyXxM3FP0TyH2gm5G8epA iiNMcxxtVuKgOg4YM6JK4of6ug6QqMCnlvLd/XPMtbM4L4Jpgefq6stVsaP3H+fHYmMU7R Uvxr57sl5gGJAkJe+Bf+s0xoxgvtTnY8T9CPQ1q9COpJjS4vcmN6LczgFdIFMLBbPAG3xw YdnORM+q2z408ADyXVlMZySRncHTPBD6wyYEkM1n9wdccVQ4bKBQiawYNv8xTA== 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=1710377258; 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=sqC2qHeWcbAzAOtXgc9P+mNSBWumbcunK0KxR9Ttcu8=; b=FEMJE1FpcQfKYb3WB2xPuf9sPwjpHzrpHgQIXjK/PrYeq4LLkZIhueHRkvE+rfNtZf79AY Waty4HEMT/0FX1dWdmnlDVd69VQoeeXJuSaCf4Xg0bbTonzs0qsKYAHRq6zgJ95AYAY5mQ a2YCLCkiqtWDKF0RFDUOgaH0irHG4gvyYht6UjI/6kk0wxDbAJAOI06b2vkFjf4P5MQbsw G+Dyo5vbry+whl5a/oy3i+W7vUWLBZ2c614D6nZt1UQkp7nwBhpSW0xoD0Zkndigub4xci EDiJWwlfyGIKSzc2vvt7upljzMrKapnh3Ap5JCaCyJct0vPFOq+xes9HvRjWaA== 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 4Tw7yL4WSlz15X0; Thu, 14 Mar 2024 00:47:38 +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 42E0lc0J029343; Thu, 14 Mar 2024 00:47:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0lc2m029340; Thu, 14 Mar 2024 00:47:38 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:38 GMT Message-Id: <202403140047.42E0lc2m029340@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: cfa5b2a501c9 - stable/13 - nullfs: add -o cache 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: cfa5b2a501c9062d3495aa73d5deac8a33992146 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cfa5b2a501c9062d3495aa73d5deac8a33992146 commit cfa5b2a501c9062d3495aa73d5deac8a33992146 Author: Konstantin Belousov AuthorDate: 2024-03-08 18:26:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 nullfs: add -o cache (cherry picked from commit 8921216dbee6884532e22d5347cff4d9ed23e782) --- sys/fs/nullfs/null_vfsops.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e08ed2f55d38..6a3f77a11734 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -202,12 +202,15 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } - xmp->nullm_flags |= NULLM_CACHE; - 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; - + if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { + xmp->nullm_flags |= NULLM_CACHE; + } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { + ; + } else if (null_cache_vnodes && + (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { + xmp->nullm_flags |= NULLM_CACHE; + } + MNT_ILOCK(mp); if ((xmp->nullm_flags & NULLM_CACHE) != 0) { mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &