]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson: introduce RAII style obc lock mechanic
authorSamuel Just <sjust@redhat.com>
Thu, 3 Oct 2024 00:41:34 +0000 (00:41 +0000)
committerSamuel Just <sjust@redhat.com>
Thu, 7 Nov 2024 18:29:42 +0000 (10:29 -0800)
commit5f996662420b9cab79d9d6e0421a506313ff903f
treef7d41193baee096137fa64053afd48c68f74be61
parent737676bdb5c4c2b234e23399d23a74f029460b63
crimson: introduce RAII style obc lock mechanic

Currently, we rely on ObjectContextLoader::with_* wrappers to load,
lock, and guarrantee release of obcs.  That mechanism works well enough,
but the execution pathway is pretty tough to read as it spans
[Internal]ClientRequest, PG, ObjectContextLoader, ObjectContext, and
tri_mutex.  This mechanism cuts out PG and ObjectContext (mostly) and
uses coroutine support for auto variables to make the interface easier
to understand.

This mechanism will also allow a future PR to access the ObjectContext
state prior to loading it.  This will be important to using the
ObjectContext memory to host per-object pipeline states.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/object_context_loader.cc
src/crimson/osd/object_context_loader.h