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/3b8e174b6a213346ff7ebcbeeb108a95ceced49f/src/lib/lwext4/block.cc


Regards
Josef

-- 
Josef Söntgen
Genode Labs

http://www.genode-labs.com/ · http://genode.org/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
users mailing list -- users@lists.genode.org
To unsubscribe send an email to users-le...@lists.genode.org
Archived at 
https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/GXOKGU2W2LGJB3UAA4WGFGFOMPHIITRT/

Reply via email to