Project

General

Profile

Bug #21859

rgw_file: full enumeration needs new readdir whence strategy, plus recursive rm side-effect of FLAG_EXACT_MATCH found

Added by Matt Benjamin over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The original rgw_readdir(...) implementation takes the 64-bit integer offset of the next entry to list, but this cannot be efficiently produced by a client that does not cache full directory listings. To solve this issue, nfs-ganesha introduced a new "whence_is_name" strategy that passes a dirent name as whence, rather than the offset. Implement a new rgw_readdir2(...) that takes the new argument, leave the original in place for legacy callers.

In addition, disable the FLAG_EXACT_MATCH behavior which in 2.4.x avoided an incorrect negative lookup failure (which could be reproduced with "cd <no such dir>", which would succeed!), but no longer reproduces. The exact match behavior caused an incorrect negative lookup for directories which were present but not cached--e.g., if created in S3 within the namespace timeout.


Related issues

Copied to rgw - Backport #21919: luminous: rgw_file: full enumeration needs new readdir whence strategy, plus recursive rm side-effect of FLAG_EXACT_MATCH found Resolved

History

#1 Updated by Ken Dreyer over 6 years ago

  • Status changed from Pending Backport to Fix Under Review

#2 Updated by Ken Dreyer over 6 years ago

NFS-Ganesha change that will take advantage of this new feature: https://review.gerrithub.io/c/382817/

#3 Updated by Matt Benjamin over 6 years ago

  • Status changed from Fix Under Review to Pending Backport

#4 Updated by Nathan Cutler over 6 years ago

  • Copied to Backport #21919: luminous: rgw_file: full enumeration needs new readdir whence strategy, plus recursive rm side-effect of FLAG_EXACT_MATCH found added

#5 Updated by Nathan Cutler about 6 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF