From c4a05cbdbdf85b55c362f01bf7e57f12e7e4d6e6 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 (cherry picked from commit 220ef4b22d1d1667eb4f2c300a0b788e87b9067d) --- 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 84e536af0a00b..e20d8dfcd8a33 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -484,6 +484,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