I wish to learn more about the backend of osx fuse.
I've started with some research about the kernel-user communication by following the data path in read system call.
The path starting from user-space entity that initiate the action, to the driver that serve as a path through to user-space filesystem deamon that perform the action.
As a start, I've focused on read sys call and discovered that this action is forwarded from vfs layer to fuse_vnop_read, with the data kept in 'uio' arguments which is the command arguments in user-space (including buffer for data to be read).
based on these params and other params like the context details, the struct fuse_dispatcher is created, and this is the entity that eventually being sent to the deamon more or less ..
here's the fuse_dispatcher class:
and here's the command that send the dispatcher and wait for response (from daemon)
err = fdisp_wait_answ(&fdi);
However, there's some other layer which seem to actually send the data to user-space, which called fuse_device_cdevsw which posses the method fuse_device_read.
Perhaps do you know how is this method connected to the read flow ?
basically what it does is dequeuing the ticket (part of the dispatcher data we collected in vnop_read), and send it to the deamon. is it working from a different thread and signal back to vnop_read (in particular fdisp_wait_answ)
once the read has been completed and response has returned ?