Hi,

I managed to made FUSE Hello world low level example (fuse-2.9.0/example/hellow_ll.c) working as fusehell* fs server. You can take a look at it in my repository:
https://code.launchpad.net/~zdenek-bouska/helenos/fuse
It is readonly for now and it has other limitations: open is not storing fuse_file_info, limited directory read, whole init is in fuse_lowlevel_new(). Tested only on ia32.
Type this if you want to try it:
mkdir /mnt
fusehell
mount fusehell /mnt
cd /mnt
ls
cat hello

Interface choice
----------------
I'm now dealing with important decision: there are tree layers where VFS could conect to FUSE. One for each FUSE interface:
1) High level API (fuse.h)
I don't thing this is a good way.
 - It requires reimplementation of libfs_lookup
 - There are problems with not having file index (ino)
 - Low level api filesystems won't work in HelenOS

2) Low level API (fuse_lowlevel.h)
 - just like any other filesystem in HelenOS
 - vfs_out_ops_t and libfs_ops_t functions are almost directly
   calling fuse_lowlevel_ops functions
 - Reply (fuse_reply_*) is stored in req (fuse_req_t).
 - fuse_path_ops from FUSe library could be used for high level api.
 - simplified readonly prototype:
   https://code.launchpad.net/~zdenek-bouska/helenos/fuse

3) Kernel interface messages - struct fuse_chan_ops could be used for this.
- It would require porting of almost whole FUSE library.
- fuse upgrades could be easier
- There is one unnecessary layer.
- I'm not sure if this would be possible without some FUSE server.
  That would mean another IPC messages.

My favorit is 2). Do you think that it is a good choise? Do you see any problems I'm missing?


Dealing with POSIX
------------------
FUSE is using POSIX stat struct. Most of FUSE filesystem is using some POSIX stuff (like string.h) I haven't dealt with this yet. I just made some modifications to hello_ll.c and POSIX structs and constants are temporary in uspace/lib/fs/fuse_posix.h I will probably move the whole fuse library to uspace/lib/posix/. I don't think of a reason for native FUSE filesystem in HelenOS: either it is supposed to be portable or you could use just libfs.

Zdenek

* fusehell = FUSE hello low level, short and funny version instead of fuse_hello_ll.

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to