cfs/src/FsProc_FileMngOps.cc
// NOTE: Helper function only called by ModifyDirEntries.
Helper function only called by ModifyDirEntries.
Helper function only called by ModifyDirEntries .
void FileMng::RenameOp::ModifySrcDirHelper(FileMng *mng, FsReq *req,
                                           InMemInode *src_dir_inode,
                                           InMemInode *src_inode) {
  auto pos_pair =
      src_inode->getDentryDataBlockPosition(src_dir_inode, req->getLeafName());
  assert(pos_pair != nullptr);
  auto [dentry_block, dentry_idx] = *pos_pair;
  mng->fsImpl_->removeFromDir(req, src_dir_inode, dentry_idx, dentry_block,
                              req->getLeafName());
  src_inode->delDentryDataBlockPosition(src_dir_inode, req->getLeafName());
  assert(req->numTotalPendingIoReq() == 0);
  src_dir_inode->adjustDentryCount(-1);
  FsPermission::MapEntry dum;
  mng->fsImpl_->removePathInodeCacheItem(req, &dum);
  mng->fsImpl_->permission->RegisterGC(dum.first);
}
void FileMng :: RenameOp :: ModifySrcDirHelper ( FileMng * mng , FsReq * req , InMemInode * src_dir_inode , InMemInode * src_inode ) { auto pos_pair = src_inode -> getDentryDataBlockPosition ( src_dir_inode , req -> getLeafName ( ) ) ; assert ( pos_pair != nullptr ) ; auto [ dentry_block , dentry_idx ] = * pos_pair ; mng -> fsImpl_ -> removeFromDir ( req , src_dir_inode , dentry_idx , dentry_block , req -> getLeafName ( ) ) ; src_inode -> delDentryDataBlockPosition ( src_dir_inode , req -> getLeafName ( ) ) ; assert ( req -> numTotalPendingIoReq ( ) == 0 ) ; src_dir_inode -> adjustDentryCount ( -1 ) ; FsPermission :: MapEntry dum ; mng -> fsImpl_ -> removePathInodeCacheItem ( req , & dum ) ; mng -> fsImpl_ -> permission -> RegisterGC ( dum . first ) ; }
NOTE: Helper function only called by ModifyDirEntries.
NOTE : Helper function only called by ModifyDirEntries .