lkml.org 
[lkml]   [1999]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NFSv3 support (bugs, some fixes, and more)
Michael Kaminsky wrote:
> Quoting Jamie Lokier (lkd@tantalophile.demon.co.uk):
> > > The server certainly is not required to send back the same filehandle
> > > for hardlinked files, but it should. Otherwise, the client (linux
> > > kernel) cannot assume the files are the same according to the RFC
> > > (which in reality they are).
> >
> > True the client can't assume the files are the same, but it can't assume
> > they're different either.
>
> The way I'm reading it is that if the file handles are different, it
> doesn't matter at all what the fileid is, you're not allowed to conclude
> that the files are the same.
>
> > > Currently, the kernel makes the assumption they are the same
> > > implicitly, by only using fileid to lookup inodes.
> >
> > This is not so bad because the RFC also says:
> >
> > "fsid" is the file system identifier for the filesystem containing
> > the file; "fileid" is a number that uniquely identifies the file
> > within its filesystem
> >
> > Note the "uniquely". But why do we not make use of the fsid value?
>
> We actually do;

I just had a look at 2.2.10's nfs client. We don't use the fsid value.
In principle to different files could have the same fileid and different
fsids, couldn't they?

> In order for the NFS client to guarantee they're the same file locally,
> the server needs to give both instances of the file the same handle.
> If it doesn't, the server has no clue what the client will do because
> of the "no conclusions can be drawn." I agree that the language is a
> bit confusing.

I don't think it matters. Locally the client may think they're two
different files, but updating one will show up in the
other... eventually.

> My problem is actually when the server does give the same file (i.e.,
> same fileid) two different handles because it wants the client to
> think they are different files. For example, the server exports the
> same volume twice.

I think the server can give two different handles even for the same
file. For example the user-space server used on Linux use a mysterious
hash-assist of the path name in the handle -- this presumably means
different handles for different paths, even when they're the same file.

This works ok because the fileid values are the same.

If this isn't good enough, let me know because I'm about to do the same
sort of thing in my own nfs server!

-- Jamie

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

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.036 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site