Merge pull request #37525 from ifed01/wip-ifed-no-recursion-clist

os/bluestore: avoid recursive calls in SimpleCollectionListIterator.

Reviewed-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
Kefu Chai 2020-10-04 13:40:49 +08:00 committed by GitHub
commit 86d597c7b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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