From 448edbfa55b921c2cb58c4f051c8aeef15fe3c17 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Thu, 25 May 2017 16:25:19 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_file.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index cd497480f4744..749c0a69c8a98 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 += "/"; } -- 2.39.5