Hi Chao, > Original intention here is to recover status to the timing before > committing atomic write. As at that timing blkaddr in dnode should be > cur->old_addr(NEW_ADDR), so we need to change to call: > f2fs_update_data_blkaddr(&dn, NEW_ADDR);
Ok, I'll change NULL_ADDR to NEW_ADDR. Thanks, > Otherwise, metadata will become inconsistent, because blkaddr value is > NULL_ADDR means that current block is not preallocated, but > total_valid_block_count has already been updated. Right? > Thanks,