]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/.../object_context_loader: simplify obc loading
authorSamuel Just <sjust@redhat.com>
Mon, 10 Jun 2024 20:40:43 +0000 (20:40 +0000)
committerSamuel Just <sjust@redhat.com>
Fri, 21 Jun 2024 22:24:57 +0000 (15:24 -0700)
commitbe92834ebd779d3c4ef6484e4612f8df17bef63c
tree2dee8a205a3ea1d9b9cfe1532008141b47e20eee
parent47cc2a871d5d2195d5eb8041cb2f128fddd17fc1
crimson/.../object_context_loader: simplify obc loading

Because we just constructed the obc, we know that we can get an
exclusive lock without blocking.  Introduce
ObjectContext::load_then_with_lock to take an exclusive lock
unconditionally, load, downgrade (which we also know must be safe), and
then run the passed function.

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