]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: avoid recursive calls in SimpleCollectionListIterator. 37525/head
authorIgor Fedotov <ifedotov@suse.com>
Fri, 2 Oct 2020 13:35:31 +0000 (16:35 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Fri, 2 Oct 2020 15:02:00 +0000 (18:02 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/BlueStore.cc

index 1530caed2f87d502e7d33ef1b3983a32d34e4f61..d086685c584ba82b72a595a08ac97310a19142b5 100644 (file)
@@ -694,16 +694,14 @@ private:
   ghobject_t m_oid;
 
   void get_oid() {
-    if (!valid()) {
-      return;
+    m_oid = ghobject_t();
+    while (m_it->valid() && is_extent_shard_key(m_it->key())) {
+      m_it->next();
     }
-
-    if (is_extent_shard_key(m_it->key())) {
-      next();
+    if (!valid()) {
       return;
     }
 
-    m_oid = ghobject_t();
     int r = get_key_object(m_it->key(), &m_oid);
     ceph_assert(r == 0);
   }