cfs/src/FsProc_Journal.cc
// definitions for InodeLogEntry
// resets InodeLogEntry state and increments the syncID
definitions for InodeLogEntry
resets InodeLogEntry state and increments the syncID
definitions for InodeLogEntry resets InodeLogEntry state and increments the syncID
void InodeLogEntry::on_successful_journal_write(CheckpointInput *ci,
                                                JournalEntry *je) {
  std::unordered_map<uint64_t, bool> blocks_add_or_del;
  applyChangesTo(minode->jinodeData, blocks_add_or_del);
  minode->inodeData->syncID = minode->jinodeData->syncID;
  for (auto const &iter : blocks_add_or_del) {
    if (iter.second)
      je->blocks_for_bitmap_set.push_back(iter.first);
    else
      je->blocks_for_bitmap_clear.push_back(iter.first);
  }
  ci->inodesToCheckpoint[inode] = nullptr;
  if (optfield_bitarr & bitmap_op_IDX)
    je->inode_alloc_dealloc[static_cast<cfs_ino_t>(inode)] = (bitmap_op == 1);
  optfield_bitarr = 0;
  extent_seq_no = 0;
  ext_add.clear();
  ext_del.clear();
  depends_on.clear();
  syncID++;
}
void InodeLogEntry :: on_successful_journal_write ( CheckpointInput * ci , JournalEntry * je ) { std :: unordered_map < uint64_t , bool > blocks_add_or_del ; applyChangesTo ( minode -> jinodeData , blocks_add_or_del ) ; minode -> inodeData -> syncID = minode -> jinodeData -> syncID ; for ( auto const & iter : blocks_add_or_del ) { if ( iter . second ) je -> blocks_for_bitmap_set . push_back ( iter . first ) ; else je -> blocks_for_bitmap_clear . push_back ( iter . first ) ; } ci -> inodesToCheckpoint [ inode ] = nullptr ; if ( optfield_bitarr & bitmap_op_IDX ) je -> inode_alloc_dealloc [ static_cast < cfs_ino_t > ( inode ) ] = ( bitmap_op == 1 ) ; optfield_bitarr = 0 ; extent_seq_no = 0 ; ext_add . clear ( ) ; ext_del . clear ( ) ; depends_on . clear ( ) ; syncID ++ ; }
definitions for InodeLogEntry
resets InodeLogEntry state and increments the syncID
definitions for InodeLogEntry resets InodeLogEntry state and increments the syncID
// Update the version to be checkpointed. // NOTE: if we do not allow any modifications while fsync in progress, // then we just have to copy inodeData instead of applying to jinodeData. // TODO preallocate the vectors and use indices instead of push_back // Reset this entry. // NOTE: no need to reset individual fields as we always check flags