2002-10-01 01:39:23

by Jonathan Nicklin

[permalink] [raw]
Subject: NFS Server Interoperability: Link and Rename


All,

Over the last decade, there seems to have been quite a bit of discussion about whether NFS filehandles (V2/V3) are allowed to change as a result of a link or rename operation. Its appears that Linux includes the parent inode as part of the filehandle and while this does not appear to be in violation of the spec (depending on who you talk to), Im curious if anyone has noticed interoperability problems with clients on other platforms that are a result of server behavior as described above. For example, how does the Solaris v7/v8 client deal with such behavior. Its obvious that renames in the same directory would be fine, but what about cross directory renames and links?

Cheers,

Jonathan Case Nicklin





---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!


2002-10-03 17:35:32

by Spencer Shepler

[permalink] [raw]
Subject: Re: NFS Server Interoperability: Link and Rename

On Mon, Jonathan Nicklin wrote:
>
> All,
>
> Over the last decade, there seems to have been quite a bit of discussion about whether NFS filehandles (V2/V3) are allowed to change as a result of a link or rename operation. Its appears that Linux includes the parent inode as part of the filehandle and while this does not appear to be in violation of the spec (depending on who you talk to), Im curious if anyone has noticed interoperability problems with clients on other platforms that are a result of server behavior as described above. For example, how does the Solaris v7/v8 client deal with such behavior. Its obvious that renames in the same directory would be fine, but what about cross directory renames and links?
>

If the client/application has the file open at the time of the rename,
it will break. The filehandle will become stale (this assumes the
server isn't doing some type of mapping to protect the client a
little) and with stale filehandles the client has no way to recover.

If the file is not open at the time of rename, the failure would
depend on how the client is coded to handle receiving a stale error
from a cached filehandle (cached in the client's name cache more than
likely). This failure would be less determinant.

This type of server behavior is frowned upon and NFSv4 offers a
partial solution to the problem.

--
Spencer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs