Path: utzoo!attcan!uunet!lll-winken!lll-lcc!pyramid!sas From: sas@pyrps5 (Scott Schoenthal) Newsgroups: comp.protocols.nfs Subject: Re: WHat is "Stale NFS handle"? Message-ID: <55699@pyramid.pyramid.com> Date: 20 Jan 89 00:38:15 GMT Sender: daemon@pyramid.pyramid.com Reply-To: sas@pyrps5.pyramid.com (Scott Schoenthal) Organization: Pyramid Technology Corp., Mountain View, CA Lines: 32 From the NFS (version 2) Protocol Definition: NFSERR_STALE The "fhandle" given in the arguments was invalid. That is, the file referred to by the file handle no longer exists, or access to it has been revoked. A file handle is initially exchanged when a "lookup" of a file is made. An example of a condition causing a stale file handle is the following: A process on System A opens file "foo" located, via NFS, on System B. As a result of the open, System A caches a file handle (a unique string of octets that identifies the file to System B). A process on System B removes "foo". The next time A attempts to use the file handle (e.g., to read a block of the file), System B will report that the file handle is stale: it does not identify a file on the system. The above description can be generalized for directories, etc. NB: The NFS server is stateless and does not keep track of how many client references are active against files managed by the server. In the Sun UNIX port of NFS, removal of a file increments a generation count on the inode. The generation field is encoded into the file handle that the NFS server passes to the client in the lookup. sas ---- Scott Schoenthal sas@pyrps5.pyramid.com Pyramid Technology Corp. {sun,hplabs,decwrl,uunet}!pyramid!sas