History log of /src/sys/fs/nullfs/null_subr.c (Results 1 – 25 of 405)
Revision Date Author Comments
# 6fa205a6 08-Oct-2025 Konstantin Belousov <kib@FreeBSD.org>

nullfs: add nounixbypass mount option

The option, when set, disables bypassing the unix socket vnode down
to the lower mp, effectively preventing connection to nullfs unix
socket from being acceptab

nullfs: add nounixbypass mount option

The option, when set, disables bypassing the unix socket vnode down
to the lower mp, effectively preventing connection to nullfs unix
socket from being acceptable from the lower mp (and vice versa).

This is done by providing a vop vector that stops bypass for unp-related
VOPs. I believe that VFS_VOP_VECTOR_REGISTER() does the right thing
there regardless of the order of initialization.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D52983

show more ...


# 0ecbc335 06-Oct-2025 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: fix up build with INVARIANTS after previous


# 84f981ba 06-Oct-2025 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: shrink null_node to 32 bytes


# c8141e27 06-Oct-2025 Olivier Certner <olce@FreeBSD.org>

nullfs: Fix some style after recent changes

In 'nullfs_subr.c':
- Sort the headers.
- Use '__func__' in preference to the function's name in an assertion.

This applies comments from D38761, one of

nullfs: Fix some style after recent changes

In 'nullfs_subr.c':
- Sort the headers.
- Use '__func__' in preference to the function's name in an assertion.

This applies comments from D38761, one of which was missed and the other
added too late.

Reviewed by: kib
MFC with: 249ec85352b5 ("nullfs: smr-protected hash lookup")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52935

show more ...


# 249ec853 30-Sep-2025 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: smr-protected hash lookup

Vast majority of real-world contention on the hash comes from lookups,
notably seen during highly parallel poudriere runs.

Lockless lookup largely alleviates the p

nullfs: smr-protected hash lookup

Vast majority of real-world contention on the hash comes from lookups,
notably seen during highly parallel poudriere runs.

Lockless lookup largely alleviates the problem.

Reviewed by: kib
Tested by: pho (previous version)
Differential Revision: https://reviews.freebsd.org/D38761

show more ...


# 72347d73 01-Oct-2025 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: assert the vnode is not doomed in null_hashget_locked

While here some style touch ups and fixing a stale name in an assert.

Reviewed by: kib
Tested by: pho (previous version)
Differential

nullfs: assert the vnode is not doomed in null_hashget_locked

While here some style touch ups and fixing a stale name in an assert.

Reviewed by: kib
Tested by: pho (previous version)
Differential Revision: https://reviews.freebsd.org/D38761

show more ...


# 01c8e2e3 27-Sep-2025 Mateusz Guzik <mjg@FreeBSD.org>

vfs: retire the NULLVP macro

The kernel was already mostly using plain NULL, just whack it and be
doen with the legacy.

Churn generated with coccinelle:
@@
@@

- NULLVP
+ NULL


# f1f23043 03-Jul-2025 Mark Johnston <markj@FreeBSD.org>

vfs: Initial revision of inotify

Add an implementation of inotify_init(), inotify_add_watch(),
inotify_rm_watch(), source-compatible with Linux. This provides
functionality similar to kevent(2)'s E

vfs: Initial revision of inotify

Add an implementation of inotify_init(), inotify_add_watch(),
inotify_rm_watch(), source-compatible with Linux. This provides
functionality similar to kevent(2)'s EVFILT_VNODE, i.e., it lets
applications monitor filesystem files for accesses. Compared to
inotify, however, EVFILT_VNODE has the limitation of requiring the
application to open the file to be monitored. This means that activity
on a newly created file cannot be monitored reliably, and that a file
descriptor per file in the hierarchy is required.

inotify on the other hand allows a directory and its entries to be
monitored at once. It introduces a new file descriptor type to which
"watches" can be attached; a watch is a pseudo-file descriptor
associated with a file or directory and a set of events to watch for.
When a watched vnode is accessed, a description of the event is queued
to the inotify descriptor, readable with read(2). Events for files in a
watched directory include the file name.

A watched vnode has its usecount bumped, so name cache entries
originating from a watched directory are not evicted. Name cache
entries are used to populate inotify events for files with a link in a
watched directory. In particular, if a file is accessed with, say,
read(2), an IN_ACCESS event will be generated for any watched hard link
of the file.

The inotify_add_watch_at() variant is included so that this
functionality is available in capability mode; plain inotify_add_watch()
is disallowed in capability mode.

When a file in a nullfs mount is watched, the watch is attached to the
lower vnode, such that accesses via either layer generate inotify
events.

Many thanks to Gleb Popov for testing this patch and finding lots of
bugs.

PR: 258010, 215011
Reviewed by: kib
Tested by: arrowd
MFC after: 3 months
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D50315

show more ...


# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 829f0bcb 19-Dec-2022 Mateusz Guzik <mjg@FreeBSD.org>

vfs: add the concept of vnode state transitions

To quote from a comment above vput_final:
<quote>
* XXX Some filesystems pass in an exclusively locked vnode and strongly depend
* on the lock being h

vfs: add the concept of vnode state transitions

