]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/seastore: fix list_onodes bug
authorchunmei-liu <chunmei.liu@intel.com>
Fri, 15 Jul 2022 05:16:27 +0000 (22:16 -0700)
committerchunmei-liu <chunmei.liu@intel.com>
Fri, 22 Jul 2022 23:12:23 +0000 (16:12 -0700)
Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.cc

index 33cf10e35885b099d07f5682a39f583ea2575b47..8d75f9fa837ce7f1c5a7c0f93e9fa727e7634c5d 100644 (file)
@@ -138,8 +138,11 @@ FLTreeOnodeManager::list_onodes_ret FLTreeOnodeManager::list_onodes(
       return trans_intr::repeat(
           [this, &trans, end, &to_list, &current_cursor, &ret] ()
           -> eagain_ifuture<seastar::stop_iteration> {
-        if (current_cursor.is_end() ||
-            current_cursor.get_ghobj() >= end) {
+        if (current_cursor.is_end()) {
+          std::get<1>(ret) = ghobject_t::get_max();
+          return seastar::make_ready_future<seastar::stop_iteration>(
+            seastar::stop_iteration::yes);
+        } else if (current_cursor.get_ghobj() >= end) {
           std::get<1>(ret) = end;
           return seastar::make_ready_future<seastar::stop_iteration>(
             seastar::stop_iteration::yes);