]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: store bucket uxattrs on the bucket 15293/head
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 25 May 2017 20:25:19 +0000 (16:25 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 25 May 2017 20:28:02 +0000 (16:28 -0400)
This turns out to be the corollary of the earlier bug in removing
buckets w/uxattrs. Rather than conditionally put the attrs on a '/'
object, put them on the bucket--because that works, and will be
slightly more efficient when the check for the '/' object goes
away.

Fixes: http://tracker.ceph.com/issues/20082
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc

index cd497480f47440f06cab5b38db23e378c4685f4a..749c0a69c8a985d052a5c1c495c3d5ca880162e8 100644 (file)
@@ -695,7 +695,8 @@ namespace rgw {
 
     string obj_name{rgw_fh->relative_object_name()};
 
-    if (rgw_fh->is_dir()) {
+    if (rgw_fh->is_dir() &&
+       (likely(! rgw_fh->is_bucket()))) {
       obj_name += "/";
     }