rgw:fix list objects with marker when bucket is enable versioning

fix: http://tracker.ceph.com/issues/21500

Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
This commit is contained in:
yuliyang 2017-09-24 08:41:04 +08:00
parent d96255138c
commit bc16b162cf

View File

@ -445,8 +445,9 @@ int rgw_bucket_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
CLS_LOG(20, "entry %s[%s] is not valid\n", key.name.c_str(), key.instance.c_str());
continue;
}
if (!op.list_versions && !entry.is_visible()) {
// filter out noncurrent versions, delete markers, and initial marker
if (!op.list_versions && (!entry.is_visible() || op.start_obj.name == key.name)) {
CLS_LOG(20, "entry %s[%s] is not visible\n", key.name.c_str(), key.instance.c_str());
continue;
}