Re: BUG REPORT: kernel nfs between 2.4.19-pre2 (server) and 2.2.21-pre3 (client)

Trond Myklebust
2002-03-19T14:46:25Z

On Tuesday 19. March 2002 00:57, NIIBE Yutaka wrote:
> File handle must be unique. But I think that it may be reused (for
> different type). Client side cache should handle this case, IMO.

No...

>From RFC1094:
----------------
2.3.3. fhandle

typedef opaque fhandle[FHSIZE];

The "fhandle" is the file handle passed between the server and the
client. All file operations are done using file handles to refer
to a file or directory. The file handle can contain whatever
information the server needs to distinguish an individual file.
-----------------
IOW: the server is required to distinguish an individual file.

Note that there is no time limit on this: if I try to write to a file that
was deleted behind my back, the server is supposed to be able to determine
which file I was writing to.

This is further clarified in RFC1813:
-----------------
If two file handles from the same server are equal, they must refer to
the same file
------------------

Again: at no point does the RFC say that there is a timelimit on the above
(unlike the so-called 'volatile filehandles' that were introduced for NFSv4)

Indeed if you think about it, then there is no way the RFC *can* allow the
client to take the burden: we are talking about a stateless system. Unless
the server has a way of notifying the client that a filehandle is invalid,
and/or the file was deleted there is no way that the client can know...

Cheers,
Trond