<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/fs/fdescfs, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-02-09T16:54:57Z</updated>
<entry>
<title>file: Add a fd flag with O_RESOLVE_BENEATH semantics</title>
<updated>2026-02-09T16:54:57Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-02-09T16:47:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f7cbcb19a9ecf606172d6d6c472b5ba7130a398b'/>
<id>urn:sha1:f7cbcb19a9ecf606172d6d6c472b5ba7130a398b</id>
<content type='text'>
The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that
they remain under the directory referenced by the dirfd.  This commit
introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored
in the file descriptor entry.  When the flag is set, any lookup relative
to that fd automatically has O_RESOLVE_BENEATH semantics.  Furthermore,
the flag is sticky, meaning that it cannot be cleared, and it is copied
by dup() and openat().

File descriptors with FD_RESOLVE_BENEATH set may not be passed to
fchdir(2) or fchroot(2).  Various fd lookup routines are modified to
return fd flags to the caller.

This flag will be used to address a case where jails with different root
directories and the ability to pass SCM_RIGHTS messages across the jail
boundary can transfer directory fds in such as way as to allow a
filesystem escape.

PR:		262180
Reviewed by:	kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D50371

(cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803)
</content>
</entry>
<entry>
<title>Fix MNT_IGNORE for devfs, fdescfs and nullfs</title>
<updated>2024-04-27T14:58:39Z</updated>
<author>
<name>Doug Rabson</name>
<email>dfr@FreeBSD.org</email>
</author>
<published>2023-08-26T09:32:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d06b45463bf404b5010f2370cb39b68a32da323'/>
<id>urn:sha1:1d06b45463bf404b5010f2370cb39b68a32da323</id>
<content type='text'>
The MNT_IGNORE flag can be used to mark certain filesystem mounts so
that utilities such as df(1) and mount(8) can filter out those mounts by
default. This can be used, for instance, to reduce the noise from
running container workloads inside jails which often have at least three
and sometimes as many as ten mounts per container.

The flag is supplied by the nmount(2) system call and is recorded so
that it can be reported by statfs(2). Unfortunately several filesystems
override the default behaviour and mask out the flag, defeating its
purpose. This change preserves the MNT_IGNORE flag for those filesystems
so that it can be reported correctly.

MFC after:	1 week

(cherry picked from commit b5c4616582cebdcf4dee909a3c2f5b113c4ae59e)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:20Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f8167e0404dab9ffeaca95853dd237ab7c587f82'/>
<id>urn:sha1:f8167e0404dab9ffeaca95853dd237ab7c587f82</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</content>
</entry>
<entry>
<title>fdescfs: add a mount option rdlnk</title>
<updated>2023-07-20T12:20:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-07-11T05:03:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=da56eae4404d4d273cc4a8b7d8f05547bb188599'/>
<id>urn:sha1:da56eae4404d4d273cc4a8b7d8f05547bb188599</id>
<content type='text'>
PR:	272127

(cherry picked from commit 3905309dfeeb89f03b09c347f7ac0a863faa3975)
</content>
</entry>
<entry>
<title>Revert "VFS: Remove VV_READLINK flag" and "fdescfs: improve linrdlnk mount option"</title>
<updated>2023-07-20T12:20:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-07-11T04:58:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=08a1dd9ad11090df27c4271d7205fb05b8ff62a9'/>
<id>urn:sha1:08a1dd9ad11090df27c4271d7205fb05b8ff62a9</id>
<content type='text'>
(cherry picked from commit 9c3bfe2ad07170cd7d3645a7c24f4d80a509c2b7)
</content>
</entry>
<entry>
<title>fdescfs: improve linrdlnk mount option</title>
<updated>2023-07-04T03:06:46Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-06-22T13:30:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=109230f383ac5a60a7bd4e40bbde361c28c430cf'/>
<id>urn:sha1:109230f383ac5a60a7bd4e40bbde361c28c430cf</id>
<content type='text'>
PR:	272127

(cherry picked from commit 3bffa2262328e4ff1737516f176107f607e7bc76)
</content>
</entry>
<entry>
<title>sys/fs: do not report blocks allocated for synthetic file systems</title>
<updated>2023-05-01T08:11:44Z</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2023-04-25T07:40:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3270f21597fb35f7cdbc39f0f09eaf4f84e79fe6'/>
<id>urn:sha1:3270f21597fb35f7cdbc39f0f09eaf4f84e79fe6</id>
<content type='text'>
The pseudo file systems (devfs, fdescfs, procfs, etc.) report total
and available blocks and inodes despite being synthetic with no
underlying storage device to which those values could be applied.

The current code of these file systems tends to report a fixed number
of total blocks but no free blocks, and in the case of procfs,
libprocfs, linsysfs also no free inodes.

This can be irritating in e.g. the "df" output, since 100% of the
resources seem to be in use, but it can also create warnings in
monitoring tools used for capacity management.

This patch makes these file systems return the same value for the
total and free parameters, leading to 0% in use being displayed by
"df". Since there is no resource that can be exhausted, this appears
to be a sensible result.

Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D39442

(cherry picked from commit 88a795e80c03ff1d960d830ee273589664ab06cc)
</content>
</entry>
<entry>
<title>fdesc_lookup(): drop fdropped</title>
<updated>2023-04-06T18:04:10Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-03-23T19:30:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4cbd728cb1535b850e9db3a965bfda6a6629bba8'/>
<id>urn:sha1:4cbd728cb1535b850e9db3a965bfda6a6629bba8</id>
<content type='text'>
(cherry picked from commit 13262b07a06910edd5e58e6bb2e1d4786a7b7d8e)
</content>
</entry>
<entry>
<title>fdesc_lookup(): the condition to use vn_vget_ino() is always true</title>
<updated>2023-04-06T18:04:10Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-03-23T19:28:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c5adb35ede6018f56697dcf9f30f701922fe3ca0'/>
<id>urn:sha1:c5adb35ede6018f56697dcf9f30f701922fe3ca0</id>
<content type='text'>
(cherry picked from commit 7dca8fd1cb3f91e7a3c07b7f57af6d9d43d0c71c)
</content>
</entry>
<entry>
<title>fdesc_lookup(): no need to vhold the dvp vnode</title>
<updated>2023-04-06T18:04:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2023-03-22T13:36:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=74aa6df1f63d1c92a959e7c6bb9395e6f153cb5d'/>
<id>urn:sha1:74aa6df1f63d1c92a959e7c6bb9395e6f153cb5d</id>
<content type='text'>
(cherry picked from commit 8d97282a394278d29883e7afa98ed6294efab35e)
</content>
</entry>
</feed>
