Open cproc opened 4 years ago
Finally got around to working on FUSe, starting with this ticket. (didn't look at #174 as the libc part is deprecated I think).
Basically, the attached patch...
...seems to get server/fuse_fs back in compiling shape, re. the compiling errors outlined above.
Though the resulting binary still fails at runtime:
[init -> fs] libc_fuse_ntfs-3g: try to mount /dev/blkdev...
[init -> fs] Error: libc suspend() called from non-user context (0x10f5edba) - aborting
[init] child "fs" exited with exit value 1
That is as per ticket #193, so it probably still needs my "patch", plus the transition/conversion to a VFS plug-in. I'll get started on that over the next few weeks. Will probably apply my "patch" first and check that tests pass OK, and only then work on the transition to plug-in, to have a solid foundation to work on.
I'll do my best to follow the Genode Coding style.
So I extended the "patch", and together with the fcntl() tweak and this bigger patch applied...
......the legacy fuse-ntfs server completes the tests in a few mins and passes except for two exceptions :
1) the "readv(fd, iov, 2)" test has to be remed out, fails in packet processing for some reason:
[init -> test-libc_vfs] calling readv(fd, iov, 2)
[init -> test-libc_vfs] Error: packet operation=0 failed
[init -> test-libc_vfs] readv(fd, iov, 2) failed, count=-1, errno=5
2) when tearing down the tests and syncing/unmounting, the server outputs an error:
[init -> fs] libc_fuse_ntfs-3g: sync file system...
[init -> test-libc_vfs] finished round 3
[init -> test-libc_vfs] test finished
[init] child "test-libc_vfs" exited with exit value 0
[init -> fs] libc_fuse_ntfs-3g: sync file system...
[init -> fs] Error: ID space not empty at destruction time
I don't use readv() in my TTS code, but if the rest works ok, that looks good for my future plans.
Now heading to ticket #193
The following commits address this issue:
The last ones fix bugs in the fuse_fs
implementation after which the exfat and ext2 tests now succeed.
(Some of the compilation errors were already fixed by @ttcoder but for better or worse I only noticed the when looking up the number of this issue.)
Thanks @cnuke. I merged your commit series to staging.
@ttcoder I saw that you circumvented the problem with ntfs-3g (opening of /
fails). I would like to post-pone applying that as I would like to check if the FUSE operations we use for directory management rely on the struct fuse_file_info
being properly initalized.
I saw that you circumvented the problem with ntfs-3g (opening of
/
fails).
You mean the ENOENT bit ? Indeed there's probably a better way to fix that ; if we find which part of ntfs-3g returns that spurious code, we can patch it there directly (until there's a new version of the ntfs-3g library shipping with bugfixes), and keep the ENOENT handling intact.
Edit -- Oh I just understood what you mean, the problem might be due to a non-initialized struct, not to incorrect code in ntfs-3g, gotcha. FWIW, I reviewed your commits and they LGTM!
When building 'make server/fuse_fs' with the current Genode staging branch, the following errors occur: