Discussion:
FUSE + VFS
Samuel Hall
2016-01-24 23:54:06 UTC
Permalink
Hello,



Thank you for the response.

In the implementation described in the article VFS isn't used due to the
fact, that VFS wasn't available in genode at that time. A comment of the
libc_fuse plugin states:

/*

* During the initialization of the plugin, we already
require the VFS.

* Hence, we need to make sure to initialize the VFS before
doing our

* own initialization.

*/
So does the current implementation, when using a FUSE fs via the libc
plugin, require VFS?
Is there any more detailed information about the VFS in genode?



I am particularly interested in finding out how the flow of a FUSE call
differs in genode compared to the "normal" call as shown in this graphic
[1].



When using a FUSE based fs as a file system server as described in Josef's
response, do any adjustments have to be made to the FUSE fs so it runs on
genode?

Kind regards
Hall Samuel



[1] Loading Image...
Josef Söntgen
2016-01-27 17:55:09 UTC
Permalink
Hello Samuel,
Post by Samuel Hall
In the implementation described in the article VFS isn't used due to the
fact, that VFS wasn't available in genode at that time. A comment of the
[…]
So does the current implementation, when using a FUSE fs via the libc
plugin, require VFS?
Yes. If you look at the different FUSE file systems you will see that
all of them use '/dev/blkdev' [1] to access the block device. By now,
this block device is configured through the VFS configuration by using
the VFS block plugin, e.g.:

<libc ...>
<vfs>
...
<dir name="dev"> <block name="blkdev"/> </dir>
</vfs>
</libc>

So when the FUSE file system wants to access the block device, the libc
will query all its plugins and normally the VFS plugin will answer the
call.

[1] repos/libports/src/lib/fuse-ext2/init.cc:49
Post by Samuel Hall
Is there any more detailed information about the VFS in genode?
There is more information in the release notes, albeit somewhat
scattered.
Post by Samuel Hall
I am particularly interested in finding out how the flow of a FUSE call
differs in genode compared to the "normal" call as shown in this graphic
[1].
If your component uses libc_fuse it looks basically like this:

open(/foo)
↳ libc (plugin list)
↳ libc_fuse (plugin)
↳ fuse->op.open(/foo)
↳ “ext2_read_inode” …

Since this happens all in the component itself there is no context switch
necessary (however, a context switch might occur in the FUSE file system
backend if the block session is provided by another component).
Post by Samuel Hall
When using a FUSE based fs as a file system server as described in Josef's
response, do any adjustments have to be made to the FUSE fs so it runs on
genode?
It depends on the file system but generally speaking one mostly ends
up reimplementating the file systems main() function if it uses the
normal fuse event loop.


Regards
Josef

Loading...