]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Mon, 22 Apr 2024 08:33:28 +0000 (08:33 +0000)
commit9a27c95b958a6f5b6c52087e8d05899dc465befe
treebc197e7c8d2becb0639057b9ad2c13064912c073
parent7e208d97e83e780bb939391df674c231a5f2cad8
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>
src/crimson/osd/object_context_loader.cc
src/crimson/osd/object_context_loader.h
src/crimson/osd/osd_operations/snaptrim_event.cc