From nobody Thu Oct 9 23:02:18 2025 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 4cjQPR1KGZz6CHW6; Thu, 09 Oct 2025 23:02:19 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cjQPR0NJgz3sdl; Thu, 09 Oct 2025 23:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760050939; 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=lgRensFTlr8AvMWONANDyOpgq5YxqHrbZc2B0zsQw8M=; b=uEb3D0Ha0+wbtX7TkjwI4wqjRpv4x+tPzseycA3LbJV7MwT1yC1dUIFD1iyFzFOvrga8Ys EVJIWzSl+SLeTdFIlqeYsAyfW5ND53M4QXkkSK5mLKBBE/cKfcRWjevCps1S0Jg77Wm9rg arD6wtdiN1IXAiaA3pOgt6OMGXmJWEwnVepd/MXxZBVwuDM1cdyxdco4GRC4UlrjeC+r4L 74hdqvfI631rWdoWjX/X3Lw/KNqTIVbi+jHj9QPrap9VzGe3CVeSb30SsemAjqKFJYdPLx 6rXzlFP6j5JtEYHgYdHJgDJOZWmVADn7BTPg83FcZK2nVttRJFwBIOpLwUpqJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760050939; 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=lgRensFTlr8AvMWONANDyOpgq5YxqHrbZc2B0zsQw8M=; b=NGogd5+885wI3O6WPFnWLHXy3gEdbgwvvbAt9+G6UCWWrVyUkTHoWRHpS7ZUDMdWXE1xxk GRNfpKNdJPUi/IeU5R1fRSk6pyFkGDWaa2kAYGCRYSZaoxbf9rwrmXD5q3o0Ckx7eDG/wy jDs3XKAyNSJskYRUvkOCk98BqWUmDozAZSNUzQt45NdA7ZXLrCFlwMtG1HB1IQdqEQXFg1 4W0OlsvLMm+7Lycn6XWsseDsntR499JIaI+q63FUPnjmE/52rK7TKDCo3hgKE0YJLPhu4T RMYVW+Rb5r4mZwLsSX/y63A87wNobYHQe5hVEaNy6SLQdFEPY/FFmnE2Botdyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760050939; a=rsa-sha256; cv=none; b=JzMN8jNme2eAdkWuitAu1bxkX2pP8/k5lTMBKL9wNRbhT2NVYh+sRLfNH7kJ07yHoYSzxT oYfUNXb5s29XnR+w6TfOG+NRRISZavrNK5plBT/ijB5SBUbUfuouZniCrTEyZH6BSqOOLw u3akuZ61JCN+pJLWU+sQDhqrQtf4JeAIXvWXrvQZfS6LS82eyVQZSY8J1M7qmuOUGLYBfh MfdVq1/uYAIOaEyOPxdZ0H6+o3XmUsTEgB0LgbXSyroJlpOKtUBFNvRT0D2uyyzXsyOlmO HIP/qtHi73/CSgSfMExAmopO8fb09zOAqasxZ3X59dWW95pKlfpLA9SZGfPTtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cjQPQ73q2zdxY; Thu, 09 Oct 2025 23:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 599N2Iu4056295; Thu, 9 Oct 2025 23:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 599N2Is3056292; Thu, 9 Oct 2025 23:02:18 GMT (envelope-from git) Date: Thu, 9 Oct 2025 23:02:18 GMT Message-Id: <202510092302.599N2Is3056292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8e6f6a5fbde7 - main - nullfs_mount: use symbols instead of string literals for cache mount options 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: 8e6f6a5fbde78bd8d19445ee6ebaf00b8f4f5aa9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8e6f6a5fbde78bd8d19445ee6ebaf00b8f4f5aa9 commit 8e6f6a5fbde78bd8d19445ee6ebaf00b8f4f5aa9 Author: Konstantin Belousov AuthorDate: 2025-10-08 15:44:59 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-09 22:47:22 +0000 nullfs_mount: use symbols instead of string literals for cache mount options Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52983 --- sys/fs/nullfs/null_vfsops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e2dabd8e33cc..483d4182e65e 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -85,6 +85,8 @@ nullfs_mount(struct mount *mp) char *target; int error, len; bool isvnunlocked; + static const char cache_opt_name[] = "cache"; + static const char nocache_opt_name[] = "nocache"; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); @@ -205,9 +207,10 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } - if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { + if (vfs_getopt(mp->mnt_optnew, cache_opt_name, NULL, NULL) == 0) { xmp->nullm_flags |= NULLM_CACHE; - } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { + } else if (vfs_getopt(mp->mnt_optnew, nocache_opt_name, NULL, + NULL) == 0) { ; } else if (null_cache_vnodes && (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) {