Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2025 17:02:28 GMT
From:      Ka Ho Ng <khng@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7c72c0822b94 - main - tmpfs: turn vfs.tmpfs.memory_percent into CTLFLAG_RWTUN
Message-ID:  <202504111702.53BH2SnA090718@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by khng:

URL: https://cgit.FreeBSD.org/src/commit/?id=7c72c0822b946626909f5a538d66a43d63c778dc

commit 7c72c0822b946626909f5a538d66a43d63c778dc
Author:     Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2025-04-11 17:02:06 +0000
Commit:     Ka Ho Ng <khng@FreeBSD.org>
CommitDate: 2025-04-11 17:02:06 +0000

    tmpfs: turn vfs.tmpfs.memory_percent into CTLFLAG_RWTUN
    
    So sysctl is not the only way to set the value of this knob, this can be
    set by loader tunables as well.
    
    Sponsored by:   Juniper Networks, Inc.
    MFC after:      1 week
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D49763
---
 sys/fs/tmpfs/tmpfs_subr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 37be0b762579..1237f6b92cdb 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -443,7 +443,7 @@ tmpfs_set_reserve_from_percent(void)
 }
 
 SYSCTL_PROC(_vfs_tmpfs, OID_AUTO, memory_percent,
-    CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, &tmpfs_mem_percent, 0,
+    CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, &tmpfs_mem_percent, 0,
     sysctl_mem_percent, "I",
     "Percent of available memory that can be used if no size limit");
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504111702.53BH2SnA090718>