From nobody Fri Oct 24 09:51:52 2025 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 4ctJ8S3JTmz6F0Qy; Fri, 24 Oct 2025 09:51:52 +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 4ctJ8S2XRmz3bJW; Fri, 24 Oct 2025 09:51:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761299512; 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=ylhP2bYIFZN+XMWOviKknY0QXRP2NNo84sx7/92zDus=; b=TTIvHDax3LcSAw3kUMAPSGKFxs1Lbb13Ssvxz9BzW0tH37aEM5JGms4wpx5u/daWNIPC9G PTMzWvGcwLrbKhXqx5gFthFw1SSc4IfvpE5f8NkeC/dYiOs5kGXbrCcCbsuGZauDAhKlkk ICTWV6gXkHXvDOv+16RKOu8XTAqZpDwyMf7z9Bt20XP+wNYdSDvAX3qUMmhR4DDnhwQ8AZ F+tmXnUycO5C1xTw1cUoa6OlwcNUTkehpVX6iWdM6R8BvpqQC9y8OpP+3dyb9m1efMcQ2s 8teZRRsDU56KMsnd1+6QJ1VdW1A8AXmJct0Fc1wnuGqdTDbvsyYgpDPxtGf7LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761299512; 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=ylhP2bYIFZN+XMWOviKknY0QXRP2NNo84sx7/92zDus=; b=FrMZcKPLOFPekOnFrUwScbzIl4ntvl4CyjwqS6lrblfk0c9PslIqc6BCm9lVJcrXrSE51S PFgKwivyva7VnAuF8X2twSyRci+k0EagzMVR8PkH2OoaKzfl+UjF5ldKZIlbHm93WDrETf 4tR0MGnt8OfQ0TPqZI03KLTS7sYZZOPxuJWE4V8rPE3toWp9VL2VXd2/zfJ70vhFeYdlSb RG+rDXYMMN7+ydoa1FDlg7kCT5601lp6uhniSzpaVwewx+ThDOTcetHUEBrv2y0CX6fyIx GL8huBDBihKKUJhqmiFeu7UOnXxaFpaqRVe7vfzDEPBQL0j/5pQTadI9GbOjrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761299512; a=rsa-sha256; cv=none; b=N4R7qYO4KV5UO4KnJoVHxaXJ6UxfiMWLgI6zMbYeSoU6Y1nlWeNxI+3oCf+YEK2mIysn8v x5PwjQ4EJCKLFqPeqwaBH13IcNiya4qASyC6v/0ofhkHH3h85kRZzjg3mQryZSil4UWMcH R92OKlgg6hO+cYtM1LlJ/Bqhm7zY513U0xWgNDs+W7r8zOcfGg6BE63Z7ePMYXZFdF9Z0z JnGs0UfvHA5bRT4hy5rK3Ig1pk2WrmEairLy3PxjCjwaP+qk8ysDBk/9xgf/dyG/03Q7GK Va+T41IhqAWG42Y4FG9zl6iIbC5o28XXRxoyRjFQZfbeXA+I1osfoOLKj5Ocxw== 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 4ctJ8S20KNzwBk; Fri, 24 Oct 2025 09:51:52 +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 59O9pqij088711; Fri, 24 Oct 2025 09:51:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59O9pq1A088708; Fri, 24 Oct 2025 09:51:52 GMT (envelope-from git) Date: Fri, 24 Oct 2025 09:51:52 GMT Message-Id: <202510240951.59O9pq1A088708@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: aa884cdf91ed - stable/14 - nullfs_mount: use symbols instead of string literals for cache mount options 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: aa884cdf91edf6dc96f25db229ff70dd030b9307 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aa884cdf91edf6dc96f25db229ff70dd030b9307 commit aa884cdf91edf6dc96f25db229ff70dd030b9307 Author: Konstantin Belousov AuthorDate: 2025-10-08 15:44:59 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-24 09:47:36 +0000 nullfs_mount: use symbols instead of string literals for cache mount options (cherry picked from commit 8e6f6a5fbde78bd8d19445ee6ebaf00b8f4f5aa9) --- 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 14a6ed5d4d4c..7f4cc5e38f96 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -89,6 +89,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); @@ -209,9 +211,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) {