]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: call ObjectContext::with_promoted_lock() with the currently demanding...
authorXuehan Xu <xxhdx1985126@gmail.com>
Wed, 2 Dec 2020 08:47:10 +0000 (16:47 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Wed, 2 Dec 2020 08:47:10 +0000 (16:47 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/osd/pg.cc

index 5f8129c62ca1cbfac98921b929104d3aa62ec42d..38d1c481734bcee638239b308727e599bf516a11 100644 (file)
@@ -808,7 +808,7 @@ PG::with_head_obc(hobject_t oid, with_obc_func_t&& func)
       logger().debug("with_head_obc: found {} in cache", oid);
     } else {
       logger().debug("with_head_obc: cache miss on {}", oid);
-      loaded = obc->with_promoted_lock<RWState::RWEXCL>([this, obc] {
+      loaded = obc->with_promoted_lock<State>([this, obc] {
         return load_head_obc(obc);
       });
     }
@@ -841,7 +841,7 @@ PG::with_clone_obc(hobject_t oid, with_obc_func_t&& func)
         logger().debug("with_clone_obc: found {} in cache", coid);
       } else {
         logger().debug("with_clone_obc: cache miss on {}", coid);
-        loaded = clone->template with_promoted_lock<RWState::RWEXCL>(
+        loaded = clone->template with_promoted_lock<State>(
           [coid, clone, head, this] {
           return backend->load_metadata(coid).safe_then(
             [coid, clone=std::move(clone), head=std::move(head)](auto md) mutable {