Re: Proposal: int (permission*)(struct dentry *, int)

From: G. Allen Morris III (gam3@groucho.ixlabs.com)
Date: Mon May 15 2000 - 17:56:07 EST


>>>Alan Cox said:
> > In summary: filehandles are useful at the protocol level, but it's
> > good for clients to retain pathnames if they need to recover
> > filehandles.
>
> How do you know the recovered pathname is the same file ?

You have to use the generation number, but since the filehandle is
opaque you have to supply the whole filehandle along with the path.

If you are switching to a replica server you don't have to do this
becuase replicated filesystems are exported read-only (or should be.)

If you use path to access a file that you consider open either the
client needs to also give the server the filehandle. If the client
does not supply the server with the filehandle then it had better
check that the file has not changed for being a regular file into
a directory or a socket.

So if you do use the path to access a file you still have to have
either have a cookie that tells you that the path points to the
same inode (or do a lot of test on the object that the path points
to to make sure that it has not changed.)

The only filesystem in the linux kernel that has an issue with this
is the MSDOS filesystem, but this is only because of the way it
is handling inter-directory renames. But there is a way to handle
this so that the inode->ino does not change on a reboot.

The last time I looked NFS version 4's "volitile" filehandle
did not pass the filehandle to the server. Becuase of this I
don't think that it is very useful for filesystems that are
writable.

  Allen

---------------------------------
       G. Allen Morris III

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:26 EST