]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/OSD: trim_maps - refactor
authorMatan Breizman <mbreizma@redhat.com>
Thu, 6 Jul 2023 10:56:26 +0000 (10:56 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 27 Jul 2023 12:39:07 +0000 (12:39 +0000)
commit343d42e44c980d6a2f2d6fed65f5e0d75c285a89
tree8e8f16e44da703f77e85dd84969c9be375300cf1
parent0f10df46b415092153979e8a27ab3c71b917e7f4
osd/OSD: trim_maps - refactor

* while loop instead of for
* remove `num` and use txn's num_ops instead
  - This will decrease the removal batches by half (Since 2 ops are appended
    in each iteration)
* Before this change, we used the same transaction (t) instance after moving it to queue_transaction.
  With this change, we avoid the UB by calling Transaction::claim_and_reset().

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/osd/OSD.cc