From ca042e4e6eafb50f9f7edb59f65b021b676b24fd Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 5 Jul 2018 17:55:24 +0200 Subject: [PATCH] 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 --- repos/{os => gems}/run/fs_report.run | 28 +++++++++++++++++--------- repos/os/src/lib/vfs/ram_file_system.h | 3 ++- 2 files changed, 20 insertions(+), 11 deletions(-) rename repos/{os => gems}/run/fs_report.run (86%) diff --git a/repos/os/run/fs_report.run b/repos/gems/run/fs_report.run similarity index 86% rename from repos/os/run/fs_report.run rename to repos/gems/run/fs_report.run index 828eea3fc4..0981db2ab4 100644 --- a/repos/os/run/fs_report.run +++ b/repos/gems/run/fs_report.run @@ -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 { - + - - - - - - - + + + + + + + + + + @@ -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 diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index d077e61704..864a445a6c 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -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;