To quote from a comment above vput_final:
<quote>
* XXX Some filesystems pass in an exclusively locked vnode and strongly depend
* on the lock being held all the way until VOP_INACTIVE. This in particular
* happens with UFS which adds half-constructed vnodes to the hash, where they
* can be found by other code.
</quote>

As is there is no mechanism which allows filesystems to denote that a
vnode is fully initialized, consequently problems like the above are
only found the hard way(tm).

Add rudimentary support for state transitions, which in particular allow
to assert the vnode is not legally unlocked until its fate is decided
(either construction finishes or vgone is called to abort it).

The new field lands in a 1-byte hole, thus it does not grow the struct.

Bump __FreeBSD_version to 1400077

Reviewed by: kib (previous version)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D37759

show more ...


# aeabf8d4 07-Mar-2022 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: hash insertion without vnode lock upgrade

Use the hash lock to serialize instead.

This enables shared-locked ".." lookups.

Reviewed by: markj
Tested by: pho (previous version)
Differential

nullfs: hash insertion without vnode lock upgrade

Use the hash lock to serialize instead.

This enables shared-locked ".." lookups.

Reviewed by: markj
Tested by: pho (previous version)
Differential Revision: https://reviews.freebsd.org/D34466

show more ...


# 66c5fbca 28-Jan-2022 Konstantin Belousov <kib@FreeBSD.org>

insmntque1(): remove useless arguments

Also remove once-used functions to clean up after failed insmntque1(),
which were destructor callbacks in previous life.

Reviewed by: markj
Tested by: pho
Spo

insmntque1(): remove useless arguments

Also remove once-used functions to clean up after failed insmntque1(),
which were destructor callbacks in previous life.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D34071

show more ...


# 2a7e4cf8 27-Jan-2022 Mateusz Guzik <mjg@FreeBSD.org>

Revert b58ca5df0bb7 ("vfs: remove the now unused insmntque1")

I was somehow convinced that insmntque calls insmntque1 with a NULL
destructor. Unfortunately this worked well enough to not immediately

Revert b58ca5df0bb7 ("vfs: remove the now unused insmntque1")

I was somehow convinced that insmntque calls insmntque1 with a NULL
destructor. Unfortunately this worked well enough to not immediately
blow up in simple testing.

Keep not using the destructor in previously patched filesystems though
as it avoids unnecessary casts.

Noted by: kib
Reported by: pho

show more ...


# d35991d3 18-Sep-2021 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: ansify fs/nullfs/null_subr.c


# 4e91a0b9 26-Jan-2022 Mateusz Guzik <mjg@FreeBSD.org>

nullfs: stop using insmntque1

It adds nothing of value over insmntque.


# 3e506a67 28-Dec-2020 Mateusz Guzik <mjg@FreeBSD.org>

vfs: add v_irflag accessors

Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D27793


# e2515283 27-Aug-2020 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: Rubicon Communications, LLC (netgate.com)


# 685cb01a 16-Aug-2020 Konstantin Belousov <kib@FreeBSD.org>

VMIO reads: enable for nullfs upper vnode if the lower vnode supports it.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D2

VMIO reads: enable for nullfs upper vnode if the lower vnode supports it.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968

show more ...


# bc02c18c 07-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357408 through r357661.


# f1fa1ba3 03-Feb-2020 Mateusz Guzik <mjg@FreeBSD.org>

Fix up various vnode-related asserts which did not dump the used vnode


# 59abbffa 31-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357270 through r357349.


# dc1d2cc6 30-Jan-2020 Konstantin Belousov <kib@FreeBSD.org>

Fix a bug in r357199.

Around a generic call to null_nodeget(), there is nothing that would
prevent the unmount of the nullfs mp until we process to the
insmntque1() point. Calculate the VV_ROOT fla

Fix a bug in r357199.

Around a generic call to null_nodeget(), there is nothing that would
prevent the unmount of the nullfs mp until we process to the
insmntque1() point. Calculate the VV_ROOT flag after insmntque1() to
not access mp->mnt_data before we have an exclusively locked vnode
from this mount point on the mp vnode list.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

show more ...


# bb1d0df5 29-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357179 through r357269.


# 5fc9e11c 28-Jan-2020 Konstantin Belousov <kib@FreeBSD.org>

Save lower root vnode in nullfs mnt data instead of upper.

Nullfs needs to know the root vnode of the lower fs during the
operation. Currently it caches the upper vnode of it, which is also
the roo

Save lower root vnode in nullfs mnt data instead of upper.

Nullfs needs to know the root vnode of the lower fs during the
operation. Currently it caches the upper vnode of it, which is also
the root of the nullfs mount. On unmount, nullfs calls vflush() with
rootrefs == 1, and aborts non-forced unmount if there are any more
vnodes instantiated during vflush(). This means that the reference to
the root vnode after failed non-forced unmount could be lost and
nullm_rootvp points to the freed memory.

Fix it by storing the reference for lower vnode instead, which is kept
intact during vflush(). nullfs_root() now instantiates the upper
vnode of lower root. Care about VV_ROOT flag in null_nodeget().

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

show more ...


12345678910>>...17