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

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Tue Mar 19 2002 - 09:45:38 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:18 EST