VOP_INOTIFY(9)

VOP_INOTIFY9

Vnode inotify interface

Usage

#include <sys/param.h>

#include <sys/vnode.h>

int

VOP_INOTIFY(struct, vnode, *vp, struct, vnode, *dvp, struct, componentname, *cnp, int, event, uint32_t, cookie);

int

VOP_INOTIFY_ADD_WATCH(struct, vnode, *vp, struct, inotify_softc, *sc, uint32_t, mask, uint32_t, *wdp, struct, thread, *td);

Overview

The VOP_INOTIFY() operation notifies the inotify(2) subsystem of a file system event on a vnode. The dvp and cnp arguments are optional and are only used to obtain a file name for the event. If they are omitted, the inotify subsystem will use the file name cache to find a name for the vnode, but this is more expensive.

The VOP_INOTIFY_ADD_WATCH() operation is for internal use by the inotify subsystem to add a watch to a vnode.

Locks

The VOP_INOTIFY() operation does not assume any particular vnode lock state. The VOP_INOTIFY_ADD_WATCH() operation should be called with the vnode locked.

Return values

Zero is returned on success, otherwise an error code is returned.

Releases

Unchanged in 4 releases since FreeBSD 14.5-RELEASE.

  1. 14.5–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.