Re: [PATCH 8/8] FUSE: per inode statfs

From: Miklos Szeredi
Date: Tue Oct 25 2005 - 00:53:03 EST


> > > > statistics based on path. While breaks with the tradition of
> > > > homogeneous statistics per _local_ filesystem, however adds useful
> > > > ability to user to differentiate statistics from different _remote_
> > > > filesystem served by the same userspace server.
> > >
> > > Wouldn't it make more sense to create more mountpoints (on demand, if
> > > necessary) to handle this case?
> >
> > Only if
> >
> > a) it's possible to find out about remote mountpoints
> >
> > b) not prohibitively expensive to do so on each lookup
>
> And finding the pathnames to call statfs() on is by some magic cheaper?

statfs() is called infrequently. If it's expensive, it's expensive.
OTOH lookup is done for every operation. The filesystem would have to
check for a remote mountpoint before doing _any_ operation, just so
that the occasional statfs() would return valid results.

Oh, and what if remote mountpoints go away, and the (unprivileged
userspace) server is not notified. How will the local mount structure
always correctly reflect the remote one?

It's far simpler just to let statfs() return different results based
on path within the filesystem. What's your problem with it?

Miklos
-
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/