7782 nfs: READDIR for referrals should conform to RFC 7530

Review Request #436 - Created April 21, 2017 and updated

Information
Vitaliy Gusev
illumos-gate
master
7782
2f0d49f...
Reviewers
general
marcel

7782 nfs: READDIR for referrals should conform to RFC 7530

This patch add returning error for whole READDIR operation if rdattr_error wasn't requested and:
- met referral
- any other error occured during getting attributes (it could be permission denied, for instance).

The patch intensionally misses first part of 8.3.2: returning success if fs_locations is set.

For more information look at Section 16.24.4:

"In some cases, the server may encounter an error while obtaining the
attributes for a directory entry..."

With Linux 4.8.5 kernel and vSphere-6.3. Both works fine.

For testing:

  1. Create nfs referral via nfsref: nfsref add somename 192.168.1.1:/data
  2. Do ls in directory that contains referral.

Linux client sends READDIR with rdattr_error attribute, but vSphere doesn't.

Before patch for vSphere client:
READDIR reply contains directory entry (that is referral) with empty attributes, i.e. w/o previously requested attributes.

After pathch for vSphere client:
READDIR reply with error NFS4ERR_MOVED, i.e. whole READDIR operation fails.

Issues

  • 0
  • 9
  • 0
  • 9
Description From Last Updated
Marcel Telka
Vitaliy Gusev
Vitaliy Gusev
Marcel Telka
Vitaliy Gusev
Vitaliy Gusev
Vitaliy Gusev
Review request changed

Change Summary:

Changes:
1. Fix remarks from Marcel
2. Fix original code from changing @ar.

Commit:

-bc0efca1840d388e7623390e405a1b4843641bb6
+2f0d49f352f5768977682d88fac52cc5a2edbdfa

Diff:

Revision 4 (+120 -140)

Show changes

Loading...