Project

General

Profile

Actions

Bug #7782

closed

nfs: READDIR for referrals should conform to RFC 7530

Added by Vitaliy Gusev about 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2017-01-18
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

NFSv4 server should reply NFS4ERR_MOVED if a client sends READDIR that does not include either of the attributes fs_locations or rdattr_error.
But current implementation returns NFS4_OK in this case.

RFC 7530:

8.3.2. READDIR and Absent File Systems

A READDIR performed when the current filehandle is within an absent
file system will result in an NFS4ERR_MOVED error, since, unlike the
case of GETATTR, no such exception is made for READDIR.

Attributes for an absent file system may be fetched via a READDIR for
a directory in a present file system, when that directory contains
the root directories of one or more absent file systems. In this
case, the handling is as follows:

o If the attribute set requested includes fs_locations, then the
fetching of attributes proceeds normally, and no NFS4ERR_MOVED
indication is returned even when the rdattr_error attribute is
requested.

o If the attribute set requested does not include fs_locations, then
if the rdattr_error attribute is requested, each directory entry
for the root of an absent file system will report NFS4ERR_MOVED as
the value of the rdattr_error attribute.

o If the attribute set requested does not include either of the
attributes fs_locations or rdattr_error, then the occurrence of
the root of an absent file system within the directory will result
in the READDIR failing with an NFS4ERR_MOVED error.

o The unavailability of an attribute because of a file system's
absence, even one that is ordinarily REQUIRED, does not result in
any error indication. The set of attributes returned for the root
directory of the absent file system in that case is simply
restricted to those actually available.


Files

file.snoop (7.84 KB) file.snoop nfs41 traffic with READDIR call and reply Vitaliy Gusev, 2017-01-18 02:06 PM
nfs40-linux-readdir-errmoved.pcapng (3.33 KB) nfs40-linux-readdir-errmoved.pcapng Vitaliy Gusev, 2018-04-03 10:35 PM
illumos-readdir-without-rdattr_error (3.56 KB) illumos-readdir-without-rdattr_error Vitaliy Gusev, 2018-04-08 02:51 PM
illumos-readdir-with-rdattr_error (3.57 KB) illumos-readdir-with-rdattr_error Vitaliy Gusev, 2018-04-08 02:51 PM
Actions

Also available in: Atom PDF