]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix bucket object listing when marker matches prefix 41141/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Fri, 30 Apr 2021 20:07:54 +0000 (16:07 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 4 May 2021 12:42:32 +0000 (08:42 -0400)
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 <ivancich@redhat.com>
src/cls/rgw/cls_rgw.cc

index 57ecdc6929ebf0afef79f66040d7d3f10c3ac94d..6b3892e31023136e0d3fe93697dc46644e2e6e46 100644 (file)
@@ -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