From 84e0ffe7cb1defa7dc7612509a05d79f68b3f69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 2 Nov 2017 11:51:58 +0100 Subject: [PATCH] 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. --- repos/dde_rump/src/server/rump_fs/file_system.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/repos/dde_rump/src/server/rump_fs/file_system.cc b/repos/dde_rump/src/server/rump_fs/file_system.cc index d5463d50d0..95d574b019 100644 --- a/repos/dde_rump/src/server/rump_fs/file_system.cc +++ b/repos/dde_rump/src/server/rump_fs/file_system.cc @@ -99,6 +99,20 @@ void File_system::init() /* check support for symlinks */ _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(); + } }