The following illustration is taking directly from the documentation in the Linux source code, and illustrates how the Linux kernel and the FUSE file system daemon are interacting.
Everything except FUSE | FUSE file system daemon
file system Daemon |
-----------------------------+--------------------------------
"rm /mnt/fuse/file" |
|>sys_read()
| >fuse_dev_read()
| >request_wait()
| [sleep on fc->waitq]
>sys_unlink() |
>fuse_unlink() |
[get request from |
fc->unused_list] |
>request_send() |
[queue req on fc->pending]|
[wake up fc->waitq] | [woken up]
>request_wait_answer() |
[sleep on req->waitq] |
| <request_wait()
| [remove req from fc->pending]
| [copy req to read buffer]
| [add req to fc->processing]
| <fuse_dev_read()
|<sys_read()
|
|[perform unlink]
|
|>sys_write()
| >fuse_dev_write()
| [look up req in fc->processing]
| [remove from fc->processing]
| [copy write buffer to req]
[woken up] | [wake up req->waitq]
| <fuse_dev_write()
|<sys_write()
<request_wait_answer() |
<request_send() |
[add request to |
fc->unused_list] |
<fuse_unlink() |
<fuse_unlink() |
<sys_unlink() |
At this point in time you should have an idea of what the kernel expect from the file system.