From: Matt Benjamin Date: Thu, 25 May 2017 20:25:19 +0000 (-0400) Subject: rgw_file: store bucket uxattrs on the bucket X-Git-Tag: v12.1.0~57^2~39^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=448edbfa55b921c2cb58c4f051c8aeef15fe3c17;p=ceph.git rgw_file: store bucket uxattrs on the bucket 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 --- diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index cd497480f474..749c0a69c8a9 100644 --- a/src/rgw/rgw_file.cc +++ b/src/rgw/rgw_file.cc @@ -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 += "/"; }