From 220ef4b22d1d1667eb4f2c300a0b788e87b9067d Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Fri, 30 Apr 2021 16:07:54 -0400 Subject: [PATCH] rgw: fix bucket object listing when marker matches prefix When an iniitial marker that ends with a delimiter is provided, it prevents listing of that "subdirectory" due to new logic at the cls level to make listing more efficient. The fix catches that situation. Signed-off-by: J. Eric Ivancich --- src/cls/rgw/cls_rgw.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 57ecdc6929eb..6b3892e31023 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -498,6 +498,7 @@ int rgw_bucket_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out) bool has_delimiter = !op.delimiter.empty(); if (has_delimiter && + start_after_key > op.filter_prefix && boost::algorithm::ends_with(start_after_key, op.delimiter)) { // advance past all subdirectory entries if we start after a // subdirectory -- 2.47.3