From: Yingxin Cheng Date: Thu, 13 Mar 2025 07:57:17 +0000 (+0800) Subject: crimson/os/seastore: prevent omaptree_rm_key() to be called concurrently in the same... X-Git-Tag: v20.3.0~347^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ef2b82a3bc59b9a227eec09c69bc1afd4b24c46b;p=ceph.git crimson/os/seastore: prevent omaptree_rm_key() to be called concurrently in the same transaction Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/seastore.cc b/src/crimson/os/seastore/seastore.cc index 9d7779be13898..f75d35ca15a51 100644 --- a/src/crimson/os/seastore/seastore.cc +++ b/src/crimson/os/seastore/seastore.cc @@ -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);