Thanks for all the help. I managed to compile everything and now I am trying to debug my implementation.
I am currently stuck on getting gdb to attach to the vfs_lwext4 plugin. My assumption is that the entrypoint is vfs_file_system_factor, so I added a wait_for_continue() in there.
However, after I run gdb (via the attached script), my breakpoints are ignored. I have applied the patch for linux-base and breakpoints work when I try debugging my main program.
I later saw that vfs_lwext4_fs has two processes, so I manually running the steps from my gdb script with each pid. Unfortunately, neither of them worked.
I then tried switching threads in gdb but that was also unsuccessful.
Any suggestions on how I can get this to work?
Best, Rumen ________________________________ From: Josef Söntgen josef.soentgen@genode-labs.com Sent: Thursday, April 3, 2025 12:18 PM To: Genode users mailing list users@lists.genode.org Subject: Re: Extending the VFS with hard-links
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Rumen,
just a disclaimer, extending the VFS with hardlink support is not something we endorse because of prior experience and the lack of complelling use-cases that balance out the pitfalls.
I need some help with extending the VFS for my project. I need hardlink support, so I added the following to repos/os/include/vfs/directory_service.h's Directory_service struct: […] The problem is that hardlink uses the default implementation in my main code: squidutils->_vfs_env.root_dir().hardlink(p2.string(), p1.string()); // Prints 'not implemented' […] From what I have read online the issue is that squidutils->_vfs_env.root_dir() is of type Directory_service, whereas […]
You have to implement hardlink support in other VFS plugins, namely the 'Dir_file_system' as this is normally the file-system you access via 'root_dir()', as well. Otherwise you are not going to end up in the lwext4 VFS plugin. The implementation of 'openlink' can show you the way.
Is there a way to use Lwext4_vfs_file_system without copying the entire source of Lwext4 into my project's source code? Or am I perhaps going in the wrong direction with all of this?
If you follow the advice given above you should be able to make use of the lwext4 VFS plugin w/o the need to create copy.
In a previous e-mail I advised against using the lwext4 library directly but perhaps iff there is no particular reason to use the VFS it could be more beneficial to go in this direction after all. The by now removed code in [1] illustrates how you can access the Block session w/o relying on the VFS.
[1] https://github.com/genodelabs/genode-world/blob/3b8e174b6a213346ff7ebcbeeb10...
Regards Josef
-- Josef Söntgen Genode Labs