Skip to content

Commit ef2b82a

Browse files
committed
crimson/os/seastore: prevent omaptree_rm_key() to be called concurrently in the same transaction
Signed-off-by: Yingxin Cheng <[email protected]>
1 parent c66e46f commit ef2b82a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/crimson/os/seastore/seastore.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,11 +2167,13 @@ SeaStore::Shard::_setattrs(
21672167
if (likely(val.length() <= onode_layout_t::MAX_SS_LENGTH)) {
21682168

21692169
if (!layout.ss_size) {
2170-
fut = omaptree_rm_key(
2171-
*ctx.transaction,
2172-
get_omap_root(omap_type_t::XATTR, onode),
2173-
onode,
2174-
SS_ATTR);
2170+
fut = std::move(fut).si_then([this, &ctx, &onode] {
2171+
return omaptree_rm_key(
2172+
*ctx.transaction,
2173+
get_omap_root(omap_type_t::XATTR, onode),
2174+
onode,
2175+
SS_ATTR);
2176+
});
21752177
}
21762178
onode.update_snapset(*ctx.transaction, val);
21772179
aset.erase(it);

0 commit comments

Comments
 (0)