|
hsm_joblistmgr
Classes | |
| class | hsm_ActiveFH |
| class | hsm_Containers |
| class | hsm_DirWaitList |
| hsm_DirWaitList class manages files which are "Dirty". More... | |
| class | hsm_FHpVecMgr |
| File header pointer vector manager. More... | |
| class | hsm_FHcache |
| hsm_FHcache: class, this class hold all active file header in HSM sistem. More... | |
| class | hsm_FHdirty |
| hsm_FHdirty class manages files which are "Dirty". More... | |
| class | hsm_FHlist |
| struct | hsm_JobList |
| class | hsm_MigByAPI |
| class | hsm_FHmigc |
| hsm_FHmigc class manages files which are "Dirty". More... | |
| class | hsm_ReleaseCandRec |
| class | hsm_FHrelc |
| class | hsm_FileHeader |
| hsm_FileHeader class describe header of file. More... | |
| class | hsm_InoObj |
| Simple class one line description. More... | |
| class | hsm_FreeJobIdxStack |
| class | hsm_JobElemVecMgr |
| class | hsm_JobListMgr |
| class | hsm_ListPos |
| class | hsm_TimeListElem |
| class | hsm_TimedList |
| struct | PathRec_t |
| pathRec_s: Structure, which contain pair file I-node / file Name. More... | |
| struct | ExtAttr_t |
| Extended attribute structure. More... | |
| struct | Event_t |
| event structure of received event More... | |
| struct | ClientConf_t |
| ClientConf_s: Structure, which contain all client configuration parameters. More... | |
| struct | hsm_FileProperty_t |
| struct | DirectoryNames_t |
| struct | FileReleaseCndPerm_t |
| struct | FileMigrCndPerm_t |
Defines | |
| #define | FSC_MAX_CORBA_BUFFERSIZE (1600 * 1024) |
| #define | CHN_CLEAN_d 0 |
| #define | CHN_DATA_d 1 |
| #define | CHN_META_d 2 |
| #define | CHN_ALTDATA_d 4 |
| #define | CHN_HEADER_d 8 |
| #define | DELETED_d 16 |
| #define | LIST_IS_UP_d 1 |
| #define | LIST_IN_RUN_d 2 |
| #define | LIST_IS_DOWN_d 0 |
| #define | LIST_RUN_d 1 |
| #define | LIST_NORUN_d 0 |
| #define | FILE_OFFLINE_d 0 |
| #define | FILE_DIRTY_d 1 |
Typedefs | |
| typedef vector< hsm_FileHeader * > | hsm_FH_p_v |
| typedef hsm_FH_p_v::iterator | hsm_FH_p_vi |
| typedef vector< hsm_FHpVecMgr * > | hsm_FHpVM_p_v |
| typedef hsm_FHpVM_p_v::iterator | hsm_FHpVM_p_i |
| typedef list< hsm_FileHeader * > | hsm_FH_p_l |
| typedef hsm_FH_p_l::iterator | hsm_FH_p_li |
| typedef vector< hsm_FileHeader * > | hsm_JobElem_v_t |
| typedef hsm_JobElem_v_t::iterator | hsm_JobElem_v_i |
| typedef hsm_JobElem_v_t::size_type | hsm_JobElem_v_st |
| typedef vector < hsm_JobElemVecMgr * > | hsm_Job_p_v_t |
| vector of jobs | |
| typedef hsm_Job_p_v_t::iterator | hsm_Job_p_v_i |
| typedef hsm_Job_p_v_t::size_type | hsm_Job_p_v_st |
| typedef list< hsm_TimeListElem > | hsm_FHtimed_l |
| typedef hsm_FHtimed_l::iterator | hsm_FHtimed_li |
| typedef list< PathRec_t > | PathList_t |
| Typedef of pathRec structure. | |
| typedef list< PathRec_t >::iterator | PathLIter_t |
| Iterator for path list (STL container). | |
| typedef hsm_FileHeader * | hsm_FHO_p |
| pointer to File Header object | |
Enumerations | |
| enum | hsm_DataMigStat_e { eNotInDoMig = 0, eDoMigStart, eDoMigAbort } |
| hsm_FileHeader class describe header of file. More... | |
| enum | hsm_JobStatus_e { hjs_NOTUSED = 0, hjs_PREPARATION, hjs_WAITFORDOMIG, hjs_DOMIG, hjs_WAITFORCOMPLETEMIG, hjs_COMPLETEMIG, hjs_MIGFAILED, hjs_RECALL } |
| Job list manager manage vector of jobs Each vector contain pointer to vector of job elements. More... | |
| enum | hsm_List_e { eNoList = 0, eDirtyList, eMigCndList, ePreJobList, eJobList, eRelCndList, eDirWaitList, eNoList = 0, eDirtyList, eMigCndList, ePreJobList, eJobList, eRelCndList, eDirWaitList } |
| List type enum used to know where File Header object is. More... | |
| enum | hsm_Dependence_e { eNoDepend = 0, eLock, ePull, ePush } |
| dependency resolve More... | |
| enum | Event_e { eUnknown = 0, ePreMount, eMount, eUmount, eOpen, eRelease, eChgName, eDelFile, eChgData, eOffline, eChgAttr, eChgMeta } |
| event type enum More... | |
| enum | hsm_List_e { eNoList = 0, eDirtyList, eMigCndList, ePreJobList, eJobList, eRelCndList, eDirWaitList, eNoList = 0, eDirtyList, eMigCndList, ePreJobList, eJobList, eRelCndList, eDirWaitList } |
| List type enum used to know where File Header object is. More... | |
Functions | |
| hsm_FileHeader * | hsmGetDirFH (hdb_DirNode_t &a_dir) |
| helper function that return directory FH First try to get it from cache and if can't create it by itself using DB Function baze on HSMDB directory tree. | |
| hsm_FileHeader * | hsmGetDirFH (cmn_Path a_path) |
| helper function that return directory FH First try to get it from cache and if can't create it by itself using DB. | |
| hsm_FileHeader * | hsmGetFH (cmn_Path &a_filePath, ivd_FS_FileProperty_t &a_fileProp) |
| helper function that check for FH in cache othervice create it. | |
| bool | hsm_CheckFile2hsmdbRec (ivd_RecordIDX_t a_fileID, hsm_FileHeader *a_fh) |
| hsm_InoObj * | GetInodeObj (ivd_FileType_e a_fType, ivd_GenInode_t a_inode, ivd_FileID_t a_fileID=0, hsm_ChgFlag_t a_inodeChgFlag=0) |
Variables | |
| hsm_ActiveFH * | g_hsm_activeList_p |
| i_FSC_var | g_iFSC |
| cmn_LockID< ivd_GenInode_t > | g_hsm_fhLock |
| hsm_FHcache * | g_hsm_FHCache_p |
| cmn_Mutex | g_jobList_x |
| cmn_Condition | g_jobList_c |
| hsm_MigByAPI | g_mig |
| hsm_FHrelc * | g_hsm_relcList_p |
| i_PartitionManager_var | g_iPM |
| pointer to File Header object | |
| cmn_Mutex | fhObjCount_x_g |
| Int32_t | fhObjCount_g |
| hsm_JobListMgr * | g_hsm_preJobList_p |
| #define CHN_ALTDATA_d 4 |
Definition at line 36 of file hsm_common.h.
| #define CHN_CLEAN_d 0 |
Definition at line 33 of file hsm_common.h.
| #define CHN_DATA_d 1 |
Definition at line 34 of file hsm_common.h.
| #define CHN_HEADER_d 8 |
Definition at line 37 of file hsm_common.h.
| #define CHN_META_d 2 |
Definition at line 35 of file hsm_common.h.
| #define DELETED_d 16 |
Definition at line 38 of file hsm_common.h.
| #define FILE_DIRTY_d 1 |
Definition at line 48 of file hsm_common.h.
| #define FILE_OFFLINE_d 0 |
Definition at line 47 of file hsm_common.h.
| #define FSC_MAX_CORBA_BUFFERSIZE (1600 * 1024) |
Definition at line 24 of file hsm_containers.h.
Referenced by hsm_FHmigc::DumpList(), and hsm_FHdirty::DumpList().
| #define LIST_IN_RUN_d 2 |
Definition at line 41 of file hsm_common.h.
| #define LIST_IS_DOWN_d 0 |
Definition at line 42 of file hsm_common.h.
| #define LIST_IS_UP_d 1 |
Definition at line 40 of file hsm_common.h.
| #define LIST_NORUN_d 0 |
Definition at line 45 of file hsm_common.h.
| #define LIST_RUN_d 1 |
Definition at line 44 of file hsm_common.h.
| typedef list<hsm_FileHeader*> hsm_FH_p_l |
Definition at line 28 of file hsm_FHlist.h.
| typedef hsm_FH_p_l::iterator hsm_FH_p_li |
Definition at line 29 of file hsm_FHlist.h.
| typedef vector<hsm_FileHeader*> hsm_FH_p_v |
Definition at line 24 of file hsm_FHcache.h.
| typedef hsm_FH_p_v::iterator hsm_FH_p_vi |
Definition at line 27 of file hsm_FHcache.h.
| typedef hsm_FileHeader* hsm_FHO_p |
| typedef hsm_FHpVM_p_v::iterator hsm_FHpVM_p_i |
Definition at line 71 of file hsm_FHcache.h.
| typedef vector<hsm_FHpVecMgr*> hsm_FHpVM_p_v |
Definition at line 70 of file hsm_FHcache.h.
| typedef list<hsm_TimeListElem> hsm_FHtimed_l |
Definition at line 47 of file hsm_TimedList.h.
| typedef hsm_FHtimed_l::iterator hsm_FHtimed_li |
Definition at line 48 of file hsm_TimedList.h.
| typedef hsm_Job_p_v_t::iterator hsm_Job_p_v_i |
Definition at line 178 of file hsm_joblistmgr.h.
| typedef hsm_Job_p_v_t::size_type hsm_Job_p_v_st |
Definition at line 179 of file hsm_joblistmgr.h.
| typedef vector<hsm_JobElemVecMgr*> hsm_Job_p_v_t |
| typedef hsm_JobElem_v_t::iterator hsm_JobElem_v_i |
Definition at line 66 of file hsm_joblistmgr.h.
| typedef hsm_JobElem_v_t::size_type hsm_JobElem_v_st |
Definition at line 67 of file hsm_joblistmgr.h.
| typedef vector<hsm_FileHeader*> hsm_JobElem_v_t |
Definition at line 63 of file hsm_joblistmgr.h.
| typedef list<PathRec_t> PathList_t |
Typedef of pathRec structure.
Typedef for list (STL container), which contain pairs file I-node / file Name as members.
Definition at line 111 of file hsm_common.h.
| typedef list<PathRec_t>::iterator PathLIter_t |
| enum Event_e |
event type enum
| eUnknown | |
| ePreMount | |
| eMount | |
| eUmount | |
| eOpen | |
| eRelease | |
| eChgName | |
| eDelFile | |
| eChgData | |
| eOffline | |
| eChgAttr | |
| eChgMeta |
Definition at line 53 of file hsm_common.h.
00053 { 00054 eUnknown = 0, 00055 ePreMount, 00056 eMount, 00057 eUmount, 00058 eOpen, 00059 eRelease, 00060 eChgName, 00061 eDelFile, 00062 eChgData, 00063 eOffline, 00064 eChgAttr, 00065 eChgMeta 00066 } Event_e;
| enum hsm_DataMigStat_e |
hsm_FileHeader class describe header of file.
This class include Inode class and \ is part of migration class
Definition at line 51 of file client/hsmlist/hsm_FileHeader.h.
00051 { 00052 eNotInDoMig = 0, 00053 eDoMigStart, 00054 eDoMigAbort 00055 } hsm_DataMigStat_e;
| enum hsm_Dependence_e |
dependency resolve
Definition at line 45 of file hsm_listcmn.h.
00045 { 00046 eNoDepend = 0, // no dependency -> migrate 00047 eLock, // has depend to FHD but is locked -> try migrate latter 00048 ePull, // has depend to FHD and is FHD is pull to list of dependent FH -> migrate 00049 ePush // has depend to FHD but is moved to FHD list -> skip it, will be mig by another list 00050 } hsm_Dependence_e;
| enum hsm_JobStatus_e |
Job list manager manage vector of jobs Each vector contain pointer to vector of job elements.
The number of jobs is limited by constructor. When all reserved jobs are used then wait condition is trigged.
It is not possible to increase the number of job in run time except if job list mutex is used, but have in mind that lock each joblist method is will slow down performance. limitation of number of jobs is good. there is not benefit of 1000 of jobs concure for resources at same time.
| hjs_NOTUSED | |
| hjs_PREPARATION | |
| hjs_WAITFORDOMIG | |
| hjs_DOMIG | |
| hjs_WAITFORCOMPLETEMIG | |
| hjs_COMPLETEMIG | |
| hjs_MIGFAILED | |
| hjs_RECALL |
Definition at line 52 of file hsm_joblistmgr.h.
00052 { 00053 hjs_NOTUSED = 0, 00054 hjs_PREPARATION, 00055 hjs_WAITFORDOMIG, 00056 hjs_DOMIG, 00057 hjs_WAITFORCOMPLETEMIG, 00058 hjs_COMPLETEMIG, 00059 hjs_MIGFAILED, 00060 hjs_RECALL 00061 } hsm_JobStatus_e;
| enum hsm_List_e |
List type enum used to know where File Header object is.
| eNoList | |
| eDirtyList | |
| eMigCndList | |
| ePreJobList | |
| eJobList | |
| eRelCndList | |
| eDirWaitList | |
| eNoList | |
| eDirtyList | |
| eMigCndList | |
| ePreJobList | |
| eJobList | |
| eRelCndList | |
| eDirWaitList |
Definition at line 71 of file hsm_common.h.
00071 { 00072 eNoList = 0, 00073 eDirtyList, 00074 eMigCndList, 00075 ePreJobList, 00076 eJobList, 00077 eRelCndList, 00078 eDirWaitList 00079 } hsm_List_e;
| enum hsm_List_e |
List type enum used to know where File Header object is.
| eNoList | |
| eDirtyList | |
| eMigCndList | |
| ePreJobList | |
| eJobList | |
| eRelCndList | |
| eDirWaitList | |
| eNoList | |
| eDirtyList | |
| eMigCndList | |
| ePreJobList | |
| eJobList | |
| eRelCndList | |
| eDirWaitList |
Definition at line 32 of file hsm_listcmn.h.
00032 { 00033 eNoList = 0, 00034 eDirtyList, 00035 eMigCndList, 00036 ePreJobList, 00037 eJobList, 00038 eRelCndList, 00039 eDirWaitList 00040 } hsm_List_e;
| hsm_InoObj* GetInodeObj | ( | ivd_FileType_e | a_fType, | |
| ivd_GenInode_t | a_inode, | |||
| ivd_FileID_t | a_fileID = 0, |
|||
| hsm_ChgFlag_t | a_inodeChgFlag = 0 | |||
| ) |
Definition at line 229 of file hsm_InoObj.cpp.
References CHG_DELETED_d, dbg_DETAIL, file, g_fs_api_p, GetInodeObj(), ivd_FS_File::GetProperties(), hsm_InoObj::hsm_InoObj(), ivd_NULLCHK_m, log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_chunkSize, ivd_FS_FileProperty_t::m_dirtyFlag, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_FileProperty_t::m_offlineFlag, ivd_FS_FileProperty_t::m_type, and s_className.
Referenced by fs_api::GetDirFH(), GetInodeObj(), and hsm_FHrelc::Truncate().
00232 { 00233 log_FUNC_m(GetInodeObj); 00234 log_DBG_m(dbg_DETAIL, "a_inodeChgFlag=" << a_inodeChgFlag 00235 << ", a_fType" << hex << a_fType << dec 00236 << ", a_inode" << a_inode 00237 << ", a_fileID" << a_fileID); 00238 // ivd_FileID_t fileID; 00239 // ivd_FileSize_t chnkSize; 00240 ivd_FS_FileProperty_t fileProp; 00241 00242 try { 00243 ivd_FS_File file(*g_fs_api_p, a_inode); 00244 file.GetProperties(fileProp); 00245 } 00246 catch (ivd_SysError) { // can't 00247 log_DBG_m(dbg_DETAIL, "File is deleted."); 00248 // if can't found then is DELETTED 00249 // maybe DELETE state is not set it 00250 a_inodeChgFlag |= CHG_DELETED_d; 00251 //DEL if (!(a_inodeChgFlag & CHG_DELETED_d)) { 00252 //DEL throw ivd_InternalError(ie_IMPOSSIBLE, "File is not DELETTED and can't got its properties.", true); 00253 //DEL } 00254 00255 fileProp.m_type = a_fType; 00256 fileProp.m_Inode = a_inode; 00257 fileProp.m_fileID = a_fileID; 00258 fileProp.m_chunkSize = 0; 00259 fileProp.m_fileSize = 0; 00260 fileProp.m_offlineFlag = false; 00261 fileProp.m_dirtyFlag = false; 00262 } 00263 // hsm_InoObj *hsmIObj = new hsm_InoObj(a_inode, fileID, chnkSize, g_hsm_fileHeaderSize); 00264 hsm_InoObj *hsmIObj = new hsm_InoObj(fileProp, a_inodeChgFlag); 00265 00266 ivd_NULLCHK_m(hsmIObj, hsm_InoObj::s_className); 00267 return hsmIObj; 00268 }


| bool hsm_CheckFile2hsmdbRec | ( | ivd_RecordIDX_t | a_fileID, | |
| hsm_FileHeader * | a_fh | |||
| ) |
Definition at line 2243 of file hsm_FileHeader.cpp.
References hdb_file2hdbID_t::circList, g_File2hdbID_p, hsm_CheckFile2hsmdbRec(), log_FUNC_m, log_WRN_m, NULL, fio_RelFile::ReadRec(), hdb_file2hdbID_t::relCandIdx, and hsm_ListPos::SetCircList().
Referenced by hsm_FileHeader::AddToReleaseCanList(), hsm_FileHeader::CompleteMigIsDone(), hsm_CheckFile2hsmdbRec(), and hsm_FileHeader::Recalled().
02243 { 02244 log_FUNC_m(hsm_CheckFile2hsmdbRec); 02245 // this record must be zero befor is set. 02246 hdb_file2hdbID_t file2hsmdbRec; 02247 g_File2hdbID_p->ReadRec(a_fileID, &file2hsmdbRec, 1); 02248 if (file2hsmdbRec.circList != 0) { 02249 ostringstream sstr; 02250 sstr << "file2hsmdbRec already used! " << file2hsmdbRec << endl; 02251 if (a_fh != NULL) { 02252 sstr << "Release candidate position mem are updated." << endl; 02253 sstr << *a_fh; 02254 a_fh->SetCircList(file2hsmdbRec.circList, file2hsmdbRec.relCandIdx); 02255 } 02256 log_WRN_m(sstr.str()); 02257 // update members 02258 return true; 02259 } 02260 return false; 02261 }


| hsm_FileHeader* hsmGetDirFH | ( | cmn_Path | a_path | ) |
helper function that return directory FH First try to get it from cache and if can't create it by itself using DB.
Function baze on path.
Definition at line 2181 of file hsm_FileHeader.cpp.
References ivd_FS_File::Close(), dbg_DETAIL, dbg_NORM, hsm_FileHeader::DecrRef(), ivd_FS_File::e_Cache, file, g_fs_api_p, g_hsm_FHCache_p, hsm_FHcache::GetFH(), cmn_Path::GetFileName(), ivd_FS_File::GetProperties(), ivd_FileSystemAPI::GetRootPath(), hsm_FileHeader::hsm_FileHeader(), hsmGetDirFH(), hsm_FHcache::InsertDirWithTest(), log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_Inode, NULL, ivd_FS_File::Open(), and cmn_Path::UpPath().
02181 { 02182 log_FUNC_m(hsmGetDirFH(cmn_Path)); 02183 02184 if (a_path.length() <= g_fs_api_p->GetRootPath().length()) { 02185 return NULL; // no more parents 02186 } 02187 02188 log_DBG_m(dbg_DETAIL, "Find FH from path: " << a_path ); 02189 02190 ivd_FS_FileProperty_t fileProp; 02191 try { 02192 ivd_FS_File file(*g_fs_api_p, a_path); 02193 file.Open(ivd_FS_File::e_Cache); 02194 file.GetProperties(fileProp); 02195 file.Close(); 02196 } 02197 catch (ivd_SysError &ise) { 02198 log_DBG_m(dbg_NORM, "Can't get general inode of: '" << a_path 02199 << "'. Dir probably not exist."); 02200 throw; 02201 } 02202 02203 hsm_FileHeader *fileHdr = g_hsm_FHCache_p->GetFH(fileProp.m_Inode); 02204 if (fileHdr == NULL) { // directory not found in cache 02205 // create it from DB and add to cache 02206 hsm_FileHeader *ownFH = hsmGetDirFH(a_path.UpPath()); 02207 02208 hsm_InoObj *hsmIObj = new hsm_InoObj(fileProp, 0); 02209 02210 fileHdr = new hsm_FileHeader(ownFH, hsmIObj, hdb_String(a_path.GetFileName())); 02211 if (ownFH != NULL){// now is used, so decrease temporary reference 02212 ownFH->DecrRef(); 02213 } 02214 02215 // if FH exist in cache then cache delete inserted and 02216 // return that from cache 02217 g_hsm_FHCache_p->InsertDirWithTest(&fileHdr); 02218 } 02219 return fileHdr; 02220 }

| hsm_FileHeader* hsmGetDirFH | ( | hdb_DirNode_t & | a_dir | ) |
helper function that return directory FH First try to get it from cache and if can't create it by itself using DB Function baze on HSMDB directory tree.
Definition at line 2108 of file hsm_FileHeader.cpp.
References CHG_DELETED_d, ivd_FS_File::Close(), dbg_DETAIL, dbg_NORM, hsm_FileHeader::DecrRef(), ivd_FS_File::e_Cache, file, hdb_DirNode_t::fileID, g_fs_api_p, g_hsm_FHCache_p, hdb_DirNode_t::generalInode, hsm_FHcache::GetFH(), ivd_FS_File::GetProperties(), ivd_FileSystemAPI::GetRootPath(), hdbReadNameOwnRec(), hsm_FileHeader::hsm_FileHeader(), hsmdbGetPath(), hsmGetDirFH(), ift_DIR, hsm_FHcache::InsertDirWithTest(), ivd_NULLCHK_m, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_chunkSize, ivd_FS_FileProperty_t::m_dirtyFlag, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_FileProperty_t::m_offlineFlag, ivd_FS_FileProperty_t::m_type, hdb_DirNode_t::nameOwnIdx, NULL, ivd_FS_File::Open(), path, and s_className.
Referenced by hsmGetDirFH(), hsmGetFH(), hsm_FileHeader::InitActive(), and hsm_FHrelc::Truncate().
02108 { 02109 log_FUNC_m(hsmGetDirFH); 02110 // try to find FH by inode 02111 ivd_FS_FileProperty_t fileProp; 02112 hsm_ChgFlag_t inodeChgFlag = 0; 02113 02114 // find proper general inode 02115 // -------------- previous code got from inside of if block 02116 hdb_String name; 02117 hdb_DirNode_t ownDir; 02118 ivd_RecordIDX_t dirIdx; 02119 // get dir name and ownerDirNode record 02120 hdbReadNameOwnRec(a_dir.nameOwnIdx, dirIdx, name, ownDir); 02121 // add to find proper general inode 02122 try { 02123 ivd_FS_File file(*g_fs_api_p, a_dir.generalInode, a_dir.fileID); 02124 02125 cmn_Path path = g_fs_api_p->GetRootPath() + hsmdbGetPath(ownDir) + name; 02126 log_DBG_m(dbg_DETAIL, "Path to find gen Inode " << path ); 02127 //HPUX - The file needs to be opened ( to be in the kernel cache ) 02128 file.Open(ivd_FS_File::e_Cache, path); 02129 02130 file.GetProperties(fileProp); 02131 file.Close(); 02132 02133 // got current inode from FS 02134 if (a_dir.generalInode != fileProp.m_Inode) { 02135 log_DBG_m(dbg_NORM, "INO changed. from DB " << IVD_PRINT_ID_FS(a_dir.generalInode) 02136 << " from FS " << IVD_PRINT_ID_FS(fileProp.m_Inode)); 02137 a_dir.generalInode = fileProp.m_Inode; 02138 } 02139 } 02140 catch (ivd_SysError &ise) { 02141 log_DBG_m(dbg_NORM, "Can't get general inode of fileID " << a_dir.fileID 02142 << " Dir probably not exist."); 02143 02144 inodeChgFlag = CHG_DELETED_d; 02145 02146 fileProp.m_type = ift_DIR; 02147 fileProp.m_Inode = a_dir.generalInode; 02148 fileProp.m_fileID = a_dir.fileID; 02149 fileProp.m_chunkSize = 0; 02150 fileProp.m_fileSize = 0; 02151 fileProp.m_offlineFlag = false; 02152 fileProp.m_dirtyFlag = false; 02153 } 02154 02155 hsm_FileHeader *fileHdr = g_hsm_FHCache_p->GetFH(a_dir.generalInode); 02156 if (fileHdr == NULL) { // directory not found in cache 02157 // create it from DB and add to cache 02158 hsm_FileHeader *ownFH = NULL; 02159 if (ownDir.nameOwnIdx > 0) { // if has owner get it 02160 // ivoke to recursion, call itself 02161 ownFH = hsmGetDirFH(ownDir); 02162 } 02163 hsm_InoObj *hsmIObj = new hsm_InoObj(fileProp, inodeChgFlag); 02164 ivd_NULLCHK_m(hsmIObj, hsm_InoObj::s_className); 02165 02166 fileHdr = new hsm_FileHeader(ownFH, hsmIObj, name); 02167 if (ownFH != NULL){// now is used, so decrease temporary reference 02168 ownFH->DecrRef(); 02169 } 02170 // fileHdr = new hsm_FileHeader(ownFH, hsmIObj, ift_DIR, name); 02171 ivd_NULLCHK_m(fileHdr, hsm_FileHeader::s_className); 02172 02173 // if FH exist in cache then cache delete inserted and 02174 // return that from cache 02175 g_hsm_FHCache_p->InsertDirWithTest(&fileHdr); 02176 } 02177 return fileHdr; 02178 }


| hsm_FileHeader* hsmGetFH | ( | cmn_Path & | a_filePath, | |
| ivd_FS_FileProperty_t & | a_fileProp | |||
| ) |
helper function that check for FH in cache othervice create it.
Definition at line 2223 of file hsm_FileHeader.cpp.
References hsm_FileHeader::DecrRef(), g_hsm_FHCache_p, hsm_FHcache::GetFH(), cmn_Path::GetFileName(), hsm_FileHeader::hsm_FileHeader(), hsmGetDirFH(), hsmGetFH(), hsm_FHcache::Insert(), log_FUNC_m, ivd_FS_FileProperty_t::m_Inode, NULL, and cmn_Path::UpPath().
Referenced by hsmGetFH(), and i_HSM_i::TrigEfficientRecall().
02223 { 02224 log_FUNC_m(hsmGetFH); 02225 02226 hsm_FileHeader *fileHdr = g_hsm_FHCache_p->GetFH(a_fileProp.m_Inode); 02227 02228 if (fileHdr == NULL) { 02229 hsm_FileHeader *fileOwnHdr = hsmGetDirFH(a_filePath.UpPath()); // and no file name 02230 hsm_InoObj *inodeObj = new hsm_InoObj(a_fileProp, 0); 02231 02232 fileHdr = new hsm_FileHeader(fileOwnHdr, inodeObj ,hdb_String(a_filePath.GetFileName()));; 02233 if (fileOwnHdr != NULL) { 02234 // increment is perform inside hsmGetDirFH inside constructor or cache search 02235 // now is decrement 02236 fileOwnHdr->DecrRef(); // this directory is dereferenced by release candidate 02237 } 02238 g_hsm_FHCache_p->Insert(fileHdr); 02239 } 02240 return fileHdr; 02241 }


Definition at line 65 of file hsm_FileHeader.cpp.
Referenced by fs_api::AddGenericEvent(), hsm_FileHeader::DumpStatus(), fs_api::EventDelay(), hsm_FileHeader::hsm_FileHeader(), and hsm_FileHeader::~hsm_FileHeader().
Definition at line 54 of file hsm_containers.cpp.
Referenced by hsm_FileHeader::Event(), fs_api::EventMounted(), hsm_FileHeader::InitActive(), hsm_FileHeader::MigrationIsDone(), hsm_FileHeader::RemoveFromActiveList(), and hsm_FileHeader::StoreActiveRec().
Definition at line 46 of file hsm_containers.cpp.
Referenced by hsm_ActiveFH::ActiveToList(), fs_api::AddGenericEvent(), TreeWalk::CheckDir(), hsm_FileHeader::CompleteMigIsDone(), hsm_FileHeader::Event(), fs_api::EventDataOffline(), fs_api::EventDelete(), fs_api::EventMove(), hsm_FileHeader::EventOffline(), fs_api::FindAndPrepareFH(), fs_api::GetDirFH(), hsmGetDirFH(), hsmGetFH(), hsm_ActiveFH::OrphanedToMigList(), hsm_FileHeader::Recalled(), hsm_DirWaitList::TaskTime(), and hsm_FHrelc::Truncate().
Definition at line 78 of file hsm_containers.cpp.
Referenced by fs_api::AddGenericEvent(), i_HSM_i::CompleteMigration(), hsm_FileHeader::DecMemberRef(), fs_api::DismissFH(), i_HSM_i::DoMigrationJob(), i_HSM_i::EfficientRecall(), fs_api::EventDelete(), hsm_Recall::FileRecalledCheck(), fs_api::FindAndPrepareFH(), i_HSM_i::ForceRelease(), hsm_FileHeader::IncMemberRef(), hsm_JobElemVecMgr::JobToSequence(), hsm_FHmigc::Migrate(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::Recall(), hsm_FHADPRecall::RecallFileFromADP(), hsm_FHADPRecall::RecallFilesFromList(), hsm_Recall::RecallOfFileCanceled(), hsm_FHmigc::SendToPM(), hsm_FHdirty::TaskTime(), hsm_DirWaitList::TaskTime(), i_HSM_i::TrigEfficientRecall(), and hsm_FHrelc::Truncate().
Definition at line 49 of file hsm_containers.cpp.
Referenced by hsm_FileHeader::CompleteMigIsDone(), i_HSM_i::CompleteMigration(), i_HSM_i::DoMigrationJob(), i_HSM_i::EfficientRecall(), hsm_FileHeader::EventOffline(), i_HSM_i::GetInfo(), hsm_FileHeader::GetJobMigID(), hsm_FileHeader::MigCanToPreJob(), hsm_FHmigc::Migrate(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), hsm_ListPos::RemoveFromList(), hsm_FHmigc::SendToPM(), i_HSM_i::ShowStatus(), i_HSM_i::TrigEfficientRecall(), hsm_FHmigc::TrigMigration(), and i_HSM_i::TrigRecall().
Definition at line 51 of file hsm_containers.cpp.
Referenced by hsm_FileHeader::AddToReleaseCanList(), hsm_FileHeader::CompleteMigIsDone(), hsm_FileHeader::Event(), hsm_FileHeader::EventOffline(), i_HSM_i::GetInfo(), hsm_FileHeader::Recalled(), i_HSM_i::Reconfigure(), hsm_FileHeader::RemoveFromRelCandList(), and i_HSM_i::ShowStatus().
| i_FSC_var g_iFSC |
| i_PartitionManager_var g_iPM |
pointer to File Header object
global object for fileheader locking
Definition at line 52 of file ivd-hsm.cpp.
Referenced by i_HSM_i::MigrateByAPI(), and hsm_FHmigc::Run().
Definition at line 62 of file i_hsm_impl.cpp.
Referenced by hsm_MigByAPI::AddJob(), hsm_MigByAPI::ClearList(), hsm_MigByAPI::GetJobs(), hsm_FHmigc::Run(), and hsm_FHmigc::SendToPM().
Definition at line 61 of file i_hsm_impl.cpp.
1.5.6