After perusing the sources of Apple's SMB and NFS clients' implementation of VNOP_MONITOR
, my understanding of how VNOP_MONITOR+vnode_notify()
operate is as follows:
- A user-space process advertises an interest in monitoring a file or directory via
kqueue(2)/kevent(2)
. VFS
calls the filesystem's implementation ofVNOP_MONITOR
.VNOP_MONITOR
forwards the commencing or terminating of monitoring events request to the filesystem server.- Network filesystem client nodes call
vnode_notify()
to notify the underlyingVFS
of a filesystem event, e.g. file/directory creation/removal, etc.
What I'm still vague about is how does the server communicate back to client nodes that an event of interest has occurred?
I'd appreciate being enlightened on the operation of `VNOP_MONITOR+vnode_notify()' in a network filesystem setting.