]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rgw: list bi log should not return marker entry
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 3 Dec 2014 22:40:13 +0000 (14:40 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 14 Jan 2015 03:21:26 +0000 (19:21 -0800)
The marker should be served as a lower bound, but should not be
returned.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/cls/rgw/cls_rgw.cc

index eb4a4232d1892f6a624d0fee2db41f064c5cee7d..6198d62810bac3c49db9615fd1fa88f3b64ce09b 100644 (file)
@@ -814,8 +814,6 @@ static int bi_log_iterate_entries(cls_method_context_t hctx, const string& marke
 
   map<string, bufferlist> keys;
   string filter_prefix, end_key;
-  bufferlist start_bl;
-  bool start_key_added = false;
   uint32_t i = 0;
   string key;
 
@@ -829,10 +827,6 @@ static int bi_log_iterate_entries(cls_method_context_t hctx, const string& marke
     key.append(marker);
 
     start_key = key;
-    int ret = cls_cxx_map_get_val(hctx, start_key, &start_bl);
-    if ((ret < 0) && (ret != -ENOENT)) {
-        return ret;
-    } 
   } else {
     start_key = key_iter;
   }
@@ -856,10 +850,6 @@ static int bi_log_iterate_entries(cls_method_context_t hctx, const string& marke
     if (ret < 0)
       return ret;
 
-    if ((start_bl.length() > 0) && (!start_key_added)) {
-      keys[start_key] = start_bl;
-      start_key_added = true;
-    }
     map<string, bufferlist>::iterator iter = keys.begin();
     if (iter == keys.end())
       break;