Re: FUSE merging?

From: Andrew Morton
Date: Fri Jul 01 2005 - 06:34:29 EST


Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> > > 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.

That shouldn't happen with write() traffic due to the dirty memory
balancing logic.

It'll happen with MAP_SHARED. Totally disallowing MAP_SHARED sounds a bit
drastic, but of course nfs/v9fs could be taught to do that.

> > > 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.

eh? How can the fuse client and the fuse server both get access to the
same file in this manner? I don't see how you could set that up with NFS,
for example.

> > > 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.

I think nfs can do this, as long as the modification was done through the
server. I'd expect v9fs would be the same.

> > Plus NFS and v9fs work across the network...
>
> Yes. I consider that a drawback.

Others (many) would disagree.


Sorry, but I'm not buying it. I still don't see a solid reason why all
this could not be done with nfs/v9fs, some kernel tweaks and the rest in
userspace. It would take some effort, but that effort would end up
strengthening existing kernel capabilities rather than adding brand new
things, which is good.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/