Commit Graph

22 Commits

Author SHA1 Message Date
Norman Feske cfba429c15 vfs/rump: offer all files as read-writeable
The distinction between read-only and read-writeable is the
responsibility of the front end, i.e., the vfs server.
2019-11-21 14:25:05 +01:00
Norman Feske 5ab1505d43 file system: enhanced file status info
This patch extends the 'File_system::Status',
'File_system::Directory_entry', and the related 'Vfs' types with
the following additional information:

- Distinction between continuous and transactional files (Node_type)
  (issue #3507)
- Readable, writeable, and executable attributes (Node_rwx),
  replacing the former 'mode' bits
  (issue #3030)

The types 'Node_rwx', 'Node_type' are defined twice,
once for the VFS (vfs/types.h) and once for the 'File_system'
session (file_system_session/file_system_session.h).
Similarly, there is a direct correspondance between
'Vfs::Directory_service::Dirent' and 'File_system::Directory_entry'.

This duplication of types follows the existing pattern of keeping the
VFS and file-system session independent from each other.
2019-11-19 14:23:56 +01:00
Josef Söntgen 9a82bbb54d vfs: add modification time member to directory_service
Issue #1784.
2019-11-19 14:17:30 +01:00
Norman Feske 114de7721f rump_fs: support the access of GEMDOS file systems
The GEMDOS variant is supported by NetBSD's msdos file-system driver.
However, it must explicitly be enabled by a mount flag. This patch
adds the principle ability for passing mount flags to file system
drivers and enables the MSDOSFSMNT_GEMDOSFS flag based on the
config attribute 'gemdos="yes"'.

Issue #3471
2019-08-21 12:37:00 +02:00
Ehmry - a635873568 VFS: Replace global response handlers with local handlers
Replace the I/O response handler that is passed to the VFS at
construction with an object that is dynamically attached to handles.
This object shall also accept read-ready notifications, and plugins are
encouraged to keep handles awaiting ready-ready notifications separate
from handles that await I/O progress.

Replace the use of handle lists in plugins with handle queues, this
makes the code easier to understand and the ordering of notifications to
the application more explicit.

These changes replace the use of the Post_signal_hook from all VFS
plugins, applications must assume that read-ready and I/O notifications
occur during I/O signal dispatch and use an Io_progress_handler at its
entrypoints to defer response until after signal dispatching.

Fix #3257
2019-04-09 12:30:34 +02:00
Ehmry - 20f7f5b64f VFS Rump: print file-system usage stats at mount time
Fix #3174
2019-02-26 14:45:20 +01:00
Josef Söntgen 1d6d6966a1 rump: add knob to set memlimit
By now, rump would query its available RAM quota to determine the
memory limit minus some RAM reserved for Genode meta-data. This
does not work when the VFS rump plugin is used as the available
quota belongs to the VFS server. In this case the memlimit should
be set by specifing the RAM in the plugin's config, e.g.:

! <vfs>
!   <rump fs="ext2fs" ram="64M" writeabl="yes"/>
! </vfs>

Fixes #2783.
2018-05-03 15:31:23 +02:00
Josef Söntgen a6760efc14 vfs/rump: close kqueue on watcher destruction
Issue #2783.
2018-05-03 15:31:22 +02:00
Sebastian Sumpf 0c6504da5c vfs_rump: fix FAT support
fixes #2589
2018-05-03 15:31:21 +02:00
Ehmry - 82a683eccc VFS: construct file-systems using Vfs::Env object
Reduce the size and forward compatibility of VFS file-system
constructors by passing an object holding accessors for 'Genode::Env',
'Genode::Allocator', response handlers, and the root file-system.

Fix #2742
2018-04-19 12:38:27 +02:00
Ehmry - c0ed3ca2bd Vfs Rump watch support
Implement watch support using the BSD kevent facility.

Test at run/fs_rom_update_ext2.

Ref #1934
2018-04-10 11:11:51 +02:00
Norman Feske b0b92e4ee2 vfs: pass root directory to plugins
This patch enables the use of the VFS from VFS plugins by passing a
reference of the root directory to the constructors of file-system
instances. Since it changes the signature of 'Vfs::Dir_file_system',
any code that uses the VFS directly requires an adaptation.

Fixes #2701
2018-04-10 11:09:17 +02:00
Ehmry - db20aad591 VFS Rump: increase open file limit
Ref #2642
2018-02-14 20:41:07 +01:00
Ehmry - 980a2da677 VFS Rump: catch exceptions, print unhandled errors
Ref #2642
2018-02-14 20:41:07 +01:00
Christian Helmuth 0923ea5bea lib/vfs/rump: safely destroy dir and file handles 2017-11-30 11:23:21 +01:00
Emery Hemingway c9f4b455c5 vfs_rump: use inode values provided by rump
Ref #2569
2017-11-30 11:23:02 +01:00
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
Christian Helmuth 1d99e7ede9 base: classify signals as I/O and application level
Fixes #2363
2017-05-31 13:15:58 +02:00
Norman Feske 29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Sebastian Sumpf aa602032dd vfs: dynamic configuration support 2017-02-23 14:54:48 +01:00
Christian Helmuth f9389109bf Support select in libc VFS plugin by read_ready() 2017-02-07 11:12:29 +01:00
Emery Hemingway 4c7ab07480 Rump kernel VFS plugin
Tests at libc_vfs_ext2, libc_vfs_fs_ext2.

Fix #1752
Ref #2224
2017-01-13 13:07:12 +01:00