be erased
Otherwise, the following modification sequence with the same transaction
might lead to onode extents' crc inconsistency during journal replay:
1. modify the last mapping in an onode extent;
2. erase the last mapping in that onode extent.
During journal replay, if the first modification is not recorded in the
delta, the onode extent's content would be inconsistent with that before
the system reboot
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit
6c236bb63a9a49c7f9e2dab03a5fe0bb016560f0)
OnodeRef &onode)
{
auto &flonode = static_cast<FLTreeOnode&>(*onode);
+ assert(flonode.is_alive());
+ if (flonode.status == FLTreeOnode::status_t::MUTATED) {
+ flonode.populate_recorder(trans);
+ }
flonode.mark_delete();
return tree.erase(trans, flonode);
}