]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: prevent omaptree_rm_key() to be called concurrently in the same...
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 13 Mar 2025 07:57:17 +0000 (15:57 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 13 Mar 2025 09:04:35 +0000 (17:04 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/seastore.cc

index 9d7779be13898f9af303d0ed357d58369caa37f7..f75d35ca15a51e2ead8565c4a0bf7df0074dbf70 100644 (file)
@@ -2167,11 +2167,13 @@ SeaStore::Shard::_setattrs(
     if (likely(val.length() <= onode_layout_t::MAX_SS_LENGTH)) {
 
       if (!layout.ss_size) {
-       fut = omaptree_rm_key(
-          *ctx.transaction,
-          get_omap_root(omap_type_t::XATTR, onode),
-          onode,
-          SS_ATTR);
+        fut = std::move(fut).si_then([this, &ctx, &onode] {
+          return omaptree_rm_key(
+            *ctx.transaction,
+            get_omap_root(omap_type_t::XATTR, onode),
+            onode,
+            SS_ATTR);
+        });
       }
       onode.update_snapset(*ctx.transaction, val);
       aset.erase(it);