Subject: [nfsv4] question about NFSv4.2 SEEK on symlink

From: Olga Kornievskaia <[email-masked]>
Date: Tue, 29 Jun 2021 17:21:12 -0400

Hi folks,

I'm looking for classification on what the server is supposed to do
when it receives a SEEK compound and the filehandle is of the type
symlink (or a directory). RFC 7862 specifically stated that for
ALLOCATE/DEALLOCATE if the current_fh is not file, then server must
return ERR_WRONG_TYPE error. However, nothing is there for SEEK. It
would seem logical to say SEEK should error the same (or return
ERR_SYMLINK). Yet, in the linux server implementation, if the server
receives a symlink filehandle, it does the operation on the target
file instead.

I would like to note that this more for dotting the "i"s as I'm not
sure what kind of a client can legitimately get a filehandle to a
symlink and have a valid stateid to be used by a SEEK command.

---

From: David Noveck <[email-masked]>
Date: Wed, 30 Jun 2021 06:02:06 -0400

On Tue, Jun 29, 2021, 5:21 PM Olga Kornievskaia <[email-masked]> wrote:

> ERR_SYMLINK).

Yes.  The other possibility is to follow READ_,PLUS, which returns ISDIR
for directories and WRONG_TYPE for everything else.

Yet, in the linux server implementation, if the server
> receives a symlink filehandle, it does the operation on the target

That seems wrong to me.

> symlink.

LOOKUP works.

and have a valid stateid to be used by a SEEK command.

I think the all-zero stated is valid in this context.

> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4
>

---

From: Olga Kornievskaia <[email-masked]>
Date: Wed, 30 Jun 2021 10:18:51 -0400

On Wed, Jun 30, 2021 at 6:02 AM David Noveck <[email-masked]> wrote:
> Yes.  The other possibility is to follow READ_,PLUS, which returns ISDIR for directories and WRONG_TYPE for everything else.
>
>

Apologizes the testing that was done was incorrect, the linux server
does return WRONG_TYPE.

But regardless, I was looking for clarification (sorry not
classification) and it sounds like it should be assumed that it's an
error condition and no server would think to work on the target file
when presented with a symlink.