From: J. Eric Ivancich Date: Fri, 31 Jan 2020 20:01:40 +0000 (-0500) Subject: rgw: fix bug with (un)ordered bucket listing and marker w/ namespace X-Git-Tag: v14.2.13~2^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ab759fcd9a256cc641c7dacdc2c63b0ddc22a1ae;p=ceph.git rgw: fix bug with (un)ordered bucket listing and marker w/ namespace When listing without specifying a namespace, the returned entries could be in one or more namespaces. The marker used to continue the listing may therefore contain a namespace, and that needs to be preserved. This fixes a bug in both ordered and unordered listings where it was not preserved. Signed-off-by: J. Eric Ivancich (cherry picked from commit 9457abb729754458aafc07a9ee514407906a1011) Conflicts: src/rgw/rgw_rados.cc - trivial whitespace --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 526c5ed718db..48b586608b09 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2438,12 +2438,15 @@ int RGWRados::Bucket::List::list_objects_ordered( // use a local marker; either the marker will have a previous entry // or it will be empty; either way it's OK to copy - rgw_obj_key marker_obj(params.marker.name, params.marker.instance, params.marker.ns); + rgw_obj_key marker_obj(params.marker.name, + params.marker.instance, + params.marker.ns); rgw_obj_index_key cur_marker; marker_obj.get_index_key(&cur_marker); - rgw_obj_key end_marker_obj(params.end_marker.name, params.end_marker.instance, - params.end_marker.ns); + rgw_obj_key end_marker_obj(params.end_marker.name, + params.end_marker.instance, + params.end_marker.ns); rgw_obj_index_key cur_end_marker; end_marker_obj.get_index_key(&cur_end_marker); const bool cur_end_marker_valid = !params.end_marker.empty();