class fsc_nsDirEntryVec contain pointer to next itself object.
A few members help class to manage this array.
The arrays are indirect bound together by fsc_nsDirEntryVec objects. Each fsc_nsDirEntryVec objects contain one array.
The array is formatted on following way: Only array from first fsc_nsDirEntryVec objects can have free elements. Arrays from next objects are always full.
Possible formats of array m_dirMembers: default size of array is N = 256 elements
FIRST array in chain can be shorter than 256 elements [0] fileID of member 1, [1] fileID of member 2, [2] 0 <- class member m_firstFree_p points to this location. [ ] ... [N-1] 0 <- class member m_nextVecIdx_p points to this location.
FIRST array in chain just before write2DB or just after read from DB contains additional information "first free array index" if array element [N-3] is zero. When [N-3] is not zero then [N-2] has to be checked if is first free array index or there is no more free element in array. [0] fileID of member 1, [1] fileID of member 2, [2] 0 <- class member m_firstFree_p points to this location. [ ] ... [N-3] 0, if this is 0 then [N-2] field contains first free array index [N-2] 3, first free array index [N-1] 0 <- class member m_nextVecIdx_p points to this location.
NOT FIRST array [1] fileID of member 1, [2] fileID of member 2, [ ] ... [N-3] fileID of member n-3, [N-2] fileID of member n-2, [N-1] 0 <- class member m_nextVecIdx_p and m_firstFree_p points to this location.
It accepts calls from class fsc_nsDirEntryMgr pass them to base classes and to next fsc_nsDirEntryVec object.
| #define ASIZE_d 256 |
number of ASCII alphabet for fast search algorithm
Definition at line 36 of file cmn_FastSearch.h.
Referenced by cmn_SkipTbl4FS::CreateSkipTbl().
| #define evt_ADMINJOB "ADMIN" |
Definition at line 35 of file mif_jobmanager.h.
Referenced by i_MediumDupl_i::AssignResources(), i_MediumDupl_i::CheckTargetMedium(), i_AdminJob_i::CloseVolume(), i_MediumDupl_i::CompleteJob(), i_AdminJob_i::DetectVolumeHeader(), i_AdminJob_i::DoInitialize(), i_MediumDupl_i::Execute(), i_AdminJob_i::Execute(), i_AdminJob_i::Format(), i_MediumDupl_i::i_MediumDupl_i(), i_AdminJob_i::Initialize(), i_AdminJob_i::InitializeSingleVolume(), i_MediumDupl_i::MediumOperationComplete(), i_AdminJob_i::OperateLA(), i_MediumDupl_i::PreFormat(), i_MediumDupl_i::Process(), i_AdminJob_i::RecreateFRIandMIC(), i_AdminJob_i::StartBEA(), and i_AdminJob_i::~i_AdminJob_i().
| #define evt_BACKUPJOB "BACKUP" |
Definition at line 36 of file mif_jobmanager.h.
Referenced by i_BackupJob_i::i_BackupJob_i(), and i_BackupJob_i::Remove().
| #define evt_DUPLJOB "DUPLICATION" |
| #define fsc_DATAL_CACHE_SIZE_m 0x8000 |
Definition at line 32 of file fsc_GlobalObj.h.
| #define fsc_nsDirEntryRecSize_d 8 |
Definition at line 65 of file fsc_nsDirEntryFormattedVec.h.
| #define fsc_nsMaxNumElemVecSize_d (256 * fsc_nsDirEntryRecSize_d) |
Definition at line 66 of file fsc_nsDirEntryFormattedVec.h.
| #define MAXNumOfLevels_d 256 |
Definition at line 37 of file hsm_fs_api.h.
| #define MIF_MEDIUM_AIT2_MEDIUM_SIZE (50972) |
| #define MIF_MEDIUM_AIT2_VOLUME_OVERHEAD (262) |
| #define MIF_MEDIUM_AIT2_VOLUMESIZE_FACTOR (1.144) |
| typedef stx_CacheArray<fsc_DATAL_CACHE_SIZE_m> fsc_DataLcache |
Definition at line 37 of file fsc_GlobalObj.h.
| typedef fsc_FLSPerVolume_p_v_t::iterator fsc_FLSPerVolume_p_v_i |
Definition at line 33 of file fsc_FLSPerMedia.h.
| typedef vector<fsc_FLSPerVolume*> fsc_FLSPerVolume_p_v_t |
Definition at line 32 of file fsc_FLSPerMedia.h.
| typedef stx_CacheArrayOfRefEl<0x2000> fsc_nsDirCache |
global cache for caching NSC directory elements used per each transaction.
Definition at line 36 of file fsc_GlobalObj.h.
| typedef vector<fsc_nsDirEntryVec *> fsc_nsDirEntryVec_p_v |
Definition at line 28 of file fsc_nsDirEntryMgr.h.
| typedef fsc_nsDirEntryVec_p_v::iterator fsc_nsDirEntryVec_p_v_i |
Definition at line 29 of file fsc_nsDirEntryMgr.h.
| typedef vector<fsc_nsElement*> fsc_nsElement_p_v |
Definition at line 30 of file fsc_nsOwnerMgr.h.
| typedef fsc_nsElement_p_v::iterator fsc_nsElement_p_v_i |
Definition at line 31 of file fsc_nsOwnerMgr.h.
| typedef list<fsc_SplitStream_t> fsc_SplitStream_l |
Definition at line 59 of file fsc_nsAttrStream.h.
| typedef fsc_SplitStream_l::iterator fsc_SplitStream_l_i |
Definition at line 60 of file fsc_nsAttrStream.h.
| typedef vector<hsm_Chunk_t> hsm_Chunk_t_v |
Definition at line 51 of file hsm_RecallInfoGrp.h.
| typedef vector<hsm_Chunk_t>::iterator hsm_Chunk_t_v_i |
Definition at line 52 of file hsm_RecallInfoGrp.h.
| typedef ivd_FileLocationData_t_v_t::iterator ivd_FileLocationData_t_v_i |
Definition at line 30 of file fsc_FLSPerVolume.h.
Definition at line 29 of file fsc_FLSPerVolume.h.
| typedef vector<ivd_PathEntry_t> ivd_PathList_t |
Definition at line 126 of file ivd_fs_api.h.
| typedef ivd_PathList_t::iterator ivd_PathListIter_t |
Definition at line 138 of file ivd_fs_api.h.
| typedef vector<ivd_RecordIDX_t> ivd_RecordIDX_t_v |
Definition at line 31 of file fsc_nsDirEntryVec.h.
| typedef ivd_RecordIDX_t_v::iterator ivd_RecordIDX_t_v_i |
Definition at line 32 of file fsc_nsDirEntryVec.h.
| typedef vector<ivd_VolInfoEntry_t> ivd_VolInfoList_t |
Definition at line 102 of file ivd_fs_api.h.
| typedef ivd_VolInfoList_t::iterator ivd_VolInfoListIter_t |
Definition at line 103 of file ivd_fs_api.h.
| enum df_AttrType_e |
all file atributes are stored in one stream before they go to FSC so before each attribute data stay attrib header that read attribute type and its size.
| at_ENDOFDATA | |
| at_FIRSTSPLIT | |
| at_SPLIT | |
| at_LASTSPLIT | |
| at_ADS | |
| at_META_MASK | |
| at_SECURITY | |
| at_EA | |
| at_LINK | |
| at_OBJID | |
| at_PROPERTY | |
| at_REPARSE | |
| at_SPARSE | |
| at_SENTINEL |
Definition at line 36 of file df_SplitInfo.h.
00036 { 00037 at_ENDOFDATA = 0, // 00038 at_FIRSTSPLIT = 1, 00039 at_SPLIT = 2, 00040 at_LASTSPLIT = 3, 00041 at_ADS = 8, // Alternate data stream (actualy only ADS name is stored) 00042 at_META_MASK = 16, // all meta data has 4th bit set 00043 at_SECURITY = 16, 00044 at_EA = 17, 00045 at_LINK = 18, 00046 at_OBJID = 19, 00047 at_PROPERTY = 20, 00048 at_REPARSE = 21, 00049 at_SPARSE = 22, 00050 00051 at_SENTINEL = 0xFFFF 00052 } df_AttrType_e;
enum fs_api::Event_e [inherited] |
| eUnknown | |
| ePreMount | |
| eMount | |
| eUmount | |
| eOpen | |
| eRelease | |
| eChgNameOwn | |
| eDelFile | |
| eChgData | |
| eOffline | |
| eChgAttr | |
| eChgMeta | |
| eCreate |
Definition at line 94 of file hsm_fs_api.h.
00094 { 00095 eUnknown = 0, 00096 ePreMount, 00097 eMount, 00098 eUmount, 00099 eOpen, 00100 eRelease, 00101 eChgNameOwn, 00102 eDelFile, 00103 eChgData, 00104 eOffline, 00105 eChgAttr, 00106 eChgMeta, 00107 eCreate 00108 } Event_e;
enum ivd_FS_File::Event_e [inherited] |
Definition at line 427 of file ivd_fs_api.h.
00427 { 00428 e_RecallEvt, 00429 e_MigrateEvt 00430 } Event_e;
| enum fsc_DataLflags_e |
Version of DataL structure, update it when sructure is change.
Definition at line 34 of file fsc_DataL_t.h.
00034 { 00035 dlfDirectory = 1 << 0, 00036 dlfNSCstored = 1 << 1 00037 } fsc_DataLflags_e;
| enum fsc_MergeStatus_e |
Definition at line 32 of file fsc_nsAttrStream.h.
00032 { 00033 mrgALREADY_IN = 0, 00034 mrgCOMPLETED, 00035 mrgINSERTED 00036 } fsc_MergeStatus_e;
Do not expand fsc_nsAttribIdxType_e enum, without redesign, because only two bits are reserved for it.
ait: attribute-index-type
Definition at line 58 of file fsc_nsCommon.h.
00058 { 00059 ait_NOTALLATTR = 0, 00060 ait_ATTRIB = 1, 00061 ait_INVMETADATA = 2, 00062 ait_ATTRIBHISTORY // for future when generations will be stored 00063 } fsc_nsAttribIdxType_e; // 2 bits
Do not expand fsc_nsMemberIdxType_e enum, without redesign, because only three bits are reserved for it.
mit prefix mean member-index-type
Definition at line 46 of file fsc_nsCommon.h.
00046 { 00047 mit_MEMBERS = 0, 00048 mit_LOTOFMEMBERS, // reserved 00049 mit_MEMBERS2, // reserved for future better space usage, faster member handle 00050 mit_LOTOFMEMBERS2 // - - - 00051 } fsc_nsMemberIdxType_e; // 2 bits
| enum fsc_nsNameIdxType_e |
Do not expand fsc_nsNameIdxType_e enum, without redesign, because only two bits are reserved for it.
nit: name-index-type
Definition at line 70 of file fsc_nsCommon.h.
00070 { 00071 nit_NSCMISSING = 0, 00072 nit_NAME, 00073 nit_DELETED, 00074 nit_NAMEHISTORY, // for future when generations will be stored 00075 nit_HARDLINK // reserved for future 00076 } fsc_nsNameIdxType_e; // 3 bits
| enum fsc_nsOwnerIdxType_e |
Do not expand fsc_nsOwnerIdxType_e enum, without redesign, because only one bit is reserved for it.
oit prefix mean owner-index-type
Definition at line 36 of file fsc_nsCommon.h.
00036 { 00037 oit_OWNER, 00038 oit_OWNERHISTORY // for future when generations will be stored 00039 } fsc_nsOwnerIdxType_e; // 1 bit
enum ivd_FS_File::ivd_FS_FileOperation_e [inherited] |
| e_NoOp | |
| e_Migrate | |
| e_MigrateNoData | |
| e_Release | |
| e_Recall | |
| e_RecallInto | |
| e_Recovery | |
| e_Cache | |
| e_RefCount |
Definition at line 344 of file ivd_fs_api.h.
00344 { 00345 e_NoOp = 0, 00346 e_Migrate = 1, 00347 e_MigrateNoData = 2, // migrate only header 00348 e_Release = 3, 00349 e_Recall = 4, 00350 e_RecallInto = 5, 00351 e_Recovery = 6, 00352 e_Cache = 7, 00353 e_RefCount = 8 00354 } ivd_FS_FileOperation_e;
| enum ivd_FS_OpMode_e |
| e_Regular | |
| e_WORM | |
| e_ReadOnlyNoRecall | |
| e_ReadWriteNoRecall | |
| e_FailIO | |
| e_RegularRecallOnly | |
| e_WORMRecallOnly |
Definition at line 32 of file ivd_fs_api.h.
00032 { 00033 e_Regular = 0, 00034 e_WORM, 00035 e_ReadOnlyNoRecall, 00036 e_ReadWriteNoRecall, 00037 e_FailIO, 00038 e_RegularRecallOnly, 00039 e_WORMRecallOnly 00040 } ivd_FS_OpMode_e;
Definition at line 29 of file mif_partmgr.h.
00029 { 00030 mps_Online = 0, 00031 mps_Disabled = 1, 00032 mps_Stopped = 2 00033 } ivd_MifPartitionStatus_e;
| enum nse_Opentype_e |
Definition at line 42 of file fsc_nsElement.h.
00042 { 00043 nse_STANDARD = 0, 00044 nse_CREATE_PARENT 00045 };
| void fs_api::AddGenericEvent | ( | ivd_FS_Event & | a_event, | |
| Event_e | a_eventType | |||
| ) | [private, inherited] |
This method add an object (if not exist yet) into Cache list and check every directory in path list if exist in Cache list.
If not add it into the Cache list. If object with the same I-node, name and owner I-node exist just return founded File Header object.
| a_event | event structure of received event |
| ivd_SysError | errno on not enough memory |
Definition at line 520 of file hsm_fs_api.cpp.
References fs_api::CreateNewFH(), dbg_NORM, fs_api::DismissFH(), fs_api::eChgData, fs_api::eCreate, hsm_FileHeader::Event(), fhObjCount_g, fs_api::FindAndPrepareFH(), g_hsm_FHCache_p, g_hsm_fhLock, ivd_BaseException::GetError(), hsm_FileHeader::GetFileID(), ivd_FS_Event::GetFileID(), hsm_FileHeader::GetFullPath(), ivd_FS_Event::GetName(), ivd_FS_Event::GetOSID(), ivd_FS_Event::GetOwnerOSID(), ivd_BaseException::GetText(), ie_HSM_COLLOCATION, ie_HSM_INVPATH, hsm_FHcache::Insert(), IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, fs_api::m_trans_p, NULL, hsm_FHcache::Remove(), and hsm_FileHeader::SetFileID().
Referenced by fs_api::EventAttributeChange(), fs_api::EventCreate(), and fs_api::EventDataChange().
00520 { 00521 00522 log_FUNC_m(AddGenericEvent); 00523 00524 00525 //ivd_PathList_t pathList; 00526 ivd_GenInode_t inode; 00527 string name; 00528 ivd_GenInode_t ownInode = 0; 00529 hsm_FileHeader *hsmFH = NULL; 00530 string oldName; 00531 00532 // a_event.GetPath(pathList); 00533 // GetFHIdentify(pathList, pathList.begin(), inode, name, ownInode); 00534 // Only one owner level is needed at this time. 00535 inode = a_event.GetOSID(); 00536 name = a_event.GetName(); 00537 ownInode = a_event.GetOwnerOSID(); 00538 00539 hsmFH = FindAndPrepareFH(inode); 00540 00541 if (hsmFH == NULL){ 00542 try { 00543 hsmFH = CreateNewFH(inode, a_event, name, oldName); 00544 } 00545 catch (ivd_Error &ie) { 00546 if (ie.GetError() == ie_HSM_INVPATH) { 00547 log_DBG_m(dbg_NORM, "Could not create FileHeader for " << 00548 IVD_PRINT_ID_FS(inode) << 00549 ", owner dir is deleted. Ignore event."); 00550 // FindAndPrepareFH() locked the inode 00551 g_hsm_fhLock.UnLockByID(inode); 00552 return; 00553 } else { 00554 throw; 00555 } 00556 } 00557 catch ( ivd_SysError &ie) { 00558 // file is probably deletted in meantime 00559 if (ie.GetError() == ENOENT) { 00560 log_DBG_m(dbg_NORM, "File is deleted. " << 00561 ie.GetError() << " " << ie.GetText()); 00562 // FindAndPrepareFH() locked the inode 00563 g_hsm_fhLock.UnLockByID(inode); 00564 return; 00565 }else { 00566 throw; 00567 } 00568 } 00569 // reference decrement of owners is perform in constructor 00570 g_hsm_FHCache_p->Insert(hsmFH); 00571 } 00572 #if TGT_OS_windows 00573 // Special case on Windows when file is over copied. 00574 // Same OSid (inode), attributes are cleared, fileID is 0, 00575 // but found previous element in cache. 00576 // Set fileID again. 00577 // See bug 3131. 00578 else { 00579 if ( (a_eventType == eCreate) // new creatted files has fileID 0 00580 && (a_event.GetFileID() == 0) // not need but just in case 00581 && (hsmFH->GetFileID() != 0) ) { 00582 try { 00583 log_DBG_m(dbg_NORM, "Over copy detected for " << IVD_PRINT_ID_FS(inode) 00584 << ", file " << hsmFH->GetFullPath() 00585 << ". Set fileID to " << hsmFH->GetFileID()); 00586 hsmFH->SetFileID(hsmFH->GetFileID()); 00587 a_eventType = eChgData; // simulate change data event 00588 } 00589 catch (ivd_SysError) { 00590 // file is probably deletted in meantime 00591 log_DBG_m(dbg_NORM, "File is probably deleted. Continue. Delete event will follow."); 00592 } 00593 } 00594 } 00595 #endif 00596 00597 try { 00598 hsmFH->Event(a_eventType, *m_trans_p); 00599 } 00600 catch (ivd_Error &ie) { 00601 if (ie.GetError() == ie_HSM_COLLOCATION) { 00602 log_DBG_m(dbg_NORM, "Create event ignored " << 00603 IVD_PRINT_ID_FS(inode) << "., fhObjCount_g=" << fhObjCount_g); 00604 // FindAndPrepareFH() locked the inode 00605 DismissFH(hsmFH, inode); 00606 g_hsm_FHCache_p->Remove(hsmFH); 00607 return; 00608 } 00609 else { 00610 throw; 00611 } 00612 } 00613 00614 DismissFH(hsmFH, inode); 00615 }


| void ivd_FS_File::AddSyncEvent | ( | ivd_FS_Event & | a_evt | ) | [inherited] |
Definition at line 906 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_File::m_syncEvents.
Referenced by hsm_FileHeader::EventOffline().
00906 { 00907 log_FUNC_m(AddSyncEvent); 00908 00909 m_syncEvents.push_back(a_evt); 00910 }

| void ivd_FS_Event::Clear | ( | void | ) | [inherited] |
Definition at line 389 of file hpux/ivd_fs_api.cpp.
References ift_FILE, ivd_FS_Event::m_cause, ivd_FS_Event::m_chnFlag, ivd_FS_Event::m_chnSize, ivd_FS_Event::m_chnTime, ivd_FS_Event::m_fChOff, ivd_FS_Event::m_fChSize, ivd_FS_Event::m_fd, ivd_FS_Event::m_fileID, ivd_FS_Event::m_fileType, ivd_FS_Event::m_pathList, ivd_FS_Event::m_pathOldList, and NULL.
Referenced by ivd_FileSystemAPI::Run().
00389 { 00390 m_fileType = ift_FILE; 00391 m_fChSize = 0; 00392 m_fChOff = 0; 00393 m_pathList.clear(); 00394 m_pathOldList.clear(); 00395 m_chnFlag = 0; 00396 m_chnSize = 0; 00397 m_chnTime = time(NULL); 00398 m_fileID = 0; 00399 m_fd = 0; 00400 m_cause = 0; 00401 }

| void ivd_FS_File::Close | ( | void | ) | [inherited] |
Definition at line 790 of file hpux/ivd_fs_api.cpp.
References cmn_File::CloseF(), log_FUNC_m, and ivd_FS_File::m_file.
Referenced by i_HSM_i::ActivateFiles(), hsm_ActiveFH::ActiveToList(), hsm_FileHeader::CompleteMigIsDone(), hsm_IVDFSRecoverer::CreateFile(), fs_api::CreateNewFH(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), hsmGetDirFH(), hsm_FileHeader::InitActive(), i_HSM_i::MigrateByAPI(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::PackFile(), hsm_IVDFSRecoverer::ProcRecFileEnd(), hsm_FileHeader::Recalled(), hsm_FHADPRecall::RecallFileFromADP(), hsm_FHmigc::SendToPM(), hsm_InoObj::SetOffline(), hsm_FileHeader::ToMigCand(), i_HSM_i::TrigEfficientRecall(), hsm_FHrelc::Truncate(), hsm_FileHeader::TruncateFile(), and i_HSM_i::UnPackFile().
00790 { 00791 log_FUNC_m(Close); 00792 m_file.CloseF(); 00793 }


| void IVD_CMN_DECL_d cmn_BackSlashToSlash | ( | string & | a_path | ) |
Definition at line 217 of file cmn_function.cpp.
Referenced by df_Packer::WriteRecFile().
00217 { 00218 for (string::iterator i(a_path.begin()); i != a_path.end(); ++i) { 00219 if (*i == '\\') { 00220 *i = '/'; 00221 } 00222 } 00223 }

| void IVD_CMN_DECL_d cmn_CleanDir | ( | const cmn_Path & | a_path | ) |
Definition at line 485 of file cmn_function.cpp.
References cmn_CleanDir(), dbg_LOW, cmn_File::DeleteDir(), cmn_File::DeleteFile(), cmn_File::Exists(), cmn_FastDirLst::GetNextName(), ift_DIR, log_DBG_m, and log_FUNC_A_m.
Referenced by cmn_CleanDir(), fsc_CollectorRedunCopy::fsc_CollectorRedunCopy(), fsc_RawMedVolCollector::fsc_RawMedVolCollector(), fsc_RawReorgScanDataCollector::fsc_RawReorgScanDataCollector(), i_RecoveryJob_i::i_RecoveryJob_i(), i_ResourceManager_i::i_ResourceManager_i(), i_HSM_i::IVDFSPrepareRecovery(), main(), mif_CfgRep::RemoveCfg(), i_ManagementInterface_i::RemovePartition(), and fsc_MedVolReader::~fsc_MedVolReader().
00485 { 00486 log_FUNC_A_m(cmn_CleanDir, "path: " << a_path); 00487 00488 cmn_File rootPath(a_path); 00489 if (!rootPath.Exists()) { 00490 log_DBG_m(dbg_LOW, "Nothing to delete. Exit."); 00491 return; 00492 } 00493 00494 cmn_FastDirLst dirList(a_path); 00495 00496 ivd_GenInode_t inode; 00497 ivd_FileType_e type; 00498 string name = dirList.GetNextName(inode, type); 00499 00500 while (name.length() > 0) { 00501 if (name.compare(".") != 0 && 00502 name.compare("..") != 0) { 00503 cmn_Path fPath(a_path + name); 00504 if (type == ift_DIR) { 00505 cmn_CleanDir(fPath); 00506 cmn_File::DeleteDir(fPath); 00507 } 00508 else { 00509 cmn_File::DeleteFile(fPath); 00510 } 00511 } 00512 name = dirList.GetNextName(inode, type); 00513 } 00514 }


| void IVD_CMN_DECL_d cmn_CreatePath | ( | const cmn_Path & | path | ) |
Definition at line 329 of file cmn_Path.cpp.
References cmn_CreatePath(), cmn_CreatePathNoException(), cmn_FileNameToLong(), cmn_UTF8ToLocale(), and log_FUNC_m.
Referenced by _tmain(), bea_DiskMedium::AppendVolume(), cmn_CreatePath(), fsc_DataCollectorStorage::CreateFile(), fio_DataBase::fio_DataBase(), fsc_Files::fsc_Files(), fsc_MedVolWriter::fsc_MedVolWriter(), fsc_RawMedVolCollector::fsc_RawMedVolCollector(), i_MaintFriJob_i::GetFRI(), hdb_Tables::hdb_Tables(), main(), mif_CfgRep::mif_CfgRep(), CreateTree::PreprocessDir(), and hsm_IVDFSRecoverer::ProcRecFileHdr().
00329 { 00330 00331 string localePath(cmn_UTF8ToLocale(a_path)); 00332 00333 #if TGT_OS_windows 00334 localePath = cmn_FileNameToLong(localePath); 00335 #endif 00336 00337 int result = cmn_CreatePathNoException(localePath); 00338 if (result != 0) { 00339 log_FUNC_m(cmn_CreatePath); 00340 throw ivd_SysError(result, string("mkdir(") + a_path + ")" ); 00341 } 00342 }


| int IVD_CMN_DECL_d cmn_CreatePathNoException | ( | const cmn_Path & | a_path | ) |
Definition at line 258 of file cmn_Path.cpp.
References cmn_CreatePathNoException(), errno, log_FUNCTAG_m, and cmn_Path::UpPath().
Referenced by bea_FRIThread::bea_FRIThread(), cmn_CreatePath(), cmn_CreatePathNoException(), i_Service_i::Execute(), log_ErrorStream::log_ErrorStream(), log_Debugger::On(), hsm_IVDFSRecoverer::ProcRecFileHdr(), log_EventLogger::SetNewPath(), and log_ErrorStream::SetNewPath().
00258 { 00259 log_FUNCTAG_m(cmn_CreatePathNoException); 00260 00261 if (a_path.empty()) { 00262 return 0; 00263 } 00264 00265 int result = mkdir(a_path.c_str(), S_IRUSR | S_IWUSR | S_IXUSR); // 0700 00266 00267 if (result != -1) { 00268 return 0; 00269 } 00270 00271 { 00272 if (errno == ENOENT) { 00273 // Create parent directory (it does not exist yet) 00274 int result = cmn_CreatePathNoException(a_path.UpPath()); 00275 if (result != 0) { 00276 return result; 00277 } 00278 00279 // Create self again. This really should not fail! 00280 return cmn_CreatePathNoException(a_path); 00281 } 00282 else if (errno == EEXIST) { 00283 return 0; 00284 } 00285 else { 00286 return errno; 00287 } 00288 } 00289 }


| void IVD_CMN_DECL_d cmn_DumpDirectoryContent | ( | cmn_Path | a_path, | |
| bool | a_skipSpecial = true | |||
| ) |
Dump directory content to debug.
| a_path | path to directory | |
| a_skipSpecial | set if special files will be skipped, default true |
Definition at line 650 of file cmn_function.cpp.
References cmn_DumpDirectoryContent(), cmn_ListDir(), dbg_NORM, log_DBG_m, and log_FUNC_m.
Referenced by cmn_DumpDirectoryContent().
00650 { 00651 log_FUNC_m(cmn_DumpDirectoryContent); 00652 00653 cmn_FileInfo_t_v fileList_v; 00654 00655 cmn_ListDir(a_path, fileList_v, a_skipSpecial); 00656 00657 log_DBG_m(dbg_NORM, "Dumping content of " << 00658 a_path << 00659 fileList_v); 00660 }


| const char IVD_CMN_DECL_d* cmn_EmptyCStr | ( | ) |
Definition at line 197 of file cmn_function.cpp.
Referenced by cmn_DirLst::GetNextName(), df_RecCmn_t::GetVarDataHost(), and df_RecCmn_t::GetVarDataNet().

Definition at line 345 of file cmn_Path.cpp.
References cmn_Path::cmn_Path(), and cmn_Path::IsAbsolute().
Referenced by cmn_CreatePath(), and cmn_MoveFile().
00345 { 00346 if (a_path.IsAbsolute()) { 00347 if ( (a_path.compare(0, 4, "\\\\?\\") == 0) 00348 || (a_path.compare(0, 4, "\\\\.\\") == 0) 00349 || (a_path.compare(0, 2, "\\\\") == 0)) // other UNC path 00350 return a_path; 00351 else { 00352 return cmn_Path("\\\\?\\") + a_path; 00353 } 00354 } 00355 else { 00356 return a_path; 00357 } 00358 }


| string IVD_CMN_DECL_d cmn_GetEnvVariable | ( | const char * | a_varName | ) |
Retrieve ENV variable into a string.
Retrieve ENV variable into a string.
Arguments:
Definition at line 348 of file cmn_function.cpp.
References cmn_GetEnvVariable(), log_FUNC_A_m, and NULL.
Referenced by bea_Medium::bea_Medium(), cmn_GetEnvVariable(), bea_MicMemory::Detect(), bea_MamMemory::Detect(), df_RecReader::df_RecReader(), fs_api::fs_api(), hsm_Containers::hsm_Containers(), i_BackEndAgent_i::i_BackEndAgent_i(), i_FSC_i::i_FSC_i(), i_LibraryAgentSCSI_i::i_LibraryAgentSCSI_i(), i_PartitionManager_i::i_PartitionManager_i(), ipc_Corba::Init(), fsc_MedVolume::InitBuffer(), fsc_DataCollectorStorage::InitBuffer(), main(), bea_Volume::MustDumpFRI(), bea_RecallThread::Recall(), bea_TapeMedium::RefreshCompressionState(), scsi_IO::scsi_IO(), and i_BackEndAgent_i::UseResources().
00348 { 00349 00350 log_FUNC_A_m(cmn_GetEnvVariable, "name = " << a_varName); 00351 00352 char* variable_cstr = getenv(a_varName); 00353 00354 if (variable_cstr == NULL) { 00355 return string(""); 00356 }; 00357 00358 return string(variable_cstr); 00359 } // cmn_GetEnvVariable


| string IVD_CMN_DECL_d cmn_GetMigFlags | ( | UInt32_t | a_flags | ) |
Definition at line 325 of file cmn_function.cpp.
References ivd_ALTDATA_d, ivd_ATTR_d, ivd_DATA_d, and ivd_META_d.
Referenced by fsc_VolumeCheck::DisplayMessage(), fsc_Split::Dump(), fsc_Generation::Dump(), fsc_Copy::Dump(), i_ManagementInterface_i::FileHistory(), operator<<(), and fsc_RawMediumContentCollector::ProcRecMedPosMgr().
00325 { 00326 string ret; 00327 if (a_flags & ivd_ATTR_d) { 00328 ret += "H"; 00329 } 00330 if (a_flags & ivd_DATA_d) { 00331 ret += "D"; 00332 } 00333 if (a_flags & ivd_META_d) { 00334 ret += "M"; 00335 } 00336 if (a_flags & ivd_ALTDATA_d) { 00337 ret += "A"; 00338 } 00339 return ret; 00340 }

| string IVD_CMN_DECL_d cmn_HexDump | ( | const void * | a_buf, | |
| UInt32_t | a_size, | |||
| UInt8_t | a_num, | |||
| bool | a_txt | |||
| ) |
Hexadecimal dump of memory.
By default, 24 bytes per line without text. Optional arguments:
| a_num | Number of bytes per line - max 24 (18 if a_txt is true) | |
| a_txt | Do text dump beside hex dump |
Definition at line 244 of file cmn_function.cpp.
Referenced by fsc_nsElement::CheckLastGen(), scsi_IO::CheckStatusAndSense(), cmn_UTF8Converter::ConvertFromUTF8(), cmn_UTF8Converter::ConvertToUTF8(), fsc_nsNameMgr::Dump(), fsc_SplitStream_t::Dump(), fio_JourFile::Dump(), fio_JourFile::DumpDamagedTrans(), fsc_CopyMgr::fsc_CopyMgr(), fsc_DataL::fsc_DataL(), fsc_GenerationMgr::fsc_GenerationMgr(), fsc_SplitMgr::fsc_SplitMgr(), i_FSC_i::InsertSplitFromFRIBlock(), scsi_IO::IOCtl(), Mamdetect(), Mamrmedinfo(), Mamrvolinfo(), Mamwmedinfo(), Mamwvolinfo(), Micnote(), Micnotemap(), nsc_ScanForIVDFSRecovery(), operator<<(), fsc_SplitStream_t::Pack(), ParseBlock(), ParseDiskMediumVolume(), data_ElementStatus::ParseElemStatus(), ParseTapeMediumVolumeHeader(), bea_MicMemory::Read(), bea_MamMemory::Read(), fio_RelFile::ReadNextUnusedVectorIDX(), fsc_nsAttrStream::ReadSplitStreamFromDfStream(), bea_Volume::ReadVolInfoFromHeader(), fsc_RawUpdate::ScanAllCopy(), fsc_RawUpdate::ScanAllFileID(), fsc_RawScan::ScanAllFileID(), fsc_RawUpdate::ScanAllGeneration(), fsc_RawScan::ScanAllGeneration(), fsc_RawUpdate::ScanAllSplit(), cmn_File::SetFullPath(), scsi_IO::WaitToBecomeReady(), fsc_SplitMgr::Write2DB(), fsc_GenerationMgr::Write2DB(), and fsc_CopyMgr::Write2DB().
00244 { 00245 00246 char hexsign[] = "0123456789ABCDEF"; 00247 char line[100], *p; 00248 string dump; 00249 const UInt8_t *buf = (const UInt8_t *)a_buf; 00250 UInt32_t i, j, start; 00251 00252 if (a_num < 1 || a_num > 24) 00253 a_num = 24; 00254 if (a_txt && a_num > 18) 00255 a_num = 18; 00256 00257 start = 0; 00258 while (a_size > 0) { 00259 00260 p = line; 00261 sprintf(p, "%05d: ", start); 00262 p += 7; 00263 00264 for (i=0; i < a_num && i < a_size; i++) { 00265 *p++ = hexsign[buf[start+i] >> 4]; 00266 *p++ = hexsign[buf[start+i] & 0x0F]; 00267 *p++ = ' '; 00268 } 00269 for (j=i; j < a_num; j++) { 00270 *p++ = ' '; 00271 *p++ = ' '; 00272 *p++ = ' '; 00273 } 00274 00275 if (a_txt) { 00276 *p++ = ' '; 00277 for (i=0; i < a_num && i < a_size; i++) { 00278 *p++ = isgraph(buf[start+i]) ? buf[start+i] : '.'; 00279 } 00280 } 00281 00282 *p++ = '\n'; 00283 *p = '\0'; 00284 00285 start += i; 00286 a_size -= i; 00287 00288 dump += string(line); 00289 } 00290 00291 return dump; 00292 }

a^b
Definition at line 54 of file cmn_function.cpp.
00054 { 00055 UInt64_t p(1); 00056 for (UInt32_t i = 0; i < b; i++) { 00057 p *= a; 00058 } 00059 return p; 00060 }
a^b
Definition at line 44 of file cmn_function.cpp.
Referenced by rm_JobIdGen::GenerateNew(), data_Mode::GetPartSize(), and rm_JobIdGen::Init().
00044 { 00045 UInt32_t p(1); 00046 for (UInt32_t i = 0; i < b; i++) { 00047 p *= a; 00048 } 00049 return p; 00050 }

| bool IVD_CMN_DECL_d cmn_IsMounted | ( | cmn_Path | a_path | ) |
Check if directory is mounted.
| a_path | path to directory |
Definition at line 682 of file cmn_function.cpp.
References dbg_NORM, cmn_File::GetFileSystemID(), cmn_File::GetFullPathRef(), log_DBG_m, log_FUNC_m, cmn_Path::RemoveTrailingPathSeparator(), and cmn_Path::UpPath().
Referenced by rm_DiskBufAllocator::DetectVolumes(), and rm_DiskBuffer::ReportContent().
00682 { 00683 log_FUNC_m(IsMounted); 00684 00685 00686 a_path.RemoveTrailingPathSeparator(); 00687 cmn_File fileSystem1(a_path); 00688 string fsID1 = fileSystem1.GetFileSystemID(); 00689 00690 cmn_File fileSystem2(a_path.UpPath()); 00691 string fsID2 = fileSystem2.GetFileSystemID(); 00692 00693 log_DBG_m(dbg_NORM, fileSystem1.GetFullPathRef() << " = " << fsID1 ); 00694 log_DBG_m(dbg_NORM, fileSystem2.GetFullPathRef() << " = " << fsID2 ); 00695 return (fsID1 != fsID2); 00696 }


| bool IVD_CMN_DECL_d cmn_IsPatternMatch | ( | const string & | a_pattern, | |
| const string & | a_file, | |||
| bool | a_verify = true | |||
| ) |
Definition at line 569 of file cmn_function.cpp.
References fpattern_match(), and fpattern_matchn().
00570 { 00571 if (a_verify == false) { 00572 return (fpattern_matchn(a_pattern.c_str(), a_file.c_str()) != 0); 00573 } 00574 return (fpattern_match(a_pattern.c_str(), a_file.c_str()) != 0); 00575 }

| bool IVD_CMN_DECL_d cmn_IsPatternMatch | ( | const vector< string > & | a_pattern_v, | |
| const cmn_Path & | a_file, | |||
| bool | a_verify = true | |||
| ) |
Definition at line 559 of file cmn_function.cpp.
References cmn_IsPatternMatch().
00560 { 00561 for (UInt32_t item = 0; item < a_patterns.size(); item++) { 00562 if (cmn_IsPatternMatch(a_patterns[item], a_file, a_verify) == true) { 00563 return true; 00564 } 00565 } 00566 return false; 00567 }

| bool IVD_CMN_DECL_d cmn_IsPatternMatch | ( | const string & | a_pattern, | |
| const cmn_Path & | a_file, | |||
| bool | a_verify = true | |||
| ) |
Attempts to match pattern a_pattern to filename a_file.
Only file name will be matched. Directory path in a_file will not be considered.
| a_pattern | specifies pattern | |
| a_file | specifies filename | |
| a_verify | indicates if pattern should be verified |
Definition at line 550 of file cmn_function.cpp.
References fpattern_match(), fpattern_matchn(), and cmn_Path::GetFileName().
Referenced by MigrateTreewalk::CheckDir(), cmn_IsPatternMatch(), and IsPatternMatch().
00551 { 00552 string filename = a_file.GetFileName(); 00553 if (a_verify == false) { 00554 return (fpattern_matchn(a_pattern.c_str(), filename.c_str()) != 0); 00555 } 00556 return (fpattern_match(a_pattern.c_str(), filename.c_str()) != 0); 00557 }


| bool IVD_CMN_DECL_d cmn_IsPatternValid | ( | const string & | a_pattern | ) |
Checks that filename pattern a_pattern is a well-formed pattern.
| a_pattern | specifies pattern to check |
Definition at line 546 of file cmn_function.cpp.
References fpattern_isvalid().
Referenced by i_HSM_i::MigrateByAPI(), and val_FileNamePattern::Validate().
00546 { 00547 return (fpattern_isvalid(a_pattern.c_str()) != 0); 00548 }


| bool IVD_CMN_DECL_d cmn_IsSpecialFile | ( | cmn_Path | a_fileName, | |
| ivd_FileType_e | a_fileType = ift_UNKNOWN | |||
| ) |
Check if file is special file.
| a_fileName | File to be checked | |
| a_fileType | File type, default 0 |
Definition at line 613 of file cmn_function.cpp.
References cmn_IsSpecialFile(), cmn_IsSpecialName(), cmn_Path::GetFileName(), ift_DIR, ift_FILE, ift_UNKNOWN, and log_FUNC_m.
Referenced by i_HSM_i::ActivateFiles(), cmn_IsSpecialFile(), cmn_ListDir(), i_HSM_i::ForceMigration(), fsc_nsElement::GetFullPath(), IsNameSpecial(), and i_HSM_i::TrigEfficientRecall().
00613 { 00614 log_FUNC_m(cmn_IsSpecialFile); 00615 00616 string name = a_fileName.GetFileName(); 00617 00618 if (cmn_IsSpecialName(name)) { 00619 return true; 00620 } 00621 switch (a_type) { 00622 case ift_UNKNOWN: 00623 case ift_FILE: 00624 case ift_DIR: 00625 return false; 00626 default: 00627 return true; 00628 } 00629 }


| bool IVD_CMN_DECL_d cmn_IsSpecialName | ( | string & | a_name | ) |
Definition at line 631 of file cmn_function.cpp.
References cmn_IsSpecialName(), dbg_NORM, log_DBG_m, and log_FUNC_m.
Referenced by cmn_IsSpecialFile(), cmn_IsSpecialName(), rm_DiskBufAllocator::DetectVolumes(), and bea_DiskMedium::Refresh().
00631 { 00632 00633 if ( (a_name.compare(".") == 0) 00634 || (a_name.compare("..") == 0) 00635 || (a_name.compare("lost+found") == 0) 00636 || (a_name.compare("._nfs") == 0) 00637 || (a_name.compare(0, 1, "$") == 0) 00638 || (a_name.compare("RECYCLER") == 0) 00639 || (a_name.compare("System Volume Information") == 0) 00640 ) { 00641 log_FUNC_m(cmn_IsSpecialName); 00642 log_DBG_m(dbg_NORM, "Special name: " << a_name); 00643 return true; 00644 } 00645 else { 00646 return false; 00647 } 00648 }


| void IVD_CMN_DECL_d cmn_ListDir | ( | cmn_Path | a_path, | |
| cmn_FileInfo_t_v & | a_fileList, | |||
| bool | a_skipSpecial = true | |||
| ) |
List specified directory, and return list of files and directories in a_fileList variable.
| a_path | specifies directory to be listed | |
| a_fileList | contains list of files to be returned $param a_listAll specifies if special directories will be listed too (e.g. ".", "..", "lost+found", ...). Default: false |
Definition at line 578 of file cmn_function.cpp.
References cmn_IsSpecialFile(), cmn_ListDir(), dbg_NORM, cmn_FastDirLst::GetNextName(), log_DBG_m, log_FUNC_m, cmn_FileInfo_t::name, cmn_FileInfo_t::node, and cmn_FileInfo_t::type.
Referenced by rm_DiskBuffer::Clear(), cmn_DumpDirectoryContent(), cmn_ListDir(), rm_DiskBuffer::ReportContent(), and blk_DiskBufferWriter::Write().
00578 { 00579 log_FUNC_m(cmn_ListDir); 00580 00581 ivd_GenInode_t node; 00582 ivd_FileType_e type; 00583 string name; 00584 00585 cmn_FileInfo_t fileInfo; 00586 00587 try { 00588 cmn_FastDirLst dbList(a_path); 00589 00590 while ((name = dbList.GetNextName(node, type)) != "") { 00591 fileInfo.name = name; 00592 fileInfo.node = node; 00593 fileInfo.type = type; 00594 00595 if (cmn_IsSpecialFile(name, type)) { 00596 if (!a_skipSpecial) { 00597 a_fileList_v.push_back(fileInfo); 00598 } 00599 } 00600 else { 00601 a_fileList_v.push_back(fileInfo); 00602 } 00603 } 00604 } 00605 catch (...) { 00606 log_DBG_m(dbg_NORM, "Can not list files in directory " << 00607 a_path); 00608 a_fileList_v.clear(); 00609 //ignore 00610 } 00611 }


| string IVD_CMN_DECL_d cmn_Num2PowOfK | ( | UInt64_t | a_num | ) |
Definition at line 294 of file cmn_function.cpp.
References cmn_Num2Str().
Referenced by _tmain(), and hsm_FHmigc::DumpStatus().
00294 { 00295 const UInt64_t oneKilo_c = 1024; 00296 UInt64_t num = a_num; 00297 00298 string strUnit; 00299 00300 int range = 0; 00301 while (num >= oneKilo_c) { 00302 num >>= 10; 00303 range++; 00304 } 00305 00306 // Used K,M,G... like on linux see man df -h or ls -h option 00307 // KB, MB, GB are assumed with power of 1000 not 1024 00308 switch (range) { 00309 case 0 : break; 00310 case 1 : strUnit = "K";break; 00311 case 2 : strUnit = "M";break; 00312 case 3 : strUnit = "G";break; 00313 case 4 : strUnit = "T";break; 00314 case 5 : strUnit = "P";break; 00315 default : strUnit = "E";break; 00316 } 00317 00318 return cmn_Num2Str(num) + strUnit; 00319 }


| string IVD_CMN_DECL_d cmn_Num2Str | ( | void * | i | ) |
Definition at line 170 of file cmn_function.cpp.
00170 { 00171 char buf[44]; // enought for 128 bit numbers 00172 #if TGT_OS_linux || TGT_OS_windows 00173 sprintf(buf,"0x%p", i ); 00174 #elif TGT_OS_hpux 00175 sprintf(buf,"0x%x", i ); 00176 #endif 00177 string retval(buf); 00178 return retval; 00179 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | UInt8_t | i, | |
| bool | a_hex = false | |||
| ) |
Definition at line 158 of file cmn_function.cpp.
00158 { 00159 char buf[44]; // enought for 128 bit numbers 00160 if (a_hex) { 00161 sprintf(buf,"0x%02X", i ); 00162 } 00163 else { 00164 sprintf(buf,"%u", i ); 00165 } 00166 string retval(buf); 00167 return retval; 00168 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | UInt16_t | i, | |
| bool | a_hex = false | |||
| ) |
Definition at line 146 of file cmn_function.cpp.
00146 { 00147 char buf[44]; // enought for 128 bit numbers 00148 if (a_hex) { 00149 sprintf(buf,"0x%04X", i ); 00150 } 00151 else { 00152 sprintf(buf,"%u", i ); 00153 } 00154 string retval(buf); 00155 return retval; 00156 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | UInt32_t | i, | |
| bool | a_hex = false | |||
| ) |
Definition at line 134 of file cmn_function.cpp.
00134 { 00135 char buf[44]; // enought for 128 bit numbers 00136 if (a_hex) { 00137 sprintf(buf,"0x%08X", i ); 00138 } 00139 else { 00140 sprintf(buf,"%u", i ); 00141 } 00142 string retval(buf); 00143 return retval; 00144 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | const UInt64_t & | i, | |
| bool | a_hex = false | |||
| ) |
Definition at line 113 of file cmn_function.cpp.
00113 { 00114 char buf[44]; // enought for 128 bit numbers 00115 #if (IVD_POSIX_OS) 00116 if (a_hex) { 00117 sprintf(buf,"0x%016llX", i ); 00118 } 00119 else { 00120 sprintf(buf,"%llu", i ); 00121 } 00122 #elif (TGT_OS_windows) 00123 if (a_hex) { 00124 sprintf(buf,"0x%I64X", i ); 00125 } 00126 else { 00127 sprintf(buf,"%I64u", i ); 00128 } 00129 #endif 00130 string retval(buf); 00131 return retval; 00132 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | Int8_t | i | ) |
Definition at line 104 of file cmn_function.cpp.
00104 { 00105 char buf[44]; // enought for 128 bit numbers 00106 sprintf(buf,"%d", i ); 00107 00108 string retval(buf); 00109 return retval; 00110 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | Int16_t | i | ) |
Definition at line 96 of file cmn_function.cpp.
00096 { 00097 char buf[44]; // enought for 128 bit numbers 00098 sprintf(buf,"%d", i ); 00099 00100 string retval(buf); 00101 return retval; 00102 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | Int32_t | i | ) |
Definition at line 88 of file cmn_function.cpp.
00088 { 00089 char buf[44]; // enought for 128 bit numbers 00090 sprintf(buf,"%d", i ); 00091 00092 string retval(buf); 00093 return retval; 00094 }
| string IVD_CMN_DECL_d cmn_Num2Str | ( | const Int64_t & | i | ) |
Definition at line 75 of file cmn_function.cpp.
Referenced by val_SlotList::Add(), i_ManagementInterface_i::AddDrive(), i_ResourceManager_i::AddMajorCol(), val_SlotList::AddRange(), fsc_CopyMgr::AddSplit(), fsc_Copy::AddSplit(), df_BlockProxyWriter::Allocate(), rm_Operator::AllocateMigCollocation(), ap_Argument::ArgParse(), val_Size::Assign(), val_Duration::Assign(), i_Job_i::AssignResources(), hsm_JobListMgr::At(), hsm_JobElemVecMgr::At(), df_FRI::BlockWritten(), fio_CirFileTrans::CheckBlockChain(), fio_Transaction::CleanUp(), cmn_FastFileSearch::cmn_FastFileSearch(), cmn_Num2PowOfK(), cmn_Time::cmn_Time(), fsc_RawUpdate::CorrectGenVec(), df_BlockManager::CreateBuffer(), hsm_FileHeader::DirtyToMigCnd(), i_UIMessageServer_i::DisplayDetail(), fsc_VolumeCheck::DisplayMessage(), i_UIMessageServer_i::DisplayTable(), i_HSM_i::DoMigrationJob(), fsc_SplitStream_t::Dump(), DumpFile(), i_HSM_i::EfficientRecall(), la_SCSILibrary::EjectMedium(), hsm_FileHeader::Event(), i_RecallJob_i::Execute(), fsc_nsFSrecovery::FlushBlock(), fsc_ColectorExpFile::FlushPackage(), fsc_GenerationMgr::fsc_GenerationMgr(), mif_CfgRep::GenerateFilename(), GetAttrName(), df_Packer::GetBSData(), fio_uvListMgr::GetBunchOfVectorIDXes(), data_Mode::GetCompressionStatus(), i_FSC_i::GetCopiesPos(), fsc_Generation::GetCopiesPos(), i_Job_i::GetDiskBufferFileName(), cmn_File::GetFileSystemID(), df_BlockManager::GetFull(), fsc_nsElement::GetFullPath(), JobListMgr< T1 >::GetJobList(), bea_MicMemory::GetManufacturer(), fsc_Split::GetMediaPos(), fsc_Copy::GetMediaPos(), hsm_JobListMgr::GetMigrationID(), df_BlockScanner::GetNextRecord(), df_RecReader::GetNextRecord(), data_Mode::GetPage(), data_Mode::GetPartCount(), data_Mode::GetPartSize(), fio_CirFileTrans::GetRFIdxFromNextBlock(), fio_uvListMgr::GetVectorIDX(), df_BlockScanner::GetVolumeID(), i_MediumCheckJob_i::i_MediumCheckJob_i(), scsi_IO::InqStandard(), hsm_JobListMgr::Insert(), fsc_Generation::Insert(), val_Integer::IntPtrToStr(), i_LibraryAgentSCSI_i::Inventory(), scsi_IO::IOCtl(), ivd_GetMountPoint(), i_ManagementInterface_i::ListJob(), la_SCSILibrary::Load(), cmn_Mutex::Lock(), fsc_nsAttrStream::MergeAttributes(), hsm_FileHeader::MigCanToPreJob(), bea_MigrationThread::Migrate(), df_DataBlock::Move(), df_BlockProxyWriter::Move(), hsm_ListPos::ObjChgGoToDirty(), operator<<(), rm_String::operator=(), hsm_ListPos::operator=(), hsm_ListPos::operator==(), fsc_nsElement::Pack(), fsc_SplitStream_t::Pack(), i_HSM_i::PackFile(), PackFile(), ParseBlock(), ParseFile(), df_RecReader::PrepareDataStreamUnpacker(), bea_FRIThread::ProcessFromDataVol(), hsm_Recall::ProcRecBSStart(), hsm_IVDFSRecoverer::ProcRecBSStart(), hsm_Recall::ProcRecEmbData(), df_FRIDistiller::ProcRecFileHdr(), hsm_Recall::ProcRecRawData(), fio_RelFileTrans::PutVectorToBufferAndFlush(), la_SCSILibrary::ReadElementAssignment(), fsc_Generation::ReadMembers(), fsc_Copy::ReadMembers(), fsc_nsAttrStream::ReadSplitsFromDB(), fsc_nsAttrStream::ReadSplitStreamFromDfStream(), i_HSM_i::Recall(), bea_RecallThread::Recall(), hsm_JobListMgr::ReleaseElement(), hsm_JobElemVecMgr::ReleaseElementNoLock(), hsm_JobListMgr::ReleaseJobIdx(), hsm_JobListMgr::ReleaseJobIdxWithTest(), fsc_Split::Remove(), fsc_Generation::Remove(), fsc_Copy::Remove(), hsm_ListPos::RemoveFromList(), mif_CfgRep::ReplaceVersion(), ivd_FileSystemAPI::Run(), FSEvMgrThrd::Run(), ivd_DD::Run(), fsc_RawUpdate::ScanAllCopy(), fsc_RawScan::ScanAllCopy(), fsc_RawScan::ScanAllGeneration(), fsc_RawUpdate::ScanAllSplit(), fsc_RawScan::ScanAllSplit(), scsi_FindSenseText(), scsi_GetASCText(), scsi_GetOpcodeText(), scsi_GetSenseAdditional(), scsi_GetSenseText(), rm_MediumVol::Select(), rm_DriveHost::Select(), rm_ColMediaVol::SelectAll(), rm_MinorCol::SelectAll(), rm_Drive::SelectAll(), rm_MinorCol::SelectByMajCol(), rm_MediumVol::SelectByMajColId(), rm_MediumVol::SelectByMedium(), rm_MediumVol::SelectByPartition(), rm_Medium::SelectByPartition(), rm_Drive::SelectByStatus(), rm_ColMediaVol::SelectByVolume(), rm_MediumVol::SelectEmptyCollocation(), rm_Drive::SelectForOperation(), rm_Operator::SelectMediumForMig(), hsm_FHmigc::SendToPM(), data_Mode::SetAITMode(), df_BlockScanner::SetBlock(), data_Mode::SetCompressionStatus(), hsm_JobListMgr::SetJobStatus(), hsm_JobListMgr::SetMigJobID(), data_Mode::SetPartitions(), fio_CirFileTrans::SetRecIndeces(), i_Job_i::Start(), i_Job_i::StartBea(), fio_Transaction::StartTransaction(), fsc_Split::TreeWalk(), fsc_Generation::TreeWalk(), fsc_Copy::TreeWalk(), la_SCSILibrary::Unload(), cmn_Mutex::Unlock(), df_RecReader::Unpack(), UnpackFile(), i_HSM_i::UnPackFile(), rm_Operator::UpdateCollocation(), i_ManagementInterface_i::UpdateDrive(), i_ResourceManager_i::UpdateMajorCol(), bea_MediumMemory::UpdateMediumRecord(), df_BlockProxy::VerifiedBlock(), df_RecReader::VerifiedRecCmn(), fsc_Split::Write2DB(), fsc_Generation::Write2DB(), fsc_Copy::Write2DB(), df_Packer::WriteECMAVolHeader(), df_Packer::WriteRecBSEnd(), df_Packer::WriteRecFRISplitInfo(), and cmn_Mutex::~cmn_Mutex().
00075 { 00076 char buf[44]; // enought for 128 bit numbers 00077 #if (IVD_POSIX_OS) 00078 //#pragma set woff ISO C89 00079 sprintf(buf,"%lld", i ); 00080 #elif (TGT_OS_windows) 00081 sprintf(buf,"%I64d", i ); 00082 #endif 00083 00084 string retval(buf); 00085 return retval; 00086 }
| int cmn_NumOfOctets | ( | int | a_size | ) | [inline] |
Return the number of eight bytes length records needed to store a_size buffer.
Definition at line 198 of file cmn_function.h.
Referenced by fsc_nsDirEntryFormattedVec::Write2DB(), and fio_BasicString::Write2DB().

| void IVD_CMN_DECL_d cmn_SetEnvVariable | ( | const char * | a_varName, | |
| string & | a_varValue | |||
| ) |
Set ENV variable.
Set ENV variable.
Arguments:
Definition at line 371 of file cmn_function.cpp.
References cmn_SetEnvVariable(), errno, and log_FUNC_A_m.
Referenced by cmn_SetEnvVariable(), ipc_Corba::Init(), and main().
00371 { 00372 00373 log_FUNC_A_m(cmn_SetEnvVariable, 00374 "name=" << a_varName << ", val=" << a_varValue); 00375 00376 #if (TGT_OS_windows) 00377 // TODO: UTF-8 to UC conversion, at least for a_varValue. 00378 if (0 == SetEnvironmentVariableA(a_varName, a_varValue.c_str())) { 00379 throw ivd_SysError(GetLastError(), "SetEnvironmentVariable()"); 00380 } 00381 #elif TGT_OS_linux 00382 if (setenv(a_varName, a_varValue.c_str(), 1) == -1) { 00383 throw ivd_SysError(errno, "setenv()"); 00384 } 00385 #else 00386 // HPUX 00387 ostringstream ostr; 00388 ostr << a_varName << "=" << a_varValue; 00389 string envstr(ostr.str()); 00390 00391 // CR: Memory leak. Needs to be fixed later. 00392 00393 char *envstring = new char[envstr.length() + 1]; // memory leak 00394 envstr.copy(envstring, envstr.length()); 00395 envstring[envstr.length()] = '\0'; 00396 00397 if (putenv(envstring) != 0) { 00398 throw ivd_SysError(errno, "putenv()"); 00399 } 00400 00401 #endif 00402 } // cmn_SetEnvVariable


| void IVD_CMN_DECL_d cmn_SlashToBackSlash | ( | string & | a_path | ) |
Definition at line 227 of file cmn_function.cpp.
Referenced by df_Unpacker::ReadRecFile().
00227 { 00228 for (string::iterator i(a_path.begin()); i != a_path.end(); ++i) { 00229 if (*i == '/') { 00230 *i = '\\'; 00231 } 00232 } 00233 }

| UInt32_t IVD_CMN_DECL_d cmn_Str2Num | ( | const string & | a_str, | |
| bool | a_hex = false | |||
| ) |
Definition at line 181 of file cmn_function.cpp.
Referenced by main(), bea_Volume::MustDumpFRI(), bea_RecallThread::Recall(), and mif_CfgRep::SetLastRevNum().
00181 { 00182 UInt32_t num(0); 00183 00184 if (a_hex 00185 && a_str.length() > 2 && a_str[0] == '0' 00186 && (a_str[1] == 'x'|| a_str[1] == 'X')) { 00187 sscanf(a_str.c_str(), "%x", &num); 00188 return num; 00189 } 00190 00191 sscanf(a_str.c_str(), "%u", &num); 00192 return num; 00193 }

| string IVD_CMN_DECL_d cmn_StrLAlign | ( | const string & | str, | |
| int | a_len | |||
| ) |
Definition at line 205 of file cmn_function.cpp.
00205 { 00206 size_t l = a_len - str.length() ; 00207 if (l < 1) { 00208 return str; 00209 } 00210 else { 00211 return str + string(l, ' '); 00212 } 00213 }
| void IVD_CMN_DECL_d cmn_StrLowerCase | ( | string & | a_str | ) |
Definition at line 64 of file cmn_function.cpp.
Referenced by cmn_SysInfo::cmn_SetHostNames(), cmn_SysInfo::cmn_SysInfo(), api_Partition::LocalPath2HSM(), ipc_Corba::MangledDeviceName(), MangledHostName(), ipc_Corba::MangledHostName(), mif_ResolveHostToFQDN(), cmn_SysInfo::Read_IP_FQDN(), and val_Hostname::Validate().

| vector<string> IVD_CMN_DECL_d cmn_StrTokenize | ( | const string & | a_str, | |
| const string & | a_delims = " \f\n\r\t\v" | |||
| ) |
Tokenize string separated by defined list of delimiters (spaces by default).
Definition at line 37 of file cmn_string.cpp.
References cmn_StrTokenize(), and log_FUNC_m.
Referenced by cmn_StrTokenize(), and ivd_FS_Event::GetRootDir().
00037 { 00038 00039 log_FUNC_m(cmn_StrTokenize); 00040 00041 vector<string> retV; 00042 string::size_type begIdx, endIdx; 00043 00044 begIdx = a_str.find_first_not_of(a_delims); 00045 00046 while (begIdx != string::npos) { 00047 00048 endIdx = a_str.find_first_of(a_delims, begIdx); 00049 if (endIdx == string::npos) { 00050 endIdx = a_str.length(); 00051 } 00052 00053 retV.push_back(a_str.substr(begIdx, endIdx - begIdx)); 00054 00055 begIdx = a_str.find_first_not_of(a_delims, endIdx); 00056 } 00057 00058 return retV; 00059 }


| void IVD_CMN_DECL_d cmn_StrUpperCase | ( | string & | a_str | ) |
Definition at line 70 of file cmn_function.cpp.
Referenced by ui_Confirm::Confirm(), df_RecReader::df_RecReader(), i_BackEndAgent_i::i_BackEndAgent_i(), i_LibraryAgentSCSI_i::i_LibraryAgentSCSI_i(), bea_TapeMedium::RefreshCompressionState(), and i_BackEndAgent_i::UseResources().

| hsm_FileHeader * fs_api::CreateNewFH | ( | ivd_GenInode_t | inode, | |
| ivd_FS_Event & | a_event, | |||
| string & | name, | |||
| string & | oldName | |||
| ) | [private, inherited] |
Method for creating and initialazing File Header.
Definition at line 431 of file hsm_fs_api.cpp.
References ivd_FS_File::Close(), ivd_FS_File::e_Cache, file, g_fs_api_p, fs_api::GetDirFH(), ivd_FS_Event::GetFileID(), ivd_FS_Event::GetFileType(), ivd_FS_Event::GetOldPath(), ivd_FS_Event::GetPath(), ivd_FileSystemAPI::GetRootPath(), ivd_NULLCHK_m, log_FUNC_m, NULL, ivd_FS_File::Open(), PathListToPath(), and s_className.
Referenced by fs_api::AddGenericEvent(), fs_api::EventDataOffline(), fs_api::EventDelete(), and fs_api::EventMove().
00435 { 00436 00437 log_FUNC_m(CreateNewFH); 00438 00439 hsm_FileHeader *hsmOwnFH = NULL; 00440 hsm_FileHeader *hsmOldOwnFH = NULL; 00441 hsm_FileHeader *hsmFH = NULL; 00442 hsm_InoObj *hsmIObj = NULL; 00443 00444 //HPUX - The file needs to be opened ( to be in the kernel cache ) - except for DELETE events 00445 ivd_PathList_t pathList; 00446 a_event.GetPath(pathList); 00447 cmn_Path fileName = GetRootPath() + PathListToPath(pathList); 00448 ivd_FS_File file(*g_fs_api_p, fileName); 00449 if(!a_name.empty()){ 00450 file.Open(ivd_FS_File::e_Cache); 00451 } 00452 00453 if (pathList.size() != 0) { 00454 // GetDirFH increment reference of owner 00455 hsmOwnFH = GetDirFH(pathList, pathList.begin()); 00456 } 00457 00458 ivd_PathList_t pathOldList; 00459 a_event.GetOldPath(pathOldList); 00460 if (pathOldList.size() != 0) { 00461 // GetDirFH increment reference of owner 00462 hsmOldOwnFH = GetDirFH(pathOldList, pathOldList.begin()); 00463 } 00464 00465 //string mountPoint = a_event.GetRootDir(m_fsUUID); 00466 hsmIObj = new hsm_InoObj(a_event.GetFileType(), 00467 a_inode, 00468 a_event.GetFileID()); 00469 00470 ivd_NULLCHK_m(hsmIObj, hsm_InoObj::s_className); 00471 00472 hsmFH = new hsm_FileHeader( a_event.GetFileID(), 00473 a_name, 00474 a_oldName, 00475 hsmOwnFH, 00476 hsmOldOwnFH, 00477 hsmIObj); 00478 00479 00480 ivd_NULLCHK_m(hsmFH, hsm_FileHeader::s_className); 00481 00482 if (hsmOwnFH != NULL) { // now is used, so decrease temporary reference 00483 hsmOwnFH->DecrRef(); 00484 } 00485 if (hsmOldOwnFH != NULL) { // now is used, so decrease temporary reference 00486 hsmOldOwnFH->DecrRef(); 00487 } 00488 00489 //HPUX - Close file 00490 if(!a_name.empty()){ 00491 file.Close(); 00492 } 00493 00494 return hsmFH; 00495 }


| void ivd_Delay::Delay | ( | int | a_objNum | ) | [inherited] |
Definition at line 198 of file hsm_fs_api.cpp.
References dbg_DETAIL, evt_WARNING, ivd_USleep, log_DBG_m, log_FUNC_m, log_WriteEvent(), ivd_Delay::m_levels, ivd_Delay::m_miliSecWaitUnit, ivd_Delay::m_sleepLevel, ivd_Delay::m_step, and ivd_Delay::m_warningWritten.
Referenced by fs_api::EventDelay().
00198 { 00199 log_FUNC_m(Delay); 00200 int waitLevel = a_objNum / m_step; 00201 if (waitLevel == 0) { 00202 return; 00203 } 00204 if (waitLevel > m_levels) { 00205 if (!m_warningWritten) { 00206 ostringstream sstr; 00207 sstr << "Max level exceeded. Huge number of active files " << a_objNum 00208 << ", waitLevel=" << waitLevel 00209 << ", decreased to " << m_levels 00210 << ", step=" << m_step; 00211 00212 log_WriteEvent(evt_WARNING, sstr.str()); 00213 m_warningWritten = true; 00214 } 00215 waitLevel = m_levels; 00216 } 00217 if ( m_warningWritten 00218 && waitLevel < (m_levels / 2)) { 00219 m_warningWritten = false; 00220 } 00221 00222 int microSeconds = 1000 * m_miliSecWaitUnit * m_sleepLevel[waitLevel]; 00223 if (microSeconds) { 00224 log_DBG_m(dbg_DETAIL, "Delay for " << microSeconds << " [micro sec]" 00225 << ", objects=" << a_objNum 00226 << ", waitLevel=" << waitLevel); 00227 ivd_USleep(microSeconds); 00228 } 00229 }


| void fs_api::Destroy | ( | void | ) | [inherited] |
Definition at line 386 of file hsm_fs_api.cpp.
References g_hsmDB_p, fs_api::m_initialized, fs_api::m_trans_p, and fio_DataBase::ReleaseTransObj().
Referenced by main().
00386 { 00387 if (m_initialized) { 00388 // release transaction 00389 g_hsmDB_p->ReleaseTransObj(*m_trans_p); 00390 m_initialized = false; 00391 } 00392 }


| void fs_api::DismissFH | ( | hsm_FileHeader * | a_hsmFH, | |
| ivd_GenInode_t | a_inode | |||
| ) | [private, inherited] |
This methods decrements File Header reference and unlocks it.
Definition at line 501 of file hsm_fs_api.cpp.
References hsm_FileHeader::DecrRef(), g_hsm_fhLock, and log_FUNC_m.
Referenced by fs_api::AddGenericEvent(), fs_api::EventDataOffline(), and fs_api::EventMove().
00501 { 00502 00503 log_FUNC_m(DismissFH); 00504 00505 // GetFH and constructor increase ref automaticaly, 00506 // to prevent others to dereference FH before is handled in Event method 00507 a_hsmFH->DecrRef(); 00508 00509 g_hsm_fhLock.UnLockByID(a_inode); 00510 }


| void ivd_FileSystemAPI::DumpState | ( | ivd_FSInfo_t & | fsInfo | ) | [inherited] |
| virtual void ivd_FileSystemAPI::EventAltdataChange | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| void fs_api::EventAttributeChange | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 987 of file hsm_fs_api.cpp.
References fs_api::AddGenericEvent(), fs_api::eChgAttr, and log_FUNC_m.
00987 { 00988 log_FUNC_m(EventAttributeChange); 00989 AddGenericEvent(a_evt, eChgAttr); 00990 }

| virtual void ivd_FileSystemAPI::EventAttributeChange | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 184 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| virtual void ivd_FileSystemAPI::EventCancelRequest | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| void fs_api::EventCreate | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 977 of file hsm_fs_api.cpp.
References fs_api::AddGenericEvent(), fs_api::eCreate, and log_FUNC_m.
00977 { 00978 log_FUNC_m(EventCreate); 00979 AddGenericEvent(a_evt, eCreate); 00980 }

| virtual void ivd_FileSystemAPI::EventCreate | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 176 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| void fs_api::EventDataChange | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 982 of file hsm_fs_api.cpp.
References fs_api::AddGenericEvent(), fs_api::eChgData, and log_FUNC_m.
00982 { 00983 log_FUNC_m(EvenDataChanged); 00984 AddGenericEvent(a_evt, eChgData); 00985 }

| virtual void ivd_FileSystemAPI::EventDataChange | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 183 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| void fs_api::EventDataOffline | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 952 of file hsm_fs_api.cpp.
References fs_api::CreateNewFH(), fs_api::DismissFH(), fs_api::FindAndPrepareFH(), g_hsm_FHCache_p, GetFHIdentify(), ivd_FS_Event::GetPath(), hsm_FHcache::Insert(), log_FUNC_m, and NULL.
00952 { 00953 log_FUNC_m(EventDataOffline); 00954 00955 ivd_PathList_t pathList; 00956 ivd_GenInode_t inode; 00957 string name; 00958 ivd_GenInode_t ownInode = 0; 00959 hsm_FileHeader *hsmFH = NULL; 00960 string oldName; 00961 00962 a_evt.GetPath(pathList); 00963 GetFHIdentify(pathList, pathList.begin(), inode, name, ownInode); 00964 00965 hsmFH = FindAndPrepareFH(inode); 00966 00967 if (hsmFH == NULL){ 00968 hsmFH = CreateNewFH(inode, a_evt, name, oldName); 00969 // reference decrement of owners is perform in constructor 00970 g_hsm_FHCache_p->Insert(hsmFH); 00971 } 00972 00973 hsmFH->EventOffline(a_evt); 00974 DismissFH(hsmFH, inode); 00975 }

| void ivd_FileSystemAPI::EventDataOffline | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented in fs_api.
Definition at line 357 of file hpux/ivd_fs_api.cpp.
References HSM_ERR_REPLY_d, log_FUNC_m, and ivd_FS_Event::ReplySyncEvent().
Referenced by ivd_FileSystemAPI::Run().
00357 { 00358 log_FUNC_m(EventDataOffline); 00359 a_evt.ReplySyncEvent(HSM_ERR_REPLY_d); 00360 }


| void fs_api::EventDelay | ( | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 691 of file hsm_fs_api.cpp.
References ivd_Delay::Delay(), fhObjCount_g, fhObjCount_x_g, log_FUNC_m, and fs_api::m_eventRateRegulation.
00691 { 00692 log_FUNC_m(EventDelay); 00693 int obj; 00694 { 00695 cmn_MutexLock l(fhObjCount_x_g); 00696 obj = fhObjCount_g; 00697 } 00698 m_eventRateRegulation.Delay(obj); 00699 }

| virtual void ivd_FileSystemAPI::EventDelay | ( | ) | [inline, virtual, inherited] |
| void fs_api::EventDelete | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 815 of file hsm_fs_api.cpp.
References fs_api::CreateNewFH(), hsm_FileHeader::DecrRef(), fs_api::eDelFile, hsm_FileHeader::Event(), fs_api::FindAndPrepareFH(), g_hsm_FHCache_p, g_hsm_fhLock, ivd_FS_Event::GetFileID(), GetIdentify(), ivd_FS_Event::GetOldPathName(), hsm_FHcache::Insert(), log_FUNC_m, fs_api::m_trans_p, and NULL.
00815 { 00816 log_FUNC_m(EventDelete); 00817 00818 ivd_GenInode_t inode; 00819 string name; 00820 ivd_GenInode_t ownInode = 0; 00821 string oldName; 00822 cmn_Path movedFrom = a_evt.GetOldPathName(); 00823 ivd_GenInode_t oldOwnInode = 0; 00824 hsm_FileHeader *hsmFH = NULL; 00825 00826 GetIdentify(a_evt, true, inode, name, ownInode, oldName, oldOwnInode); 00827 00828 hsmFH = FindAndPrepareFH(inode); 00829 00830 // Write FileID to log so it can be latter used for ivdfile --recall 00831 // g_fsLog.Write(a_evt.GetFileID(), 0, a_evt.GetOldPathName(), "Deleted."); 00832 00833 if (hsmFH == NULL){ 00834 if (a_evt.GetFileID() == 0){ 00835 goto unlock; 00836 // g_hsm_fhLock.UnLockByID(inode); 00837 // return; 00838 } 00839 00840 hsmFH = CreateNewFH(inode, a_evt, name, oldName); 00841 // reference decrement of owners is perform in constructor 00842 g_hsm_FHCache_p->Insert(hsmFH); 00843 } 00844 00847 hsmFH->Event(eDelFile, *m_trans_p, &movedFrom); 00848 00849 // GetFH and constructor increase ref automaticaly, 00850 // to prevent others to dereference FH before is handled in Event method 00851 hsmFH->DecrRef(); 00852 00853 unlock: 00854 g_hsm_fhLock.UnLockByID(inode); 00855 }

| virtual void ivd_FileSystemAPI::EventDelete | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 177 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| void fs_api::EventDismounted | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 804 of file hsm_fs_api.cpp.
References ClientConf_t::CfgPartitionName, dbg_DETAIL, g_clientConf_p, ivd_FS_Event::GetVolumeID(), log_DBG_m, log_FUNC_m, and log_WriteEvent().
00804 { 00805 log_FUNC_m(EventDismounted); 00806 00807 ostringstream sstr; 00808 sstr << "Unmounted file system " << a_evt.GetVolumeID() 00809 << " on HSM partition " << g_clientConf_p->CfgPartitionName 00810 << "."; 00811 log_WriteEvent(sstr.str()); 00812 log_DBG_m(dbg_DETAIL, "Event_UnMount. HSM will GO_DOWN"); 00813 }

| virtual void ivd_FileSystemAPI::EventDismounted | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 174 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| virtual void ivd_FileSystemAPI::EventLogMessage | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| virtual void ivd_FileSystemAPI::EventMetadataChange | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| void fs_api::EventMounted | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 702 of file hsm_fs_api.cpp.
References hsm_ActiveFH::ActiveToList(), ClientConf_t::CfgOperationMode, ClientConf_t::CfgPartitionName, ClientConf_t::CfgRecallOnly, ClientConf_t::CfgRecallTimeOut, ClientConf_t::CfgWORMTimeout, log_EventLog::ChangeQualifier(), CheckRootMembersForEA(), dbg_DETAIL, dbg_LOW, dbg_NORM, e_Regular, e_RegularRecallOnly, e_WORM, e_WORMRecallOnly, g_clientConf_p, g_hsm_activeList_p, g_iPM, g_partitionFSID, hsm_MigByAPI::GetAPIMode(), ivd_FileSystemAPI::GetConfiguration(), i_HSM_i::GetLastFscFileID(), ivd_FS_Event::GetRootDir(), ivd_FileSystemAPI::GetRootPath(), ivd_FS_Event::GetVolumeID(), i_FST_WORM, ie_HSM_INVPATH, ivd_Error, log_DBG_m, log_FUNC_m, log_WriteEvent(), fs_api::m_fsUUID, fs_api::m_pCont, fs_api::m_peLog, fs_api::m_pIHSM, ivd_FS_Cfg_t::operationMode, ivd_FileSystemAPI::SetConfiguration(), i_HSM_i::SetReady(), ivd_FileSystemAPI::SetRootPath(), hsm_Containers::Start(), ivd_FS_Cfg_t::syncEventTimeout, and ivd_FS_Cfg_t::WORMTimeout.
00702 { 00703 log_FUNC_m(EventMounted); 00704 00705 //TODO:Check event status 00706 00707 log_DBG_m(dbg_DETAIL, " Event Manager to get Root properties"); 00708 SetRootPath(a_evt.GetRootDir(m_fsUUID)); 00709 00710 if (GetRootPath().empty()) { 00711 throw ivd_Error(ie_HSM_INVPATH, "Can not get mount point"); 00712 } 00713 00714 log_DBG_m(dbg_DETAIL, " Event Manager got Root properties: mount point: " 00715 << GetRootPath()); 00716 00717 string vol = m_fsUUID; 00718 string mountPnt = GetRootPath(); 00719 log_WriteEvent("Mounting " 00720 + vol 00721 + " on " 00722 + mountPnt, 00723 "", 0, ""); 00724 00725 ivd_FS_Cfg_t cfg; 00726 GetConfiguration(cfg); 00727 cfg.syncEventTimeout = g_clientConf_p->CfgRecallTimeOut; 00728 if (i_FST_WORM == g_clientConf_p->CfgOperationMode) { 00729 if (g_clientConf_p->CfgRecallOnly) { 00730 cfg.operationMode = e_WORMRecallOnly; 00731 log_DBG_m(dbg_NORM, "RecallOnly set!"); 00732 } 00733 else { 00734 cfg.operationMode = e_WORM; 00735 } 00736 cfg.WORMTimeout = g_clientConf_p->CfgWORMTimeout; 00737 } 00738 else { 00739 if (g_clientConf_p->CfgRecallOnly) { 00740 cfg.operationMode = e_RegularRecallOnly; 00741 log_DBG_m(dbg_NORM, "RecallOnly set!"); 00742 } 00743 else { 00744 cfg.operationMode = e_Regular; 00745 } 00746 cfg.WORMTimeout = 0; 00747 } 00748 SetConfiguration(cfg); 00749 00750 m_peLog->ChangeQualifier(GetRootPath()); 00751 { 00752 ostringstream sstr; 00753 sstr << "Mounted file system " << m_fsUUID 00754 << " on HSM partition " << g_clientConf_p->CfgPartitionName 00755 << "." 00756 << " Max FileID from FSC:" << m_pIHSM->GetLastFscFileID(); 00757 log_WriteEvent(sstr.str()); 00758 } 00759 00760 if (m_pIHSM->GetLastFscFileID() == 0) { 00761 // Brand new partition 00762 // check at least root members to not have EA with (fileID > 0), bug 3965 00763 CheckRootMembersForEA(*this); 00764 } 00765 00766 00767 if (g_mig.GetAPIMode()) { 00768 log_WriteEvent("Recall only mode: Active entries from HSM DB not read."); 00769 } 00770 else { 00771 log_WriteEvent("Started reading active entries from HSM DB."); 00772 log_DBG_m(dbg_LOW, "Read active"); 00773 g_hsm_activeList_p->ActiveToList(vol); 00774 log_WriteEvent("Finished reading active entries from HSM DB."); 00775 } 00776 00777 log_DBG_m(dbg_LOW, "Send Partition ID to PM for CORBA NS registration"); 00778 g_iPM->RegisterFSID(a_evt.GetVolumeID().c_str()); 00779 g_partitionFSID = a_evt.GetVolumeID(); 00780 00781 log_DBG_m(dbg_LOW, "START threads"); 00782 m_pCont->Start(); 00783 00784 log_DBG_m(dbg_LOW, "HSM is prepared to catch events."); 00785 00786 m_pIHSM->SetReady(true); 00787 }

| virtual void ivd_FileSystemAPI::EventMounted | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 166 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| void ivd_FileSystemAPI::EventMountRequest | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Definition at line 352 of file hpux/ivd_fs_api.cpp.
References HSM_ERR_REPLY_d, log_FUNC_m, and ivd_FS_Event::ReplySyncEvent().
00352 { 00353 log_FUNC_m(EventMountRequest); 00354 a_evt.ReplySyncEvent(HSM_ERR_REPLY_d); 00355 }

| void fs_api::EventMove | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 857 of file hsm_fs_api.cpp.
References fs_api::CreateNewFH(), dbg_DETAIL, hsm_FileHeader::DecrRef(), fs_api::DismissFH(), fs_api::eChgNameOwn, hsm_FileHeader::Event(), fs_api::FindAndPrepareFH(), g_hsm_FHCache_p, fs_api::GetDirFH(), GetIdentify(), hsm_FileHeader::GetOldFullPath(), ivd_FS_Event::GetOldPathName(), ivd_FS_Event::GetPath(), hsm_FHcache::Insert(), IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, log_WRN_m, fs_api::m_trans_p, hsm_FileHeader::MakePath(), hsm_FileHeader::NewName(), hsm_FileHeader::NewOwner(), and NULL.
00857 { 00858 log_FUNC_m(EventMove); 00859 00860 ivd_GenInode_t inode; 00861 string name; 00862 ivd_GenInode_t ownInode = 0; 00863 string oldName; 00864 cmn_Path movedFrom = a_evt.GetOldPathName(); 00865 ivd_GenInode_t oldOwnInode = 0; 00866 bool changeName = false; 00867 bool changeOwner = false; 00868 hsm_FileHeader *hsmFH = NULL; 00869 ivd_PathList_t pathList; 00870 00871 // exist two different change name event 00872 // one is from create and other from mv operation 00873 // create file must be handled little different 00874 GetIdentify(a_evt, false, inode, name, ownInode, oldName, oldOwnInode); 00875 00876 changeName = name != oldName; 00877 changeOwner = ownInode != oldOwnInode; 00878 00879 if (changeName && !changeOwner) { 00880 log_DBG_m(dbg_DETAIL, " Changed name not owner " << 00881 IVD_PRINT_ID_FS(inode) << 00882 " name " << name << 00883 " old name " << oldName << 00884 " owner " << IVD_PRINT_ID_FS(ownInode) << 00885 " old owner " << IVD_PRINT_ID_FS(oldOwnInode)); 00886 } 00887 else if (!changeName && changeOwner) { 00888 log_DBG_m(dbg_DETAIL, " Changed owner not name " << 00889 IVD_PRINT_ID_FS(inode) << 00890 " name " << name << 00891 " old name " << oldName << 00892 " owner " << IVD_PRINT_ID_FS(ownInode) << 00893 " old owner " << IVD_PRINT_ID_FS(oldOwnInode)); 00894 } 00895 else if (changeName && changeOwner) { 00896 log_DBG_m(dbg_DETAIL, " Changed owner and name " << 00897 IVD_PRINT_ID_FS(inode) << 00898 " name " << name << 00899 " old name " << oldName << 00900 " owner " << IVD_PRINT_ID_FS(ownInode) << 00901 " old owner " << IVD_PRINT_ID_FS(oldOwnInode)); 00902 } 00903 else { 00904 log_WRN_m(" Change event anounce, but nothing is changed: inode " << 00905 IVD_PRINT_ID_FS(inode) << 00906 " name " << name << 00907 " old name " << oldName << 00908 " owner " << IVD_PRINT_ID_FS(ownInode) << 00909 " old owner " << IVD_PRINT_ID_FS(oldOwnInode)); 00910 return; 00911 // nothing is changed 00912 } 00913 00914 hsmFH = FindAndPrepareFH(inode); 00915 00916 if (hsmFH == NULL){ 00917 hsmFH = CreateNewFH(inode, a_evt, name, oldName); 00918 log_DBG_m(dbg_DETAIL, "Create FH." << IVD_PRINT_ID_FS(inode) 00919 << " path " << hsmFH->MakePath() 00920 << " old path " << hsmFH->GetOldFullPath()); 00921 00922 // reference decrement of owners is perform in constructor 00923 g_hsm_FHCache_p->Insert(hsmFH); 00924 } 00925 else { // if (hsmFH == NULL) 00926 log_DBG_m(dbg_DETAIL, "Got from cache " << IVD_PRINT_ID_FS(inode)); 00927 // Fh got from cache then old values are there 00928 hsmFH->NewName(name); 00929 00930 hsm_FileHeader *hsmOwnFH; 00931 // GetDirFH increment reference of owner 00932 a_evt.GetPath(pathList); 00933 hsmOwnFH = GetDirFH(pathList, pathList.begin()); 00934 00935 // newOwner doesn't change oldpath if is already changed 00936 hsmFH->NewOwner(hsmOwnFH); 00937 // decrement reference after assign 00938 if (hsmOwnFH != NULL) { 00939 hsmOwnFH->DecrRef(); 00940 } 00941 } // if (hsmFH == NULL) 00942 log_DBG_m(dbg_DETAIL, "Change move/rename." 00943 << " path " << hsmFH->MakePath() 00944 << " old path " << hsmFH->GetOldFullPath() 00945 << " moved from " << movedFrom ); 00946 00947 hsmFH->Event(eChgNameOwn, *m_trans_p, &movedFrom); 00948 00949 DismissFH(hsmFH, inode); 00950 }

| virtual void ivd_FileSystemAPI::EventMove | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
Reimplemented in fs_api.
Definition at line 179 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::Run().

| virtual void ivd_FileSystemAPI::EventPreDelete | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| void fs_api::EventPredismount | ( | ivd_FS_Event & | a_evt | ) | [virtual, inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 789 of file hsm_fs_api.cpp.
References dbg_DETAIL, ivd_FS_Event::GetVolumeID(), ivd_FS_OK_Reply, log_DBG_m, log_FUNC_m, log_WriteEvent(), and ivd_FS_Event::ReplySyncEvent().
00789 { 00790 log_FUNC_m(EventPredismount); 00791 00792 ostringstream sstr; 00793 sstr << "PreUnmount file system " << a_evt.GetVolumeID() << "."; 00794 log_WriteEvent(sstr.str()); 00795 log_DBG_m(dbg_DETAIL, "Event_PreUnMount."); 00796 00797 // Put here whatever ops need to be executed before volume is dimounted. 00798 00799 // It is sync predismount event. 00800 // Note: Allways return success, can't fail dismount. 00801 a_evt.ReplySyncEvent(ivd_FS_OK_Reply); 00802 }

| virtual void ivd_FileSystemAPI::EventPredismount | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| virtual void ivd_FileSystemAPI::EventQueueEmpty | ( | ivd_FS_Event & | ) | [inline, virtual, inherited] |
| void ivd_Delay::Fibonacci | ( | ) | [private, inherited] |
Definition at line 232 of file hsm_fs_api.cpp.
References log_FUNC_m, ivd_Delay::m_levels, ivd_Delay::m_maxMiliSecWait, ivd_Delay::m_maxNumOfLevels_c, ivd_Delay::m_miliSecWaitUnit, and ivd_Delay::m_sleepLevel.
Referenced by ivd_Delay::SetProperties().
00232 { 00233 log_FUNC_m(Fibonacci); 00234 m_sleepLevel[0] = 0; 00235 m_sleepLevel[1] = 1; 00236 m_levels = 1; 00237 int *p1 = &m_sleepLevel[0]; 00238 int *p2 = &m_sleepLevel[1]; 00239 int *pe = &m_sleepLevel[m_maxNumOfLevels_c - 1]; 00240 int maxFaktor = m_maxMiliSecWait / m_miliSecWaitUnit; 00241 int f; 00242 do { 00243 f = *p1 + *p2; 00244 p1++; 00245 p2++; 00246 m_levels++; 00247 *p2 = f; 00248 } while ( f < maxFaktor 00249 && p2 < pe); 00250 }

| hsm_FileHeader * fs_api::FindAndPrepareFH | ( | ivd_GenInode_t | inode | ) | [private, inherited] |
This methods tries to find File Header and lock it.
Definition at line 398 of file hsm_fs_api.cpp.
References eDoMigAbort, eDoMigStart, g_hsm_FHCache_p, g_hsm_fhLock, hsm_FileHeader::GetDataMigStat(), hsm_FHcache::GetFH(), IVD_PRINT_ID_FS, ivd_USleep, log_FUNC_m, log_WRN_m, NULL, and hsm_FileHeader::SetDataMigStat().
Referenced by fs_api::AddGenericEvent(), fs_api::EventDataOffline(), fs_api::EventDelete(), and fs_api::EventMove().
00398 { 00399 00400 log_FUNC_m(FindAndPrepareFH); 00401 00402 hsm_FileHeader *hsmFH = NULL; 00403 // fix bug 491 00404 // first try to lock FH. if looked and migration is in progress 00405 // then set willing to abort migration. To get scope quick. 00406 if (!g_hsm_fhLock.CanLockByID(inode)) { 00407 hsmFH = g_hsm_FHCache_p->GetFH(inode); 00408 if (hsmFH != NULL) { 00409 ivd_USleep(1000); // sleep one mili seconds for synchronization 00410 if (hsmFH->GetDataMigStat() == eDoMigStart) { 00411 hsmFH->SetDataMigStat(eDoMigAbort); 00412 } 00413 } 00414 else { 00415 log_WRN_m("Inode is locked but not in cache. " 00416 "Possible when it was just removed. " << IVD_PRINT_ID_FS(inode)); 00417 00418 } 00419 g_hsm_fhLock.LockByID(inode); 00420 } 00421 00422 if (hsmFH == NULL) { // maybe found when locked 00423 hsmFH = g_hsm_FHCache_p->GetFH(inode); 00424 } 00425 return hsmFH; 00426 }


| fs_api::fs_api | ( | string & | a_dev, | |
| string & | a_fsUUID, | |||
| i_HSM_i * | a_pIHSM, | |||
| hsm_Containers * | a_pCont, | |||
| log_EventLog * | a_peLog | |||
| ) | [inherited] |
Definition at line 349 of file hsm_fs_api.cpp.
References ClientConf_t::CfgMaxNumFiles, cmn_GetEnvVariable(), g_clientConf_p, log_FUNC_m, fs_api::m_eventRateRegulation, and ivd_Delay::SetProperties().
00352 : 00353 00354 ivd_FileSystemAPI(a_dev, true), 00355 m_fsUUID(a_fsUUID), 00356 m_pIHSM(a_pIHSM), 00357 m_pCont(a_pCont), 00358 m_peLog(a_peLog), 00359 m_initialized(false), 00360 m_trans_p(NULL) 00361 { 00362 log_FUNC_m(fs_api); 00363 string eventPolicy = cmn_GetEnvVariable("HSM_EVENT_RATE_POLICY"); 00364 if (eventPolicy.empty()) { 00365 // step , max mili sec wait, mili sec wait unit 00366 m_eventRateRegulation.SetProperties(g_clientConf_p->CfgMaxNumFiles * 4, 10000, 1); 00367 } 00368 else { 00369 m_eventRateRegulation.SetProperties(eventPolicy); 00370 } 00371 }

| fsc_nsAttrMgr* fsc_nsCreateAttribObj | ( | UInt8_t | a_flags, | |
| UInt8_t | a_size, | |||
| ivd_RecordIDX_t | a_idx | |||
| ) |
| IVD_FSC_DECL_d fsc_nsDirectory* fsc_nsCreateDirectoryObj | ( | ivd_RecordIDX_t | a_fileID, | |
| fsc_nsElement_t & | a_el | |||
| ) |
| IVD_FSC_DECL_d fsc_nsDirectory* fsc_nsCreateDirectoryObj | ( | ivd_RecordIDX_t | a_fileID | ) |
Definition at line 39 of file fsc_nsElementMgr.cpp.
References dbg_DETAIL, fsc_nsCreateDirectoryObj(), g_nsDirCache, stx_CacheArrayOfRefEl< _MaxCacheSize >::Get(), stx_CacheArrayOfRefEl< _MaxCacheSize >::Insert(), log_DBG_m, log_FUNC_m, and NULL.
Referenced by fsc_nsOwnerMgr::ChgOwner(), and fsc_nsCreateDirectoryObj().
00039 { 00040 log_FUNC_m(fsc_nsCreateDirectoryObj(fileID)); 00041 00042 fsc_nsDirectory *dir_p = static_cast<fsc_nsDirectory*>(g_nsDirCache.Get(a_fileID)); 00043 if (dir_p == NULL) { 00044 dir_p = new fsc_nsDirectory(a_fileID); 00045 g_nsDirCache.Insert(dir_p); 00046 log_DBG_m(dbg_DETAIL, "DirectoryObj is not in cache. Make it. fileID = " 00047 << a_fileID 00048 << " pointer " << dir_p 00049 << " refNumber = " 00050 << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber()); 00051 } 00052 else { 00053 log_DBG_m(dbg_DETAIL, "DirectoryObj found in cache. fileID = " 00054 << a_fileID 00055 << " pointer " << dir_p); 00056 } 00057 00058 return dir_p; 00059 }


| IVD_FSC_DECL_d fsc_nsElement* fsc_nsCreateElementObj | ( | ivd_RecordIDX_t | a_fileID, | |
| nse_Opentype_e | a_openType = nse_STANDARD | |||
| ) |
Definition at line 96 of file fsc_nsElementMgr.cpp.
References dbg_DETAIL, fsc_nsCreateElementObj(), g_nsDirCache, stx_CacheArrayOfRefEl< _MaxCacheSize >::Get(), stx_CacheArrayOfRefEl< _MaxCacheSize >::Insert(), log_DBG_m, log_FUNC_m, fsc_nsElement_t::memberIdx, and NULL.
00097 { 00098 log_FUNC_m(fsc_nsCreateElementObj); 00099 00100 // check if is in directory cache 00101 fsc_nsDirectory *dir_p = static_cast<fsc_nsDirectory*>(g_nsDirCache.Get(a_fileID)); 00102 if (dir_p != NULL) { 00103 log_DBG_m(dbg_DETAIL, "Got in cache. refNumber = " 00104 << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber()); 00105 return dir_p; 00106 } 00107 00108 fsc_nsElement_t el(a_fileID); 00109 if (el.memberIdx > 0) { // is a directory 00110 dir_p = new fsc_nsDirectory(a_fileID, el, a_openType); 00111 g_nsDirCache.Insert(dir_p); 00112 log_DBG_m(dbg_DETAIL, "DirectoryObj is not in cache. Make it. fileID = " 00113 << a_fileID 00114 << " pointer " << dir_p 00115 << " refNumber = " 00116 << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber()); 00117 return dir_p; 00118 } 00119 else { 00120 fsc_nsElement *file_p = new fsc_nsElement(a_fileID, el, a_openType); 00121 log_DBG_m(dbg_DETAIL, "ElementObj fileID = " 00122 << a_fileID 00123 << " pointer " << file_p); 00124 return file_p; 00125 } 00126 }

| IVD_FSC_DECL_d fsc_nsElement* fsc_nsCreateElementObj | ( | ivd_RecordIDX_t | a_fileID, | |
| bool | a_isDirectory | |||
| ) |
use at inser split where already know the file type
Definition at line 63 of file fsc_nsElementMgr.cpp.
References dbg_DETAIL, fsc_nsCreateElementObj(), g_nsDirCache, stx_CacheArrayOfRefEl< _MaxCacheSize >::Get(), stx_CacheArrayOfRefEl< _MaxCacheSize >::Insert(), log_DBG_m, log_FUNC_m, and NULL.
Referenced by fsc_VolumeCheck::Check(), fsc_DataL::CheckLastGen(), fsc_DataL::Dump(), fsc_DataL::fsc_DataL(), fsc_nsCreateElementObj(), fsc_DataL::GetCopiesPos(), fsc_DataL::GetFullPath(), fsc_DataL::Insert(), fsc_RawMedVolPathCollector::ProcRecMedPosMgr(), fsc_RawMediumContentCollector::ProcRecMedPosMgr(), and fsc_DataL::Remove().
00064 { 00065 log_FUNC_m(fsc_nsCreateElementObj(bool)); 00066 if (a_isDirectory) { 00067 fsc_nsDirectory *dir_p = static_cast<fsc_nsDirectory*>(g_nsDirCache.Get(a_fileID)); 00068 if (dir_p != NULL) { 00069 log_DBG_m(dbg_DETAIL, "DirectoryObj found in cache. fileID = " 00070 << a_fileID 00071 << " pointer " << dir_p 00072 << " refNumber = " 00073 << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber()); 00074 return dir_p; 00075 } 00076 dir_p = new fsc_nsDirectory(a_fileID); 00077 g_nsDirCache.Insert(dir_p); 00078 log_DBG_m(dbg_DETAIL, "DirectoryObj is not in cache. Make it. fileID = " 00079 << a_fileID 00080 << " pointer " << dir_p 00081 << " refNumber = " 00082 << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber()); 00083 return dir_p; 00084 } 00085 else { 00086 fsc_nsElement *file_p = new fsc_nsElement(a_fileID); 00087 log_DBG_m(dbg_DETAIL, "ElementObj fileID = " 00088 << a_fileID 00089 << " pointer " << file_p); 00090 return file_p; 00091 } 00092 }


| fsc_nsNameMgr* fsc_nsCreateNameObj | ( | UInt8_t | a_size, | |
| ivd_RecordIDX_t | a_idx | |||
| ) |
Definition at line 59 of file fsc_nsElement.cpp.
References fsc_nsCreateNameObj(), and log_FUNC_m.
Referenced by fsc_nsElement::CheckLastGen(), fsc_nsElement::ChgName(), fsc_nsElement::Dump(), fsc_nsCreateNameObj(), fsc_nsElement::GetFullPath(), and fsc_nsElement::InsertSplit().
00059 { 00060 log_FUNC_m(fsc_nsCreateNameObj); 00061 return new fsc_nsNameMgr(a_size, a_idx); 00062 }


| fsc_nsOwnerMgr* fsc_nsCreateOwnerMgrObj | ( | ivd_RecordIDX_t | a_ownerFileID | ) |
Definition at line 45 of file fsc_nsElement.cpp.
References log_FUNC_m.
Referenced by fsc_nsElement::ChgOwner(), fsc_nsElement::fsc_nsElement(), fsc_nsElement::GetFullPath(), and fsc_nsElement::SetMemOfOwner().
00045 { 00046 log_FUNC_m(fsc_nsCreateOwnMemObj); 00047 return new fsc_nsOwnerMgr(a_ownerFileID); 00048 }

| IVD_FSC_DECL_d void fsc_nsRemoveElementObj | ( | fsc_nsElement * | a_dir_p | ) |
Definition at line 130 of file fsc_nsElementMgr.cpp.
References dbg_DETAIL, fsc_nsRemoveElementObj(), g_nsDirCache, fsc_nsElement::GetFileID(), fsc_nsElement::IsDirectory(), log_DBG_m, log_FUNC_m, and stx_CacheArrayOfRefEl< _MaxCacheSize >::RemoveEl().
Referenced by fsc_VolumeCheck::Check(), fsc_nsRemoveElementObj(), fsc_RawMedVolPathCollector::ProcRecMedPosMgr(), fsc_RawMediumContentCollector::ProcRecMedPosMgr(), fsc_DataL::~fsc_DataL(), and fsc_nsOwnerMgr::~fsc_nsOwnerMgr().
00130 { 00131 log_FUNC_m(fsc_nsRemoveElementObj); 00132 //log_DBG_m(dbg_DETAIL, "Remove element " << a_nsElement_p); 00133 //log_DBG_m(dbg_DETAIL, "Remove's fileID = " << a_nsElement_p->GetFileID()); 00134 00135 if (a_nsElement_p->IsDirectory()) { 00136 log_DBG_m(dbg_DETAIL, "Remove's fileID = " << a_nsElement_p->GetFileID() 00137 << " pointer " << a_nsElement_p 00138 << " refNumber = " 00139 << static_cast<fsc_nsDirectory*>(a_nsElement_p)->GetRefNumber()); 00140 g_nsDirCache.RemoveEl(static_cast<fsc_nsDirectory*>(a_nsElement_p)); 00141 } 00142 else { 00143 // log_DBG_m(dbg_DETAIL, "File element just delete."); 00144 delete a_nsElement_p; 00145 } 00146 }


| UInt32_t IVD_FSAPI_DECL_d GetAllOwnersAndIDs | ( | ivd_FileHandle_t | , | |
| ivd_PathList_t & | ||||
| ) |
| string IVD_DF_DECL_d GetAttrName | ( | df_AttrType_e | a_at | ) |
Definition at line 68 of file df_SplitInfo.cpp.
References at_EA, at_LINK, at_OBJID, at_PROPERTY, at_REPARSE, at_SECURITY, at_SPARSE, cmn_Num2Str(), ie_DATA_CORRUPTION, stn_WIN_EA, stn_WIN_LINK, stn_WIN_OBJID, stn_WIN_PROPERTY, stn_WIN_REPARSE, stn_WIN_SECURITY, and stn_WIN_SPARSE.
Referenced by fsc_SplitStream_t::Dump(), and fsc_SplitStream_t::Pack().
00068 { 00069 switch (a_at) { 00070 case at_SECURITY : return stn_WIN_SECURITY; 00071 case at_EA : return stn_WIN_EA; 00072 case at_LINK : return stn_WIN_LINK; 00073 case at_OBJID : return stn_WIN_OBJID; 00074 case at_PROPERTY : return stn_WIN_PROPERTY; 00075 case at_REPARSE : return stn_WIN_REPARSE; 00076 case at_SPARSE : return stn_WIN_SPARSE; 00077 default : 00078 throw ivd_InternalError(ie_DATA_CORRUPTION, 00079 "Stream type'" + cmn_Num2Str(int(a_at)) 00080 + "' is not known by NSC. Update GetAttrName() helper function in df_SplitInfo.cpp." 00081 ); 00082 } 00083 return "UNKNOWN"; 00084 }


| df_AttrType_e GetAttrType | ( | const string & | a_streamName | ) |
Definition at line 36 of file df_SplitInfo.cpp.
References at_EA, at_LINK, at_OBJID, at_PROPERTY, at_REPARSE, at_SECURITY, at_SENTINEL, at_SPARSE, ie_DATA_CORRUPTION, stn_WIN_EA, stn_WIN_LINK, stn_WIN_OBJID, stn_WIN_PROPERTY, stn_WIN_REPARSE, stn_WIN_SECURITY, and stn_WIN_SPARSE.
Referenced by df_SplitInfoUnpacker::ProcRecEmbData().
00036 { 00037 if (a_streamName == stn_WIN_SECURITY) { // "WIN.SEC" Windows: security (ACL) [META] 00038 return at_SECURITY; 00039 } 00040 else if (a_streamName == stn_WIN_EA) { 00041 return at_EA; 00042 } 00043 else if (a_streamName == stn_WIN_LINK) { 00044 return at_LINK; 00045 } 00046 else if (a_streamName == stn_WIN_OBJID) { 00047 return at_OBJID; 00048 } 00049 else if (a_streamName == stn_WIN_PROPERTY) { 00050 return at_PROPERTY; 00051 } 00052 else if (a_streamName == stn_WIN_REPARSE) { 00053 return at_REPARSE; 00054 } 00055 else if (a_streamName == stn_WIN_SPARSE) { 00056 return at_SPARSE; 00057 } 00058 else { 00059 throw ivd_InternalError(ie_DATA_CORRUPTION, 00060 "Stream '" + a_streamName 00061 + "' is not known by NSC. Update GetAttrType() helper function in df_SplitInfo.cpp." 00062 ); 00063 } 00064 return at_SENTINEL; 00065 }

| UInt32_t ivd_FS_Event::GetCancelReqID | ( | void | ) | [inherited] |
Definition at line 776 of file linux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_cancelReqId.
00776 { 00777 log_FUNC_m(GetCancelReqID); 00778 return m_cancelReqId; 00779 }
| UInt8_t ivd_FS_Event::GetCause | ( | void | ) | [inherited] |
Definition at line 514 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_cause.
Referenced by hsm_FileHeader::EventOffline().
00514 { 00515 log_FUNC_m(GetCause); 00516 return m_cause; 00517 }

| UInt8_t ivd_FS_Event::GetChnFlag | ( | void | ) | [inherited] |
Definition at line 499 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_chnFlag.
00499 { 00500 log_FUNC_m(GetChnFlag); 00501 return m_chnFlag; 00502 }
| ivd_FileSize_t ivd_FS_Event::GetChnSize | ( | void | ) | [inherited] |
Definition at line 509 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_chnSize.
00509 { 00510 log_FUNC_m(GetChnSize); 00511 return m_chnSize; 00512 }
| ivd_Time_t ivd_FS_Event::GetChnTime | ( | void | ) | [inherited] |
Definition at line 504 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_chnTime.
00504 { 00505 log_FUNC_m(GetChnTime); 00506 return m_chnTime; 00507 }
| ivd_FileSize_t ivd_FS_Event::GetChunkOff | ( | void | ) | [inline, inherited] |
Definition at line 244 of file ivd_fs_api.h.
References ivd_FS_Event::m_fChOff.
Referenced by hsm_FileHeader::EventOffline().
00244 { return m_fChOff; };

| ivd_FileSize_t ivd_FS_Event::GetChunkSize | ( | void | ) | [inline, inherited] |
Definition at line 243 of file ivd_fs_api.h.
References ivd_FS_Event::m_fChSize.
Referenced by hsm_FileHeader::EventOffline().
00243 { return m_fChSize; };

| void ivd_FileSystemAPI::GetConfiguration | ( | ivd_FS_Cfg_t & | cfg | ) | [inherited] |
Definition at line 340 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m.
Referenced by fs_api::EventMounted(), i_HSM_i::Reconfigure(), and i_HSM_i::SetFullAccess().
00340 { 00341 log_FUNC_m(GetConfiguration); 00342 // TODO: Set/Get configuration w/ prvate member. 00343 }

| ivd_FileHandle_t ivd_FileSystemAPI::GetDevHandle | ( | void | ) | [inherited] |
Definition at line 362 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FileSystemAPI::m_fd.
00362 { 00363 log_FUNC_m(GetDevHandle); 00364 return m_fd; 00365 }
| const string& ivd_FileSystemAPI::GetDevName | ( | void | ) | [inherited] |
| hsm_FileHeader * fs_api::GetDirFH | ( | ivd_PathList_t & | a_pathList, | |
| ivd_PathListIter_t | a_plIter | |||
| ) | [private, inherited] |
getOwner return pointer to FH of parent directory if directory doesn't exist in cache then generate new ad put it to cache and
Definition at line 623 of file hsm_fs_api.cpp.
References hsm_FileHeader::DecrRef(), fs_api::eCreate, eNoList, hsm_FileHeader::Event(), g_hsm_FHCache_p, hsm_FHcache::GetFH(), hsm_FileHeader::GetFileID(), hsm_FileHeader::GetFullPath(), hsm_FileHeader::GetInode(), GetInodeObj(), hsm_FileHeader::GetList(), ift_DIR, hsm_FHcache::InsertDirWithTest(), ivd_NULLCHK_m, IVD_PRINT_ID_FS, log_FUNC_m, log_WRN_m, fs_api::m_trans_p, NULL, and s_className.
Referenced by fs_api::CreateNewFH(), and fs_api::EventMove().
00624 { 00625 00626 log_FUNC_m(GetDirFH); 00627 00628 // at least one element is in list (name of FH), owner is next 00629 if (++a_plIter == a_pathList.end()) { 00630 return NULL; 00631 } 00632 00633 hsm_FileHeader *hsmFH = g_hsm_FHCache_p->GetFH(a_plIter->m_fInode); 00634 if (hsmFH != NULL){ 00635 // NOTE GetFH alredy increased reference 00636 return hsmFH; 00637 } 00638 00639 hsm_FileHeader *hsmOwnFH = GetDirFH(a_pathList, a_plIter); // try to find owner 00640 hsm_InoObj *hsmIObj = NULL; 00641 00642 hsmIObj = GetInodeObj(ift_DIR, a_plIter->m_fInode, a_plIter->m_fID); 00643 // inode reference is increaseased inside constructor or search 00644 hsmFH = new hsm_FileHeader(hsmOwnFH, hsmIObj, hdb_String(a_plIter->m_fName)); 00645 if (hsmOwnFH != NULL) { // now is used, so decrease temporary reference 00646 hsmOwnFH->DecrRef(); 00647 } 00648 00649 ivd_NULLCHK_m(hsmFH, hsm_FileHeader::s_className); 00650 00651 g_hsm_FHCache_p->InsertDirWithTest(&hsmFH); 00652 // if directory has not set fileID and is not in HSM lists then add it. 00653 if ( (hsmFH->GetFileID() == 0) 00654 && (hsmFH->GetList() == eNoList) 00655 && (a_plIter->m_fInode != 6)) { // EXT3_UNDEL_DIR_INO 00656 log_WRN_m("Directory : '" << hsmFH->GetFullPath() 00657 << "' has fileID 0 and is not in HSM list for migration. Create event is sent now. INO " << endl 00658 << IVD_PRINT_ID_FS(hsmFH->GetInode()) ); 00659 // if directory is dirty and not on list then add it as new 00660 hsmFH->Event(eCreate, *m_trans_p); 00661 } 00662 return hsmFH; 00663 }


| UInt32_t ivd_FS_Event::GetErrorCode | ( | void | ) | [inherited] |
Definition at line 519 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_errorCode.
00519 { 00520 log_FUNC_m(GetErrorCode); 00521 return m_errorCode; 00522 }
| ivd_FileID_t ivd_FS_Event::GetFileID | ( | void | ) | [inherited] |
Definition at line 462 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_fileID.
Referenced by fs_api::AddGenericEvent(), fs_api::CreateNewFH(), fs_api::EventDelete(), and hsm_FileHeader::EventOffline().
00462 { 00463 log_FUNC_m(GetFileID); 00464 return m_fileID; 00465 }

| ivd_FileType_e ivd_FS_Event::GetFileType | ( | void | ) | [inherited] |
Definition at line 488 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_fileType.
Referenced by fs_api::CreateNewFH().
00488 { 00489 log_FUNC_m(GetFileType); 00490 return m_fileType; 00491 }

| cmn_Path& ivd_FS_File::GetFullPathRef | ( | ) | [inline, inherited] |
Definition at line 419 of file ivd_fs_api.h.
Referenced by hsm_FileHeader::GetRecallIntoName(), i_HSM_i::MigrateByAPI(), hsm_IVDFSRecoverer::ProcRecFileEnd(), hsm_FileHeader::TruncateFile(), and i_HSM_i::UnPackFile().
00419 {return m_file.GetFullPathRef();};

| string & ivd_FS_Event::GetName | ( | void | ) | [inherited] |
Definition at line 439 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_pathList.
Referenced by fs_api::AddGenericEvent().
00439 { 00440 log_FUNC_m(GetName); 00441 return m_pathList[0].m_fName; 00442 }

| ivd_GenInode_t ivd_FS_Event::GetOldListOSID | ( | void | ) | [inherited] |
Definition at line 665 of file linux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_pathOldList.
00665 { 00666 log_FUNC_m(GetOldListOSID); 00667 if (m_pathOldList.empty()) { 00668 return 0; 00669 } else { 00670 return m_pathOldList[0].m_fInode; 00671 } 00672 }
| void ivd_FS_Event::GetOldPath | ( | ivd_PathList_t & | a_pathList | ) | [inherited] |
Definition at line 472 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_pathOldList.
Referenced by fs_api::CreateNewFH(), GetIdentify(), and ivd_FS_Event::GetOldPathName().
00472 { 00473 log_FUNC_m(GetOldPath); 00474 a_pathList = m_pathOldList; 00475 }

| ivd_PathList_t& ivd_FS_Event::GetOldPathList | ( | void | ) | [inherited] |
| string ivd_FS_Event::GetOldPathName | ( | void | ) | [inherited] |
Definition at line 477 of file hpux/ivd_fs_api.cpp.
References ivd_FS_Event::GetOldPath(), log_FUNC_m, and ivd_FS_Event::m_pathOldList.
Referenced by fs_api::EventDelete(), and fs_api::EventMove().
00477 { 00478 log_FUNC_m(GetOldPath); 00479 00480 ivd_PathListIter_t i = m_pathOldList.begin(); 00481 cmn_Path result(i->m_fName); 00482 while (++i != m_pathOldList.end()) { 00483 result = i->m_fName + result; 00484 } 00485 return result; 00486 }


| ivd_GenInode_t ivd_FS_Event::GetOSID | ( | void | ) | [inherited] |
Definition at line 444 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_pathList.
Referenced by fs_api::AddGenericEvent().
00444 { 00445 log_FUNC_m(GetOSID); 00446 if (m_pathList.empty()) { 00447 return 0; 00448 } else { 00449 return m_pathList[0].m_fInode; 00450 } 00451 }

| ivd_GenInode_t ivd_FS_Event::GetOwnerOSID | ( | void | ) | [inherited] |
Definition at line 453 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_pathList.
Referenced by fs_api::AddGenericEvent().
00453 { 00454 log_FUNC_m(GetOwnerOSID); 00455 if (m_pathList.size() <= 1) { 00456 return 0; 00457 } else { 00458 return m_pathList[1].m_fInode; 00459 } 00460 }

| void ivd_FS_Event::GetPath | ( | ivd_PathList_t & | a_pathList | ) | [inherited] |
Definition at line 467 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_pathList.
Referenced by fs_api::CreateNewFH(), fs_api::EventDataOffline(), fs_api::EventMove(), hsm_FileHeader::EventOffline(), and GetIdentify().
00467 { 00468 log_FUNC_m(GetPath); 00469 a_pathList = m_pathList; 00470 }

| ivd_PathList_t& ivd_FS_Event::GetPathList | ( | void | ) | [inherited] |
| void ivd_FS_File::GetProperties | ( | ivd_FS_FileProperty_t & | a_fileProp | ) | [inherited] |
Definition at line 931 of file hpux/ivd_fs_api.cpp.
References hsm_ioc_fileinfo_t::chg_time, hsm_ioc_fileinfo_t::chunk_size, dbg_DETAIL, errno, hsm_ioc_fileinfo_t::file_id, hsm_ioc_fileinfo_t::file_mode, hsm_ioc_fileinfo_t::file_size, cmn_File::FileTypeFromMode(), hsm_ioc_fileinfo_t::flags, HSM_FILE_GEN, HSM_IOC_GET_FILE_INFO, HSM_PRINT_ID_FS, ia_F_DIRTY, ia_F_OFFLINE, hsm_ioc_fileinfo_t::id_fs, log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_chgTime, ivd_FS_FileProperty_t::m_chunkSize, ivd_FS_FileProperty_t::m_dirtyFlag, ivd_FS_File::m_fd, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_File::m_gotProp, ivd_FS_FileProperty_t::m_Inode, ivd_FS_FileProperty_t::m_offlineFlag, ivd_FS_File::m_prop, and ivd_FS_FileProperty_t::m_type.
Referenced by i_HSM_i::ActivateFiles(), hsm_ActiveFH::ActiveToList(), hsm_IVDFSRecoverer::CreateFile(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), GetInodeObj(), hsmGetDirFH(), hsm_FileHeader::InitActive(), i_HSM_i::MigrateByAPI(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::PackFile(), hsm_IVDFSRecoverer::ProcRecFileEnd(), hsm_IVDFSRecoverer::ProcRecFileHdr(), hsm_FileHeader::ToMigCand(), i_HSM_i::TrigEfficientRecall(), and hsm_FileHeader::TruncateFile().
00931 { 00932 log_FUNC_m(GetProperties); 00933 00934 hsm_ioc_fileinfo_t fileInfo; 00935 fileInfo.id_fs = m_prop.m_Inode; 00936 00937 log_DBG_m(dbg_DETAIL, 00938 "Inode to get fileInfo: " << 00939 HSM_PRINT_ID_FS(m_prop.m_Inode)); 00940 00941 if (ioctl(m_fd, HSM_IOC_GET_FILE_INFO, &fileInfo) == -1) { 00942 ostringstream sstr; 00943 sstr 00944 << "ioctl(HSM_IOC_GET_FILE_INFO, " 00945 << HSM_PRINT_ID_FS(m_prop.m_Inode) << ")"; 00946 00947 throw ivd_SysError(errno, sstr.str() ); 00948 }; 00949 00950 if (HSM_FILE_GEN(m_prop.m_Inode) != 0 && fileInfo.id_fs != m_prop.m_Inode) { 00951 // 00952 // Input generation id is not 0 and it is different from 00953 // generation id that is returned from kernel. 00954 // NOTE: We simulate the system error here. 00955 // 00956 ostringstream sstr; 00957 sstr 00958 << "Generation ID does not match: ioctl(HSM_IOC_GET_FILE_INFO, " 00959 << "in: " << HSM_PRINT_ID_FS(m_prop.m_Inode) << " " 00960 << "out: " << HSM_PRINT_ID_FS(fileInfo.id_fs) << " )"; 00961 00962 throw ivd_SysError(ENXIO, sstr.str()); 00963 }; 00964 00965 a_fileProp.m_chgTime = fileInfo.chg_time; 00966 a_fileProp.m_chunkSize = fileInfo.chunk_size; 00967 a_fileProp.m_fileID = fileInfo.file_id; 00968 a_fileProp.m_fileSize = fileInfo.file_size; 00969 a_fileProp.m_Inode = fileInfo.id_fs; 00970 a_fileProp.m_dirtyFlag = fileInfo.flags & ia_F_DIRTY; 00971 a_fileProp.m_offlineFlag = fileInfo.flags & ia_F_OFFLINE; 00972 a_fileProp.m_type = cmn_File::FileTypeFromMode(fileInfo.file_mode); 00973 00974 m_prop = a_fileProp; 00975 m_gotProp = true; 00976 }


| ivd_RequestorInfo_t & ivd_FS_Event::GetRequestorInfo | ( | void | ) | [inherited] |
Definition at line 603 of file linux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_requestorInfo.
00603 { 00604 log_FUNC_m(GetRequestorInfo); 00605 00606 return m_requestorInfo; 00607 }
| cmn_Path ivd_FS_Event::GetRootDir | ( | const string & | a_fsUUID = string() |
) | [inherited] |
Definition at line 537 of file hpux/ivd_fs_api.cpp.
References cmn_StrTokenize(), dbg_DETAIL, hsm_req_mount_t::dev_major, hsm_req_mount_t::dev_minor, HSM_DEVNAME, ivd_Sleep, ivd_STAT, log_DBG_m, log_ERR_m, log_FUNC_m, lstat, ivd_FS_Event::m_buff_p, major, minor, and S_ISBLK.
Referenced by fs_api::EventMounted().
00537 { 00538 log_FUNC_m(GetRootDir); 00539 00540 //hsm_req_t *req_p = (hsm_req_t *)m_buff_p; 00541 hsm_req_mount_t *req_p = (hsm_req_mount_t *)m_buff_p; 00542 int a_major = req_p->dev_major; 00543 int a_minor = req_p->dev_minor; 00544 00545 char buf[1024]; 00546 ifstream iFile; 00547 00548 string m_FileID(HSM_DEVNAME); 00549 char m_procFile[] = "/etc/mnttab"; 00550 00551 // Allow ihsmfs to appear in mnttab 00552 ivd_Sleep(3); 00553 00554 ivd_Stat_t stat_buf; 00555 { 00556 int err = ivd_STAT(m_procFile, &stat_buf); 00557 if (err != 0) { 00558 log_ERR_m(" GetRoot ERROR: file " << m_procFile << " NOT_FOUND."); 00559 return ""; 00560 } 00561 } 00562 iFile.open(m_procFile, ios::in); 00563 if (!iFile.is_open()) { 00564 log_ERR_m(" GetRoot ERROR: cannot open file " << m_procFile ); 00565 return ""; 00566 } 00567 string lineStr; 00568 while (!iFile.eof()) { 00569 iFile.getline(buf,1024,'\n'); 00570 00571 if (!iFile.eof()) { 00572 00573 lineStr = string(buf); 00574 00575 int pos = lineStr.find(m_FileID,0); 00576 00577 if (pos >= 0) { 00578 log_DBG_m(dbg_DETAIL, " GetRoot find " << m_FileID); 00579 vector<string> parts = cmn_StrTokenize(lineStr); 00580 00581 if (parts.size() > 3 ) { 00582 00583 int err = lstat(parts[0].c_str(), &stat_buf); 00584 00585 if ( err == 0 && S_ISBLK(stat_buf.st_mode)) { 00586 00587 if (a_minor == minor(stat_buf.st_rdev) && 00588 a_major == major(stat_buf.st_rdev)) { 00589 log_DBG_m(dbg_DETAIL, " GetRoot GOT root path " << parts[1]); 00590 iFile.close(); 00591 cmn_Path rootPath = parts[1]; 00592 // a_rootInode = GetRootInode(rootPath); 00593 return rootPath; 00594 } 00595 else { 00596 log_DBG_m(dbg_DETAIL, " a_minor == minor(st_dev) " 00597 << a_minor << " == " << minor(stat_buf.st_rdev) 00598 << " a_major == major(st_dev) " 00599 << a_major << " == " << major(stat_buf.st_rdev)); 00600 } 00601 } 00602 else { 00603 log_ERR_m(" get stat of " << parts[0].c_str() 00604 << " mode = " << stat_buf.st_mode 00605 << " got err " << err); 00606 } 00607 } 00608 else { 00609 log_ERR_m(" NOT parts.size() > 3 size = " << parts.size()); 00610 } 00611 } 00612 } 00613 } 00614 iFile.close(); 00615 log_ERR_m(" GetRoot NOT_FOUND root path"); 00616 return ""; 00617 }


| cmn_Path ivd_FileSystemAPI::GetRootPath | ( | ) | [inline, inherited] |
Definition at line 196 of file ivd_fs_api.h.
Referenced by i_HSM_i::ActivateFiles(), hsm_ActiveFH::ActiveToList(), i_HSM_i::CheckFSCvsIVDFS(), CheckRootMembersForEA(), hsm_FileHeader::CompleteMigIsDone(), fs_api::CreateNewFH(), i_HSM_i::DoDeletion(), fs_api::EventMounted(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::GetInfo(), hsm_FHrelc::hsm_FHrelc(), hsmGetDirFH(), hsm_FHrelc::Init(), hsm_FileHeader::InitActive(), i_HSM_i::IVDFSPrepareRecovery(), hsm_FileHeader::MakeStat(), i_HSM_i::MigrateByAPI(), hsm_FileHeader::OpenFile(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::PackFile(), hsm_Recall::ProcRecBSStart(), hsm_IVDFSRecoverer::ProcRecFileHdr(), hsm_FileHeader::Recalled(), hsm_FHADPRecall::RecallFileFromADP(), hsm_FHrelc::Reconfigure(), hsm_FHmigc::SendToPM(), hsm_FileHeader::SetOffline(), i_HSM_i::ShowStatus(), hsm_FileHeader::ToMigCand(), and hsm_FHrelc::Truncate().
00196 { return m_rootPath; };

| UInt32_t ivd_FS_Event::GetStatusCode | ( | void | ) | [inherited] |
Definition at line 757 of file linux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_statusCode.
00757 { 00758 log_FUNC_m(GetStatusCode); 00759 return m_statusCode; 00760 }
| UInt32_t ivd_FS_File::GetStreamHeader | ( | string & | a_streamName, | |
| ivd_FilePosition_t & | a_streamSize | |||
| ) | [inherited] |
Get next file stream (data, meta or alternate data) - used for migration.
Definition at line 758 of file hpux/ivd_fs_api.cpp.
References cmn_File::GetStreamHeader(), log_FUNC_m, and ivd_FS_File::m_file.
Referenced by i_HSM_i::PackFile().
00759 { 00760 log_FUNC_m(GetStreamHeader); 00761 return m_file.GetStreamHeader(a_streamName, a_streamSize); 00762 }


| ivd_FilePosition_t ivd_FS_File::GetStreamLeft | ( | ) | [inline, inherited] |
Definition at line 377 of file ivd_fs_api.h.
Referenced by i_HSM_i::UnPackFile().
00377 { return m_file.GetStreamLeft(); };

| string ivd_FS_Event::GetVolumeID | ( | void | ) | [inherited] |
Definition at line 532 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_volumeID.
Referenced by fs_api::EventDismounted(), fs_api::EventMounted(), and fs_api::EventPredismount().
00532 { 00533 log_FUNC_m(GetVolumeID); 00534 return m_volumeID; 00535 }

| void fs_api::Initialize | ( | void | ) | [inherited] |
Definition at line 378 of file hsm_fs_api.cpp.
References dbg_DETAIL, g_hsmDB_p, fio_DataBase::GetTransObj(), log_DBG_m, log_FUNC_m, fs_api::m_initialized, and fs_api::m_trans_p.
Referenced by main().
00378 { 00379 log_FUNC_m(Initialize); 00380 m_trans_p = g_hsmDB_p->GetTransObj(); 00381 log_DBG_m(dbg_DETAIL, "Size of fileHeader " << sizeof(hsm_FileHeader)); 00382 log_DBG_m(dbg_DETAIL, "Size of inode " << sizeof(hsm_InoObj)); 00383 m_initialized = true; 00384 }


| bool ivd_FS_File::IsOfflineProlonged | ( | ) | [inherited] |
Definition at line 1041 of file hpux/ivd_fs_api.cpp.
References cmn_UTF8ToLocale(), dbg_DETAIL, cmn_File::GetFullPathRef(), ift_FILE, log_DBG_m, log_FUNC_m, ivd_FS_File::m_file, ivd_FS_FileProperty_t::m_offlineFlag, ivd_FS_File::m_prop, ivd_FS_FileProperty_t::m_type, and stat().
Referenced by i_HSM_i::ForceRelease().
01041 { 01042 log_FUNC_m(IsOfflineProlonged); 01043 01044 if (!m_prop.m_offlineFlag || m_prop.m_type!=ift_FILE) { 01045 return false; 01046 } 01047 01048 string csName(cmn_UTF8ToLocale(m_file.GetFullPathRef())); 01049 const char *fileNameStr = csName.c_str(); 01050 01051 struct stat stat_buf; 01052 stat(fileNameStr, &stat_buf); 01053 int blocksOccupied=stat_buf.st_blocks; 01054 int bytesPerBlock=stat_buf.st_blksize; 01055 01056 #warning "Should stat_buf.st_blksize be used instead of 512?" 01057 int blocksExpected = bytesPerBlock / 512; 01058 01059 log_DBG_m(dbg_DETAIL, "IsOfflineProlonged (" << fileNameStr << "), blocks occupied==" 01060 << blocksOccupied << ", blockes expected==" << blocksExpected ); 01061 01062 return blocksOccupied > blocksExpected; 01063 }


| bool ivd_FS_File::IsOpen | ( | ) | [inline, inherited] |
Definition at line 390 of file ivd_fs_api.h.
Referenced by hsm_RecallInfoGrp::OpenF().

| bool ivd_FileSystemAPI::IsPathTooLong | ( | UInt32_t | a_len | ) | [private, inherited] |
Definition at line 194 of file linux/ivd_fs_api.cpp.
References dbg_DETAIL, len, log_DBG_m, log_FUNC_m, and ivd_FileSystemAPI::m_rootPath.
00194 { 00195 log_FUNC_m(IsPathTooLong); 00196 UInt32_t len = a_len; 00197 len += (m_rootPath.length() + 1); 00198 log_DBG_m(dbg_DETAIL, "Path length = " << len << ", allowed " << PATH_MAX); 00199 return (len > PATH_MAX); 00200 }
| ivd_FS_Event::ivd_FS_Event | ( | const ivd_FS_Event & | a_from | ) | [inherited] |
Definition at line 426 of file hpux/ivd_fs_api.cpp.
References ivd_FS_Event::ivd_FS_Event(), log_FUNC_m, ivd_FS_Event::m_buff_p, and NULL.
00426 { 00427 log_FUNC_m(ivd_FS_Event(const &)); 00428 m_buff_p = NULL; 00429 *this = a_from; 00430 }

| ivd_FS_File::ivd_FS_File | ( | ivd_FileSystemAPI & | a_fs_api, | |
| const string & | a_fullPath, | |||
| ivd_GenInode_t | a_inode, | |||
| ivd_FileSize_t | a_fileSize, | |||
| ivd_FileType_e | a_fileType | |||
| ) | [inherited] |
Definition at line 705 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::ivd_FS_File(), log_FUNC_m, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_File::m_prop, and ivd_FS_FileProperty_t::m_type.
00710 : 00711 m_fd(a_fs_api.GetDevHandle()), 00712 m_gotProp(false), 00713 m_prop(), 00714 m_file(a_fullPath), 00715 m_fileOp(e_NoOp), 00716 m_recallOffset(0) { 00717 log_FUNC_m(ivd_FS_File(ivd_FileType_e)); 00718 00719 m_prop.m_Inode = a_inode; 00720 m_prop.m_fileSize = a_fileSize; 00721 m_prop.m_type = a_fileType; 00722 00723 }

| ivd_FS_File::ivd_FS_File | ( | ivd_FileSystemAPI & | a_fs_api, | |
| const string & | fullPath, | |||
| ivd_GenInode_t | a_inode = 0 | |||
| ) | [inherited] |
Definition at line 676 of file hpux/ivd_fs_api.cpp.
References ivd_BaseException::GetError(), ivd_FS_File::ivd_FS_File(), log_FUNC_m, ivd_FS_File::m_file, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_File::m_prop, ivd_FS_FileProperty_t::m_type, and cmn_File::StatF().
00676 : 00677 m_fd(a_fs_api.GetDevHandle()), 00678 m_gotProp(false), 00679 m_prop(), 00680 m_file(a_fullPath), 00681 m_fileOp(e_NoOp), 00682 m_recallOffset(0) { 00683 log_FUNC_m(ivd_FS_File(string)); 00684 00685 ivd_FileInfo_t fInfo; 00686 00687 try { 00688 m_file.StatF(fInfo); 00689 } catch(ivd_SysError &ie) { 00690 // intercept 'No such file or directory' 00691 if (ie.GetError() != ENOENT) { 00692 throw ie; 00693 } 00694 } 00695 if (a_inode == 0) { 00696 m_prop.m_Inode = fInfo.idOnFS; 00697 } 00698 else { 00699 m_prop.m_Inode = a_inode; 00700 } 00701 m_prop.m_fileSize = fInfo.size; 00702 m_prop.m_type = fInfo.type; 00703 }

| ivd_CommonArg_e IVD_CMN_DECL_d ivd_ParseCmnArgs | ( | int | a_argc, | |
| char * | a_argv[] | |||
| ) |
Definition at line 409 of file cmn_function.cpp.
References dbg_SetArgs(), dbg_SetProcName(), g_cmn, ivd_Versions::GetVersionString(), ivd_Versions::GetVersionStringDetail(), help(), ica_HELP, ica_NO_CMN_ARG, ica_NODAEMON, ivd_Product::m_copyright, ivd_Product::m_copyright2, ivd_Product::m_name, and cmn_Global::prod.
Referenced by main(), and Parse().
00409 { 00410 bool version = false; 00411 bool detail = false; 00412 bool help = false; 00413 bool nodaemon = false; 00414 int dbgIdx = 0; 00415 00416 dbg_SetProcName(a_argv[0]); 00417 00418 for (int i=1; i < a_argc; ++i) { 00419 if (a_argv[i][0] != '-') 00420 continue; 00421 00422 if (strcmp(a_argv[i], "--version") == 0) { 00423 version = true; 00424 } 00425 else if (strcmp(a_argv[i], "--detail") == 0) { 00426 detail = true; 00427 } 00428 else if (strcmp(a_argv[i], "--help") == 0) { 00429 help = true; 00430 } 00431 else if (strcmp(a_argv[i], "-h") == 0) { 00432 help = true; 00433 } 00434 else if (strcmp(a_argv[i], "--no-daemon") == 0) { 00435 nodaemon = true; 00436 } 00437 else if (strcmp(a_argv[i], "--dbg") == 0) { 00438 dbgIdx = i; 00439 } 00440 } 00441 00442 if (dbgIdx > 0) { 00443 // debug option specified - enable debugging 00444 dbg_SetArgs( 00445 dbgIdx+1 < a_argc && a_argv[dbgIdx+1][0] != '-' ? // level 00446 a_argv[dbgIdx+1][0] : '\0', 00447 dbgIdx+2 < a_argc && a_argv[dbgIdx+2][0] != '-' ? // file 00448 a_argv[dbgIdx+2] : "", 00449 dbgIdx+3 < a_argc && a_argv[dbgIdx+3][0] != '-' ? // flags 00450 a_argv[dbgIdx+3] : "" 00451 ); 00452 } 00453 00454 if (version) { 00455 cout << 00456 g_cmn.prod.m_name << endl << 00457 g_cmn.prod.m_copyright << endl << endl; 00458 if (!g_cmn.prod.m_copyright2.empty()) { 00459 cout << g_cmn.prod.m_copyright2 << endl << endl; 00460 } 00461 00462 if (detail) { 00463 cout << ivd_Versions::GetVersionStringDetail() << endl; 00464 } 00465 else { 00466 cout << ivd_Versions::GetVersionString() << endl; 00467 } 00468 exit(0); 00469 } 00470 00471 if (help) { 00472 return ica_HELP; 00473 } 00474 00475 if (nodaemon) { 00476 return ica_NODAEMON; 00477 } 00478 00479 return ica_NO_CMN_ARG; 00480 }


| ivd_PathEntry_t::ivd_PathEntry_t | ( | ivd_GenInode_t | a_fInode, | |
| ivd_FileID_t | a_fID, | |||
| cmn_Path | a_fName | |||
| ) | [inline, inherited] |
Definition at line 54 of file ivd_fs_api.h.
00057 : 00058 m_fInode(a_fInode), 00059 m_fID(a_fID), 00060 m_fName(a_fName) {}; ivd_GenInode_t m_fInode;
| void nsc_ScanForIVDFSRecovery | ( | const string & | a_partitionName, | |
| i_HSM_ptr | a_ihsm, | |||
| ui_MsgWriter & | a_msgWriter, | |||
| bool & | a_abort | |||
| ) |
Definition at line 40 of file fsc_nsScan.cpp.
References blk_FSRec_c, cmn_HexDump(), dbg_DETAIL, cmn_File::DeleteFile(), cmn_Global::dirs, ui_MsgWriter::DisplayMessage(), file, fio_RelFile::FirstNewIDX(), g_cmn, g_nsElementRF_p, ipc_EXEC_m, log_DBG_m, log_FUNC_m, log_WriteEvent(), fsc_nsElement_t::nameType, nit_DELETED, nit_NSCMISSING, nsc_ScanForIVDFSRecovery(), fsc_nsElement::Pack(), and ivd_Directories::tmp.
Referenced by i_FSC_i::IVDFSRecovery(), and nsc_ScanForIVDFSRecovery().
00043 { 00044 log_FUNC_m(nsc_ScanForIVDFSRecovery); 00045 00046 ivd_RecordIDX_t fileNum = g_nsElementRF_p->FirstNewIDX() - 1; 00047 00048 const UInt32_t blockSize = 512*1024; 00049 ostringstream sstr; 00050 sstr << "Start. " << fileNum << " fileIDs to recover." 00051 << " DF block size " << blockSize; 00052 log_WriteEvent(sstr.str(), "HSMFS RECOVERY"); 00053 a_msgWriter.DisplayMessage(sstr.str()); 00054 00055 // int showEvery = 1000; 00056 00057 int recovered = 0; 00058 int deleted = 0; 00059 int reserved = 0; 00060 00061 ivd_RecordIDX_t fileID = 1; 00062 00063 cmn_Path resumeInfoFile(g_cmn.dirs.tmp + ( string(".") + a_partitionName + "_hsmfs_recover")); 00064 00065 ifstream infs(resumeInfoFile.c_str()); 00066 log_DBG_m(dbg_DETAIL, " Get resumed fileID stack. infs.fail() = " << infs.fail() ); 00067 00068 bool fromScratch = true; 00069 if (infs.fail() != true) { 00070 fromScratch = false; 00071 log_DBG_m(dbg_DETAIL, " Get resumed fileID stack." ); 00072 infs >> fileID; 00073 infs.close(); 00074 ostringstream sstr; 00075 sstr << "Resume recovery of HSMFS from fileID " << fileID; 00076 a_msgWriter.DisplayMessage(sstr.str()); 00077 log_WriteEvent(sstr.str(), "HSMFS Recovery"); 00078 } 00079 00080 i_HSM_var ihsm = a_ihsm; 00081 bool slashPathSeparator; 00082 ipc_EXEC_m( 00083 long ret = ihsm->IVDFSPrepareRecovery(fromScratch, CORBA::string_dup(resumeInfoFile.c_str())); 00084 log_DBG_m(dbg_DETAIL, "Return of IVDFSPrepareRecovery() = " << ret); 00085 00086 slashPathSeparator = (bool)ret; 00087 log_DBG_m(dbg_DETAIL, "slashPathSeparator = " << boolalpha << slashPathSeparator); 00088 ); 00089 00090 char pathSeparator = slashPathSeparator ? '/' : '\\' ; 00091 00092 { 00093 // prepare FS recovery blocks 00094 df_Packer packer(new fsc_nsFSrecovery(i_HSM::_duplicate(ihsm), 00095 a_msgWriter, 00096 blk_FSRec_c, 00097 blockSize, 00098 resumeInfoFile, 00099 fileID)); 00100 00101 const int c_maxArrayPowerOf2 = 12; // cache size = 4196 elements 00102 const int c_maxArray = 1 << c_maxArrayPowerOf2; 00103 const int c_arrayIdxmask = c_maxArray - 1; // example 0x10 - 1 = 0x0F 00104 // array of auto pointers work as a cache. 00105 auto_ptr<fsc_nsElement> nscEl[c_maxArray]; 00106 int i = 0; 00107 00108 // int badAttributesCount = 0; 00109 while (fileID < g_nsElementRF_p->FirstNewIDX()) { 00110 fsc_nsElement_t file(fileID); 00111 log_DBG_m(dbg_DETAIL, "R nsElement from = " << fileID << endl << 00112 cmn_HexDump(&file, sizeof(fsc_nsElement_t), sizeof(fsc_nsElement_t), false) ); 00113 if (file.nameType == nit_NSCMISSING) { 00114 log_DBG_m(dbg_DETAIL, "Missing NSC for " << fileID); 00115 ++reserved; 00116 ++fileID; 00117 continue; 00118 } else if (file.nameType == nit_DELETED) { 00119 ++deleted; 00120 ++fileID; 00121 continue; 00122 } 00123 //else if (file.attribType == ait_NOTALLATTR) { 00124 // badAttributesCount++; 00125 // if (file.attribIdx) { 00126 // log_WRN_m(" NSC scan: fileID " << fileID << " has no all attributes stored."); 00127 // } 00128 // else { 00129 // log_WRN_m(" NSC scan: fileID " << fileID << " has no attributes stored."); 00130 // } 00131 // ++fileID; 00132 //} 00133 recovered++; 00134 fsc_nsElement *nscEl_p = new fsc_nsElement(fileID, file); 00135 nscEl[i].reset(nscEl_p); // store it in array, prevent releasing directories 00136 ++i &= c_arrayIdxmask; // increment i and cut it if overflow. 00137 00138 nscEl_p->Pack(packer, pathSeparator); 00139 if (a_abort) { 00140 ostringstream sstr; 00141 sstr << "Abort." ; // << 00142 a_msgWriter.DisplayMessage(sstr.str()); 00143 log_WriteEvent(sstr.str(), "HSMFS Recovery"); 00144 break; 00145 } 00146 // if (fileID % showEvery == 0) { 00147 // a_msgWriter.DisplayMessage("Recovered " + cmn_Num2Str(recovered) 00148 // + " Scanned " + cmn_Num2Str(fileID)); 00149 // } 00150 ++fileID; 00151 } 00152 } // to call packer destructor who flush data to HSM 00153 if (!a_abort) { 00154 cmn_File::DeleteFile(resumeInfoFile); 00155 } 00156 ostringstream sstr2; 00157 sstr2 << "Recovered " << recovered 00158 << " of " <<g_nsElementRF_p->FirstNewIDX() - 1 00159 << " (Reserved " << reserved 00160 << ", Deleted " << deleted 00161 << ")."; 00162 a_msgWriter.DisplayMessage(sstr2.str()); 00163 log_WriteEvent(sstr2.str(), "HSMFS Recovery"); 00164 }


| void ivd_FS_File::Open | ( | ivd_FS_FileOperation_e | a_fileOp, | |
| const string & | pathName = string() | |||
| ) | [inherited] |
Definition at line 725 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::e_Cache, ivd_FS_File::e_Migrate, ivd_FS_File::e_MigrateNoData, ivd_FS_File::e_Recall, ivd_FS_File::e_RecallInto, ivd_FS_File::e_Recovery, ivd_FS_File::e_Release, fom_CREATE_NEW, fom_NO_BUFFERING, fom_OPEN_ALWAYS, fom_OPEN_EXISTING, fom_READ, fom_READWRITE, fom_STREAM, fom_STREAM_NO_DATA, fom_WRITE, log_FUNC_m, ivd_FS_File::m_file, ivd_FS_File::m_fileOp, cmn_File::OpenF(), and cmn_File::SetFullPath().
Referenced by i_HSM_i::ActivateFiles(), hsm_ActiveFH::ActiveToList(), hsm_FileHeader::CompleteMigIsDone(), hsm_IVDFSRecoverer::CreateFile(), fs_api::CreateNewFH(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), hsmGetDirFH(), hsm_FileHeader::InitActive(), i_HSM_i::MigrateByAPI(), hsm_RecallInfoGrp::OpenF(), hsm_FileHeader::OpenFile(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::PackFile(), hsm_IVDFSRecoverer::ProcRecFileEnd(), hsm_IVDFSRecoverer::ProcRecFileHdr(), hsm_FHADPRecall::RecallFileFromADP(), hsm_FHmigc::SendToPM(), hsm_InoObj::SetOffline(), hsm_FileHeader::ToMigCand(), i_HSM_i::TrigEfficientRecall(), hsm_FHrelc::Truncate(), and i_HSM_i::UnPackFile().
00725 { 00726 log_FUNC_m(Open); 00727 if (!a_pathName.empty()) { 00728 m_file.SetFullPath(a_pathName); 00729 } 00730 00731 m_fileOp = a_fileOp; 00732 if (m_fileOp == e_Migrate) { 00733 m_file.OpenF(fom_READ | fom_OPEN_EXISTING | fom_STREAM); 00734 } 00735 else if (m_fileOp == e_MigrateNoData) { 00736 m_file.OpenF(fom_READ | fom_OPEN_EXISTING | fom_STREAM | fom_STREAM_NO_DATA); 00737 } 00738 else if(m_fileOp == e_Release) { 00739 m_file.OpenF(fom_READWRITE | fom_OPEN_EXISTING); 00740 } 00741 else if(m_fileOp == e_Recall) { 00742 m_file.OpenF(fom_READWRITE | fom_OPEN_EXISTING | fom_STREAM | fom_NO_BUFFERING); 00743 } 00744 else if (m_fileOp == e_RecallInto) { 00745 m_file.OpenF(fom_WRITE | fom_CREATE_NEW | fom_STREAM | fom_NO_BUFFERING); 00746 } 00747 else if(m_fileOp == e_Recovery) { 00748 m_file.OpenF(fom_READWRITE | fom_OPEN_ALWAYS); 00749 } 00750 else if(m_fileOp == e_Cache) { 00751 m_file.OpenF(fom_READ); 00752 } 00753 else { 00754 // throw 00755 } 00756 }


| IVD_CMN_DECL_d ostream& operator<< | ( | ostream & | a_os, | |
| cmn_FileInfo_t_v | a_fileList_v | |||
| ) |
Definition at line 662 of file cmn_function.cpp.
References cmn_FileInfo_t::name.
00662 { 00663 00664 a_os << "\n"; 00665 if (a_fileList_v.empty()) { 00666 a_os << "Directory is empty."; 00667 } 00668 else { 00669 a_os << "List of files found: \n"; 00670 a_os << "-------------------------------\n"; 00671 00672 cmn_FileInfo_t_v::iterator iter; 00673 for (iter = a_fileList_v.begin(); iter != a_fileList_v.end(); ++iter) { 00674 cmn_FileInfo_t &fInfo (*iter); 00675 a_os << fInfo.name; 00676 } 00677 a_os << "-------------------------------\n"; 00678 } 00679 return a_os; 00680 }
| ostream& operator<< | ( | ostream & | a_os, | |
| const i_Recall_t & | a_o | |||
| ) |
Definition at line 345 of file hsm_Recall.cpp.
References i_Recall_t::fileID, i_Recall_t::fileIdx, i_Recall_t::fileSize, and i_Recall_t::migrationID.
00345 { 00346 a_os << "i_Recall_t object addr: 0x" << hex << &a_o << dec << endl 00347 << ", fileID: " << a_o.fileID << endl 00348 << ", migrationID: " << a_o.migrationID << endl 00349 << ", fileSize: " << a_o.fileSize << endl 00350 << ", fileIdx: " << a_o.fileIdx << endl; 00351 return a_os; 00352 }
| ivd_FS_Event const & ivd_FS_Event::operator= | ( | ivd_FS_Event const & | a_from | ) | [inherited] |
Definition at line 403 of file hpux/ivd_fs_api.cpp.
References free(), log_FUNC_m, ivd_FS_Event::m_buff_p, ivd_FS_Event::m_cause, ivd_FS_Event::m_chnFlag, ivd_FS_Event::m_chnSize, ivd_FS_Event::m_chnTime, ivd_FS_Event::m_fChOff, ivd_FS_Event::m_fChSize, ivd_FS_Event::m_fd, ivd_FS_Event::m_fileID, ivd_FS_Event::m_fileType, ivd_FS_Event::m_pathList, ivd_FS_Event::m_pathOldList, malloc, MAX_EVT_BUFSIZE, and NULL.
00403 { 00404 log_FUNC_m(operator=); 00405 if (this != &a_from) { 00406 m_fileType = a_from.m_fileType; 00407 m_fChSize = a_from.m_fChSize; 00408 m_fChOff = a_from.m_fChOff; 00409 m_pathList = a_from.m_pathList; 00410 m_pathOldList = a_from.m_pathOldList; 00411 m_chnFlag = a_from.m_chnFlag; 00412 m_chnSize = a_from.m_chnSize; 00413 m_chnTime = a_from.m_chnTime; 00414 m_fileID = a_from.m_fileID; 00415 m_fd = a_from.m_fd; 00416 m_cause = a_from.m_cause; 00417 if (m_buff_p != NULL) { 00418 free(m_buff_p); 00419 } 00420 m_buff_p = malloc(MAX_EVT_BUFSIZE); 00421 memcpy(m_buff_p, a_from.m_buff_p, MAX_EVT_BUFSIZE); 00422 } 00423 return *this; 00424 }

| cmn_Path IVD_FSAPI_DECL_d PathListToPath | ( | const ivd_PathList_t & | a_pList | ) |
Definition at line 148 of file linux/ivd_fs_api.cpp.
References dbg_DETAIL, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, and PathListToPath().
00148 { 00149 // NOOP on Linux. 00150 log_FUNC_m(PathListToPath); 00151 static const cmn_Path empty(""); 00152 for (int i = 0; i < a_pList.size(); i++){ 00153 log_DBG_m(dbg_DETAIL, " PathList: level " << i 00154 << " inode " << IVD_PRINT_ID_FS(a_pList[i].m_fInode) 00155 << " fileID " << a_pList[i].m_fID 00156 << " name " << a_pList[i].m_fName 00157 ); 00158 } 00159 return empty; 00160 }

| cmn_Path IVD_FSAPI_DECL_d PathListToPath | ( | const ivd_PathList_t & | a_pList | ) |
Definition at line 87 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, path, and PathListToPath().
Referenced by fs_api::CreateNewFH(), hsm_FileHeader::EventOffline(), and PathListToPath().
00087 { 00088 log_FUNC_m(PathListToPath); 00089 00090 typedef ivd_PathList_t::const_reverse_iterator PListCRIter_t; 00091 00092 const string::size_type defNameSize_c(10); 00093 00094 cmn_Path path; 00095 path.reserve(a_pList.size() * defNameSize_c); 00096 00097 for (PListCRIter_t i = a_pList.rbegin(); i != a_pList.rend(); ++i) { 00098 path += i->m_fName; 00099 } 00100 00101 return path; 00102 }


| void ivd_FS_File::QueryFullFileName | ( | string & | cmnFileName | ) | [inherited] |
| ivd_FileRetSize_t ivd_FS_File::ReadStream | ( | void * | a_buf, | |
| ivd_FileBufSize_t | a_size | |||
| ) | [inherited] |
Read current file stream - used for migration.
Definition at line 764 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::m_file, and cmn_File::ReadStream().
Referenced by i_HSM_i::PackFile().
00765 { 00766 return m_file.ReadStream(a_buf, a_size); 00767 }


| void ivd_FileSystemAPI::Reconfigure | ( | void | ) | [inherited] |
| void ivd_FS_File::Release | ( | ivd_FileSize_t | offset = 0, |
|
| ivd_FileSize_t | size = 0 | |||
| ) | [inherited] |
Definition at line 785 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, ivd_FS_File::m_file, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_File::m_prop, and cmn_File::SparseF().
Referenced by i_HSM_i::ForceRelease(), hsm_IVDFSRecoverer::ProcRecFileEnd(), and hsm_FileHeader::TruncateFile().
00785 { 00786 log_FUNC_m(Release); 00787 m_file.SparseF(m_prop.m_fileSize); 00788 }


| void ivd_FS_Event::ReplySyncEvent | ( | UInt16_t | status | ) | [inherited] |
Definition at line 619 of file hpux/ivd_fs_api.cpp.
References dbg_DETAIL, errno, hsm_req_t::hdr, log_DBG_m, log_ERR_m, log_FUNC_m, ivd_FS_Event::m_buff_p, ivd_FS_Event::m_fd, NULL, hsm_req_hdr_t::pid, hsm_req_hdr_t::reqid, size, hsm_req_hdr_t::status, and hsm_req_hdr_t::type.
Referenced by ivd_FileSystemAPI::EventDataOffline(), ivd_FileSystemAPI::EventMountRequest(), hsm_FileHeader::EventOffline(), and fs_api::EventPredismount().
00619 { 00620 log_FUNC_m(ReplySyncEvent); 00621 00622 if (0 == m_fd) { 00623 log_ERR_m("No device to reply to!"); 00624 return; 00625 } 00626 00627 if (NULL == m_buff_p) { 00628 log_ERR_m("No request header for Reply!"); 00629 return; 00630 } 00631 00632 hsm_req_t *req = (hsm_req_t *) m_buff_p; 00633 /*log_DBG_m(dbg_DETAIL, " Sending Reply Req: " << endl << 00634 "\t\t\t\t\tmajor " << req->hdr.major << 00635 " \tminor " << req->hdr.minor << 00636 " \tpid " << req->hdr.pid << endl << 00637 "\t\t\t\t\treqid " << req->hdr.reqid << 00638 " \ttype " << req->hdr.type); */ 00639 00640 //Removed major & minor fileds from hsm_req_t structure 00641 log_DBG_m(dbg_DETAIL, " Sending Reply Req: " << endl << 00642 " \tpid " << req->hdr.pid << endl << 00643 "\t\t\t\t\treqid " << req->hdr.reqid << 00644 " \ttype " << req->hdr.type); 00645 int size = sizeof(hsm_req_hdr_t); 00646 00647 // code is removed from hdr struct, and it seems that is not needed to have it anymore. 00648 // Maybe solution will be to wait until timeout expires? 00649 req->hdr.status = a_status; 00650 00651 00652 int ret = write(m_fd, &req->hdr, size); 00653 if (ret < 0 || ret < size) { 00654 log_ERR_m("Sending Reply failed for requestID " << req->hdr.reqid 00655 << " errno " << errno); 00656 return; 00657 } 00658 log_DBG_m(dbg_DETAIL,"Sending Reply successful for requestID " 00659 << req->hdr.reqid); 00660 }

| void ivd_FS_File::ReplySyncEvents | ( | UInt16_t | status | ) | [inherited] |
Definition at line 912 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::e_MigrateEvt, HSM_CAUSE_MIGRATE, HSM_CAUSE_OFFLINE, HSM_OK_REPLY_d, log_FUNC_m, ivd_FS_File::m_syncEvents, and ivd_FS_File::TriggerEvent().
Referenced by hsm_FileHeader::SendReply().
00912 { 00913 log_FUNC_m(ReplySyncEvents); 00914 00915 for (vector<ivd_FS_Event>::iterator i = m_syncEvents.begin(); 00916 i != m_syncEvents.end(); i++) { 00917 switch (i->GetCause()) { 00918 case HSM_CAUSE_OFFLINE: 00919 i->ReplySyncEvent(a_status); 00920 break; 00921 case HSM_CAUSE_MIGRATE: 00922 if (HSM_OK_REPLY_d == a_status) { 00923 // Event reason was forced migration, but file was offline. 00924 TriggerEvent(e_MigrateEvt); 00925 } 00926 break; 00927 } 00928 } 00929 }


| void fs_api::Run | ( | bool | a_recoveryMode | ) | [inherited] |
Reimplemented from ivd_FileSystemAPI.
Definition at line 666 of file hsm_fs_api.cpp.
References dbg_NORM, ivd_BaseException::GetError(), ivd_BaseException::GetText(), log_DBG_m, log_ERR_m, log_FUNC_m, and ivd_FileSystemAPI::Run().
Referenced by main().
00666 { 00667 log_FUNC_m(Run); 00668 00669 log_DBG_m(dbg_NORM, "Waiting for mount event..."); 00670 00671 //TODO:wait 10sec then check IsQueueEmpty, repeat 6xtimes then fail 00672 00673 try { 00674 ivd_FileSystemAPI::Run(a_recoveryMode); 00675 } 00676 catch (ivd_Error &ie) { 00677 log_ERR_m("HSM_ERROR: " << ie.GetError() << " " << ie.GetText()); 00678 } 00679 catch (ivd_InternalError &iie) { 00680 log_ERR_m("HSM_INTERNAL_ERROR: " << iie.GetError() << " " << iie.GetText()); 00681 } 00682 catch (ivd_SysError &ise) { 00683 log_ERR_m("HSM_SYS_ERROR: " << ise.GetError() << " " << ise.GetText()); 00684 } 00685 catch(...) { 00686 log_ERR_m("Other ERROR."); 00687 } 00688 }


| void ivd_FileSystemAPI::Run | ( | bool | a_recoveryMode | ) | [inherited] |
Reimplemented in fs_api.
Definition at line 137 of file hpux/ivd_fs_api.cpp.
References hsm_req_data_offl_t::cause, hsm_req_t::chg_attr, hsm_req_t::chg_data, hsm_req_t::chg_name, hsm_req_chg_data_t::chg_time, hsm_req_chg_name_t::chg_time, hsm_req_data_offl_t::chunk_offset, hsm_req_chg_data_t::chunk_offset, hsm_req_data_offl_t::chunk_size, hsm_req_chg_data_t::chunk_size, ivd_FS_Event::Clear(), cmn_Num2Str(), hsm_req_t::data_offl, dbg_DETAIL, dbg_LOW, dbg_NORM, hsm_req_umount_t::dev_major, hsm_req_umount_t::dev_minor, errno, ivd_FileSystemAPI::EventAttributeChange(), ivd_FileSystemAPI::EventCreate(), ivd_FileSystemAPI::EventDataChange(), ivd_FileSystemAPI::EventDataOffline(), ivd_FileSystemAPI::EventDelete(), ivd_FileSystemAPI::EventDismounted(), ivd_FileSystemAPI::EventMounted(), ivd_FileSystemAPI::EventMove(), hsm_req_data_offl_t::file_id, hsm_req_chg_attr_t::file_id, hsm_req_chg_data_t::file_id, hsm_req_chg_name_t::file_id, hsm_req_chg_attr_t::file_mode, hsm_req_chg_name_t::file_mode, GetPathList(), hsm_req_t::hdr, HSM_EVT_CHG_ATTR, HSM_EVT_CHG_DATA, HSM_EVT_CHG_NAME, HSM_EVT_DATA_OFFL, HSM_EVT_MOUNT, HSM_EVT_UMOUNT, HSM_PRINT_ID_FS, hsm_req_data_offl_t::id_fs, hsm_req_chg_data_t::id_fs, if(), ift_BLK_DEV, ift_CHR_DEV, ift_DIR, ift_FIFO, ift_FILE, ift_SOCKET, ift_SYMLINK, log_DBG_m, log_ERR_m, log_FUNC_m, ivd_FS_Event::m_buff_p, ivd_FS_Event::m_cause, ivd_FS_Event::m_chnSize, ivd_FS_Event::m_chnTime, ivd_FS_Event::m_fChOff, ivd_FS_Event::m_fChSize, ivd_FS_Event::m_fd, ivd_FileSystemAPI::m_fd, ivd_FS_Event::m_fileID, ivd_FS_Event::m_fileType, ivd_FS_Event::m_pathList, ivd_FS_Event::m_pathOldList, ivd_FS_Event::m_volumeID, MAX_EVT_BUFSIZE, NULL, hsm_req_data_offl_t::path, hsm_req_chg_attr_t::path, hsm_req_chg_data_t::path, hsm_req_chg_name_t::path, hsm_req_chg_name_t::path_old_offset, S_IFDIR, hsm_req_hdr_t::type, and hsm_req_t::umount.
Referenced by fs_api::Run().
00137 { 00138 log_FUNC_m(Run); 00139 00140 ivd_FS_Event recEvent; 00141 00142 hsm_req_t *req; 00143 00144 int ret; 00145 while ((ret = read(m_fd, recEvent.m_buff_p, MAX_EVT_BUFSIZE)) > 0) { 00146 req = (hsm_req_t *) recEvent.m_buff_p; 00147 if (req != NULL) { 00148 switch (req->hdr.type) { 00149 case HSM_EVT_CHG_NAME: 00150 log_DBG_m(dbg_DETAIL, "Event_ChangeName."); // file is deleted if Path IS_NULL 00151 { 00152 switch (req->chg_name.file_mode & S_IFMT) { 00153 case S_IFLNK: 00154 recEvent.m_fileType = ift_SYMLINK; 00155 break; 00156 case S_IFDIR: 00157 recEvent.m_fileType = ift_DIR; 00158 break; 00159 case S_IFCHR: 00160 recEvent.m_fileType = ift_CHR_DEV; 00161 case S_IFBLK: 00162 recEvent.m_fileType = ift_BLK_DEV; 00163 break; 00164 case S_IFIFO: 00165 recEvent.m_fileType = ift_FIFO; 00166 case S_IFSOCK: 00167 recEvent.m_fileType = ift_SOCKET; 00168 break; 00169 default: 00170 recEvent.m_fileType = ift_FILE; 00171 break; 00172 } 00173 if (req->chg_name.chg_time == 0 ) { 00174 recEvent.m_chnTime = time(NULL); 00175 } 00176 else { 00177 recEvent.m_chnTime = req->chg_name.chg_time; 00178 } 00179 recEvent.m_fileID = req->chg_name.file_id; 00180 00181 hsm_path_t *path_old = (hsm_path_t *) 00182 ((char *)req + req->chg_name.path_old_offset); 00183 { 00184 Int32_t sizePath = GetPathList(req->chg_name.path, recEvent.m_pathList); 00185 Int32_t sizeOldPath = GetPathList(*path_old, recEvent.m_pathOldList); 00186 if ( sizePath == 0 && sizeOldPath == 0) { 00187 log_ERR_m("->Event has no pathlists"); 00188 continue; 00189 } 00190 if (sizePath == 0) { 00191 //recEvent.eventType = eDelFile; 00192 log_DBG_m(dbg_NORM, " Delete of file happened."); // file is deleted if Path IS_NULL 00193 EventDelete(recEvent); 00194 } 00195 else { 00196 if (sizeOldPath == 0) { 00197 log_DBG_m(dbg_NORM, " Create a file happened." << endl << 00198 " Path levels: " << sizePath << " OLD Path levels: " << sizeOldPath); 00199 //recEvent.eventType = eCreate; 00200 EventCreate(recEvent); 00201 } 00202 else { 00203 log_DBG_m(dbg_NORM, " Change name or move happened." << endl << 00204 " Path levels: " << sizePath << " OLD Path levels: " << sizeOldPath); 00205 //recEvent.eventType = eChgNameOwn; 00206 EventMove(recEvent); 00207 } 00208 } 00209 } 00210 } 00211 break; 00212 case HSM_EVT_CHG_DATA: 00213 log_DBG_m(dbg_DETAIL, "Event_ChangeData ino=" 00214 << HSM_PRINT_ID_FS(req->chg_data.id_fs) ); 00215 if (GetPathList(req->chg_data.path, recEvent.m_pathList) == 0) { 00216 log_ERR_m("->Event has zero pathlist"); 00217 continue; 00218 } 00219 //recEvent.eventType = eChgData; 00220 recEvent.m_fChSize = req->chg_data.chunk_size; 00221 recEvent.m_fChOff = req->chg_data.chunk_offset; 00222 recEvent.m_chnSize = 0; 00223 recEvent.m_fileID = req->chg_data.file_id; 00224 if (req->chg_data.chg_time == 0 ) { 00225 recEvent.m_chnTime = time(NULL); 00226 } 00227 else { 00228 recEvent.m_chnTime = req->chg_data.chg_time; 00229 } 00230 EventDataChange(recEvent); 00231 break; 00232 case HSM_EVT_CHG_ATTR: 00233 log_DBG_m(dbg_DETAIL, "Event_ChangeAttr fileID=" << req->chg_attr.file_id << 00234 "\tmode=" << req->chg_attr.file_mode); 00235 //recEvent.eventType = eChgAttr; 00236 if (GetPathList(req->chg_attr.path, recEvent.m_pathList) == 0) { 00237 log_ERR_m("->Event has zero pathlist"); 00238 continue; 00239 } 00240 recEvent.m_fileID = req->chg_attr.file_id; 00241 if (req->chg_data.chg_time == 0 ) { 00242 recEvent.m_chnTime = time(NULL); 00243 } 00244 else { 00245 recEvent.m_chnTime = req->chg_data.chg_time; 00246 } 00247 00248 switch (req->chg_attr.file_mode & S_IFMT) { 00249 case S_IFLNK: 00250 recEvent.m_fileType = ift_SYMLINK; 00251 break; 00252 case S_IFDIR: 00253 recEvent.m_fileType = ift_DIR; 00254 break; 00255 case S_IFCHR: 00256 recEvent.m_fileType = ift_CHR_DEV; 00257 case S_IFBLK: 00258 recEvent.m_fileType = ift_BLK_DEV; 00259 break; 00260 case S_IFIFO: 00261 recEvent.m_fileType = ift_FIFO; 00262 case S_IFSOCK: 00263 recEvent.m_fileType = ift_SOCKET; 00264 break; 00265 default: 00266 recEvent.m_fileType = ift_FILE; 00267 break; 00268 } 00269 EventAttributeChange(recEvent); 00270 break; 00271 case HSM_EVT_DATA_OFFL: 00272 log_DBG_m(dbg_DETAIL, "Event_Data_OFFLINE."); 00273 log_DBG_m(dbg_DETAIL, "->Fill OFFLINE Event for inode " << 00274 HSM_PRINT_ID_FS(req->data_offl.id_fs)); 00275 //recEvent.eventType = eOffline; 00276 if (GetPathList(req->data_offl.path, recEvent.m_pathList) == 0) { 00277 log_ERR_m("->Event has zero pathlist"); 00278 continue; 00279 } 00280 recEvent.m_fileID = req->data_offl.file_id; 00281 recEvent.m_fChSize = req->data_offl.chunk_size; 00282 recEvent.m_fChOff = req->data_offl.chunk_offset; 00283 recEvent.m_cause = req->data_offl.cause; 00284 recEvent.m_fd = m_fd; 00285 EventDataOffline(recEvent); 00286 break; 00287 case HSM_EVT_MOUNT: 00288 /*if (req->hdr.code != 0) { 00289 throw ivd_Error(ie_NOMOUNT, "Event Manager: Mount event failed with code " 00290 + cmn_Num2Str(req->hdr.code) + ". Exit."); 00291 } */ 00292 recEvent.m_volumeID = string( 00293 cmn_Num2Str(req->umount.dev_major) + 00294 string(":") + 00295 cmn_Num2Str(req->umount.dev_minor)); 00296 EventMounted(recEvent); 00297 log_DBG_m(dbg_DETAIL, " Event Manager: mount event is caught. Starting HSM."); 00298 break; 00299 case HSM_EVT_UMOUNT: 00300 recEvent.m_volumeID = string( 00301 cmn_Num2Str(req->umount.dev_major) + 00302 string(":") + 00303 cmn_Num2Str(req->umount.dev_minor)); 00304 log_DBG_m(dbg_DETAIL, " Event Manager: dismounted event is caught. Stopping HSM."); 00305 EventDismounted(recEvent); 00306 goto end; 00307 break; 00308 default: 00309 log_DBG_m(dbg_DETAIL, "Event_Other: " << req->hdr.type); 00310 continue; 00311 break; 00312 } 00313 00314 } 00315 recEvent.Clear(); 00316 } 00317 if (ret < 0) { 00318 ostringstream sstr; 00319 sstr << "Read an event pump failed. ret = " << ret; 00320 throw ivd_SysError(errno, sstr.str(), true); 00321 } 00322 end: 00323 log_DBG_m(dbg_LOW, "Event Pump is IS_DOWN."); 00324 }


| void ivd_FS_File::SeekF | ( | ivd_FilePosition_t | a_offset | ) | [inherited] |
Definition at line 795 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::m_file, and cmn_File::SeekF().
Referenced by hsm_RecallInfoGrp::SeekF().


| void ivd_FS_Event::SetCause | ( | UInt8_t | a_cause | ) | [inline, inherited] |
Definition at line 247 of file ivd_fs_api.h.
References ivd_FS_Event::m_cause.
00247 { m_cause = a_cause; };
Definition at line 1323 of file linux/ivd_fs_api.cpp.
References dbg_DETAIL, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_Inode, and ivd_FS_File::m_prop.
Referenced by Collocation::TrigMigration().
01323 { 01324 log_FUNC_m(SetCollocationId); 01325 log_DBG_m(dbg_DETAIL, "NYI: SetCollocationId file inode: " << 01326 IVD_PRINT_ID_FS(m_prop.m_Inode) << 01327 "\tFileID: " << m_prop.m_fileID << 01328 "\tCollocationMajorID: " << a_major << 01329 "\tCollocationMinorID:" << a_minor); 01330 01331 // TODO: Implementation is needed! 01332 }

| void ivd_FileSystemAPI::SetConfiguration | ( | const ivd_FS_Cfg_t & | cfg | ) | [inherited] |
Definition at line 326 of file hpux/ivd_fs_api.cpp.
References dbg_DETAIL, errno, HSM_IOC_SET_OPMODE, HSM_IOC_SET_TIMEOUT, log_DBG_m, log_FUNC_m, ivd_FileSystemAPI::m_fd, hsm_ioc_opmode_t::operation_mode, ivd_FS_Cfg_t::operationMode, ivd_FS_Cfg_t::syncEventTimeout, hsm_ioc_opmode_t::WORM_timeout, and ivd_FS_Cfg_t::WORMTimeout.
Referenced by fs_api::EventMounted(), i_HSM_i::Reconfigure(), and i_HSM_i::SetFullAccess().
00326 { 00327 log_FUNC_m(SetConfiguration); 00328 if (ioctl(m_fd, HSM_IOC_SET_TIMEOUT, &(a_cfg.syncEventTimeout)) < 0) { 00329 throw ivd_SysError(errno, "ioctl(HSM_IOC_SET_TIMEOUT)", true); 00330 } 00331 log_DBG_m(dbg_DETAIL, "errno: " << errno); 00332 hsm_ioc_opmode_t om; 00333 om.operation_mode = a_cfg.operationMode; 00334 om.WORM_timeout = a_cfg.WORMTimeout; 00335 if (ioctl(m_fd, HSM_IOC_SET_OPMODE, &om) < 0) { 00336 throw ivd_SysError(errno, "ioctl(HSM_IOC_SET_OPMODE)", true); 00337 } 00338 }

| void ivd_FS_File::SetDataClean | ( | ivd_Time_t | mtime, | |
| ivd_FileSize_t | offset = 0, |
|||
| ivd_FileSize_t | size = 0 | |||
| ) | [inherited] |
Definition at line 844 of file hpux/ivd_fs_api.cpp.
References hsm_ioc_datastate_t::chunk_offset, hsm_ioc_datastate_t::chunk_size, dbg_DETAIL, errno, hsm_ioc_datastate_t::file_id, HSM_IOC_DATA_CLEAN, HSM_PRINT_ID_FS, hsm_ioc_datastate_t::id_fs, log_DBG_m, log_FUNC_m, ivd_FS_File::m_fd, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_Inode, ivd_FS_File::m_prop, and hsm_ioc_datastate_t::mod_time.
Referenced by hsm_InoObj::CleanChgFlag(), and hsm_IVDFSRecoverer::ProcRecFileEnd().
00845 { 00846 log_FUNC_m(SetDataClean); 00847 log_DBG_m(dbg_DETAIL, "SetDataClean file inode: " << 00848 HSM_PRINT_ID_FS(m_prop.m_Inode) << 00849 " \tFileID: " << m_prop.m_fileID << 00850 " \tChSize: " << a_size << 00851 " \tChOff : " << a_offset << 00852 " \tmtime : " << a_mtime); 00853 hsm_ioc_datastate_t datastate; 00854 00855 datastate.id_fs = m_prop.m_Inode; 00856 datastate.file_id = m_prop.m_fileID; 00857 datastate.chunk_size = a_size; 00858 datastate.chunk_offset = a_offset; 00859 datastate.mod_time = a_mtime; 00860 00861 if (ioctl(m_fd, HSM_IOC_DATA_CLEAN, &datastate) == -1) { 00862 throw ivd_SysError(errno, "ioctl(HSM_IOC_DATA_CLEAN)"); 00863 } 00864 }

| void ivd_FS_File::SetDataOffline | ( | ivd_FileSize_t | offset = 0, |
|
| ivd_FileSize_t | size = 0 | |||
| ) | [inherited] |
Definition at line 866 of file hpux/ivd_fs_api.cpp.
References hsm_ioc_datastate_t::chunk_offset, hsm_ioc_datastate_t::chunk_size, dbg_DETAIL, errno, hsm_ioc_datastate_t::file_id, HSM_IOC_DATA_OFFLINE, HSM_PRINT_ID_FS, hsm_ioc_datastate_t::id_fs, log_DBG_m, log_FUNC_m, ivd_FS_File::m_fd, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_Inode, and ivd_FS_File::m_prop.
Referenced by i_HSM_i::ForceRelease(), hsm_IVDFSRecoverer::ProcRecFileEnd(), and hsm_InoObj::SetOffline().
00866 { 00867 log_FUNC_m(SetDataOffline); 00868 log_DBG_m(dbg_DETAIL, "SetDataOffline file inode: " << 00869 HSM_PRINT_ID_FS(m_prop.m_Inode) << 00870 " \tFileID: " << m_prop.m_fileID << 00871 " \tChSize: " << a_size << 00872 " \tChOff : " << a_offset); 00873 00874 hsm_ioc_datastate_t datastate; 00875 00876 datastate.id_fs = m_prop.m_Inode; 00877 datastate.file_id = m_prop.m_fileID; 00878 datastate.chunk_size = a_size; 00879 datastate.chunk_offset = a_offset; 00880 00881 if (ioctl(m_fd, HSM_IOC_DATA_OFFLINE, &datastate) == -1) { 00882 throw ivd_SysError(errno, "ioctl(HSM_IOC_DATA_OFFLINE)"); 00883 } 00884 }

| void ivd_FS_File::SetDataOnline | ( | ivd_FileSize_t | offset = 0, |
|
| ivd_FileSize_t | size = 0 | |||
| ) | [inherited] |
Definition at line 886 of file hpux/ivd_fs_api.cpp.
References hsm_ioc_datastate_t::chunk_offset, hsm_ioc_datastate_t::chunk_size, dbg_DETAIL, errno, hsm_ioc_datastate_t::file_id, HSM_IOC_DATA_ONLINE, HSM_PRINT_ID_FS, hsm_ioc_datastate_t::id_fs, log_DBG_m, log_FUNC_m, ivd_FS_File::m_fd, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_Inode, and ivd_FS_File::m_prop.
Referenced by hsm_FileHeader::EventOffline(), hsm_FileHeader::Recalled(), hsm_FHADPRecall::RecallFileFromADP(), and hsm_InoObj::SetOffline().
00886 { 00887 log_FUNC_m(SetDataOnline); 00888 log_DBG_m(dbg_DETAIL, "SetDataOnline file inode: " << 00889 HSM_PRINT_ID_FS(m_prop.m_Inode) << 00890 " \tFileID: " << m_prop.m_fileID << 00891 " \tChSize: " << a_size << 00892 " \tChOff : " << a_offset); 00893 00894 hsm_ioc_datastate_t datastate; 00895 00896 datastate.id_fs = m_prop.m_Inode; 00897 datastate.file_id = m_prop.m_fileID; 00898 datastate.chunk_size = a_size; 00899 datastate.chunk_offset = a_offset; 00900 00901 if (ioctl(m_fd, HSM_IOC_DATA_ONLINE, &datastate) == -1) { 00902 throw ivd_SysError(errno, "ioctl(HSM_IOC_DATA_ONLINE)", true); 00903 } 00904 }

| void ivd_FileSystemAPI::SetDebug | ( | UInt32_t | a_dbgIVDFS | ) | [inherited] |
Definition at line 345 of file hpux/ivd_fs_api.cpp.
References errno, HSM_IOC_SET_DEBUG, log_FUNC_m, and ivd_FileSystemAPI::m_fd.
00345 { 00346 log_FUNC_m(SetDebug); 00347 if (ioctl(m_fd, HSM_IOC_SET_DEBUG, a_dbgIVDFS) < 0) { 00348 throw ivd_SysError(errno, "ioctl(HSM_IOC_SET_DEBUG)", true); 00349 } 00350 }
| void ivd_FS_Event::SetErrorCode | ( | UInt32_t | a_code | ) | [inherited] |
Definition at line 752 of file linux/ivd_fs_api.cpp.
References log_FUNC_m, and ivd_FS_Event::m_errorCode.
00752 { 00753 log_FUNC_m(SetErrorCode); 00754 m_errorCode = a_code; 00755 }
| void ivd_FS_File::SetFileID | ( | ivd_FileID_t | fileID, | |
| ivd_FileSize_t | a_chunkSize | |||
| ) | [inherited] |
Definition at line 802 of file hpux/ivd_fs_api.cpp.
References hsm_ioc_setfileid_t::chunk_size, dbg_DETAIL, dbg_LOW, errno, hsm_ioc_setfileid_t::file_id, HSM_IOC_SET_FILEID, HSM_IOCTL_RETRY_COUNT, HSM_IOCTL_RETRY_DELAY, HSM_PRINT_ID_FS, hsm_ioc_setfileid_t::id_fs, log_DBG_m, log_FUNC_m, ivd_FS_File::m_fd, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_Inode, and ivd_FS_File::m_prop.
Referenced by hsm_IVDFSRecoverer::ProcRecFileEnd(), and hsm_InoObj::SetFileID().
00802 { 00803 log_FUNC_m(SetFileID); 00804 log_DBG_m(dbg_DETAIL, "SetFileID file inode: " << 00805 HSM_PRINT_ID_FS(m_prop.m_Inode) << 00806 "\tFileID: " << a_fileID << 00807 "\tChunkSize:" << a_chunkSize); 00808 00809 hsm_ioc_setfileid_t sfid; 00810 00811 sfid.file_id = a_fileID; 00812 sfid.chunk_size = a_chunkSize; 00813 sfid.id_fs = m_prop.m_Inode; 00814 m_prop.m_fileID = a_fileID; 00815 00816 Int32_t ret = 0; 00817 UInt32_t slp = 0; 00818 00819 do { 00820 if (ioctl(m_fd, HSM_IOC_SET_FILEID, &sfid) == -1) { 00821 ret = errno; 00822 } else { 00823 ret = 0; 00824 } 00825 if (ret == EAGAIN) { 00826 log_DBG_m(dbg_LOW, "HSM_IOC_SET_FILEID returned EAGAIN."); 00827 if (slp < HSM_IOCTL_RETRY_COUNT) { 00828 log_DBG_m(dbg_LOW, "Sleep and retry after " 00829 << slp*HSM_IOCTL_RETRY_DELAY << " miliseconds."); 00830 usleep(slp*HSM_IOCTL_RETRY_DELAY*1000); 00831 } 00832 } 00833 slp++; 00834 } while ((ret == EAGAIN) && (slp <= HSM_IOCTL_RETRY_COUNT)); 00835 if (ret) { 00836 throw ivd_SysError(ret, "ioctl(HSM_IOC_SET_FILEID)"); 00837 } 00838 }

| void ivd_FS_File::SetFileSize | ( | ivd_FileSize_t | a_size | ) | [inherited] |
Definition at line 840 of file hpux/ivd_fs_api.cpp.
References ivd_FS_FileProperty_t::m_fileSize, and ivd_FS_File::m_prop.
Referenced by hsm_IVDFSRecoverer::ProcRecFileEnd().
00840 { 00841 m_prop.m_fileSize = a_size; 00842 }

| void ivd_FS_File::SetFullPath | ( | const cmn_Path & | a_fullpath | ) | [inline, inherited] |
Definition at line 420 of file ivd_fs_api.h.
Referenced by hsm_FileHeader::Recalled(), hsm_InoObj::SetOffline(), and i_HSM_i::UnPackFile().
00420 { 00421 m_file.SetFullPath(a_fullpath); 00422 }

| void ivd_FS_File::SetInode | ( | ivd_GenInode_t | a_inode | ) | [inline, inherited] |
Definition at line 397 of file ivd_fs_api.h.
Referenced by hsm_IVDFSRecoverer::CreateFile(), and hsm_IVDFSRecoverer::ProcRecFileHdr().

| void ivd_FileSystemAPI::SetLimitedAccessMode | ( | const string & | a_VolumeName, | |
| ivd_FS_OpMode_e | a_OpMode | |||
| ) | [inherited] |
| void ivd_Delay::SetProperties | ( | int | a_step, | |
| int | a_maxMiliSecWait, | |||
| int | a_miliSecWaitUnit | |||
| ) | [inherited] |
Definition at line 163 of file hsm_fs_api.cpp.
References dbg_LOW, ivd_Delay::Fibonacci(), log_DBG_m, log_FUNC_m, ivd_Delay::m_maxMiliSecWait, ivd_Delay::m_maxMiliSecWait_c, ivd_Delay::m_maxMiliSecWaitUnit_c, ivd_Delay::m_maxStep_c, ivd_Delay::m_miliSecWaitUnit, ivd_Delay::m_step, and ivd_Delay::SetProperties().
00165 { 00166 log_FUNC_m(SetProperties); 00167 00168 m_step = a_step; 00169 if (m_step > m_maxStep_c) { 00170 m_step = m_maxStep_c; 00171 } 00172 00173 m_maxMiliSecWait = a_maxMiliSecWait <= m_maxMiliSecWait_c 00174 ? a_maxMiliSecWait 00175 : m_maxMiliSecWait_c; 00176 00177 m_miliSecWaitUnit = a_miliSecWaitUnit <= m_maxMiliSecWaitUnit_c 00178 ? a_miliSecWaitUnit 00179 : m_maxMiliSecWaitUnit_c; 00180 00181 if (m_miliSecWaitUnit < 1) { 00182 m_miliSecWaitUnit = 1; 00183 } 00184 00185 if (m_maxMiliSecWait < m_miliSecWaitUnit) { 00186 m_maxMiliSecWait = m_miliSecWaitUnit * 2; 00187 } 00188 00189 00190 Fibonacci(); 00191 log_DBG_m(dbg_LOW, " arguments : a_step=" << a_step 00192 << ", a_maxMiliSecWait=" << a_maxMiliSecWait 00193 << ", a_miliSecWaitUnit=" << a_miliSecWaitUnit); 00194 log_DBG_m(dbg_LOW, *this); 00195 }

| void ivd_Delay::SetProperties | ( | const string & | a_eventRatePolicy | ) | [inherited] |
Definition at line 146 of file hsm_fs_api.cpp.
References log_FUNC_A_m.
Referenced by fs_api::fs_api(), and ivd_Delay::SetProperties().
00146 { 00147 log_FUNC_A_m(SetProperties(), "policy:" << a_eventRatePolicy); 00148 00149 if (a_eventRatePolicy.empty()) { 00150 return; 00151 } 00152 00153 int step; 00154 int maxMiliSecWait; 00155 int miliSecWaitUnit; 00156 00157 istringstream policy(a_eventRatePolicy); 00158 policy >> step >> maxMiliSecWait >> miliSecWaitUnit; 00159 SetProperties(step, maxMiliSecWait, miliSecWaitUnit); 00160 }

| void ivd_FS_Event::SetRequestorInfo | ( | void | ) | [inherited] |
Definition at line 598 of file linux/ivd_fs_api.cpp.
References log_FUNC_m.
00598 { 00599 log_FUNC_m(SetRequestorInfo); 00600 00601 }
| void ivd_FileSystemAPI::SetRootPath | ( | cmn_Path | a_rootPath | ) | [inline, inherited] |
Definition at line 195 of file ivd_fs_api.h.
Referenced by fs_api::EventMounted().
00195 { m_rootPath = a_rootPath; };

| void ivd_FS_File::SetStatAttr | ( | ivd_FileInfo_t & | a_info | ) | [inherited] |
Used at recovery to restore owner, group, and all four times.
Definition at line 1024 of file hpux/ivd_fs_api.cpp.
References cmn_UTF8ToLocale(), cmn_File::GetFullPathRef(), log_FUNC_m, ivd_FS_File::m_file, and path.
Referenced by hsm_IVDFSRecoverer::ProcRecFileEnd().
01024 { 01025 log_FUNC_m(SetStatAttr); 01026 01027 string csName(cmn_UTF8ToLocale(m_file.GetFullPathRef())); 01028 01029 const char *path = csName.c_str(); 01030 // set owner, mode and times 01031 int ret = chown(path, a_info.owner, a_info.group); 01032 ret = chmod(path, a_info.attr & 0xFFFF); 01033 01034 struct utimbuf time; 01035 time.actime = a_info.timeAccess; 01036 time.modtime = a_info.timeModify; 01037 01038 ret = utime(path, &time); 01039 }


| void ivd_FS_File::SetStreamHeader | ( | UInt32_t | a_streamType | ) | [inline, inherited] |
Definition at line 379 of file ivd_fs_api.h.
00379 { 00380 SetStreamHeader(a_streamType, string(""), m_prop.m_fileSize); 00381 };
| void ivd_FS_File::SetStreamHeader | ( | UInt32_t | a_streamType, | |
| const string & | a_streamName, | |||
| ivd_FilePosition_t | a_streamSize | |||
| ) | [inherited] |
Set next file stream (data, meta or alternate data) - used for recall.
Definition at line 769 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m, ivd_FS_File::m_file, and cmn_File::SetStreamHeader().
Referenced by hsm_IVDFSRecoverer::ProcRecBSStart(), hsm_FHADPRecall::RecallFileFromADP(), and i_HSM_i::UnPackFile().
00771 { 00772 log_FUNC_m(SetStreamHeader); 00773 return m_file.SetStreamHeader(a_streamType, a_streamName, a_streamSize); 00774 }


| void ivd_FS_File::StatF | ( | ivd_FileInfo_t & | a_info | ) | [inline, inherited] |
Definition at line 434 of file ivd_fs_api.h.
Referenced by hsm_IVDFSRecoverer::CreateFile(), hsm_IVDFSRecoverer::ProcRecFileHdr(), and hsm_FHADPRecall::RecallFileFromADP().

| void ivd_FS_File::TriggerEvent | ( | Event_e | a_event | ) | [inherited] |
Definition at line 978 of file hpux/ivd_fs_api.cpp.
References hsm_ioc_triggevent_t::chunk_offset, hsm_ioc_triggevent_t::chunk_size, dbg_DETAIL, ivd_FS_File::e_MigrateEvt, ivd_FS_File::e_RecallEvt, errno, hsm_ioc_triggevent_t::evt, file, fom_OPEN_EXISTING, fom_READ, cmn_File::GetFullPathRef(), HSM_EVT_CHG_DATA, HSM_EVT_DATA_OFFL, HSM_IOC_TRIGGER_EVENT, HSM_PRINT_ID_FS, hsm_ioc_triggevent_t::id_fs, ie_HSM_NOEVENT, ift_DIR, ift_FILE, ivd_Error, log_DBG_m, log_FUNC_m, ivd_FS_File::m_fd, ivd_FS_File::m_file, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_File::m_prop, and ivd_FS_FileProperty_t::m_type.
Referenced by i_HSM_i::ActivateFiles(), i_HSM_i::ForceMigration(), hsm_FHADPRecall::RecallFileFromADP(), ivd_FS_File::ReplySyncEvents(), and Collocation::TrigMigration().
00978 { 00979 log_FUNC_m(TriggerEvent); 00980 00981 hsm_ioc_triggevent_t tevt; 00982 00983 log_DBG_m(dbg_DETAIL, 00984 "Inode : " << HSM_PRINT_ID_FS(m_prop.m_Inode) 00985 << " fileSize " << m_prop.m_fileSize); 00986 00987 tevt.id_fs = m_prop.m_Inode; 00988 tevt.chunk_size = m_prop.m_fileSize; 00989 tevt.chunk_offset = 0; 00990 switch (a_event) { 00991 case e_RecallEvt: 00992 tevt.evt = HSM_EVT_DATA_OFFL; 00993 00994 break; 00995 case e_MigrateEvt: 00996 tevt.evt = HSM_EVT_CHG_DATA; 00997 break; 00998 default: 00999 throw ivd_Error(ie_HSM_NOEVENT, "Unsupported event type.", true); 01000 } 01001 01002 if (m_prop.m_type == ift_FILE) { 01003 cmn_File file(m_file.GetFullPathRef()); 01004 file.OpenF(fom_READ | fom_OPEN_EXISTING); 01005 if (ioctl(m_fd, HSM_IOC_TRIGGER_EVENT, &tevt) < 0) { 01006 if(errno == EACCES){ 01007 throw ivd_SysError(errno, "HSM attr db migration is not allowed",false); 01008 }else{ 01009 throw ivd_SysError(errno, "ioctl(HSM_IOC_TRIGGER_EVENT)", true); 01010 } 01011 } 01012 } 01013 else if (m_prop.m_type == ift_DIR) { 01014 cmn_FastDirLst dirList(m_file.GetFullPathRef()); 01015 if (ioctl(m_fd, HSM_IOC_TRIGGER_EVENT, &tevt) < 0) { 01016 throw ivd_SysError(errno, "ioctl(HSM_IOC_TRIGGER_EVENT)", true); 01017 } 01018 } 01019 else { 01020 throw ivd_SysError(ENOENT, "Not file or directory.", true); 01021 } 01022 }


| void ivd_FileSystemAPI::TriggerTerminateEvent | ( | void | ) | [inherited] |
Definition at line 367 of file hpux/ivd_fs_api.cpp.
References log_FUNC_m.
Referenced by i_HSM_i::Remove().
00367 { 00368 log_FUNC_m(TriggerTerminateEvent); 00369 }

| void UpdateContentData | ( | ivd_MediaKey_t | a_mediumKey, | |
| ivd_MedVolNum_t | a_medVolNum, | |||
| ivd_FileSize_t | a_dataSize | |||
| ) |
Definition at line 91 of file fsc_GlobalObj.cpp.
References dbg_DETAIL, log_DBG_m, log_FUNC_m, ivd_ScanInfo_t::mediumKey, ivd_ScanInfo_t::medvolNum, ivd_ScanInfo_t::totalSize, and UpdateContentData().
Referenced by UpdateContentData(), and fsc_ReorgScanContentVolStorage::~fsc_ReorgScanContentVolStorage().
00093 { 00094 log_FUNC_m(UpdateContentData); 00095 log_DBG_m(dbg_DETAIL,"a_mediumKey: " << a_mediumKey << 00096 " a_medVolNum: " << a_medVolNum << 00097 " a_dataSize: " << a_dataSize); 00098 bool found(false); 00099 ivd_ScanInfo_v_i iter = g_fscScanInfo.begin(); 00100 for (; iter != g_fscScanInfo.end(); iter++) { 00101 ivd_ScanInfo_t &scanInfo = *iter; 00102 if ((scanInfo.mediumKey == a_mediumKey) && 00103 (scanInfo.medvolNum == a_medVolNum) ) { 00104 found = true; 00105 scanInfo.totalSize = a_dataSize; 00106 } 00107 } 00108 if (!found){ 00109 g_fscScanInfo.push_back( ivd_ScanInfo_t(a_mediumKey, 00110 a_medVolNum, 00111 a_dataSize, 00112 0)); 00113 } 00114 }


| void UpdateReorgData | ( | ivd_MediaKey_t | a_mediumKey, | |
| ivd_MedVolNum_t | a_medVolNum, | |||
| ivd_FileSize_t | a_dataSize | |||
| ) |
Definition at line 65 of file fsc_GlobalObj.cpp.
References dbg_DETAIL, log_DBG_m, log_FUNC_m, ivd_ScanInfo_t::mediumKey, ivd_ScanInfo_t::medvolNum, ivd_ScanInfo_t::reorgSize, and UpdateReorgData().
Referenced by UpdateReorgData(), and fsc_ReorgScanReorgVolStorage::~fsc_ReorgScanReorgVolStorage().
00067 { 00068 log_FUNC_m(UpdateReorgData); 00069 log_DBG_m(dbg_DETAIL,"a_mediumKey: " << a_mediumKey << 00070 " a_medVolNum: " << a_medVolNum << 00071 " a_dataSize: " << a_dataSize); 00072 bool found(false); 00073 ivd_ScanInfo_v_i iter = g_fscScanInfo.begin(); 00074 for (; iter != g_fscScanInfo.end(); iter++) { 00075 ivd_ScanInfo_t &scanInfo = *iter; 00076 if ((scanInfo.mediumKey == a_mediumKey) && 00077 (scanInfo.medvolNum == a_medVolNum) ) { 00078 found = true; 00079 scanInfo.reorgSize = a_dataSize; 00080 } 00081 } 00082 if (!found){ 00083 g_fscScanInfo.push_back( ivd_ScanInfo_t(a_mediumKey, 00084 a_medVolNum, 00085 0, 00086 a_dataSize)); 00087 } 00088 }


| ivd_FileRetSize_t ivd_FS_File::WriteF | ( | const void * | a_buf, | |
| ivd_FileBufSize_t | a_size | |||
| ) | [inherited] |
Definition at line 781 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::m_file, and cmn_File::WriteF().
Referenced by hsm_RecallInfoGrp::WriteF().


| ivd_FileRetSize_t ivd_FS_File::WriteStream | ( | const void * | a_buf, | |
| ivd_FileBufSize_t | a_size | |||
| ) | [inherited] |
Write current file stream - used for recall.
Definition at line 776 of file hpux/ivd_fs_api.cpp.
References ivd_FS_File::m_file, and cmn_File::WriteStream().
Referenced by hsm_IVDFSRecoverer::ProcRecEmbData(), hsm_IVDFSRecoverer::ProcRecRawData(), hsm_FHADPRecall::RecallFileFromADP(), and i_HSM_i::UnPackFile().
00777 { 00778 return m_file.WriteStream(a_buf, a_size); 00779 }


| fs_api::~fs_api | ( | ) | [virtual, inherited] |
NULL statement
Definition at line 373 of file hsm_fs_api.cpp.
References log_FUNC_m.
00373 { 00374 log_FUNC_m(~fs_api); 00376 }
| ivd_FileSystemAPI::~ivd_FileSystemAPI | ( | void | ) | [virtual, inherited] |
Definition at line 131 of file hpux/ivd_fs_api.cpp.
References dbg_NORM, log_DBG_m, log_FUNC_m, ivd_FileSystemAPI::m_devFile, and ivd_FileSystemAPI::m_fd.
00131 { 00132 log_FUNC_m(~ivd_FileSystemAPI); 00133 close (m_fd); 00134 log_DBG_m(dbg_NORM, "Event Manager is stopped. Closed device " << m_devFile); 00135 }
| ivd_FS_Event::~ivd_FS_Event | ( | void | ) | [inherited] |
Definition at line 432 of file hpux/ivd_fs_api.cpp.
References free(), log_FUNC_m, ivd_FS_Event::m_buff_p, and NULL.
00432 { 00433 log_FUNC_m(~ivd_FS_Event); 00434 if (m_buff_p != NULL) { 00435 free(m_buff_p); 00436 } 00437 }

| ivd_FS_FileProperty_t::~ivd_FS_FileProperty_t | ( | ) | [inline, inherited] |
| const unsigned int c_lastVecIdx |
Definition at line 40 of file fsc_GenerationMgr.cpp.
Referenced by fsc_GenerationMgr::fsc_GenerationMgr().
| const unsigned int c_maxArraySize |
Definition at line 38 of file fsc_nsDirEntryFormattedVec.cpp.
Referenced by fsc_nsDirEntryFormattedVec::fsc_nsDirEntryFormattedVec().
| const unsigned int c_maxNumOfMember |
Definition at line 41 of file fsc_GenerationMgr.cpp.
Referenced by fsc_nsDirEntryFormattedVec::Write2DB(), and fsc_GenerationMgr::Write2DB().
| const unsigned int c_maxRFVecSize |
Definition at line 39 of file fsc_GenerationMgr.cpp.
Referenced by fsc_nsDirEntryVec::CreateNextVector(), fsc_GenerationMgr::fsc_GenerationMgr(), fsc_nsDirEntryFormattedVec::fsc_nsDirEntryFormattedVec(), fsc_nsDirEntryFormattedVec::Write2DB(), and fsc_GenerationMgr::Write2DB().
| const unsigned int c_preSizeIdx |
Definition at line 41 of file fsc_nsDirEntryFormattedVec.cpp.
Referenced by fsc_nsDirEntryFormattedVec::Write2DB().
UInt32_t ivd_CommCtx_t::close_to [inherited] |
Definition at line 72 of file ivd_fs_api.h.
UInt32_t ivd_FS_Cfg_t::debugLevel [inherited] |
Definition at line 46 of file ivd_fs_api.h.
| const int fsc_DataLCacheSize_c |
Definition at line 35 of file fsc_GlobalObj.cpp.
void* ivd_VolInfoEntry_t::fsdo_attached_do [inherited] |
Definition at line 94 of file ivd_fs_api.h.
ivd_CommCtx_t ivd_VolInfoEntry_t::fsdo_comctx [inherited] |
Definition at line 99 of file ivd_fs_api.h.
void* ivd_VolInfoEntry_t::fsdo_dev_ptr [inherited] |
Definition at line 91 of file ivd_fs_api.h.
void* ivd_VolInfoEntry_t::fsdo_devext [inherited] |
Definition at line 93 of file ivd_fs_api.h.
UInt32_t ivd_VolInfoEntry_t::fsdo_nof_file [inherited] |
Definition at line 98 of file ivd_fs_api.h.
UInt32_t ivd_VolInfoEntry_t::fsdo_nof_filectx [inherited] |
Definition at line 97 of file ivd_fs_api.h.
ivd_FS_OpMode_e ivd_VolInfoEntry_t::fsdo_op_mode [inherited] |
Definition at line 92 of file ivd_fs_api.h.
void* ivd_VolInfoEntry_t::fsdo_realdo [inherited] |
Definition at line 95 of file ivd_fs_api.h.
UInt32_t ivd_VolInfoEntry_t::fsdo_worm_to [inherited] |
Definition at line 96 of file ivd_fs_api.h.
cache for fast insert
Definition at line 43 of file fsc_GlobalObj.cpp.
Referenced by fsc_DataLMgr::DumpTree(), fsc_DataLMgr::FastInsert(), fsc_DataLMgr::FlushChangesAndCleanCache(), fsc_FRIunpacker::fsc_FRIunpacker(), fsc_DataLMgr::Insert(), i_FSC_i::InsertSplitFromFRIBlock(), and fsc_DataLMgr::Remove().
| fs_api* g_fs_api_p |
Referenced by i_HSM_i::ActivateFiles(), hsm_ActiveFH::ActiveToList(), TreeWalk::CheckDir(), MigrateTreewalk::CheckDir(), i_HSM_i::CheckFSCvsIVDFS(), CheckRootMembersForEA(), hsm_InoObj::CleanChgFlag(), hsm_FileHeader::CompleteMigIsDone(), fs_api::CreateNewFH(), i_HSM_i::DoDeletion(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), i_HSM_i::GetInfo(), GetInodeObj(), hsm_FHrelc::hsm_FHrelc(), hsmGetDirFH(), hsm_FHrelc::Init(), hsm_FileHeader::InitActive(), i_HSM_i::IVDFSPrepareRecovery(), main(), hsm_FileHeader::MakeStat(), i_HSM_i::MigrateByAPI(), hsm_FileHeader::OpenFile(), hsm_ActiveFH::OrphanedToMigList(), i_HSM_i::PackFile(), hsm_Recall::ProcRecBSStart(), hsm_IVDFSRecoverer::ProcRecFileHdr(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), hsm_FHADPRecall::RecallFileFromADP(), i_HSM_i::Reconfigure(), hsm_FHrelc::Reconfigure(), i_HSM_i::Remove(), hsm_FHmigc::SendToPM(), hsm_InoObj::SetFileID(), i_HSM_i::SetFullAccess(), hsm_InoObj::SetOffline(), hsm_FileHeader::SetOffline(), i_HSM_i::ShowStatus(), hsm_FileHeader::ToMigCand(), i_HSM_i::TrigEfficientRecall(), i_HSM_i::TrigRecall(), hsm_FHrelc::Truncate(), and hsm_FileHeader::TruncateFile().
transaction for fast insert set when dataLMgr is instantiated
Definition at line 48 of file fsc_GlobalObj.cpp.
Referenced by fsc_DataLMgr::FlushChangesAndCleanCache(), fsc_DataLMgr::fsc_DataLMgr(), fsc_nsDirectory::RemoveNotification(), and fsc_DataL::RemoveNotification().
Only one thread can change FSC at once.
Better performance, because it is possible to handle more file changes in one transaction. NSC can't work with simultaneous changes, because of directory's member.
Definition at line 55 of file fsc_GlobalObj.cpp.
Referenced by fsc_RawScan::DirTreeWalk(), fsc_DataLMgr::Insert(), i_FSC_i::InsertSplitFromFRIBlock(), fsc_DataLMgr::Remove(), and fsc_RawScan::ScanAllFileID().
g_fsLog is same as ivdfs log that is used in HSM for logging file event.
InFSC will be uset to log removing of file from FSC.
Definition at line 55 of file ivd-hsm.cpp.
g_fsLog is same as ivdfs log that is used in HSM for logging file event.
InFSC will be uset to log removing of file from FSC.
Definition at line 55 of file ivd-hsm.cpp.
Referenced by hsm_FileHeader::Event(), i_FSC_i::i_FSC_i(), hsm_FileHeader::MigrationIsDone(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), and fsc_DataL::Write2DB().
global cache for caching NSC directory elements used per each transaction.
Definition at line 39 of file fsc_GlobalObj.cpp.
Referenced by fsc_nsCreateDirectoryObj(), fsc_nsCreateElementObj(), and fsc_nsRemoveElementObj().
bool ivd_RequestorInfo_t::is_remote_call [inherited] |
Definition at line 121 of file ivd_fs_api.h.
| IVD_FSAPI_DECL_d const UInt16_t ivd_FS_ERR_Reply |
Definition at line 50 of file hpux/ivd_fs_api.cpp.
Referenced by hsm_FileHeader::EventOffline(), main(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), and hsm_FHADPRecall::RecallFileFromADP().
| IVD_FSAPI_DECL_d const UInt16_t ivd_FS_OK_Reply |
Definition at line 47 of file hpux/ivd_fs_api.cpp.
Referenced by hsm_FileHeader::EventOffline(), fs_api::EventPredismount(), main(), hsm_FileHeader::Recalled(), and hsm_FHADPRecall::RecallFileFromADP().
ivd_Delay::log_CLASSID_m [private, inherited] |
Definition at line 62 of file hsm_fs_api.h.
ivd_FS_File::log_CLASSID_m [inherited] |
Definition at line 340 of file ivd_fs_api.h.
ivd_FS_Event::log_CLASSID_m [inherited] |
Definition at line 219 of file ivd_fs_api.h.
ivd_FileSystemAPI::log_CLASSID_m [inherited] |
void* ivd_FS_Event::m_buff_p [private, inherited] |
Definition at line 281 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::GetRootDir(), ivd_FS_Event::ivd_FS_Event(), ivd_FS_Event::operator=(), ivd_FS_Event::ReplySyncEvent(), ivd_FileSystemAPI::Run(), and ivd_FS_Event::~ivd_FS_Event().
UInt32_t ivd_FS_Event::m_cancelReqId [private, inherited] |
UInt8_t ivd_FS_Event::m_cause [private, inherited] |
Definition at line 283 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetCause(), ivd_FS_Event::operator=(), ivd_FileSystemAPI::Run(), and ivd_FS_Event::SetCause().
ivd_Time_t ivd_FS_FileProperty_t::m_chgTime [inherited] |
Definition at line 315 of file ivd_fs_api.h.
Referenced by hsm_IVDFSRecoverer::CreateFile(), ivd_FS_File::GetProperties(), i_HSM_i::PackFile(), and hsm_IVDFSRecoverer::ProcRecFileEnd().
UInt8_t ivd_FS_Event::m_chnFlag [private, inherited] |
Definition at line 274 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetChnFlag(), and ivd_FS_Event::operator=().
ivd_FileSize_t ivd_FS_Event::m_chnSize [private, inherited] |
Definition at line 275 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetChnSize(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_Time_t ivd_FS_Event::m_chnTime [private, inherited] |
Definition at line 276 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetChnTime(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_FileSize_t ivd_FS_FileProperty_t::m_chunkSize [inherited] |
Definition at line 317 of file ivd_fs_api.h.
Referenced by GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), and hsm_FileHeader::InitActive().
string ivd_FileSystemAPI::m_devFile [private, inherited] |
Definition at line 201 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::ivd_FileSystemAPI(), and ivd_FileSystemAPI::~ivd_FileSystemAPI().
bool ivd_FS_FileProperty_t::m_dirtyFlag [inherited] |
Definition at line 318 of file ivd_fs_api.h.
Referenced by i_HSM_i::ActivateFiles(), TreeWalk::CheckDir(), MigrateTreewalk::CheckDir(), CheckRootMembersForEA(), hsm_IVDFSRecoverer::CreateFile(), i_HSM_i::ForceRelease(), GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), hsm_FileHeader::InitActive(), and i_HSM_i::MigrateByAPI().
UInt32_t ivd_FS_Event::m_errorCode [private, inherited] |
Definition at line 284 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::GetErrorCode(), and ivd_FS_Event::SetErrorCode().
ivd_Delay fs_api::m_eventRateRegulation [private, inherited] |
Definition at line 159 of file hsm_fs_api.h.
Referenced by fs_api::EventDelay(), and fs_api::fs_api().
ivd_FileSize_t ivd_FS_Event::m_fChOff [private, inherited] |
Definition at line 269 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetChunkOff(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_FileSize_t ivd_FS_Event::m_fChSize [private, inherited] |
Definition at line 268 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetChunkSize(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_FileHandle_t ivd_FS_File::m_fd [private, inherited] |
Definition at line 447 of file ivd_fs_api.h.
Referenced by ivd_FS_File::GetProperties(), ivd_FS_File::SetDataClean(), ivd_FS_File::SetDataOffline(), ivd_FS_File::SetDataOnline(), ivd_FS_File::SetFileID(), and ivd_FS_File::TriggerEvent().
ivd_FileHandle_t ivd_FS_Event::m_fd [private, inherited] |
Definition at line 282 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::operator=(), ivd_FS_Event::ReplySyncEvent(), and ivd_FileSystemAPI::Run().
ivd_FileHandle_t ivd_FileSystemAPI::m_fd [private, inherited] |
Definition at line 196 of file ivd_fs_api.h.
Referenced by ivd_FileSystemAPI::GetDevHandle(), ivd_FileSystemAPI::ivd_FileSystemAPI(), ivd_FileSystemAPI::Run(), ivd_FileSystemAPI::SetConfiguration(), ivd_FileSystemAPI::SetDebug(), and ivd_FileSystemAPI::~ivd_FileSystemAPI().
ivd_FileID_t ivd_PathEntry_t::m_fID [inherited] |
Definition at line 62 of file ivd_fs_api.h.
cmn_File ivd_FS_File::m_file [private, inherited] |
Definition at line 450 of file ivd_fs_api.h.
Referenced by ivd_FS_File::Close(), ivd_FS_File::GetStreamHeader(), ivd_FS_File::IsOfflineProlonged(), ivd_FS_File::ivd_FS_File(), ivd_FS_File::Open(), ivd_FS_File::ReadStream(), ivd_FS_File::Release(), ivd_FS_File::SeekF(), ivd_FS_File::SetStatAttr(), ivd_FS_File::SetStreamHeader(), ivd_FS_File::TriggerEvent(), ivd_FS_File::WriteF(), and ivd_FS_File::WriteStream().
ivd_FileID_t ivd_FS_FileProperty_t::m_fileID [inherited] |
Definition at line 314 of file ivd_fs_api.h.
Referenced by i_HSM_i::ActivateFiles(), TreeWalk::CheckDir(), MigrateTreewalk::CheckDir(), CheckRootMembersForEA(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), hsm_FileHeader::InitActive(), hsm_ActiveFH::OrphanedToMigList(), hsm_IVDFSRecoverer::ProcRecFileHdr(), ivd_FS_File::SetCollocationId(), ivd_FS_File::SetDataClean(), ivd_FS_File::SetDataOffline(), ivd_FS_File::SetDataOnline(), ivd_FS_File::SetFileID(), hsm_FileHeader::ToMigCand(), and i_HSM_i::TrigEfficientRecall().
ivd_FileID_t ivd_FS_Event::m_fileID [private, inherited] |
Definition at line 278 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetFileID(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_FS_FileOperation_e ivd_FS_File::m_fileOp [private, inherited] |
ivd_FileSize_t ivd_FS_FileProperty_t::m_fileSize [inherited] |
Definition at line 316 of file ivd_fs_api.h.
Referenced by TreeWalk::CheckDir(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceRelease(), GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), hsm_FileHeader::InitActive(), ivd_FS_File::ivd_FS_File(), ivd_FS_File::Release(), ivd_FS_File::SetFileSize(), hsm_FileHeader::ToMigCand(), ivd_FS_File::TriggerEvent(), and hsm_FileHeader::TruncateFile().
ivd_FileType_e ivd_FS_Event::m_fileType [private, inherited] |
Definition at line 267 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetFileType(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_GenInode_t ivd_PathEntry_t::m_fInode [inherited] |
Definition at line 60 of file ivd_fs_api.h.
cmn_Path ivd_PathEntry_t::m_fName [inherited] |
Definition at line 63 of file ivd_fs_api.h.
string fs_api::m_fsUUID [inherited] |
Definition at line 133 of file hsm_fs_api.h.
Referenced by fs_api::EventMounted(), and i_HSM_i::TrigRecall().
bool ivd_FS_Event::m_getOldPath [private, inherited] |
Definition at line 291 of file ivd_fs_api.h.
bool ivd_FS_Event::m_getPath [private, inherited] |
Definition at line 290 of file ivd_fs_api.h.
bool ivd_FS_File::m_gotProp [private, inherited] |
bool fs_api::m_initialized [private, inherited] |
Definition at line 155 of file hsm_fs_api.h.
Referenced by fs_api::Destroy(), and fs_api::Initialize().
ivd_GenInode_t ivd_FS_FileProperty_t::m_Inode [inherited] |
Definition at line 312 of file ivd_fs_api.h.
Referenced by hsm_ActiveFH::ActiveToList(), TreeWalk::CheckDir(), MigrateTreewalk::CheckDir(), CheckRootMembersForEA(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceRelease(), GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), hsmGetFH(), hsm_FileHeader::InitActive(), ivd_FS_File::ivd_FS_File(), i_HSM_i::MigrateByAPI(), hsm_ActiveFH::OrphanedToMigList(), ivd_FS_File::SetCollocationId(), ivd_FS_File::SetDataClean(), ivd_FS_File::SetDataOffline(), ivd_FS_File::SetDataOnline(), ivd_FS_File::SetFileID(), i_HSM_i::TrigEfficientRecall(), and ivd_FS_File::TriggerEvent().
int ivd_Delay::m_levels [private, inherited] |
Definition at line 75 of file hsm_fs_api.h.
Referenced by ivd_Delay::Delay(), ivd_Delay::Fibonacci(), and operator<<().
UInt64_t ivd_FS_FileProperty_t::m_majColId [inherited] |
int ivd_Delay::m_maxMiliSecWait [private, inherited] |
Definition at line 66 of file hsm_fs_api.h.
Referenced by ivd_Delay::Fibonacci(), operator<<(), and ivd_Delay::SetProperties().
const int ivd_Delay::m_maxMiliSecWait_c = 180000 [static, private, inherited] |
Definition at line 71 of file hsm_fs_api.h.
Referenced by operator<<(), and ivd_Delay::SetProperties().
const int ivd_Delay::m_maxMiliSecWaitUnit_c = 1000 [static, private, inherited] |
Definition at line 72 of file hsm_fs_api.h.
Referenced by operator<<(), and ivd_Delay::SetProperties().
const int ivd_Delay::m_maxNumOfLevels_c = MAXNumOfLevels_d [static, private, inherited] |
const int ivd_Delay::m_maxStep_c = 20000 [static, private, inherited] |
int ivd_Delay::m_miliSecWaitUnit [private, inherited] |
Definition at line 67 of file hsm_fs_api.h.
Referenced by ivd_Delay::Delay(), ivd_Delay::Fibonacci(), operator<<(), and ivd_Delay::SetProperties().
UInt64_t ivd_FS_FileProperty_t::m_minColId [inherited] |
bool ivd_FS_FileProperty_t::m_offlineFlag [inherited] |
Definition at line 319 of file ivd_fs_api.h.
Referenced by i_HSM_i::ActivateFiles(), TreeWalk::CheckDir(), CheckRootMembersForEA(), hsm_IVDFSRecoverer::CreateFile(), hsm_FileHeader::EventOffline(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), hsm_FileHeader::InitActive(), and ivd_FS_File::IsOfflineProlonged().
ivd_PathList_t ivd_FS_Event::m_pathList [private, inherited] |
Definition at line 271 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetName(), ivd_FS_Event::GetOSID(), ivd_FS_Event::GetOwnerOSID(), ivd_FS_Event::GetPath(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
ivd_PathList_t ivd_FS_Event::m_pathOldList [private, inherited] |
Definition at line 272 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::Clear(), ivd_FS_Event::GetOldListOSID(), ivd_FS_Event::GetOldPath(), ivd_FS_Event::GetOldPathName(), ivd_FS_Event::operator=(), and ivd_FileSystemAPI::Run().
hsm_Containers* fs_api::m_pCont [private, inherited] |
log_EventLog* fs_api::m_peLog [private, inherited] |
i_HSM_i* fs_api::m_pIHSM [private, inherited] |
ivd_FS_FileProperty_t ivd_FS_File::m_prop [private, inherited] |
Definition at line 449 of file ivd_fs_api.h.
Referenced by ivd_FS_File::GetProperties(), ivd_FS_File::IsOfflineProlonged(), ivd_FS_File::ivd_FS_File(), ivd_FS_File::Release(), ivd_FS_File::SetCollocationId(), ivd_FS_File::SetDataClean(), ivd_FS_File::SetDataOffline(), ivd_FS_File::SetDataOnline(), ivd_FS_File::SetFileID(), ivd_FS_File::SetFileSize(), and ivd_FS_File::TriggerEvent().
UInt64_t ivd_FS_File::m_recallOffset [private, inherited] |
m_recallOffset is used on Win platform because recall of file goes through kernel write function and IOCTL function needs this parameter.
member is set by SeekF method and updated after each WriteF method.
Definition at line 462 of file ivd_fs_api.h.
ivd_RequestorInfo_t ivd_FS_Event::m_requestorInfo [private, inherited] |
cmn_Path ivd_FileSystemAPI::m_rootPath [private, inherited] |
int ivd_Delay::m_sleepLevel[MAXNumOfLevels_d] [private, inherited] |
Definition at line 76 of file hsm_fs_api.h.
Referenced by ivd_Delay::Delay(), ivd_Delay::Fibonacci(), ivd_Delay::ivd_Delay(), and operator<<().
UInt32_t ivd_FS_Event::m_statusCode [private, inherited] |
int ivd_Delay::m_step [private, inherited] |
Definition at line 65 of file hsm_fs_api.h.
Referenced by ivd_Delay::Delay(), operator<<(), and ivd_Delay::SetProperties().
vector<ivd_FS_Event> ivd_FS_File::m_syncEvents [private, inherited] |
Definition at line 454 of file ivd_fs_api.h.
Referenced by ivd_FS_File::AddSyncEvent(), and ivd_FS_File::ReplySyncEvents().
fio_Transaction* fs_api::m_trans_p [private, inherited] |
Definition at line 157 of file hsm_fs_api.h.
Referenced by fs_api::AddGenericEvent(), fs_api::Destroy(), fs_api::EventDelete(), fs_api::EventMove(), fs_api::GetDirFH(), and fs_api::Initialize().
ivd_FileType_e ivd_FS_FileProperty_t::m_type [inherited] |
Definition at line 320 of file ivd_fs_api.h.
Referenced by TreeWalk::CheckDir(), MigrateTreewalk::CheckDir(), i_HSM_i::ForceRelease(), GetInodeObj(), ivd_FS_File::GetProperties(), hsmGetDirFH(), hsm_FileHeader::InitActive(), ivd_FS_File::IsOfflineProlonged(), ivd_FS_File::ivd_FS_File(), i_HSM_i::MigrateByAPI(), and ivd_FS_File::TriggerEvent().
string ivd_FS_Event::m_volumeID [private, inherited] |
Definition at line 279 of file ivd_fs_api.h.
Referenced by ivd_FS_Event::GetVolumeID(), and ivd_FileSystemAPI::Run().
string ivd_FS_File::m_VolumeRoot [private, inherited] |
Definition at line 455 of file ivd_fs_api.h.
bool ivd_FileSystemAPI::m_waitForMountEvent [private, inherited] |
Definition at line 204 of file ivd_fs_api.h.
bool ivd_Delay::m_warningWritten [private, inherited] |
ivd_CommCtx_t ivd_FSInfo_t::mdo_comctx [inherited] |
Definition at line 109 of file ivd_fs_api.h.
string ivd_VolInfoEntry_t::name [inherited] |
Definition at line 87 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::new_event_to [inherited] |
Definition at line 73 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::owner_pid [inherited] |
Definition at line 69 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::owner_tid [inherited] |
Definition at line 70 of file ivd_fs_api.h.
UInt32_t ivd_RequestorInfo_t::pid [inherited] |
Definition at line 117 of file ivd_fs_api.h.
string ivd_RequestorInfo_t::pname [inherited] |
Definition at line 118 of file ivd_fs_api.h.
UInt8_t ivd_CommCtx_t::queue_empty [inherited] |
Definition at line 78 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::queue_head [inherited] |
Definition at line 76 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::queue_tail [inherited] |
Definition at line 77 of file ivd_fs_api.h.
UInt32_t ivd_FSInfo_t::ref_cnt [inherited] |
Definition at line 108 of file ivd_fs_api.h.
UInt32_t ivd_VolInfoEntry_t::ref_cnt [inherited] |
Definition at line 85 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::refcnt [inherited] |
Definition at line 71 of file ivd_fs_api.h.
Int32_t ivd_CommCtx_t::reply_evt_idx [inherited] |
Definition at line 79 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::semaphore_to [inherited] |
Definition at line 74 of file ivd_fs_api.h.
string ivd_RequestorInfo_t::session_info [inherited] |
Definition at line 123 of file ivd_fs_api.h.
string ivd_VolInfoEntry_t::spec_dirs [inherited] |
Definition at line 88 of file ivd_fs_api.h.
ivd_FS_OpMode_e ivd_VolInfoEntry_t::starting_op_mode [inherited] |
Definition at line 86 of file ivd_fs_api.h.
UInt32_t ivd_CommCtx_t::sync_event_to [inherited] |
Definition at line 75 of file ivd_fs_api.h.
UInt32_t ivd_FS_Cfg_t::syncEventTimeout [inherited] |
Definition at line 44 of file ivd_fs_api.h.
Referenced by fs_api::EventMounted(), i_HSM_i::Reconfigure(), ivd_FileSystemAPI::SetConfiguration(), and i_HSM_i::SetFullAccess().
UInt32_t ivd_RequestorInfo_t::tid [inherited] |
Definition at line 119 of file ivd_fs_api.h.
UInt32_t ivd_RequestorInfo_t::type [inherited] |
Definition at line 120 of file ivd_fs_api.h.
string ivd_RequestorInfo_t::user_name [inherited] |
Definition at line 122 of file ivd_fs_api.h.
string ivd_VolInfoEntry_t::voldev_name [inherited] |
Definition at line 89 of file ivd_fs_api.h.
ivd_VolInfoList_t ivd_FSInfo_t::volInfoList [inherited] |
Definition at line 111 of file ivd_fs_api.h.
UInt32_t ivd_FS_Cfg_t::WORMTimeout [inherited] |
Definition at line 45 of file ivd_fs_api.h.
Referenced by fs_api::EventMounted(), i_HSM_i::Reconfigure(), ivd_FileSystemAPI::SetConfiguration(), and i_HSM_i::SetFullAccess().
| void ivd_FileSystemAPI::Run | ( | bool | a_recoveryMode | ) | [friend, inherited] |
| ostream& operator<< | ( | ostream & | o_s, | |
| const ivd_Delay & | a_o | |||
| ) | [friend, inherited] |
Definition at line 121 of file hsm_fs_api.cpp.
00121 { 00122 a_os << "***** ivd_Delay obj properties: *****" << endl; 00123 a_os << " m_maxNumOfLevels_c : " << a_o.m_maxNumOfLevels_c << endl; 00124 a_os << " m_maxMiliSecWait_c : " << a_o.m_maxMiliSecWait_c << endl; 00125 a_os << " m_maxMiliSecWaitUnit_c : " << a_o.m_maxMiliSecWaitUnit_c << endl; 00126 a_os << " m_step : " << a_o.m_step << endl; 00127 a_os << " m_maxMiliSecWait : " << a_o.m_maxMiliSecWait << endl; 00128 a_os << " m_miliSecWaitUnit : " << a_o.m_miliSecWaitUnit << endl; 00129 a_os << " m_levels : " << a_o.m_levels << endl; 00130 a_os << " fibonacci : { "; 00131 for (int i = 0; i < a_o.m_levels; i++) { 00132 a_os << a_o.m_sleepLevel[i] << ", "; 00133 } 00134 a_os << a_o.m_sleepLevel[a_o.m_levels] << " }" << endl; 00135 return a_os; 00136 }
1.5.6