]> git-server-git.apps.pok.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)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 29 Jul 2024 12:38:29 +0000 (15:38 +0300)
commitd315d6756ea7d773fa7d1c377a3e8f2ac573f470
treeb015815d142b1a72867c822b6fcb1a622fc3cb27
parent92e8e2d4ee52a6d86369d0df17be94e51db54c8f
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>
(cherry picked from commit be92834ebd779d3c4ef6484e4612f8df17bef63c)
src/crimson/osd/object_context.h
src/crimson/osd/object_context_loader.cc
src/crimson/osd/object_context_loader.h