]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw_file: allow setattr on placeholder directories
authorMatt Benjamin <mbenjamin@redhat.com>
Sun, 19 Feb 2017 23:21:06 +0000 (18:21 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 28 Mar 2017 19:30:29 +0000 (15:30 -0400)
commit26a38e2e1525714978feda018c03698d7af65129
tree0e751b5a1e7648e0f7059f36bbb2a9d4c980f54c
parent8c02e54a747644d24feb98dbc15a15cdd55d1afd
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.

Fixes: http://tracker.ceph.com/issues/18989
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 55eec1c0a0e136736961423b7b6244d0f3693c1a)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc