genode/os/include
Norman Feske ae1d0c04ae File-system interface, ram_fs, libc-fs
This patch introduces the file-system-session interface, provides an
implementation of this interface in the form of an in-memory file
system, and enables the libc to use the new file-system facility.

The new interface resides in 'os/include/file_system_session/'. It
uses synchronous RPC calls for functions referring to directory
and meta-data handling. For transferring payload from/to files, the
packet-stream interface is used. I envision that the asynchronous design
of the packet-stream interface fits well will the block-session
interface. Compared to Unix-like file-system APIs, Genode's file-system
session interface is much simpler. In particular, it does not support
per-file permissions. On Genode, we facilitate binding policy (such as
write-permission) is sessions rather than individual file objects.

As a reference implementation of the new interface, there is the
new 'ram_fs' service at 'os/src/server/ram_fs'. It stores sparse
files in memory. At the startup, 'ram_fs' is able to populate the
file-system content with directories and ROM modules as specified
in its configuration.

To enable libc-using programs to access the new file-system interface,
there is the new libc plugin at 'libports/src/lib/libc-fs'. Using this
plugin, files stored on a native Genode file system can be accessed
using the traditional POSIX file API.

To see how the three parts described above fit together, the test
case at 'libports/run/libc_fs' can be taken as reference. It reuses
the original 'libc_ffat' test to exercise several file operations
on a RAM file-system using the libc API.

:Known limitations:

The current state should be regarded as work in progress. In particular
the error handling is not complete yet. Not all of the session functions
return the proper exceptions in the event of an error. I plan to
successively refine the interface while advancing the file-system
implementations. Also the support for truncating files and symlink
handling are not yet implemented.

Furthermore, there is much room for optimization, in particular for the
handling of directory entries. Currently, we communicate only one dir
entry at a time, which is bad when traversing large trees. However, I
decided to focus on functionality first and defer optimizations (such as
batching dir entries) to a later stage.

The current implementation does not handle file modification times at
all, which may be a severe limitation for tools that depend on this
information such as GNU make. Support for time will be added after we
have revisited Genode's timer-session interface (issue #1).

Fixes #54
Fixes #171
2012-05-17 20:33:53 +02:00
..
audio_out_session Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
blit Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
block Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
block_session Add const qualifiers, minor style fixes 2012-04-17 11:08:40 +02:00
dde_kit Follow-up for spin-lock unification, ref #123 2012-03-01 10:57:05 +01:00
file_system_session File-system interface, ram_fs, libc-fs 2012-05-17 20:33:53 +02:00
framebuffer_session Qualifying RPC functions as const 2012-01-27 16:54:05 +01:00
gpu Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
init Support for dynamic ROM sessions, fix #170 2012-04-05 11:25:26 +02:00
input Qualifying RPC functions as const 2012-01-27 16:54:05 +01:00
input_session Qualifying RPC functions as const 2012-01-27 16:54:05 +01:00
ldso Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
loader_session Re-implementation of the loader service, ref #187 2012-05-02 16:54:18 +02:00
net Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
nic Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
nic_session Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
nitpicker_gfx Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
nitpicker_session Replace Framebuffer::info by Framebuffer::mode 2012-01-25 13:27:47 +01:00
nitpicker_view Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
os Improve robustness of policy matching 2012-05-17 20:12:51 +02:00
packet_stream_rx Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
packet_stream_tx Simplify use of custom data-flow signal handlers 2012-04-17 11:08:52 +02:00
pci_device Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
pci_session Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
platform Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
terminal_session Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
timer_session Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
util Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
xev_track Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00