Bug #21859
closedrgw_file: full enumeration needs new readdir whence strategy, plus recursive rm side-effect of FLAG_EXACT_MATCH found
0%
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.