]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: add PG::with_head_obc()
authorKefu Chai <kchai@redhat.com>
Tue, 10 Nov 2020 13:03:02 +0000 (21:03 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 18 Nov 2020 09:37:59 +0000 (17:37 +0800)
commitb0d3d2a392cfa6e4e21731746ec1d0a32e7966f9
treed8990ef50c13017806f861c2bdd195458baafff1
parent6811578137e0184656447ed697b3dfeb071ce8b3
crimson/osd: add PG::with_head_obc()

this method replicates `PG::get_or_load_head_obc()`. but uses a different
way to ensure that the "lock" on obc is always released even if the
called func throws. it always guard the called func with a
`with_lock()`, so `lock.unlock()` is always called. the plan is to
replace `PG::get_or_load_head_obc()` with `PG::with_head_obc()` in
the following changes piecemeal.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h
src/crimson/osd/replicated_recovery_backend.cc