genode/repos/libports/src/server/fuse_fs
Christian Prochaska b0935ef9b2 VFS: nonblocking interface
The VFS library can be used in single-threaded or multi-threaded
environments and depending on that, signals are handled by the same thread
which uses the VFS library or possibly by a different thread. If a VFS
plugin needs to block to wait for a signal, there is currently no way
which works reliably in both environments.

For this reason, this commit makes the interface of the VFS library
nonblocking, similar to the File_system session interface.

The most important changes are:

- Directories are created and opened with the 'opendir()' function and the
  directory entries are read with the recently introduced 'queue_read()'
  and 'complete_read()' functions.

- Symbolic links are created and opened with the 'openlink()' function and
  the link target is read with the 'queue_read()' and 'complete_read()'
  functions and written with the 'write()' function.

- The 'write()' function does not wait for signals anymore. This can have
  the effect that data written by a VFS library user has not been
  processed by a file system server yet when the library user asks for the
  size of the file or closes it (both done with RPC functions at the file
  system server). For this reason, a user of the VFS library should
  request synchronization before calling 'stat()' or 'close()'. To make
  sure that a file system server has processed all write request packets
  which a client submitted before the synchronization request,
  synchronization is now requested at the file system server with a
  synchronization packet instead of an RPC function. Because of this
  change, the synchronization interface of the VFS library is now split
  into 'queue_sync()' and 'complete_sync()' functions.

Fixes #2399
2017-08-28 16:49:38 +02:00
..
exfat os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
ext2 os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
ntfs-3g os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
directory.h file system: use Id_space instead of Node_handle_registry 2017-08-17 10:59:43 +02:00
file.h file system: use Id_space instead of Node_handle_registry 2017-08-17 10:59:43 +02:00
fuse_fs_main.cc VFS: nonblocking interface 2017-08-28 16:49:38 +02:00
mode_util.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
node.h file system: use Id_space instead of Node_handle_registry 2017-08-17 10:59:43 +02:00
README Make label prefixing more strict 2016-11-30 13:37:07 +01:00
symlink.h file system: use Id_space instead of Node_handle_registry 2017-08-17 10:59:43 +02:00
util.h Define Genode::size_t as unsigned long 2016-10-21 12:39:29 +02:00

The fuse_fs server provides access to a FUSE based file system by using a
File_system_session.

The File_system_session component implementation is independent from each
FUSE based file system. fuse_fs only calls the FUSE operation in question
directly. These operations are provided by the FUSE file system and Genode's
libfuse library makes sure, that each operation is executeable, e.g. by using
a dummy function in case it is not provided by the FUSE file system.
Therefore, to utilize a FUSE file system, the FUSE file system is linked
against libfuse as well as the File_system_session component. For each
fuse_fs server there is a binary (.e.g. 'os/src/server/fuse_fs/ext2').

Note: write-support is supported but considered to be experimantal at this
point and for now using it is NOT recommended.


To use the ext2_fuse_fs server in noux the following config snippet may be
used:

!  <start name="ext2_fuse_fs">
!  	<resource name="RAM" quantum="8M"/>
!  	<provides> <service name="File_system"/> </provides>
!  	<config>
!  		<policy label_prefix="noux -> fuse" root="/" writeable="no" />
!  	</config>
!  </start>