1.\"- 2.\" SPDX-License-Identifier: BSD-2-Clause 3.\" 4.\" Copyright (c) 2025 Klara, Inc. 5.\" 6.Dd May 27, 2025 7.Dt VOP_INOTIFY 9 8.Os 9.Sh NAME 10.Nm VOP_INOTIFY 11.Nd vnode inotify interface 12.Sh SYNOPSIS 13.In sys/param.h 14.In sys/vnode.h 15.Ft int 16.Fo VOP_INOTIFY 17.Fa struct vnode *vp 18.Fa struct vnode *dvp 19.Fa struct componentname *cnp 20.Fa int event 21.Fa uint32_t cookie 22.Fc 23.Ft int 24.Fo VOP_INOTIFY_ADD_WATCH 25.Fa struct vnode *vp 26.Fa struct inotify_softc *sc 27.Fa uint32_t mask 28.Fa uint32_t *wdp 29.Fa struct thread *td 30.Fc 31.Sh DESCRIPTION 32The 33.Fn VOP_INOTIFY 34operation notifies the 35.Xr inotify 2 36subsystem of a file system event on a vnode. 37The 38.Fa dvp 39and 40.Fa cnp 41arguments are optional and are only used to obtain a file name for the event. 42If they are omitted, the inotify subsystem will use the file name cache to 43find a name for the vnode, but this is more expensive. 44.Pp 45The 46.Fn VOP_INOTIFY_ADD_WATCH 47operation is for internal use by the inotify subsystem to add a watch to a 48vnode. 49.Sh LOCKS 50The 51.Fn VOP_INOTIFY 52operation does not assume any particular vnode lock state. 53The 54.Fn VOP_INOTIFY_ADD_WATCH 55operation should be called with the vnode locked. 56.Sh RETURN VALUES 57Zero is returned on success, otherwise an error code is returned. 58.Sh SEE ALSO 59.Xr inotify 2 , 60.Xr vnode 9 61