New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw_file: wip dir orphan #13529

merged 4 commits into from Feb 20, 2017


None yet
2 participants

mattbenjamin added some commits Feb 19, 2017

rgw_file: invalid use of RGWFileHandle::FLAG_EXACT_MATCH
The change which introduced this flag also caused it to be
given as the flags argument to RGWLibFS::stat_leaf() when called
from rgw_lookup().

This was incorrect:  in particular, when a directory is known only
as a common prefix of other objects, the AWS namespace mapping
convention requires lookup("foo") to match a non-materialized
instance of "foo/" (case 2 in RGWLibFS::stat_leaf's stat loop).


Signed-off-by: Matt Benjamin <>
rgw_file: allow setattr on placeholder directories
When a POSIX path <bucket>/foo/ is known only as an implicit path
segment from other objects (e.g., <bucket>/foo/bar.txt), a case
that would usually arise from S3 upload of such an object, an
RGWFileHandle object representing "<bucket>/foo/" will be constructed
as needed, with no backing in RGW.

This is by design, but subsequently, if a setattr is performed on
such a handle, we must be ready to create the object inline with
storing the attributes.


Signed-off-by: Matt Benjamin <>
rgw_file: rgw_readdir can't list multi-segment dirs
This issue has one root cause in librgw, namely that the marker
argument to these requests was incorrectly formatted (though the
marker cache was working as intended).

Secondarily, for nfs-ganesha users, there is a compounding issue
that the RGW fsal was required by "temporary" convention to
populate the entire dirent cache for a directory on a single
readdir() invocation--the cache_inode/mdcache implementations
invariantly pass (before future 2.5 changesets, currently in
progress) a null pointer for the start cookie offset, intended
to convey this.


Signed-off-by: Matt Benjamin <>

@mattbenjamin mattbenjamin self-assigned this Feb 20, 2017

@mattbenjamin mattbenjamin requested review from cbodley and yehudasa Feb 20, 2017

rgw_file: fix marker computation

Signed-off-by: Matt Benjamin <>

@mattbenjamin mattbenjamin merged commit ecb4820 into ceph:master Feb 20, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Unmodifed Submodules submodules for project are unmodified
default Build finished.

@mattbenjamin mattbenjamin changed the title from rgw: wip dir orphan to rgw_file: wip dir orphan Feb 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment