rump_fs: try to mount the fs on startup

By now the file system gets mounted and unmounted on demand (whenever
the first clients comes along and whenever the last client leaves).
As a precaution we now also try to mount and unmounted the file system
in the init phase to prevent the first client from failing to its own
surprise.

Issue #2558.
This commit is contained in:
Josef Söntgen 2017-11-02 11:51:58 +01:00 committed by Christian Helmuth
parent f2d063be07
commit 84e0ffe7cb

View File

@ -99,6 +99,20 @@ void File_system::init()
/* check support for symlinks */ /* check support for symlinks */
_supports_symlinks = check_symlinks(fs_type); _supports_symlinks = check_symlinks(fs_type);
/*
* Try to mount the file system just to check if it
* is working as intended. In case it is not that gives
* us a change to react upon before any client may
* hang.
*/
try {
mount_fs();
unmount_fs();
} catch (...) {
Genode::error("dry mount attempt failed, aborting");
throw Genode::Exception();
}
} }