Fix VFS notifications for ram file removal

The ram plugin to the VFS must send notifications to watch handles on
files when they are removed. This brings the VFS server to parity with
the ram_fs server for the sake of notifications.

Move run/fs_report to gems and use the vfs server and the vfs init
plugin in the test.

Ref #2902
This commit is contained in:
Emery Hemingway 2018-07-05 17:55:24 +02:00 committed by Christian Helmuth
parent 953c62c04c
commit ca042e4e6e
2 changed files with 20 additions and 11 deletions

View File

@ -3,7 +3,11 @@
#
set build_components {
core init drivers/timer
server/fs_report server/fs_rom server/ram_fs test/fs_report
lib/vfs/import
server/fs_report
server/fs_rom
server/vfs
test/fs_report
}
build $build_components
@ -32,17 +36,20 @@ append config {
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="ram_fs">
<start name="vfs">
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content>
<dir name="test-fs_report">
<inline name="devices">
<devices version="initial"/>
</inline>
</dir>
</content>
<vfs>
<ram/>
<import>
<dir name="test-fs_report">
<inline name="devices">
<devices version="initial"/>
</inline>
</dir>
</import>
</vfs>
<policy label_prefix="fs_report -> " root="/" writeable="yes"/>
<policy label_prefix="fs_rom -> " root="/test-fs_report"/>
<policy label_prefix="test-fs_report -> " root="/test-fs_report" writeable="yes"/>
@ -82,7 +89,8 @@ install_config $config
#
set boot_modules {
core ld.lib.so init timer
fs_report fs_rom ram_fs test-fs_report vfs.lib.so
fs_report fs_rom test-fs_report
vfs vfs.lib.so vfs_import.lib.so
}
build_boot_image $boot_modules

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2015-2017 Genode Labs GmbH
* Copyright (C) 2015-2018 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
@ -859,6 +859,7 @@ class Vfs::Ram_file_system : public Vfs::File_system
node->lock();
parent->release(node);
node->notify(_env.watch_handler());
parent->notify(_env.watch_handler());
remove(node);
return UNLINK_OK;