Subject: READ results on non-regular files

From: Martin Pool <[email-masked]>
Date: Mon, 25 Jun 2001 17:20:11 +1000

It's not mentioned in RFC3010 14.2.23, but I assume that READ on a
filehandle identifying directory is meant to return NFS4ERR_ISDIR.  Is
that the intention?  It seems like it would not be very useful to
return the contents of the directory in the server's native format, as
read(2) on a directory does on Solaris and some other unices.

Also, I would expect that NFSv4 continues to export devices as device
nodes, rather than allowing clients to directly access from the device
on the server.  What is the correct error for READ to return if the
client tries to READ a character or block device?  NFS4ERR_INVAL?

-- 
Martin 
VA Linux Systems                        GnuPG encrypted email preferred

---

From: Spencer Shepler <[email-masked]>
Date: Mon, 25 Jun 2001 02:24:27 -0500

> read(2) on a directory does on Solaris and some other unices.

With the current list of error returns, NFS4ERR_INVAL would need to be
used in this instance.  I will add an item to add NFS4ERR_ISDIR
for the READ operation and add clarifying text.

> client tries to READ a character or block device?  NFS4ERR_INVAL?

You are correct, the model for device special files has not changed
from NFSv2/v3.  INVAL would be most appropriate.

Spencer