Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162380661
D58181.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D58181.diff
View Options
diff --git a/bin/chflags/chflags.1.nocache b/bin/chflags/chflags.1
--- a/bin/chflags/chflags.1.nocache
+++ b/bin/chflags/chflags.1
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 12, 2018
+.Dd July 9, 2026
.Dt CHFLAGS 1
.Os
.Sh NAME
@@ -105,6 +105,8 @@
.Bl -tag -offset indent -width ".Cm opaque"
.It Cm arch , archived
set the archived flag (super-user only)
+.It Cm udontcache , dontcache
+set the dont cache flag (owner or super-user only)
.It Cm nodump
set the nodump flag (owner or super-user only)
.It Cm opaque
diff --git a/lib/libc/gen/strtofflags.c.nocache b/lib/libc/gen/strtofflags.c
--- a/lib/libc/gen/strtofflags.c.nocache
+++ b/lib/libc/gen/strtofflags.c
@@ -80,7 +80,9 @@
{ "nosparse", 0, UF_SPARSE },
{ "nousparse", 0, UF_SPARSE },
{ "nosystem", 0, UF_SYSTEM },
- { "nousystem", 0, UF_SYSTEM }
+ { "nousystem", 0, UF_SYSTEM },
+ { "nodontcache", 0, UF_DONTCACHE },
+ { "noudontcache", 0, UF_DONTCACHE }
};
#define nmappings (sizeof(mapping) / sizeof(mapping[0]))
diff --git a/sys/fs/tmpfs/tmpfs_subr.c.nocache b/sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c.nocache
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -2042,7 +2042,7 @@
if ((flags & ~(SF_APPEND | SF_ARCHIVED | SF_IMMUTABLE | SF_NOUNLINK |
UF_APPEND | UF_ARCHIVE | UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP |
UF_NOUNLINK | UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE |
- UF_SPARSE | UF_SYSTEM)) != 0)
+ UF_SPARSE | UF_SYSTEM | UF_DONTCACHE)) != 0)
return (EOPNOTSUPP);
/* Disallow this operation if the file system is mounted read-only. */
diff --git a/sys/sys/stat.h.nocache b/sys/sys/stat.h
--- a/sys/sys/stat.h.nocache
+++ b/sys/sys/stat.h
@@ -327,6 +327,7 @@
#define UF_REPARSE 0x00000400 /* Windows reparse point file bit */
#define UF_ARCHIVE 0x00000800 /* file needs to be archived */
#define UF_READONLY 0x00001000 /* Windows readonly file bit */
+#define UF_DONTCACHE 0x00002000 /* don't cache file data (NFSv4) */
/* This is the same as the MacOS X definition of UF_HIDDEN. */
#define UF_HIDDEN 0x00008000 /* file is hidden */
diff --git a/sys/ufs/ufs/ufs_vnops.c.nocache b/sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c.nocache
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -662,7 +662,7 @@
SF_NOUNLINK | SF_SNAPSHOT | UF_APPEND | UF_ARCHIVE |
UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP | UF_NOUNLINK |
UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE |
- UF_SPARSE | UF_SYSTEM)) != 0)
+ UF_SPARSE | UF_SYSTEM | UF_DONTCACHE)) != 0)
return (EOPNOTSUPP);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
return (EROFS);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 13, 4:44 PM (5 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35038737
Default Alt Text
D58181.diff (2 KB)
Attached To
Mode
D58181: chflags: Add a new UF_DONTCACHE flag
Attached
Detach File
Event Timeline
Log In to Comment