Re: FUSE merging?

Miklos Szeredi
2005-07-01T10:12:49Z

> > Well, there's the "unsolvable" writeback deadlock problem, that FUSE
> > works around by not buffering dirty pages (and not allowing writable
> > mmap). Does NFS solve that? I'm interested :)
>
> I don't know - first you'd have to describe it.

A dirty page is being written back, but the userspace server needs to
allocate memory to complete the request. But the allocation will
block, since there's no more free memory.

> > Then there's the usual "filesystem recursing into itself" deadlock.
>
> Describe this completely as well, please.

User does unlink("/mnt/userfs/file"). Userspace server receives
request to unlink "/file". Then the daemon does
unlink("/mnt/userfs/file"). This will deadlock on i_sem.

> > Mounting with 'intr' probably solves this for NFS, but that has
> > unwanted side effects. FUSE only allows KILL to interrupt a request.
>
> Maybe these things can be solved in NFS?

Possibly.

>
> > > > - dcache invalidation policy
> > >
> > > What's that?
> >
> > Userspace can tell the kernel, how long a dentry should be valid. I
> > don't think the NFS protocol provides this. Same holds for the inode
> > attributes.
>
> Why is that needed?

Because, I can well imagine a synthetic filesystem, where file
data/metadata change aribitrarily. In this case the timeout heuristic
in NFS is not useful.

In fact with NFS it's often a PITA, that it doesn't want to refresh a
file's data/metatata, which I _know_ has changed on the server.

> > > > - probably more, but I can't remember
> > >
> > > Please do..
> >
> > OK, I'll do a little research.
> >
>
> v9fs has a user-level server too. Maybe it has been used in FUSE-like
> scenarios more than NFS.

I think the p9 protocol is suffering from trying to be too generic.
The FUSE kernel interface is probably slightly tied to the linux VFS,
and would present problems if trying to port to other *NIX or god
forbid some other OS family altogether.

That may seem like a drawback, but I don't think it is:

- people are encouraged to use the FUSE library API instead of the
raw kernel interface

- if it will be ported to other systems, even the kernel interface
could probably be made compatible, only at the loss of
simplicity/performance.

> Plus NFS and v9fs work across the network...

Yes. I consider that a drawback. FUSE does data transfer very
efficiently (single copy), without the heavy network infrastructure
being in the way.

Miklos