|
| typedef vector<hdb_DirTree_t> hdb_DirTreeVec_t |
Definition at line 71 of file hdb_Tables.h.
| typedef fio_String<&g_DirEntName_p> hdb_String |
Definition at line 67 of file hdb_Tables.h.
| typedef hsm_FileHeader_p_v_t::iterator hsm_FileHeader_p_v_i |
Definition at line 32 of file hdb_common.h.
| typedef hsm_FileHeader_p_v_t::size_type hsm_FileHeader_p_v_st |
Definition at line 33 of file hdb_common.h.
| typedef vector<hsm_FileHeader*> hsm_FileHeader_p_v_t |
Definition at line 29 of file hdb_common.h.
| enum hdb_circList_e |
Definition at line 38 of file hdb_common.h.
00038 { 00039 clNoList, 00040 clMigration, 00041 clRecall, 00042 clSmall 00043 };
| void IVD_HSMDB_DECL_d hdb_RemoveName | ( | ivd_RecordIDX_t | a_nameOwnIdx, | |
| fio_Transaction & | a_trans | |||
| ) |
Definition at line 364 of file hdb_Tables.cpp.
References fio_Transaction::EndTransaction(), log_FUNC_m, hdb_NameOwner_t::nameIdx, hdb_NameOwner_t::nameSize, fio_RelFile::ReadRec(), fio_RelFileTrans::ReleaseVectorIdx(), size, fio_Transaction::StartTransaction(), and fio_BasicString::Write2DB().
Referenced by hsm_ActiveFH::ActiveToList(), and hsm_ActiveFH::OrphanedToMigList().
00365 { 00366 log_FUNC_m(ActiveToList); 00367 if (a_nameOwnIdx == 0) { 00368 return; 00369 } 00370 00371 // get name from DB 00372 hdb_NameOwner_t nameOwn; 00373 g_NameOwner_p->ReadRec(a_nameOwnIdx, &nameOwn); 00374 00375 hdb_String name(nameOwn.nameSize, nameOwn.nameIdx); 00376 00377 a_trans.StartTransaction(); 00378 00379 // remove nameOwnIdx 00380 g_NameOwner_p->ReleaseVectorIdx(a_nameOwnIdx, 1, &a_trans); 00381 // remove name 00382 ivd_RecordIDX_t nameIdx(0); 00383 ivd_VectorSize_t size(0); 00384 name.erase(); 00385 name.Write2DB(size, nameIdx, a_trans); // release old name 00386 00387 a_trans.EndTransaction(); 00388 }


| void IVD_HSMDB_DECL_d hdbReadNameOwnRec | ( | ivd_RecordIDX_t | a_nameOwnIdx, | |
| ivd_RecordIDX_t & | a_dirTreeIdx, | |||
| hdb_String & | a_name, | |||
| hdb_DirNode_t & | a_ownerRec | |||
| ) |
get name, owner inode and oner nameOwnIdx from DB by using nameOwnIdx.
helper method return name and fill owner's dirNode struct
Definition at line 334 of file hdb_Tables.cpp.
References hdb_DirNode_t::Clear(), dbg_DETAIL, hdb_NameOwner_t::dirTreeIdx, hdbReadNameOwnRec(), log_DBG_m, log_FUNC_m, hdb_NameOwner_t::nameIdx, hdb_NameOwner_t::nameSize, and fio_RelFile::ReadRec().
Referenced by hsm_ActiveFH::ActiveToList(), hdb_Tables::DumpActiveEntries(), hdb_Tables::DumpMigratedFiles(), hdb_Tables::DumpReleaseCand(), hdbReadNameOwnRec(), hsmdbGetPath(), hsmGetDirFH(), hsm_FileHeader::InitActive(), hsm_ActiveFH::OrphanedToMigList(), and hsm_FHrelc::Truncate().
00337 { 00338 00339 log_FUNC_m(hdbReadNameOwnRec); 00340 // get name and owner from DB 00341 log_DBG_m(dbg_DETAIL, "Read NameOwnRec from idx " << a_nameOwnIdx); 00342 hdb_NameOwner_t nameOwn; 00343 if (a_nameOwnIdx > 0) { 00344 g_NameOwner_p->ReadRec(a_nameOwnIdx, &nameOwn); 00345 hdb_String name(nameOwn.nameSize, nameOwn.nameIdx); 00346 a_name = name; 00347 00348 log_DBG_m(dbg_DETAIL, "Got NameOwnRec " << nameOwn); 00349 if (nameOwn.dirTreeIdx > 0) { 00350 g_DirTree_p->ReadRec(nameOwn.dirTreeIdx, &a_ownerRec); 00351 } 00352 else { 00353 a_ownerRec.Clear(); 00354 } 00355 } 00356 else { 00357 a_ownerRec.Clear(); 00358 a_name.empty(); 00359 } 00360 a_dirTreeIdx = nameOwn.dirTreeIdx; 00361 }


| cmn_Path IVD_HSMDB_DECL_d hsmdbGetPath | ( | hdb_DirNode_t & | a_dir, | |
| hdb_DirTreeVec_t & | dirNode_v | |||
| ) |
| cmn_Path IVD_HSMDB_DECL_d hsmdbGetPath | ( | hdb_DirNode_t & | a_dir | ) |
Definition at line 293 of file hdb_Tables.cpp.
References hdbReadNameOwnRec(), hsmdbGetPath(), log_FUNC_m, and hdb_DirNode_t::nameOwnIdx.
Referenced by hsm_ActiveFH::ActiveToList(), hdb_Tables::DumpActiveEntries(), hdb_Tables::DumpMigratedFiles(), hdb_Tables::DumpReleaseCand(), hsmdbGetPath(), hsmGetDirFH(), hsm_ActiveFH::OrphanedToMigList(), and hsm_FHrelc::Truncate().
00293 { 00294 log_FUNC_m(hsmdbGetPath); 00295 // try to find FH by inode 00296 00297 hdb_String name; 00298 hdb_DirNode_t ownDir; 00299 ivd_RecordIDX_t dirIdx; 00300 // get dir name and ownerDirNode record 00301 hdbReadNameOwnRec(a_dir.nameOwnIdx, dirIdx, name, ownDir); 00302 00303 if (ownDir.nameOwnIdx > 0) { // if has owner get it 00304 // ivoke to recursion, call itself 00305 return hsmdbGetPath(ownDir) + name; 00306 } 00307 00308 return name; 00309 }


| IVD_HSMDB_DECL_d fio_CirFileTrans* g_Active_p |
| IVD_HSMDB_DECL_d fio_VarLenRFT* g_DirEntName_p |
| IVD_HSMDB_DECL_d fio_RelFileTrans* g_DirTree_p |
| IVD_HSMDB_DECL_d fio_RelFileTrans* g_File2hdbID_p |
Definition at line 45 of file hdb_Tables.cpp.
Referenced by hsm_FHrelc::Append(), TreeWalk::CheckDir(), hsm_FileHeader::CompleteMigIsDone(), hsm_FHmigc::GetFileIDs(), hsm_CheckFile2hsmdbRec(), hsm_FileHeader::InitFromDB(), main(), hsm_FHrelc::Release(), hsm_FileHeader::RemoveNameFromHSMDB(), and hsm_FHrelc::Truncate().
| IVD_HSMDB_DECL_d fio_DataBase* g_hsmDB_p |
Definition at line 50 of file hdb_Tables.cpp.
Referenced by i_HSM_i::ActivateFiles(), hsm_ActiveFH::ActiveToList(), i_HSM_i::CompleteMigration(), i_HSM_i::Continue(), fs_api::Destroy(), hsm_FileHeader::EventOffline(), hsm_FHmigc::GetFileIDs(), hsm_Containers::hsm_Containers(), hsm_FileHeader::IncMemberRef(), hsm_FileHeader::InitActive(), fs_api::Initialize(), hsm_FileHeader::MigrationIsDone(), hsm_ActiveFH::OrphanedToMigList(), hsm_FileHeader::Recalled(), hsm_FHmigc::SendToPM(), i_HSM_i::Suspend(), and hsm_FHrelc::~hsm_FHrelc().
| IVD_HSMDB_DECL_d fio_RelFileTrans* g_NameOwner_p |
Definition at line 44 of file hdb_Tables.cpp.
Referenced by hsm_FileHeader::RemoveFromActiveList(), hsm_FileHeader::RemoveNameFromHSMDB(), hsm_FileHeader::StoreNameOwnRec(), hsm_FileHeader::StoreOldNameOwnRec(), and hsm_FHrelc::Truncate().
| IVD_HSMDB_DECL_d fio_CirFileTrans* g_RelCandMigrt_p |
| IVD_HSMDB_DECL_d fio_CirFileTrans* g_RelCandRecal_p |
| IVD_HSMDB_DECL_d fio_CirFileTrans* g_RelCandSmall_p |
1.5.6