Greetings,

I'm currently implementing some support for named attributes in our
NFS client and came across a bug when testing against the *Solaris
NFSv4 server.

I found the server will return a different file handle for a named
attribute depending on what operation that file handle is returned in.
LOOKUP or OPEN ops followed by a GETATTR will return one file handle,
but READDIR ops that retrieve the file handle for each entry return a
file handle that is different - specifically, there is one bit different.

Digging through the server code, the difference is the flag bit: FH4_NAMEDATTR.
It is not getting set in file handles returned via READDIR.

It looks like rfs4_op_readdir() isn't setting that flag for named
attribute file handles.

Perhaps there should be a:

        if (dvp->v_flag & V_XATTRDIR)
                set_fh4_flag(&fh, FH4_NAMEDATTR);

after the makefh4()?


Technically, the server is allowed to return whatever file handle
values it wants.  However, if it returns different file handles for
the same object, the client will likely treat them as different objects
and this can lead to unexpected/undesirable results.  Our client would
prefer if this oversight were fixed.  :-)

If necessary, I can provide a packet capture file.

Thanks!
--macko
Apple NFS Engineer

Reply via email to