From: Jan E. <je...@co...> - 2007-08-14 09:44:00
|
On Aug 14 2007 04:20, Graham Toal wrote: >On 8/14/07, Jan Engelhardt <je...@co...> wrote: >> On Aug 13 2007 19:44, Graham Toal wrote: >> So you could use http://aufs.sf.net/ - it's not FUSE, >> but does COW in a way. > >Not too keen on rebuilding my kernel It builds as a module. >just to add a fuse lookalike of unknown quality, It certainly does not silently lock up on an NFS setup like unionfs. >when I have a perfectly good implementation of the real fuse already installed >and working. Anyway, I want to be able to distribute a working fuse module, >not a fuse module and instructions to rebuild your kernel :-/ > >> encfs. > >It's nice but you need to enter a password which I don't want. Would >prefer public key. Change it. > >> RAIF1. > >Would be a *much* simpler implementation if the duplication were done by a >fuse module (see above). And I have no idea how to make software raid write >to a non-blocked device This is RAIF, not RAID. It works on *f*iles, not *d*evices. >nor do I want to back up an entire filing system image (using scp, ftp, >whatever) for a change to a single file. > >Anyway, if I do them all as fuse systems, once they're working I can >consolidate the code into a single fuse module that does everything I want and >which can be distributed to anyone with fuse installed as a trivial add-on. > >> There is not really anything to a nullfs. >> >> #define XRET(f) \ >> return ({ \ >> int __ret = (v); \ >> (__ret >= 0) ? __ret : -errno; \ >> }) >> int root_fd; >> int nullfs_getattr(const char *path, struct stat *sb) >> { >> XRET(fstatat(root_fd, path+1, sb)); >> } >> int main(int argc, const char **argv) >> { >> root_fd = open("/underlyin_dir", O_RDONLY | O_DIRECTORY); >> return fuse_main(...); >> } > >Thanks for the effort, but I didn't really mean quite such a minimal >nullfs! - I was looking for something that implemented all the >filesystem calls so that if I wanted to intercept any particular one, >the hook would be obvious (and hopefully trivial). Well, symlink for example is exactly like getattr. { XRET(symlinkat(root_fd, orig_path+1, root_fd, new_path+1); } Hence I can see the reason why noone has even bothered to do a nullfs. It's like saying "oh write me a program which outputs the hard-coded PI constant." Jan -- |