Subject: POSIX compliant READDIR

From: Brent <[email-masked]>
Date: Fri, 20 Jul 2001 16:49:10 -0700

NFS version 4 LOOKUPs are required to cross mountpoints on the server.
Clients can detect a mountpoint crossing by noticing the change in
the fsid attribute, and can preserve POSIX semantics (fids are unique
within a fsid) by doing a mount in their own namespace.

However, the treatment of mountpoints by READDIR is not currently
defined in RFC 3010.

If any of the entries in a READDIR response is mounted-on, then
it must return the attributes of the mounted-on directory - not
the mounted directory.  The attribute at issue is the fid.
POSIX requires that the fids returned in READDIR entries be
unique and belong to the filesystem of the directory.

I propose a sentence in the READDIR description to indicate
that the attributes returned for mounted-on directory entries
must be those of the mounted-on directory - not the mounted
directory.

This requirement raises a couple of issues:

	- A client that aggressively caches file attributes for
	  directory entries must distinguish between attributes
	  obtained via READDIR and those obtained via LOOKUP,
	  since they may be different at entries that are mountpoints.

	  It would be useful to have a boolean "mountpoint" attribute
	  to indicate whether the attributes belong to a 
	  directory entry that is mounted-on.

	- User-level servers do not have direct access to the attributes
	  of mounted-on directories, though they do (on UNIX systems)
	  have access to the mounted-on fid via a getdents() call to
	  the parent directory.  In this case, a user-level server
	  would return "true" for "mountpoint" and return just
	  the fid attribute.

So, I'm proposing:

	1) Additional wording in READDIR: that if any directory entry
	   is mounted-on, the attributes of the mounted-on directory
	   are to be returned.

	2) A new, non-mandatory, boolean attribute "mountpoint" that
	   indicates whether the directory is mounted on.

I'm interested in how these semantics would affect other, non-POSIX
implementations.

	Thanks
		Brent

---

From: Som <[email-masked]>
Date: Sat, 21 Jul 2001 01:09:24 -0700 (PDT)

> I'm interested in how these semantics would affect

By non-POSIX, do you mean Windows( I mean Win95,
Win98, WinME, Windows NT, Windows 2000, Windows XP )
NFS clients?  

If so, a Windows based network file system driver is
unawre of mount point crossing, unless....
someone tried to use the concept of DFS implementation
with Windows+NFS ( I am not sure if anyone tried that
yet ).

BTW, I have a question here: Is there good number of
users who are interested to use NFS file systems
drivers for Windows machines? Is there any current
user of this?

thanks, som.

=====
"Chess holds its master in its own bonds,
shackling the mind and brain so that the 
inner freedom of the very strongest must 
suffer"-Albert Einstein

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/