Skip to content

Commit

Permalink
crimson/os/seastore: set last_committed_crc for rewritten extents
Browse files Browse the repository at this point in the history
Signed-off-by: Xuehan Xu <[email protected]>
  • Loading branch information
xxhdx1985126 committed May 15, 2024
1 parent a136cc6 commit e7ccb91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/crimson/os/seastore/btree/fixed_kv_btree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ class FixedKVBtree {
n_fixed_kv_extent->get_bptr().c_str());
n_fixed_kv_extent->set_modify_time(fixed_kv_extent.get_modify_time());
n_fixed_kv_extent->range = n_fixed_kv_extent->get_node_meta();
n_fixed_kv_extent->set_last_committed_crc(fixed_kv_extent.get_last_committed_crc());

if (fixed_kv_extent.get_type() == internal_node_t::TYPE ||
leaf_node_t::do_has_children) {
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/os/seastore/transaction_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ TransactionManager::rewrite_logical_extent(
nlextent->get_bptr().c_str());
nlextent->set_laddr(lextent->get_laddr() + off);
nlextent->set_modify_time(lextent->get_modify_time());
nlextent->set_last_committed_crc(nlextent->calc_crc32c());
nlextent->set_last_committed_crc(lextent->get_last_committed_crc());
DEBUGT("rewriting logical extent -- {} to {}", t, *lextent, *nlextent);

/* This update_mapping is, strictly speaking, unnecessary for delayed_alloc
Expand Down

0 comments on commit e7ccb91

Please sign in to comment.