* Move fuse_opt* funcs from refuse.c into refuse_opt.c.
Implement fuse_opt_parse() and fuse_opt_match(). And make the other
functions just dummy, always returning 0 (I added debugging printfs
to see what the application is trying to do).
For now there are two things that do not work in fuse_opt:
* options accepting arguments, i.e -otimeout=%u or -ofile=%s.
* options without arguments are not enabled, just parsed.
At least now curlftpfs works, even with verbose mode! :-)
Ok'ed by pooka.
is implemented as a very dummy version (i.e. totally unimplemented),
so some effort is still needed there.
After this change it is possible to compile and run ntfs-3g. It
works read/write for ntfs images and shows no faults at least with
superficial testing. I did not test it against a block device,
only an image.
Thanks to Tracy and Jason for help with the test image.
fuse does it: read directory completely into refuse buffers if starting
from read offset 0 and for later calls trickle results from the buffers
to the kernel without consulting the fuse file system.
through fuse_file_info to the fuse open operation.
* reference count opens for each node and do release once the count
drops to zero (instead of waiting for inactive). I'm still not sure
if this exactly matches linux/fuse behaviour, but at least we do
open when a new file descriptor is opened for each node and a do
a release when the reference to the last file descriptor for a
node is closed, so it ought to be pretty close
cryptofs works after these changes
* make set/getattr easily callable from interface functions and sprinkle
calls to locations which require them
* use libpuffs routine for stat->vattr translation instead of homegrown one
* I have concluded that we really want to do release/releasedir in
inactive instead of reclaim. make it so. we'll tweak it for the next
file system which decides it doesn't want to work
after these changes lzofs works, at least for most parts
(I'd assume the non-working parts to fail also on fuse/linux)
ops specified in the fuse op vector (or, if they're missing,
we're SOL)
* great return value overhaul: return -ret to get linuxy -errno
right for the kernel
based on top of libpuffs. This version is still barebones and
incomplete, but will benefit from others working on it, rather than
just me.
The option code has still to be implemented, but this gets far enough
to run hellofs (from the fuse web page):
% priv ./hellofs ~/hellofs/mnt &
% l ~/hellofs/mnt
total 2
drwxr-xr-x 2 root wheel 0 Jan 1 1970 .
drwxr-xr-x 4 agc agc 512 Feb 9 18:05 ..
-r--r--r-- 1 root wheel 13 Jan 1 1970 hello
% cat ~/hellofs/mnt/hello
Hello World!
% df ~/hellofs/mnt
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/dk0 28101396 18946682 7749646 70% /
kernfs 1 1 0 100% /kern
procfs 4 4 0 100% /proc
ptyfs 1 1 0 100% /dev/pts
puffs:refuse:hellofs 28101396 18946682 7749646 70% /home/agc/hellofs/mnt
% mount -v -v
...
mount: mount_puffs not found for /home/agc/hellofs/mnt
puffs:refuse:hellofs on /home/agc/hellofs/mnt type puffs (nosuid, nodev, fsid: 0xcb01/0x6acb, reads: sync 0 async 0, writes: sync 0 async 0)
%
This code is not enabled by default. Yet.