Post

Replies

Boosts

Views

Activity

AppleDouble, aka dotbar, files not removed via Finder
I've having trouble deleting AppleDouble files residing on my custom filesystem through Finder. This also affects files that use the AppleDouble naming convention, i.e. their names start with '._', but aren't AppleDoubles themselves. dtrace output In vnop_readdir, 'struct dent/dentry' is set up for dotbar files and written to the uio_t buffer. It's just that my vnop_remove is never called for dotbar files, and I don't understand why not. Dotbar files are removed successfully, when deleted through command line. For SMBClients, vnop_readdir is followed by vnop_access, followed by vnop_lookup, followed by vnop_remove of dotbar files. SMBClient rm dotbar files dtrace output Implementing vnop_access for my filesystem did not result in the combination of vnop_lookup and vnop_remove being called for dotbar files. Perusing the kernel sources, I observed the following functions that might be involved, but I have not way of verifying this, as none of the functions of interest are dtrace(1)-able, rmdir_remove_orphaned_appleDouble() in particular. rmdir_remove_orphaned_appleDouble() -> VNOP_READDIR(). rmdirat_internal() -> rmdir_remove_orphaned_appleDouble() unlinkat()-> rmdirat_internal() rmdir()-> rmdirat_internal() Any pointers on how dotbar files may be removed through Finder would be greatly appreciated.
1
0
573
Jan ’25
VNOP_MONITOR+vnode_notify() operation details
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 of VNOP_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 underlying VFS 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.
1
0
126
Aug ’25