]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd/object_context_loader: cleanup with_clone_obc_direct
authorMatan Breizman <mbreizma@redhat.com>
Wed, 3 Apr 2024 08:50:55 +0000 (08:50 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 16 May 2024 11:53:49 +0000 (14:53 +0300)
commit5f4ac1177898b87d0af43a73f0fecbe901eb3b57
treeb3008fa3923cbe710d162737ec614e56a14666b9
parentef6ec4ed4f3eb7bc28841ccb852542ab496ff5ae
crimson/osd/object_context_loader: cleanup with_clone_obc_direct

ObjectContextLoader interface provides two variants:

* with_obc:
  // Use this variant by default
  // If oid is a clone object, the clone obc *and* it's
  // matching head obc will be locked and can be used in func.

* with_clone_obc_only:
  // Use this variant in the case where the head object
  // obc is already locked and only the clone obc is needed.
  // Avoid nesting with_head_obc() calls by using with_clone_obc()
  // with an already locked head.

with_clone_obc_direct variant is equal to with_obc on a clone obc
since both the head and the clone obcs will be locked and can be used.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 9a27c95b958a6f5b6c52087e8d05899dc465befe)
src/crimson/osd/object_context_loader.cc
src/crimson/osd/object_context_loader.h
src/crimson/osd/osd_operations/snaptrim_event.cc