Classes | Defines | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends

G_new_group

Class fsc_nsDirEntryFormattedVec contains fixed size array of type ivd_RecordIDX_t. More...

Classes

class  TreeWalkBackup
struct  ivd_FS_Cfg_t
struct  ivd_PathEntry_t
struct  ivd_CommCtx_t
struct  ivd_VolInfoEntry_t
struct  ivd_FSInfo_t
struct  ivd_RequestorInfo_t
class  ivd_FileSystemAPI
class  ivd_FS_Event
struct  ivd_FS_FileProperty_t
class  ivd_FS_File
class  ivd_Delay
class  fs_api
class  hsm_IVDFSRecoverer
class  hsm_Recall
 Object from class hsm_Recall can be created only if number of i_RecallList_t members is greter that 0. More...
class  hsm_FHADPRecall
struct  hsm_Chunk_t
 class hsm_RecallInfoGrp is a replacement for hsm_RecallInfo It additional work is to collects written data of chunks to file. More...
class  hsm_RecallInfoGrp
class  cmn_FastSearch
 This class is super class for different fast search algorithm on buffer. More...
class  cmn_SkipTbl4FS
 This class hold skip table an pattern for fast search class. More...
class  cmn_FastPattSearch
 This is a class for fast pattern search through buffer. More...
class  cmn_FastZeroSearch
 This is a class for fast search of zeroes through buffer. More...
class  cmn_FastZeroRecSearch
 This is a class for fast search of zeroes through buffer. More...
class  cmn_Path
class  df_LimitedStream
struct  df_AttrHeader_t
struct  df_SplitInfo
 This struct is used by BEA when parsing data format for FRI and by FSC to update its data. More...
class  df_Stream
struct  ivd_MediaChkStat_t
class  ivd_MigrationID
 <Description:> A more elaborate class description that describes all aspects of class usage etc. More...
class  log_File
class  log_ivdfs
class  fio_String< _REL_FILE >
class  fio_UV_t
class  fsc_ColectorExpFile
struct  fsc_Copy_t
struct  fsc_DataL_t
class  fsc_FileLocStorage
 is used to collect file locations got from FSC. More...
class  fsc_FLSPerMedia
class  fsc_FLSPerVolume
class  fsc_FRIblockUnpacker
struct  fsc_Generation_t
struct  fsc_SplitStream_t
class  fsc_nsAttrStream
 is a nsStream who take care to store/read attribute to/from FSCDB. More...
struct  fsc_nsElement_t
class  fsc_nsDirectory
class  fsc_nsDirEntryFormattedVec
class  fsc_nsDirEntryMgr
 class fsc_nsDirEntryMgr pass changes to fsc_nsDirEntryVec class. More...
class  fsc_nsDirEntryVec
class  fsc_nsElement
class  fsc_nsFSrecovery
class  fsc_nsNameMgr
class  fsc_nsOwnerMgr
 Class fsc_nsOwnerMgr take care about owner of element. More...
class  fsc_nsPropertyMgr
class  fsc_nsStream
 is a fio_Vector take care of DB vectors in chain. More...
class  fsc_RawMedVolCollector
class  fsc_RawUpdate
class  fsc_RedunCopyDataVolStorage
class  fsc_RedunCopyDataVolStorageWriter
class  fsc_RedunCopyDataVolStorageReader
struct  fsc_Split_t
class  mif_JobManager
struct  mif_PartEntry
class  mif_PartMgr
class  pm_JobMgr
class  pm_RecallSetReader
class  pm_ReorgVolStatus
class  pm_VolStatus
 Created: 24.3.2004. More...
class  fsc_RawMediumContentCollector
 This class is intended for dumping the contents of the specified medium (and medium volumes) to a specified file. More...

Defines

#define MAXNumOfLevels_d   256
#define RecallBufferSize_d   (512*1024)
#define ASIZE_d   256
 number of ASCII alphabet for fast search algorithm
#define fsc_DATAL_CACHE_SIZE_m   0x8000
#define fsc_nsDirEntryRecSize_d   8
#define fsc_nsMaxNumElemVecSize_d   (256 * fsc_nsDirEntryRecSize_d)
#define evt_ADMINJOB   "ADMIN"
#define evt_BACKUPJOB   "BACKUP"
#define evt_DUPLJOB   "DUPLICATION"
#define MIF_MEDIUM_AIT2_MEDIUM_SIZE   (50972)
 AIT 2 specific constants.
#define MIF_MEDIUM_AIT2_VOLUME_OVERHEAD   (262)
#define MIF_MEDIUM_AIT2_VOLUMESIZE_FACTOR   (1.144)

Typedefs

typedef vector
< ivd_VolInfoEntry_t
ivd_VolInfoList_t
typedef ivd_VolInfoList_t::iterator ivd_VolInfoListIter_t
typedef vector< ivd_PathEntry_tivd_PathList_t
typedef ivd_PathList_t::iterator ivd_PathListIter_t
typedef vector< hsm_Chunk_thsm_Chunk_t_v
typedef vector< hsm_Chunk_t >
::iterator 
hsm_Chunk_t_v_i
typedef vector
< fsc_FLSPerVolume * > 
fsc_FLSPerVolume_p_v_t
typedef
fsc_FLSPerVolume_p_v_t::iterator 
fsc_FLSPerVolume_p_v_i
typedef vector
< ivd_FileLocationData_t
ivd_FileLocationData_t_v_t
typedef
ivd_FileLocationData_t_v_t::iterator 
ivd_FileLocationData_t_v_i
typedef stx_CacheArrayOfRefEl< 0x2000 > fsc_nsDirCache
 global cache for caching NSC directory elements used per each transaction.
typedef stx_CacheArray
< fsc_DATAL_CACHE_SIZE_m > 
fsc_DataLcache
typedef list< fsc_SplitStream_tfsc_SplitStream_l
typedef fsc_SplitStream_l::iterator fsc_SplitStream_l_i
typedef vector
< fsc_nsDirEntryVec * > 
fsc_nsDirEntryVec_p_v
typedef
fsc_nsDirEntryVec_p_v::iterator 
fsc_nsDirEntryVec_p_v_i
typedef vector< ivd_RecordIDX_tivd_RecordIDX_t_v
typedef ivd_RecordIDX_t_v::iterator ivd_RecordIDX_t_v_i
typedef vector< fsc_nsElement * > fsc_nsElement_p_v
typedef fsc_nsElement_p_v::iterator fsc_nsElement_p_v_i

Enumerations

enum  ivd_FS_OpMode_e {
  e_Regular = 0, e_WORM,
  e_ReadOnlyNoRecall, e_ReadWriteNoRecall,
  e_FailIO, e_RegularRecallOnly,
  e_WORMRecallOnly
}
enum  ivd_FS_File::ivd_FS_FileOperation_e {
  ivd_FS_File::e_NoOp = 0, ivd_FS_File::e_Migrate = 1,
  ivd_FS_File::e_MigrateNoData = 2, ivd_FS_File::e_Release = 3,
  ivd_FS_File::e_Recall = 4, ivd_FS_File::e_RecallInto = 5,
  ivd_FS_File::e_Recovery = 6, ivd_FS_File::e_Cache = 7,
  ivd_FS_File::e_RefCount = 8
}
enum  ivd_FS_File::Event_e { ivd_FS_File::e_RecallEvt, ivd_FS_File::e_MigrateEvt }
enum  fs_api::Event_e {
  fs_api::eUnknown = 0, fs_api::ePreMount,
  fs_api::eMount, fs_api::eUmount,
  fs_api::eOpen, fs_api::eRelease,
  fs_api::eChgNameOwn, fs_api::eDelFile,
  fs_api::eChgData, fs_api::eOffline,
  fs_api::eChgAttr, fs_api::eChgMeta,
  fs_api::eCreate
}
enum  df_AttrType_e {
  at_ENDOFDATA = 0, at_FIRSTSPLIT = 1,
  at_SPLIT = 2, at_LASTSPLIT = 3,
  at_ADS = 8, at_META_MASK = 16,
  at_SECURITY = 16, at_EA = 17,
  at_LINK = 18, at_OBJID = 19,
  at_PROPERTY = 20, at_REPARSE = 21,
  at_SPARSE = 22, at_SENTINEL = 0xFFFF
}
 

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.

More...
enum  fsc_DataLflags_e { dlfDirectory = 1 << 0, dlfNSCstored = 1 << 1 }
 

Version of DataL structure, update it when sructure is change.

More...
enum  fsc_MergeStatus_e {
  mrgALREADY_IN = 0, mrgCOMPLETED,
  mrgINSERTED
}
enum  fsc_nsOwnerIdxType_e { oit_OWNER, oit_OWNERHISTORY }
 

Do not expand fsc_nsOwnerIdxType_e enum, without redesign, because only one bit is reserved for it.

More...
enum  fsc_nsMemberIdxType_e {
  mit_MEMBERS = 0, mit_LOTOFMEMBERS,
  mit_MEMBERS2, mit_LOTOFMEMBERS2
}
 

Do not expand fsc_nsMemberIdxType_e enum, without redesign, because only three bits are reserved for it.

More...
enum  fsc_nsAttribIdxType_e {
  ait_NOTALLATTR = 0, ait_ATTRIB = 1,
  ait_INVMETADATA = 2, ait_ATTRIBHISTORY
}
 

Do not expand fsc_nsAttribIdxType_e enum, without redesign, because only two bits are reserved for it.

More...
enum  fsc_nsNameIdxType_e {
  nit_NSCMISSING = 0, nit_NAME,
  nit_DELETED, nit_NAMEHISTORY,
  nit_HARDLINK
}
 

Do not expand fsc_nsNameIdxType_e enum, without redesign, because only two bits are reserved for it.

More...
enum  nse_Opentype_e { nse_STANDARD = 0, nse_CREATE_PARENT }
enum  ivd_MifPartitionStatus_e {
  mps_Online = 0, mps_Disabled = 1,
  mps_Stopped = 2
}

Functions

 ivd_PathEntry_t::ivd_PathEntry_t (ivd_GenInode_t a_fInode, ivd_FileID_t a_fID, cmn_Path a_fName)
UInt32_t IVD_FSAPI_DECL_d GetAllOwnersAndIDs (ivd_FileHandle_t, ivd_PathList_t &)
virtual ivd_FileSystemAPI::~ivd_FileSystemAPI (void)
void ivd_FileSystemAPI::Run (bool a_recoveryMode)
void ivd_FileSystemAPI::SetConfiguration (const ivd_FS_Cfg_t &cfg)
void ivd_FileSystemAPI::GetConfiguration (ivd_FS_Cfg_t &cfg)
void ivd_FileSystemAPI::SetDebug (UInt32_t a_dbgIVDFS)
void ivd_FileSystemAPI::DumpState (ivd_FSInfo_t &fsInfo)
void ivd_FileSystemAPI::SetLimitedAccessMode (const string &a_VolumeName, ivd_FS_OpMode_e a_OpMode)
virtual void ivd_FileSystemAPI::EventDelay ()
virtual void ivd_FileSystemAPI::EventQueueEmpty (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventCancelRequest (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventMounted (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventMountRequest (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventLogMessage (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventPredismount (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventDismounted (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventCreate (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventDelete (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventPreDelete (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventMove (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventDataOffline (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventDataChange (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventAttributeChange (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventMetadataChange (ivd_FS_Event &)
virtual void ivd_FileSystemAPI::EventAltdataChange (ivd_FS_Event &)
ivd_FileHandle_t ivd_FileSystemAPI::GetDevHandle (void)
const string & ivd_FileSystemAPI::GetDevName (void)
void ivd_FileSystemAPI::TriggerTerminateEvent (void)
void ivd_FileSystemAPI::Reconfigure (void)
void ivd_FileSystemAPI::SetRootPath (cmn_Path a_rootPath)
cmn_Path ivd_FileSystemAPI::GetRootPath ()
bool ivd_FileSystemAPI::IsPathTooLong (UInt32_t a_len)
 ivd_FS_Event::ivd_FS_Event (const ivd_FS_Event &)
 ivd_FS_Event::~ivd_FS_Event (void)
string & ivd_FS_Event::GetName (void)
ivd_GenInode_t ivd_FS_Event::GetOSID (void)
ivd_GenInode_t ivd_FS_Event::GetOldListOSID (void)
ivd_GenInode_t ivd_FS_Event::GetOwnerOSID (void)
ivd_FileID_t ivd_FS_Event::GetFileID (void)
void ivd_FS_Event::SetRequestorInfo (void)
ivd_RequestorInfo_tivd_FS_Event::GetRequestorInfo (void)
void ivd_FS_Event::GetPathList (ivd_PathList_t &a_pathList)
void ivd_FS_Event::GetOldPathList (ivd_PathList_t &a_pathList)
cmn_Path ivd_FS_Event::GetPath ()
cmn_Path ivd_FS_Event::GetOldPath ()
ivd_FileType_e ivd_FS_Event::GetFileType (void)
UInt8_t ivd_FS_Event::GetChnFlag (void)
ivd_Time_t ivd_FS_Event::GetChnTime (void)
ivd_FileSize_t ivd_FS_Event::GetChnSize (void)
ivd_FileSize_t ivd_FS_Event::GetChunkSize (void)
ivd_FileSize_t ivd_FS_Event::GetChunkOff (void)
UInt8_t ivd_FS_Event::GetCause (void)
void ivd_FS_Event::SetCause (UInt8_t a_cause)
UInt32_t ivd_FS_Event::GetErrorCode (void)
void ivd_FS_Event::SetErrorCode (UInt32_t a_code)
UInt32_t ivd_FS_Event::GetCancelReqID (void)
UInt32_t ivd_FS_Event::GetStatusCode (void)
string ivd_FS_Event::GetVolumeID (void)
cmn_Path ivd_FS_Event::GetRootDir (const string &a_fsUUID=string())
void ivd_FS_Event::ReplySyncEvent (UInt16_t status)
void ivd_FS_Event::Clear (void)
ivd_FS_Event const & ivd_FS_Event::operator= (ivd_FS_Event const &a_from)
cmn_Path ivd_FS_Event::GetPath (const ivd_PathList_t &a_pathList)
 ivd_FS_FileProperty_t::~ivd_FS_FileProperty_t ()
 ivd_FS_File::ivd_FS_File (ivd_FileSystemAPI &, const string &fullPath, ivd_GenInode_t a_inode=0)
 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)
void ivd_FS_File::Open (ivd_FS_FileOperation_e, const string &pathName=string())
void ivd_FS_File::Release (ivd_FileSize_t offset=0, ivd_FileSize_t size=0)
UInt32_t ivd_FS_File::GetStreamHeader (string &a_streamName, ivd_FilePosition_t &a_streamSize)
 Get next file stream (data, meta or alternate data) - used for migration.
ivd_FileRetSize_t ivd_FS_File::ReadStream (void *a_buf, ivd_FileBufSize_t a_size)
 Read current file stream - used for migration.
void ivd_FS_File::SetStreamHeader (UInt32_t a_streamType, const string &a_streamName, ivd_FilePosition_t a_streamSize)
 Set next file stream (data, meta or alternate data) - used for recall.
ivd_FilePosition_t ivd_FS_File::GetStreamLeft ()
void ivd_FS_File::SetStreamHeader (UInt32_t a_streamType)
ivd_FileRetSize_t ivd_FS_File::WriteStream (const void *a_buf, ivd_FileBufSize_t a_size)
 Write current file stream - used for recall.
ivd_FileRetSize_t ivd_FS_File::WriteF (const void *a_buf, ivd_FileBufSize_t a_size)
void ivd_FS_File::Close (void)
void ivd_FS_File::SeekF (ivd_FilePosition_t a_offset)
bool ivd_FS_File::IsOpen ()
void ivd_FS_File::SetFileID (ivd_FileID_t fileID, ivd_FileSize_t a_chunkSize)
void ivd_FS_File::SetInode (ivd_GenInode_t a_inode)
void ivd_FS_File::SetFileSize (ivd_FileSize_t a_size)
void ivd_FS_File::SetDataClean (ivd_Time_t mtime, ivd_FileSize_t offset=0, ivd_FileSize_t size=0)
void ivd_FS_File::SetDataOffline (ivd_FileSize_t offset=0, ivd_FileSize_t size=0)
void ivd_FS_File::SetDataOnline (ivd_FileSize_t offset=0, ivd_FileSize_t size=0)
void ivd_FS_File::AddSyncEvent (ivd_FS_Event &)
void ivd_FS_File::ReplySyncEvents (UInt16_t status)
void ivd_FS_File::GetProperties (ivd_FS_FileProperty_t &a_fileProp)
cmn_Pathivd_FS_File::GetFullPathRef ()
void ivd_FS_File::SetFullPath (const cmn_Path &a_fullpath)
void ivd_FS_File::QueryFullFileName (string &cmnFileName)
void ivd_FS_File::TriggerEvent (Event_e a_event)
void ivd_FS_File::StatF (ivd_FileInfo_t &a_info)
void ivd_FS_File::SetStatAttr (ivd_FileInfo_t &a_info)
 Used at recovery to restore owner, group, and all four times.
bool ivd_FS_File::IsOfflineProlonged ()
void ivd_FS_File::SetCollocationId (UInt64_t a_major, UInt64_t a_minor)
void ivd_Delay::SetProperties (const string &a_eventRatePolicy)
void ivd_Delay::SetProperties (int a_step, int a_maxMiliSecWait, int a_miliSecWaitUnit)
void ivd_Delay::Delay (int a_objNum)
void ivd_Delay::Fibonacci ()
 fs_api::fs_api (string &a_dev, string &a_fsUUID, i_HSM_i *a_pIHSM, hsm_Containers *a_pCont, log_EventLog *a_peLog)
virtual fs_api::~fs_api ()
void fs_api::Initialize (void)
void fs_api::Destroy (void)
void fs_api::Run (bool a_recoveryMode)
void fs_api::EventDelay ()
void fs_api::EventMounted (ivd_FS_Event &)
void fs_api::EventPredismount (ivd_FS_Event &)
void fs_api::EventDismounted (ivd_FS_Event &)
void fs_api::EventCreate (ivd_FS_Event &)
void fs_api::EventDelete (ivd_FS_Event &)
void fs_api::EventMove (ivd_FS_Event &)
void fs_api::EventDataOffline (ivd_FS_Event &)
void fs_api::EventDataChange (ivd_FS_Event &)
void fs_api::EventAttributeChange (ivd_FS_Event &)
void fs_api::AddGenericEvent (ivd_FS_Event &a_event, Event_e a_eventType)
 This method add an object (if not exist yet) into Cache list and check every directory in path list if exist in Cache list.
hsm_FileHeaderfs_api::GetDirFH (ivd_PathList_t &a_pathList, ivd_PathListIter_t a_plIter)
 getOwner return pointer to FH of parent directory if directory doesn't exist in cache then generate new ad put it to cache and
hsm_FileHeaderfs_api::FindAndPrepareFH (ivd_GenInode_t inode)
 This methods tries to find File Header and lock it.
hsm_FileHeaderfs_api::CreateNewFH (ivd_GenInode_t inode, ivd_FS_Event &a_event, string &name, string &oldName)
 Method for creating and initialazing File Header.
void fs_api::DismissFH (hsm_FileHeader *a_hsmFH, ivd_GenInode_t a_inode)
 This methods decrements File Header reference and unlocks it.
ostream & operator<< (ostream &a_os, const i_Recall_t &a_o)
UInt32_t IVD_CMN_DECL_d cmn_IntPow (UInt32_t a, UInt32_t b)
 a^b
UInt64_t IVD_CMN_DECL_d cmn_IntPow (UInt64_t a, UInt32_t b)
 a^b
void IVD_CMN_DECL_d cmn_StrLowerCase (string &a_str)
void IVD_CMN_DECL_d cmn_StrUpperCase (string &a_str)
string IVD_CMN_DECL_d cmn_Num2Str (const Int64_t &i)
string IVD_CMN_DECL_d cmn_Num2Str (Int32_t i)
string IVD_CMN_DECL_d cmn_Num2Str (Int16_t i)
string IVD_CMN_DECL_d cmn_Num2Str (Int8_t i)
string IVD_CMN_DECL_d cmn_Num2Str (const UInt64_t &i, bool a_hex=false)
string IVD_CMN_DECL_d cmn_Num2Str (UInt32_t i, bool a_hex=false)
string IVD_CMN_DECL_d cmn_Num2Str (UInt16_t i, bool a_hex=false)
string IVD_CMN_DECL_d cmn_Num2Str (UInt8_t i, bool a_hex=false)
string IVD_CMN_DECL_d cmn_Num2Str (void *i)
UInt32_t IVD_CMN_DECL_d cmn_Str2Num (const string &a_str, bool a_hex=false)
const char IVD_CMN_DECL_d * cmn_EmptyCStr ()
void IVD_CMN_DECL_d cmn_CleanDir (const cmn_Path &a_path)
void IVD_CMN_DECL_d cmn_BackSlashToSlash (string &a_path)
void IVD_CMN_DECL_d cmn_SlashToBackSlash (string &a_path)
string IVD_CMN_DECL_d cmn_StrLAlign (const string &str, int a_len)
string IVD_CMN_DECL_d cmn_HexDump (const void *a_buf, UInt32_t a_size, UInt8_t a_num=24, bool a_txt=false)
 Hexadecimal dump of memory.
string IVD_CMN_DECL_d cmn_Num2PowOfK (UInt64_t a_num)
string IVD_CMN_DECL_d cmn_GetMigFlags (UInt32_t a_flags)
ivd_CommonArg_e IVD_CMN_DECL_d ivd_ParseCmnArgs (int a_argc, char *a_argv[])
string IVD_CMN_DECL_d cmn_GetEnvVariable (const char *a_varName)
 Retrieve ENV variable into a string.
void IVD_CMN_DECL_d cmn_SetEnvVariable (const char *a_varName, string &a_varValue)
 Set ENV variable.
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).
int cmn_NumOfOctets (int a_size)
 Return the number of eight bytes length records needed to store a_size buffer.
bool IVD_CMN_DECL_d cmn_IsPatternValid (const string &a_pattern)
 Checks that filename pattern a_pattern is a well-formed pattern.
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.
bool IVD_CMN_DECL_d cmn_IsPatternMatch (const vector< string > &a_pattern_v, const cmn_Path &a_file, bool a_verify=true)
bool IVD_CMN_DECL_d cmn_IsPatternMatch (const string &a_pattern, const string &a_file, bool a_verify=true)
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.
bool IVD_CMN_DECL_d cmn_IsSpecialFile (cmn_Path a_fileName, ivd_FileType_e a_fileType=ift_UNKNOWN)
 Check if file is special file.
void IVD_CMN_DECL_d cmn_DumpDirectoryContent (cmn_Path a_path, bool a_skipSpecial=true)
 Dump directory content to debug.
IVD_CMN_DECL_d ostream & operator<< (ostream &a_os, cmn_FileInfo_t_v a_fileList_v)
bool IVD_CMN_DECL_d cmn_IsMounted (cmn_Path a_path)
 Check if directory is mounted.
bool IVD_CMN_DECL_d cmn_IsSpecialName (string &a_name)
int IVD_CMN_DECL_d cmn_CreatePathNoException (const cmn_Path &a_path)
void IVD_CMN_DECL_d cmn_CreatePath (const cmn_Path &path)
cmn_Path IVD_CMN_DECL_d cmn_FileNameToLong (const cmn_Path &a_path)
df_AttrType_e GetAttrType (const string &a_streamName)
string IVD_DF_DECL_d GetAttrName (df_AttrType_e a_at)
 cmn_ASSERT (sizeof(fio_UV_t)==7)
void UpdateReorgData (ivd_MediaKey_t a_mediumKey, ivd_MedVolNum_t a_medVolNum, ivd_FileSize_t a_dataSize)
void UpdateContentData (ivd_MediaKey_t a_mediumKey, ivd_MedVolNum_t a_medVolNum, ivd_FileSize_t a_dataSize)
fsc_nsOwnerMgrfsc_nsCreateOwnerMgrObj (ivd_RecordIDX_t a_ownerFileID)
fsc_nsAttrMgrfsc_nsCreateAttribObj (UInt8_t a_flags, UInt8_t a_size, ivd_RecordIDX_t a_idx)
fsc_nsNameMgrfsc_nsCreateNameObj (UInt8_t a_size, ivd_RecordIDX_t a_idx)
IVD_FSC_DECL_d fsc_nsDirectoryfsc_nsCreateDirectoryObj (ivd_RecordIDX_t a_fileID)
IVD_FSC_DECL_d fsc_nsDirectoryfsc_nsCreateDirectoryObj (ivd_RecordIDX_t a_fileID, fsc_nsElement_t &a_el)
IVD_FSC_DECL_d fsc_nsElementfsc_nsCreateElementObj (ivd_RecordIDX_t a_fileID, bool a_isDirectory)
 use at inser split where already know the file type
IVD_FSC_DECL_d fsc_nsElementfsc_nsCreateElementObj (ivd_RecordIDX_t a_fileID, nse_Opentype_e a_openType=nse_STANDARD)
IVD_FSC_DECL_d void fsc_nsRemoveElementObj (fsc_nsElement *a_dir_p)
void nsc_ScanForIVDFSRecovery (const string &a_partitionName, i_HSM_ptr a_ihsm, ui_MsgWriter &a_msgWriter, bool &a_abort)

Variables

UInt32_t ivd_FS_Cfg_t::syncEventTimeout
UInt32_t ivd_FS_Cfg_t::WORMTimeout
bool ivd_FS_Cfg_t::recallOnOpen
UInt32_t ivd_FS_Cfg_t::debugLevel
ivd_GenInode_t ivd_PathEntry_t::m_fInode
ivd_FileID_t ivd_PathEntry_t::m_fID
cmn_Path ivd_PathEntry_t::m_fName
UInt32_t ivd_CommCtx_t::owner_pid
UInt32_t ivd_CommCtx_t::owner_tid
UInt32_t ivd_CommCtx_t::refcnt
UInt32_t ivd_CommCtx_t::close_to
UInt32_t ivd_CommCtx_t::new_event_to
UInt32_t ivd_CommCtx_t::semaphore_to
UInt32_t ivd_CommCtx_t::sync_event_to
UInt32_t ivd_CommCtx_t::queue_head
UInt32_t ivd_CommCtx_t::queue_tail
UInt8_t ivd_CommCtx_t::queue_empty
Int32_t ivd_CommCtx_t::reply_evt_idx
UInt32_t ivd_VolInfoEntry_t::ref_cnt
ivd_FS_OpMode_e ivd_VolInfoEntry_t::starting_op_mode
string ivd_VolInfoEntry_t::name
string ivd_VolInfoEntry_t::spec_dirs
string ivd_VolInfoEntry_t::voldev_name
void * ivd_VolInfoEntry_t::fsdo_dev_ptr
ivd_FS_OpMode_e ivd_VolInfoEntry_t::fsdo_op_mode
void * ivd_VolInfoEntry_t::fsdo_devext
void * ivd_VolInfoEntry_t::fsdo_attached_do
void * ivd_VolInfoEntry_t::fsdo_realdo
UInt32_t ivd_VolInfoEntry_t::fsdo_worm_to
UInt32_t ivd_VolInfoEntry_t::fsdo_nof_filectx
UInt32_t ivd_VolInfoEntry_t::fsdo_nof_file
ivd_CommCtx_t ivd_VolInfoEntry_t::fsdo_comctx
UInt32_t ivd_FSInfo_t::ref_cnt
ivd_CommCtx_t ivd_FSInfo_t::mdo_comctx
ivd_VolInfoList_t ivd_FSInfo_t::volInfoList
UInt32_t ivd_RequestorInfo_t::pid
string ivd_RequestorInfo_t::pname
UInt32_t ivd_RequestorInfo_t::tid
UInt32_t ivd_RequestorInfo_t::type
bool ivd_RequestorInfo_t::is_remote_call
string ivd_RequestorInfo_t::user_name
string ivd_RequestorInfo_t::session_info
 ivd_FileSystemAPI::log_CLASSID_m
ivd_FileHandle_t ivd_FileSystemAPI::m_fd
string ivd_FileSystemAPI::m_devFile
cmn_Path ivd_FileSystemAPI::m_rootPath
bool ivd_FileSystemAPI::m_waitForMountEvent
IVD_FSAPI_DECL_d const UInt16_t ivd_FS_OK_Reply
IVD_FSAPI_DECL_d const UInt16_t ivd_FS_ERR_Reply
 ivd_FS_Event::log_CLASSID_m
ivd_FileType_e ivd_FS_Event::m_fileType
ivd_FileSize_t ivd_FS_Event::m_fChSize
ivd_FileSize_t ivd_FS_Event::m_fChOff
ivd_PathList_t ivd_FS_Event::m_pathList
ivd_PathList_t ivd_FS_Event::m_pathOldList
UInt8_t ivd_FS_Event::m_chnFlag
ivd_FileSize_t ivd_FS_Event::m_chnSize
ivd_Time_t ivd_FS_Event::m_chnTime
ivd_FileID_t ivd_FS_Event::m_fileID
string ivd_FS_Event::m_volumeID
void * ivd_FS_Event::m_buff_p
ivd_FileHandle_t ivd_FS_Event::m_fd
UInt8_t ivd_FS_Event::m_cause
UInt32_t ivd_FS_Event::m_errorCode
UInt32_t ivd_FS_Event::m_cancelReqId
UInt32_t ivd_FS_Event::m_statusCode
bool ivd_FS_Event::m_getPath
bool ivd_FS_Event::m_getOldPath
ivd_RequestorInfo_t ivd_FS_Event::m_requestorInfo
ivd_GenInode_t ivd_FS_FileProperty_t::m_Inode
ivd_FileID_t ivd_FS_FileProperty_t::m_fileID
ivd_Time_t ivd_FS_FileProperty_t::m_chgTime
ivd_FileSize_t ivd_FS_FileProperty_t::m_fileSize
ivd_FileSize_t ivd_FS_FileProperty_t::m_chunkSize
bool ivd_FS_FileProperty_t::m_dirtyFlag
bool ivd_FS_FileProperty_t::m_offlineFlag
ivd_FileType_e ivd_FS_FileProperty_t::m_type
UInt64_t ivd_FS_FileProperty_t::m_majColId
UInt64_t ivd_FS_FileProperty_t::m_minColId
 ivd_FS_File::log_CLASSID_m
ivd_FileHandle_t ivd_FS_File::m_fd
bool ivd_FS_File::m_gotProp
ivd_FS_FileProperty_t ivd_FS_File::m_prop
cmn_File ivd_FS_File::m_file
ivd_FS_FileOperation_e ivd_FS_File::m_fileOp
vector< ivd_FS_Eventivd_FS_File::m_syncEvents
string ivd_FS_File::m_VolumeRoot
UInt64_t ivd_FS_File::m_recallOffset
 m_recallOffset is used on Win platform because recall of file goes through kernel write function and IOCTL function needs this parameter.
log_ivdfs g_fsLog
 g_fsLog is same as ivdfs log that is used in HSM for logging file event.
 ivd_Delay::log_CLASSID_m
int ivd_Delay::m_step
int ivd_Delay::m_maxMiliSecWait
int ivd_Delay::m_miliSecWaitUnit
static const int ivd_Delay::m_maxStep_c = 20000
static const int ivd_Delay::m_maxNumOfLevels_c = MAXNumOfLevels_d
static const int ivd_Delay::m_maxMiliSecWait_c = 180000
static const int ivd_Delay::m_maxMiliSecWaitUnit_c = 1000
int ivd_Delay::m_levels
int ivd_Delay::m_sleepLevel [MAXNumOfLevels_d]
bool ivd_Delay::m_warningWritten
string fs_api::m_fsUUID
i_HSM_ifs_api::m_pIHSM
hsm_Containersfs_api::m_pCont
log_EventLogfs_api::m_peLog
bool fs_api::m_initialized
fio_Transactionfs_api::m_trans_p
ivd_Delay fs_api::m_eventRateRegulation
fs_apig_fs_api_p
hsm_FHADPRecallg_hsm_FHADPRecall_p
fsc_nsDirCache g_nsDirCache
 global cache for caching NSC directory elements used per each transaction.
fsc_DataLcache g_DataLcache
 cache for fast insert
fio_Transactiong_fsc_trans_p
 transaction for fast insert set when dataLMgr is instantiated
cmn_Mutex g_fscUpdate_x
 Only one thread can change FSC at once.
const int fsc_DataLCacheSize_c
log_ivdfs g_fsLog
 g_fsLog is same as ivdfs log that is used in HSM for logging file event.
ivd_ScanInfo_v_t g_fscScanInfo
const unsigned int c_maxRFVecSize
const unsigned int c_maxArraySize
const unsigned int c_lastVecIdx
const unsigned int c_maxNumOfMember
const unsigned int c_preSizeIdx

Friends

void ivd_FS_Event::ivd_FileSystemAPI::Run (bool a_recoveryMode)
ostream & ivd_Delay::operator<< (ostream &o_s, const ivd_Delay &a_o)

Detailed Description

Class fsc_nsDirEntryFormattedVec contains fixed size array of type ivd_RecordIDX_t.

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 Documentation

#define ASIZE_d   256

number of ASCII alphabet for fast search algorithm

Definition at line 50 of file cmn_FastSearch.h.

#define evt_ADMINJOB   "ADMIN"

Definition at line 49 of file mif_jobmanager.h.

Referenced by i_MediumDupl_i::Process().

#define evt_BACKUPJOB   "BACKUP"

Definition at line 50 of file mif_jobmanager.h.

Referenced by i_BackupJob_i::i_BackupJob_i(), and i_BackupJob_i::Remove().

#define evt_DUPLJOB   "DUPLICATION"

Definition at line 51 of file mif_jobmanager.h.

#define fsc_DATAL_CACHE_SIZE_m   0x8000

Definition at line 46 of file fsc_GlobalObj.h.

#define fsc_nsDirEntryRecSize_d   8

Definition at line 79 of file fsc_nsDirEntryFormattedVec.h.

#define fsc_nsMaxNumElemVecSize_d   (256 * fsc_nsDirEntryRecSize_d)

Definition at line 80 of file fsc_nsDirEntryFormattedVec.h.

#define MAXNumOfLevels_d   256

Definition at line 51 of file hsm_fs_api.h.

#define MIF_MEDIUM_AIT2_MEDIUM_SIZE   (50972)

AIT 2 specific constants.

Definition at line 55 of file mif_jobmanager.h.

#define MIF_MEDIUM_AIT2_VOLUME_OVERHEAD   (262)

Definition at line 56 of file mif_jobmanager.h.

Referenced by i_AdminJob_i::Format().

#define MIF_MEDIUM_AIT2_VOLUMESIZE_FACTOR   (1.144)

Definition at line 59 of file mif_jobmanager.h.

Referenced by i_AdminJob_i::Format().

#define RecallBufferSize_d   (512*1024)

Definition at line 53 of file hsm_fs_api.h.

Referenced by hsm_RecallInfoGrp::WriteBufferedF().


Typedef Documentation

typedef stx_CacheArray<fsc_DATAL_CACHE_SIZE_m> fsc_DataLcache

Definition at line 51 of file fsc_GlobalObj.h.

typedef fsc_FLSPerVolume_p_v_t::iterator fsc_FLSPerVolume_p_v_i

Definition at line 47 of file fsc_FLSPerMedia.h.

Definition at line 46 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 50 of file fsc_GlobalObj.h.

Definition at line 42 of file fsc_nsDirEntryMgr.h.

typedef fsc_nsDirEntryVec_p_v::iterator fsc_nsDirEntryVec_p_v_i

Definition at line 43 of file fsc_nsDirEntryMgr.h.

Definition at line 44 of file fsc_nsOwnerMgr.h.

typedef fsc_nsElement_p_v::iterator fsc_nsElement_p_v_i

Definition at line 45 of file fsc_nsOwnerMgr.h.

Definition at line 73 of file fsc_nsAttrStream.h.

typedef fsc_SplitStream_l::iterator fsc_SplitStream_l_i

Definition at line 74 of file fsc_nsAttrStream.h.

Definition at line 65 of file hsm_RecallInfoGrp.h.

typedef vector<hsm_Chunk_t>::iterator hsm_Chunk_t_v_i

Definition at line 66 of file hsm_RecallInfoGrp.h.

typedef ivd_FileLocationData_t_v_t::iterator ivd_FileLocationData_t_v_i

Definition at line 44 of file fsc_FLSPerVolume.h.

Definition at line 43 of file fsc_FLSPerVolume.h.

Definition at line 141 of file ivd_fs_api.h.

typedef ivd_PathList_t::iterator ivd_PathListIter_t

Definition at line 153 of file ivd_fs_api.h.

Definition at line 45 of file fsc_nsDirEntryVec.h.

typedef ivd_RecordIDX_t_v::iterator ivd_RecordIDX_t_v_i

Definition at line 46 of file fsc_nsDirEntryVec.h.

Definition at line 117 of file ivd_fs_api.h.

typedef ivd_VolInfoList_t::iterator ivd_VolInfoListIter_t

Definition at line 118 of file ivd_fs_api.h.


Enumeration Type Documentation

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.

Enumerator:
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 50 of file df_SplitInfo.h.

             {
    at_ENDOFDATA    =  0,  // 
    at_FIRSTSPLIT   =  1, 
    at_SPLIT        =  2,
    at_LASTSPLIT    =  3, 
    at_ADS          =  8,  // Alternate data stream (actualy only ADS name is stored)
    at_META_MASK    = 16,  // all  meta data has 4th bit set
    at_SECURITY     = 16,
    at_EA           = 17,
    at_LINK         = 18,
    at_OBJID        = 19,
    at_PROPERTY     = 20,
    at_REPARSE      = 21,
    at_SPARSE       = 22,

    at_SENTINEL     = 0xFFFF 
} df_AttrType_e;

enum ivd_FS_File::Event_e [inherited]
Enumerator:
e_RecallEvt 
e_MigrateEvt 

Definition at line 438 of file ivd_fs_api.h.

                 {
        e_RecallEvt,
        e_MigrateEvt
    } Event_e;

enum fs_api::Event_e [inherited]
Enumerator:
eUnknown 
ePreMount 
eMount 
eUmount 
eOpen 
eRelease 
eChgNameOwn 
eDelFile 
eChgData 
eOffline 
eChgAttr 
eChgMeta 
eCreate 

Definition at line 111 of file hsm_fs_api.h.

                 {
        eUnknown = 0,
        ePreMount,
        eMount,
        eUmount,
        eOpen,
        eRelease,
        eChgNameOwn,
        eDelFile,
        eChgData,
        eOffline,
        eChgAttr,
        eChgMeta,
        eCreate
    } Event_e;

Version of DataL structure, update it when sructure is change.

Enumerator:
dlfDirectory 
dlfNSCstored 

Definition at line 48 of file fsc_DataL_t.h.

             {
    dlfDirectory = 1 << 0,
    dlfNSCstored = 1 << 1
} fsc_DataLflags_e;

Enumerator:
mrgALREADY_IN 
mrgCOMPLETED 
mrgINSERTED 

Definition at line 46 of file fsc_nsAttrStream.h.

             {
    mrgALREADY_IN = 0,
    mrgCOMPLETED,
    mrgINSERTED
} fsc_MergeStatus_e;

Do not expand fsc_nsAttribIdxType_e enum, without redesign, because only two bits are reserved for it.

ait: attribute-index-type

Enumerator:
ait_NOTALLATTR 
ait_ATTRIB 
ait_INVMETADATA 
ait_ATTRIBHISTORY 

Definition at line 72 of file fsc_nsCommon.h.

             {
    ait_NOTALLATTR = 0,
    ait_ATTRIB = 1,
    ait_INVMETADATA = 2,
    ait_ATTRIBHISTORY // for future when generations will be stored
} 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

Enumerator:
mit_MEMBERS 
mit_LOTOFMEMBERS 
mit_MEMBERS2 
mit_LOTOFMEMBERS2 

Definition at line 60 of file fsc_nsCommon.h.

             {
    mit_MEMBERS = 0,
    mit_LOTOFMEMBERS, // reserved 
    mit_MEMBERS2, // reserved for future better space usage, faster member handle
    mit_LOTOFMEMBERS2 //  -  -  -
} fsc_nsMemberIdxType_e; // 2 bits

Do not expand fsc_nsNameIdxType_e enum, without redesign, because only two bits are reserved for it.

nit: name-index-type

Enumerator:
nit_NSCMISSING 
nit_NAME 
nit_DELETED 
nit_NAMEHISTORY 
nit_HARDLINK 

Definition at line 84 of file fsc_nsCommon.h.

             {
    nit_NSCMISSING = 0,
    nit_NAME,
    nit_DELETED,
    nit_NAMEHISTORY, // for future when generations will be stored
    nit_HARDLINK // reserved for future 
} fsc_nsNameIdxType_e; // 3 bits

Do not expand fsc_nsOwnerIdxType_e enum, without redesign, because only one bit is reserved for it.

oit prefix mean owner-index-type

Enumerator:
oit_OWNER 
oit_OWNERHISTORY 

Definition at line 50 of file fsc_nsCommon.h.

             {
    oit_OWNER,
    oit_OWNERHISTORY // for future when generations will be stored
} fsc_nsOwnerIdxType_e; // 1 bit

Enumerator:
e_NoOp 
e_Migrate 
e_MigrateNoData 
e_Release 
e_Recall 
e_RecallInto 
e_Recovery 
e_Cache 
e_RefCount 

Definition at line 355 of file ivd_fs_api.h.

                 {
        e_NoOp          = 0,
        e_Migrate       = 1,
        e_MigrateNoData = 2,    // migrate only header
        e_Release       = 3,
        e_Recall        = 4,
        e_RecallInto    = 5,
        e_Recovery      = 6,
        e_Cache         = 7,
        e_RefCount      = 8
    } ivd_FS_FileOperation_e;

Enumerator:
e_Regular 
e_WORM 
e_ReadOnlyNoRecall 
e_ReadWriteNoRecall 
e_FailIO 
e_RegularRecallOnly 
e_WORMRecallOnly 

Definition at line 46 of file ivd_fs_api.h.

             {
    e_Regular = 0,
    e_WORM,
    e_ReadOnlyNoRecall,
    e_ReadWriteNoRecall,
    e_FailIO,
    e_RegularRecallOnly,
    e_WORMRecallOnly
} ivd_FS_OpMode_e;

Enumerator:
mps_Online 
mps_Disabled 
mps_Stopped 

Definition at line 43 of file mif_partmgr.h.

             {
    mps_Online   = 0,
    mps_Disabled = 1,
    mps_Stopped  = 2
} ivd_MifPartitionStatus_e;

Enumerator:
nse_STANDARD 
nse_CREATE_PARENT 

Definition at line 56 of file fsc_nsElement.h.


Function Documentation

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.

Parameters:
a_event event structure of received event
Exceptions:
ivd_SysError errno on not enough memory

Definition at line 537 of file hsm_fs_api.cpp.

References fs_api::CreateNewFH(), dbg_NORM, fs_api::DismissFH(), 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(), 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().

                                                                      {

    log_FUNC_m(AddGenericEvent);


    //ivd_PathList_t pathList;
    ivd_GenInode_t inode;
    string  name;
    ivd_GenInode_t   ownInode    = 0;
    hsm_FileHeader  *hsmFH = NULL;
    string  oldName;

    // a_event.GetPath(pathList);
    // GetFHIdentify(pathList, pathList.begin(), inode, name, ownInode);
    // Only one owner level is needed at this time.
    inode = a_event.GetOSID();
    name = a_event.GetName();
    ownInode = a_event.GetOwnerOSID();

    hsmFH = FindAndPrepareFH(inode);

    if (hsmFH == NULL){
        try {
            hsmFH = CreateNewFH(inode, a_event, name, oldName);
        }
        catch (ivd_Error &ie) {
            if (ie.GetError() == ie_HSM_INVPATH) {
                log_DBG_m(dbg_NORM, "Could not create FileHeader for " <<
                    IVD_PRINT_ID_FS(inode) <<
                    ", owner dir is deleted. Ignore event.");
                //  FindAndPrepareFH() locked the inode
                g_hsm_fhLock.UnLockByID(inode);
                return;
            } else {
                throw;
            }
        }
        catch ( ivd_SysError &ie) {
             // file is probably deletted in meantime
            if (ie.GetError() == ENOENT) {
                log_DBG_m(dbg_NORM, "File is deleted. " <<
                    ie.GetError() << " " << ie.GetText());
                //  FindAndPrepareFH() locked the inode
                g_hsm_fhLock.UnLockByID(inode);
                return;
            }else {
                throw;
            }
        }
        // reference decrement of owners is perform in constructor
        g_hsm_FHCache_p->Insert(hsmFH);
    }
#if TGT_OS_windows
// Special case on Windows when file is over copied.
// Same OSid (inode), attributes are cleared, fileID is 0,
// but found previous element in cache.
// Set fileID again.
// See bug 3131.
    else {
        if (  (a_eventType == eCreate)    // new creatted files has fileID 0
           && (a_event.GetFileID() == 0)  // not need but just in case
           && (hsmFH->GetFileID()  != 0) ) {
            try {
                log_DBG_m(dbg_NORM, "Over copy detected for " << IVD_PRINT_ID_FS(inode)
                                 << ", file " << hsmFH->GetFullPath()
                                 << ". Set fileID to " << hsmFH->GetFileID());
                hsmFH->SetFileID(hsmFH->GetFileID());
                a_eventType = eChgData; // simulate change data event
            }
            catch (ivd_SysError) {
                // file is probably deletted in meantime
                log_DBG_m(dbg_NORM, "File is probably deleted. Continue. Delete event will follow.");
            }
        }
    }
#endif

    try {
        hsmFH->Event(a_eventType, *m_trans_p);
    }
    catch (ivd_Error &ie) {
        if (ie.GetError() == ie_HSM_COLLOCATION) {
            log_DBG_m(dbg_NORM, "Create event ignored " <<
                IVD_PRINT_ID_FS(inode) << "., fhObjCount_g=" << fhObjCount_g);
            //  FindAndPrepareFH() locked the inode
            DismissFH(hsmFH, inode);
            g_hsm_FHCache_p->Remove(hsmFH);
            return;
        }
        else {
            throw;
        }
    }

    DismissFH(hsmFH, inode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ivd_FS_File::AddSyncEvent ( ivd_FS_Event a_evt  )  [inherited]

Definition at line 887 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_File::m_syncEvents.

Referenced by hsm_FileHeader::EventOffline().

                                                  {
    log_FUNC_m(AddSyncEvent);

    m_syncEvents.push_back(a_evt);
}

Here is the caller graph for this function:

void ivd_FS_Event::Clear ( void   )  [inherited]
void ivd_FS_File::Close ( void   )  [inherited]
cmn_ASSERT ( sizeof(fio_UV_t = =7  ) 
void IVD_CMN_DECL_d cmn_BackSlashToSlash ( string &  a_path  ) 

Definition at line 231 of file cmn_function.cpp.

Referenced by df_Packer::WriteRecFile().

                                          {
    for (string::iterator i(a_path.begin()); i != a_path.end(); ++i) {
        if (*i == '\\') {
            *i = '/';
        }
    }
}

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_CleanDir ( const cmn_Path a_path  ) 

Definition at line 499 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().

                                          {
    log_FUNC_A_m(cmn_CleanDir, "path: " << a_path);

    cmn_File rootPath(a_path);
    if (!rootPath.Exists()) {
        log_DBG_m(dbg_LOW, "Nothing to delete. Exit.");
        return;
    }

    cmn_FastDirLst dirList(a_path);

    ivd_GenInode_t inode;
    ivd_FileType_e type;
    string name = dirList.GetNextName(inode, type);

    while  (name.length() > 0) {
        if (name.compare(".") != 0 &&
            name.compare("..") != 0) {
            cmn_Path fPath(a_path + name);
            if (type == ift_DIR) {
                cmn_CleanDir(fPath);
                cmn_File::DeleteDir(fPath);
            }
            else {
                cmn_File::DeleteFile(fPath);
            }
        }
        name = dirList.GetNextName(inode, type);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_CreatePath ( const cmn_Path path  ) 
int IVD_CMN_DECL_d cmn_CreatePathNoException ( const cmn_Path a_path  ) 

Definition at line 348 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(), hsm_IVDFSRecoverer::CreateParentDir(), i_Service_i::Execute(), log_ErrorStream::log_ErrorStream(), log_Debugger::On(), log_EventLogger::SetNewPath(), log_ErrorStream::SetNewPath(), cfg_CollocationInfo::WriteCollocationInfo(), and cfg_HL7Info::WriteHL7Info().

                                                      {
    log_FUNCTAG_m(cmn_CreatePathNoException);

    if (a_path.empty()) {
        return 0;
    }

    int result = mkdir(a_path.c_str(), S_IRUSR | S_IWUSR | S_IXUSR);  // 0700

    if (result != -1) {
        return 0;
    }

    {
        if (errno == ENOENT) {
            // Create parent directory (it does not exist yet)
            int result = cmn_CreatePathNoException(a_path.UpPath());
            if (result != 0) {
                return result;
            }

            // Create self again. This really should not fail!
            return cmn_CreatePathNoException(a_path);
        }
        else if (errno == EEXIST) {
            return 0;
        }
        else {
            return errno;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_DumpDirectoryContent ( cmn_Path  a_path,
bool  a_skipSpecial = true 
)

Dump directory content to debug.

Parameters:
a_path path to directory
a_skipSpecial set if special files will be skipped, default true

Definition at line 664 of file cmn_function.cpp.

References cmn_DumpDirectoryContent(), cmn_ListDir(), dbg_NORM, log_DBG_m, and log_FUNC_m.

Referenced by cmn_DumpDirectoryContent().

                                                                   {
    log_FUNC_m(cmn_DumpDirectoryContent);

    cmn_FileInfo_t_v fileList_v;

    cmn_ListDir(a_path, fileList_v, a_skipSpecial);

    log_DBG_m(dbg_NORM, "Dumping content of " <<
                        a_path <<
                        fileList_v);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char IVD_CMN_DECL_d* cmn_EmptyCStr (  ) 

Definition at line 211 of file cmn_function.cpp.

Referenced by cmn_DirLst::GetNextName(), df_RecCmn_t::GetVarDataHost(), and df_RecCmn_t::GetVarDataNet().

                            {
    static const char* const emptyCStr("");

    return emptyCStr;
}

Here is the caller graph for this function:

cmn_Path IVD_CMN_DECL_d cmn_FileNameToLong ( const cmn_Path a_path  ) 

Definition at line 430 of file cmn_Path.cpp.

References cmn_Path::IsAbsolute().

Referenced by cmn_CreatePath(), and cmn_MoveFile().

                                                    {
    if (a_path.IsAbsolute()) {
        if (   (a_path.compare(0, 4, "\\\\?\\") == 0)
            || (a_path.compare(0, 4, "\\\\.\\") == 0)
            || (a_path.compare(0, 2, "\\\\") == 0))  // other UNC path
            return a_path;
        else {
            return cmn_Path("\\\\?\\") + a_path;
        }
    }
    else {
        return a_path;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string IVD_CMN_DECL_d cmn_GetEnvVariable ( const char *  a_varName  ) 

Retrieve ENV variable into a string.

Retrieve ENV variable into a string.

Arguments:

  • a_varName: name of variable whose value to retrieve.

Definition at line 362 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(), hsm_HL7MessageProxy::hsm_HL7MessageProxy(), 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().

                                                 {

    log_FUNC_A_m(cmn_GetEnvVariable, "name = " << a_varName);

    char* variable_cstr = getenv(a_varName);

    if (variable_cstr == NULL) {
        return string("");
    };

    return string(variable_cstr);
} // cmn_GetEnvVariable

Here is the call graph for this function:

Here is the caller graph for this function:

string IVD_CMN_DECL_d cmn_GetMigFlags ( UInt32_t  a_flags  ) 

Definition at line 339 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().

                                         {
    string ret;
    if (a_flags & ivd_ATTR_d) {
        ret += "H";
    }
    if (a_flags & ivd_DATA_d) {
        ret += "D";
    }
    if (a_flags & ivd_META_d) {
        ret += "M";
    }
    if (a_flags & ivd_ALTDATA_d) {
        ret += "A";
    }
    return ret;
}

Here is the caller graph for this function:

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:

Parameters:
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 258 of file cmn_function.cpp.

Referenced by fsc_nsElement::CheckLastGen(), scsi_IO::CheckStatusAndSense(), cmn_UTF8Converter::ConvertFromUTF8(), cmn_UTF8Converter::ConvertToUTF8(), hl7::CreateHL7Message(), 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().

                                                                                  {

    char hexsign[] = "0123456789ABCDEF";
    char line[100], *p;
    string dump;
    const UInt8_t *buf = (const UInt8_t *)a_buf;
    UInt32_t i, j, start;

    if (a_num < 1 || a_num > 24)
        a_num = 24;
    if (a_txt && a_num > 18)
        a_num = 18;

    start = 0;
    while (a_size > 0) {

        p = line;
        sprintf(p, "%05d: ", start);
        p += 7;

        for (i=0; i < a_num && i < a_size; i++) {
            *p++ = hexsign[buf[start+i] >> 4];
            *p++ = hexsign[buf[start+i] & 0x0F];
            *p++ = ' ';
        }
        for (j=i; j < a_num; j++) {
            *p++ = ' ';
            *p++ = ' ';
            *p++ = ' ';
        }

        if (a_txt) {
            *p++ = ' ';
            for (i=0; i < a_num && i < a_size; i++) {
                *p++ = isgraph(buf[start+i]) ? buf[start+i] : '.';
            }
        }

        *p++ = '\n';
        *p   = '\0';

        start  += i;
        a_size -= i;

        dump += string(line);
    }

    return dump;
}

Here is the caller graph for this function:

UInt32_t IVD_CMN_DECL_d cmn_IntPow ( UInt32_t  a,
UInt32_t  b 
)

a^b

Definition at line 58 of file cmn_function.cpp.

Referenced by rm_JobIdGen::GenerateNew(), data_Mode::GetPartSize(), and rm_JobIdGen::Init().

                                            {
    UInt32_t p(1);
    for (UInt32_t i = 0; i < b; i++) {
        p *= a;
    }
    return p;
}

Here is the caller graph for this function:

UInt64_t IVD_CMN_DECL_d cmn_IntPow ( UInt64_t  a,
UInt32_t  b 
)

a^b

Definition at line 68 of file cmn_function.cpp.

                                            {
    UInt64_t p(1);
    for (UInt32_t i = 0; i < b; i++) {
        p *= a;
    }
    return p;
}

bool IVD_CMN_DECL_d cmn_IsMounted ( cmn_Path  a_path  ) 

Check if directory is mounted.

Parameters:
a_path path to directory

Definition at line 696 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().

                                    {
    log_FUNC_m(IsMounted);


    a_path.RemoveTrailingPathSeparator();
    cmn_File fileSystem1(a_path);
    string fsID1 = fileSystem1.GetFileSystemID();

    cmn_File fileSystem2(a_path.UpPath());
    string fsID2 = fileSystem2.GetFileSystemID();

    log_DBG_m(dbg_NORM, fileSystem1.GetFullPathRef() << " = " << fsID1 );
    log_DBG_m(dbg_NORM, fileSystem2.GetFullPathRef() << " = " << fsID2 );
    return (fsID1 != fsID2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
a_pattern specifies pattern
a_file specifies filename
a_verify indicates if pattern should be verified

Definition at line 564 of file cmn_function.cpp.

References fpattern_match(), fpattern_matchn(), and cmn_Path::GetFileName().

Referenced by MigrateTreewalk::CheckDir(), cmn_IsPatternMatch(), and IsPatternMatch().

                                                                            {
    string filename = a_file.GetFileName();
    if (a_verify == false) {
        return (fpattern_matchn(a_pattern.c_str(), filename.c_str()) != 0);
    }
    return (fpattern_match(a_pattern.c_str(), filename.c_str()) != 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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 573 of file cmn_function.cpp.

References cmn_IsPatternMatch().

                                                                             {
    for (UInt32_t item = 0; item < a_patterns.size(); item++) {
        if (cmn_IsPatternMatch(a_patterns[item], a_file, a_verify) == true) {
            return true;
        }
    }
    return false;
}

Here is the call graph for this function:

bool IVD_CMN_DECL_d cmn_IsPatternMatch ( const string &  a_pattern,
const string &  a_file,
bool  a_verify = true 
)

Definition at line 583 of file cmn_function.cpp.

References fpattern_match(), and fpattern_matchn().

                                                                          {
    if (a_verify == false) {
        return (fpattern_matchn(a_pattern.c_str(), a_file.c_str()) != 0);
    }
    return (fpattern_match(a_pattern.c_str(), a_file.c_str()) != 0);
}

Here is the call graph for this function:

bool IVD_CMN_DECL_d cmn_IsPatternValid ( const string &  a_pattern  ) 

Checks that filename pattern a_pattern is a well-formed pattern.

Parameters:
a_pattern specifies pattern to check

Definition at line 560 of file cmn_function.cpp.

References fpattern_isvalid().

Referenced by i_HSM_i::MigrateByAPI(), and val_FileNamePattern::Validate().

                                                 {
    return (fpattern_isvalid(a_pattern.c_str()) != 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool IVD_CMN_DECL_d cmn_IsSpecialFile ( cmn_Path  a_fileName,
ivd_FileType_e  a_fileType = ift_UNKNOWN 
)

Check if file is special file.

Parameters:
a_fileName File to be checked
a_fileType File type, default 0

Definition at line 627 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().

                                                                   {
    log_FUNC_m(cmn_IsSpecialFile);

    string name = a_fileName.GetFileName();

    if (cmn_IsSpecialName(name)) {
        return true;
    }
    switch (a_type) {
        case ift_UNKNOWN:
        case ift_FILE:
        case ift_DIR:
            return false;
        default:
            return true;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool IVD_CMN_DECL_d cmn_IsSpecialName ( string &  a_name  ) 

Definition at line 645 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().

                                       {
    
    if (   (a_name.compare(".") == 0)
        || (a_name.compare("..") == 0)
        || (a_name.compare("lost+found") == 0)
        || (a_name.compare("._nfs") == 0)
        || (a_name.compare(0, 1, "$") == 0)
        || (a_name.compare("RECYCLER") == 0)
        || (a_name.compare("System Volume Information") == 0)
       ) {
        log_FUNC_m(cmn_IsSpecialName);
        log_DBG_m(dbg_NORM, "Special name: " << a_name);
        return true;
    }
    else {
        return false;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
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 592 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().

                                                                                      {
    log_FUNC_m(cmn_ListDir);

    ivd_GenInode_t node;
    ivd_FileType_e type;
    string         name;

    cmn_FileInfo_t fileInfo;

    try {
        cmn_FastDirLst dbList(a_path);

        while ((name = dbList.GetNextName(node, type)) != "") {
            fileInfo.name = name;
            fileInfo.node = node;
            fileInfo.type = type;

            if (cmn_IsSpecialFile(name, type)) {
                if (!a_skipSpecial) {
                    a_fileList_v.push_back(fileInfo);
                }
            }
            else {
                a_fileList_v.push_back(fileInfo);
            }
        }
    }
    catch (...) {
        log_DBG_m(dbg_NORM, "Can not list files in directory " <<
                            a_path);
        a_fileList_v.clear();
        //ignore
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string IVD_CMN_DECL_d cmn_Num2PowOfK ( UInt64_t  a_num  ) 

Definition at line 308 of file cmn_function.cpp.

References cmn_Num2Str().

Referenced by _tmain(), and hsm_FHmigc::DumpStatus().

                                      {
    const UInt64_t oneKilo_c = 1024;
    UInt64_t num = a_num;

    string strUnit;

    int range = 0;
    while (num >= oneKilo_c) {
        num >>= 10;
        range++;
    }

    // Used K,M,G... like on linux see man df -h or ls -h option
    // KB, MB, GB are assumed with power of 1000 not 1024
    switch (range) {
        case  0 : break;
        case  1 : strUnit = "K";break;
        case  2 : strUnit = "M";break;
        case  3 : strUnit = "G";break;
        case  4 : strUnit = "T";break;
        case  5 : strUnit = "P";break;
        default : strUnit = "E";break;
    }

    return cmn_Num2Str(num) + strUnit;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string IVD_CMN_DECL_d cmn_Num2Str ( const UInt64_t i,
bool  a_hex = false 
)

Definition at line 127 of file cmn_function.cpp.

                                                  {
    char buf[44];  // enought for 128 bit numbers
#if (IVD_POSIX_OS)
    if (a_hex) {
        sprintf(buf,"0x%016llX", i );
    }
    else {
        sprintf(buf,"%llu", i );
    }
#elif (TGT_OS_windows)
    if (a_hex) {
        sprintf(buf,"0x%I64X", i );
    }
    else {
        sprintf(buf,"%I64u", i );
    }
#endif
    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( UInt32_t  i,
bool  a_hex = false 
)

Definition at line 148 of file cmn_function.cpp.

                                           {
    char buf[44];  // enought for 128 bit numbers
    if (a_hex) {
        sprintf(buf,"0x%08X", i );
    }
    else {
        sprintf(buf,"%u", i );
    }
    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( UInt16_t  i,
bool  a_hex = false 
)

Definition at line 160 of file cmn_function.cpp.

                                           {
    char buf[44];  // enought for 128 bit numbers
    if (a_hex) {
        sprintf(buf,"0x%04X", i );
    }
    else {
        sprintf(buf,"%u", i );
    }
    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( UInt8_t  i,
bool  a_hex = false 
)

Definition at line 172 of file cmn_function.cpp.

                                          {
    char buf[44];  // enought for 128 bit numbers
    if (a_hex) {
        sprintf(buf,"0x%02X", i );
    }
    else {
        sprintf(buf,"%u", i );
    }
    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( void *  i  ) 

Definition at line 184 of file cmn_function.cpp.

                            {
    char buf[44];  // enought for 128 bit numbers
#if TGT_OS_linux || TGT_OS_windows
    sprintf(buf,"0x%p", i );
#elif TGT_OS_hpux
    sprintf(buf,"0x%x", i );
#endif
    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( Int16_t  i  ) 

Definition at line 110 of file cmn_function.cpp.

                              {
    char buf[44];  // enought for 128 bit numbers
    sprintf(buf,"%d", i );

    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( Int8_t  i  ) 

Definition at line 118 of file cmn_function.cpp.

                             {
    char buf[44];  // enought for 128 bit numbers
    sprintf(buf,"%d", i );

    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( const Int64_t i  ) 

Definition at line 89 of file cmn_function.cpp.

Referenced by _tmain(), 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_HL7CacheFile::CreateFile(), hl7::CreateHL7Message(), 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(), rm_Operator::MajorColIdMatches(), 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(), i_PartitionManager_i::ReadHl7Info(), 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(), hl7::ReorderFileSequenceNumbers(), 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(), cfg_HL7Info::WriteGroupToFile(), cfg_CollocationInfo::WriteGroupToFile(), df_Packer::WriteRecBSEnd(), df_Packer::WriteRecFRISplitInfo(), i_HSM_i::WriteToDirectoryHl7InfoTable(), and cmn_Mutex::~cmn_Mutex().

                                     {
    char buf[44];  // enought for 128 bit numbers
#if (IVD_POSIX_OS)
//#pragma set woff ISO C89
    sprintf(buf,"%lld", i );
#elif (TGT_OS_windows)
    sprintf(buf,"%I64d", i );
#endif

    string retval(buf);
    return retval;
}

string IVD_CMN_DECL_d cmn_Num2Str ( Int32_t  i  ) 

Definition at line 102 of file cmn_function.cpp.

                              {
    char buf[44];  // enought for 128 bit numbers
    sprintf(buf,"%d", i );

    string retval(buf);
    return retval;
}

int cmn_NumOfOctets ( int  a_size  )  [inline]

Return the number of eight bytes length records needed to store a_size buffer.

Definition at line 216 of file cmn_function.h.

Referenced by fsc_nsDirEntryFormattedVec::Write2DB(), and fio_BasicString::Write2DB().

                                       {
    return ((a_size + 8 - 1) >> 3);
}

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_SetEnvVariable ( const char *  a_varName,
string &  a_varValue 
)

Set ENV variable.

Set ENV variable.

Arguments:

  • a_varName: name of variable whose value to retrieve.
  • a_varValue: value of the variable

Definition at line 385 of file cmn_function.cpp.

References cmn_SetEnvVariable(), errno, and log_FUNC_A_m.

Referenced by cmn_SetEnvVariable(), ipc_Corba::Init(), and main().

                                                                   {

    log_FUNC_A_m(cmn_SetEnvVariable,
                 "name=" << a_varName << ", val=" << a_varValue);

#if (TGT_OS_windows)
    // TODO: UTF-8 to UC conversion, at least for a_varValue.
    if (0 == SetEnvironmentVariableA(a_varName, a_varValue.c_str())) {
        throw ivd_SysError(GetLastError(), "SetEnvironmentVariable()");
    }
#elif TGT_OS_linux
    if (setenv(a_varName, a_varValue.c_str(), 1) == -1) {
        throw ivd_SysError(errno, "setenv()");
    }
#else
// HPUX
    ostringstream ostr;
    ostr << a_varName << "=" << a_varValue;
    string envstr(ostr.str());

    // CR: Memory leak. Needs to be fixed later.

       char *envstring = new char[envstr.length() + 1]; // memory leak
       envstr.copy(envstring, envstr.length());
       envstring[envstr.length()] = '\0';

    if (putenv(envstring) != 0) {
       throw ivd_SysError(errno, "putenv()");
    }

#endif
} // cmn_SetEnvVariable

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_SlashToBackSlash ( string &  a_path  ) 

Definition at line 241 of file cmn_function.cpp.

Referenced by df_Unpacker::ReadRecFile().

                                          {
    for (string::iterator i(a_path.begin()); i != a_path.end(); ++i) {
        if (*i == '/') {
            *i = '\\';
        }
    }
}

Here is the caller graph for this function:

UInt32_t IVD_CMN_DECL_d cmn_Str2Num ( const string &  a_str,
bool  a_hex = false 
)

Definition at line 195 of file cmn_function.cpp.

Referenced by hsm_HL7CacheFile::hsm_HL7CacheFile(), hsm_HL7MessageProxy::hsm_HL7MessageProxy(), main(), bea_Volume::MustDumpFRI(), bea_RecallThread::Recall(), mif_CfgRep::SetLastRevNum(), and i_PartitionManager_i::WriteHl7Info().

                                                      {
    UInt32_t num(0);

    if (a_hex
        && a_str.length() > 2 && a_str[0] == '0'
        && (a_str[1] == 'x'|| a_str[1] == 'X')) {
        sscanf(a_str.c_str(), "%x", &num);
        return num;
    }

    sscanf(a_str.c_str(), "%u", &num);
    return num;
}

Here is the caller graph for this function:

string IVD_CMN_DECL_d cmn_StrLAlign ( const string &  str,
int  a_len 
)

Definition at line 219 of file cmn_function.cpp.

                                                   {
    size_t l = a_len - str.length() ;
    if (l < 1) {
        return str;
    }
    else {
        return str + string(l, ' ');
    }
}

void IVD_CMN_DECL_d cmn_StrLowerCase ( string &  a_str  ) 
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 51 of file cmn_string.cpp.

References cmn_StrTokenize(), and log_FUNC_m.

Referenced by cmn_StrTokenize(), ivd_FS_Event::GetRootDir(), and log_ivdfs::WriteHL7MsgNotification().

                                                                            {

    log_FUNC_m(cmn_StrTokenize);

    vector<string> retV;
    string::size_type begIdx, endIdx;

    begIdx = a_str.find_first_not_of(a_delims);

    while (begIdx != string::npos) {

        endIdx = a_str.find_first_of(a_delims, begIdx);
        if (endIdx == string::npos) {
            endIdx = a_str.length();
        }

        retV.push_back(a_str.substr(begIdx, endIdx - begIdx));

        begIdx = a_str.find_first_not_of(a_delims, endIdx);
    }

    return retV;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_StrUpperCase ( string &  a_str  ) 

Definition at line 84 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().

                                     {
    transform( a_str.begin(), a_str.end(), a_str.begin(), ::toupper);
}

Here is the caller graph for this function:

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 447 of file hsm_fs_api.cpp.

References ivd_FS_File::e_Cache, file, g_fs_api_p, fs_api::GetDirFH(), ivd_FS_Event::GetFileID(), ivd_FS_Event::GetFileType(), ivd_FS_Event::GetOldPathList(), ivd_FS_Event::GetOSID(), ivd_FS_Event::GetPath(), ivd_FS_Event::GetPathList(), ivd_FileSystemAPI::GetRootPath(), ivd_NULLCHK_m, log_FUNC_m, NULL, and s_className.

Referenced by fs_api::AddGenericEvent(), fs_api::EventDataOffline(), fs_api::EventDelete(), and fs_api::EventMove().

                               {

    log_FUNC_m(CreateNewFH);

    hsm_FileHeader *hsmOwnFH    = NULL;
    hsm_FileHeader *hsmOldOwnFH = NULL;
    hsm_FileHeader *hsmFH       = NULL;
    hsm_InoObj     *hsmIObj     = NULL;

    //HPUX - The file needs to be opened ( to be in the kernel cache ) - except for DELETE events
    ivd_PathList_t pathList;
    a_event.GetPathList(pathList);

    ivd_FS_File file(*g_fs_api_p, a_event.GetOSID(), a_event.GetFileID());
    if(!a_name.empty()){
        cmn_Path fileName = GetRootPath() + a_event.GetPath();
        file.Open(ivd_FS_File::e_Cache, fileName);
    }

    if (pathList.size() != 0) {
        // GetDirFH increment reference of owner
        hsmOwnFH = GetDirFH(pathList, pathList.begin());
    }

    ivd_PathList_t pathOldList;
    a_event.GetOldPathList(pathOldList);
    if (pathOldList.size() != 0) {
        // GetDirFH increment reference of owner
        hsmOldOwnFH = GetDirFH(pathOldList, pathOldList.begin());
    }

    //string mountPoint = a_event.GetRootDir(m_fsUUID);
    hsmIObj = new hsm_InoObj(a_event.GetFileType(),
                             a_inode,
                             a_event.GetFileID());

    ivd_NULLCHK_m(hsmIObj, hsm_InoObj::s_className);

    hsmFH = new hsm_FileHeader( a_event.GetFileID(),
                                a_name,
                                a_oldName,
                                hsmOwnFH,
                                hsmOldOwnFH,
                                hsmIObj);


    ivd_NULLCHK_m(hsmFH, hsm_FileHeader::s_className);

    if (hsmOwnFH != NULL) { // now is used, so decrease temporary reference
        hsmOwnFH->DecrRef();
    }
    if (hsmOldOwnFH != NULL) { // now is used, so decrease temporary reference
        hsmOldOwnFH->DecrRef();
    }

    //HPUX - Close file
    if(!a_name.empty()){
        file.Close();
    }

    return hsmFH;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ivd_Delay::Delay ( int  a_objNum  )  [inherited]

Definition at line 214 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().

                                  {
    log_FUNC_m(Delay);
    int waitLevel = a_objNum / m_step;
    if (waitLevel == 0) {
        return;
    }
    if (waitLevel > m_levels) {
        if (!m_warningWritten) {
            ostringstream sstr;
            sstr << "Max level exceeded. Huge number of active files " << a_objNum
                        <<  ", waitLevel=" << waitLevel
                        <<  ", decreased to " << m_levels
                        <<  ", step=" << m_step;

            log_WriteEvent(evt_WARNING, sstr.str());
            m_warningWritten = true;
        }
        waitLevel = m_levels;
    }
    if (   m_warningWritten
        && waitLevel < (m_levels / 2)) {
        m_warningWritten = false;
    }

    int microSeconds = 1000 * m_miliSecWaitUnit * m_sleepLevel[waitLevel];
    if (microSeconds) {
        log_DBG_m(dbg_DETAIL, "Delay for " << microSeconds << " [micro sec]"
                           << ", objects=" << a_objNum
                           << ", waitLevel=" << waitLevel);
        ivd_USleep(microSeconds);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void fs_api::Destroy ( void   )  [inherited]

Definition at line 402 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().

                         {
    if (m_initialized) {
        // release transaction
        g_hsmDB_p->ReleaseTransObj(*m_trans_p);
        m_initialized = false;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

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 518 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().

                                                                      {

    log_FUNC_m(DismissFH);

    // GetFH and constructor increase ref automaticaly,
    // to prevent others to dereference FH before is handled in Event method
    a_hsmFH->DecrRef();

    g_hsm_fhLock.UnLockByID(a_inode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ivd_FileSystemAPI::DumpState ( ivd_FSInfo_t fsInfo  )  [inherited]
virtual void ivd_FileSystemAPI::EventAltdataChange ( ivd_FS_Event  )  [inline, virtual, inherited]

Definition at line 200 of file ivd_fs_api.h.

{};   // ADS

virtual void ivd_FileSystemAPI::EventAttributeChange ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 198 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{}; // permissions/ownership

Here is the caller graph for this function:

void fs_api::EventAttributeChange ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 1046 of file hsm_fs_api.cpp.

References fs_api::AddGenericEvent(), fs_api::eChgAttr, and log_FUNC_m.

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventCancelRequest ( ivd_FS_Event  )  [inline, virtual, inherited]

Definition at line 179 of file ivd_fs_api.h.

{}; // Cancel sync req.

virtual void ivd_FileSystemAPI::EventCreate ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 190 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{};

Here is the caller graph for this function:

void fs_api::EventCreate ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 1036 of file hsm_fs_api.cpp.

References fs_api::AddGenericEvent(), fs_api::eCreate, and log_FUNC_m.

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventDataChange ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 197 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{};

Here is the caller graph for this function:

void fs_api::EventDataChange ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 1041 of file hsm_fs_api.cpp.

References fs_api::AddGenericEvent(), fs_api::eChgData, and log_FUNC_m.

                                                {
    log_FUNC_m(EvenDataChanged);
    AddGenericEvent(a_evt, eChgData);
}

Here is the call graph for this function:

void ivd_FileSystemAPI::EventDataOffline ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented in fs_api.

Definition at line 348 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void fs_api::EventDataOffline ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 975 of file hsm_fs_api.cpp.

References cmn_EXEC_WAIT, cmn_ExecCommand(), fs_api::CreateNewFH(), dbg_LOW, fs_api::DismissFH(), exitCode, fs_api::FindAndPrepareFH(), g_clientConf_p, g_fs_api_p, g_hsm_FHCache_p, ivd_FS_Event::GetCause(), GetFHIdentify(), ivd_FS_Event::GetPath(), ivd_FS_Event::GetPathList(), ivd_FileSystemAPI::GetRootPath(), hsm_FHcache::Insert(), ClientConf_t::IsRecallScriptAvailable(), ivd_FS_ERR_Reply, log_DBG_m, log_FUNC_m, log_NOTE_m, ClientConf_t::m_recallScriptPath, NULL, and ivd_FS_Event::ReplySyncEvent().

                                                 {
    log_FUNC_m(EventDataOffline);

    ivd_PathList_t pathList;
    ivd_GenInode_t inode;
    string  name;
    ivd_GenInode_t   ownInode    = 0;
    hsm_FileHeader  *hsmFH = NULL;
    string  oldName;

    a_evt.GetPathList(pathList);

    if (   (a_evt.GetCause() == 0 /* HSM_CAUSE_OFFLINE */)
        && g_clientConf_p->IsRecallScriptAvailable()) {
        // Call external script to trigger recall(s)
        string command;
        vector<string> args;
        cmn_Path fileName = g_fs_api_p->GetRootPath() + a_evt.GetPath();
#if TGT_OS_windows
        command = "cmd.exe";
        args.push_back("/c");
        args.push_back(g_clientConf_p->m_recallScriptPath);
#else
        command = g_clientConf_p->m_recallScriptPath;
#endif
        args.push_back(fileName);

        try {
            int exitCode = cmn_ExecCommand(command, args, cmn_EXEC_WAIT);
            switch (exitCode) {
                case 101:
                    // Reply "not recalled" to filer and do not conrinue with the recall
                    a_evt.ReplySyncEvent(ivd_FS_ERR_Reply);
                    return;
                case 100:
                    // Continue with file the recall
                    break;
                default:
                    log_NOTE_m("The recall script returned unexpected value " << exitCode << ". Ignoring...");
                    // Continue with file the recall
            }
        }
        catch (...) {
            log_DBG_m(dbg_LOW, "Cannot execute recall script.");
        }
    }

    GetFHIdentify(pathList, pathList.begin(), inode, name, ownInode);

    hsmFH = FindAndPrepareFH(inode);

    if (hsmFH == NULL) {
        hsmFH = CreateNewFH(inode, a_evt, name, oldName);
        // reference decrement of owners is perform in constructor
        g_hsm_FHCache_p->Insert(hsmFH);
    }

    hsmFH->EventOffline(a_evt);
    DismissFH(hsmFH, inode);
}

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventDelay (  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 175 of file ivd_fs_api.h.

{};

void fs_api::EventDelay (  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 710 of file hsm_fs_api.cpp.

References ivd_Delay::Delay(), fhObjCount_g, fhObjCount_x_g, log_FUNC_m, and fs_api::m_eventRateRegulation.

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventDelete ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 191 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{};

Here is the caller graph for this function:

void fs_api::EventDelete ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 838 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::GetOldPath(), hsm_FHcache::Insert(), log_FUNC_m, fs_api::m_trans_p, and NULL.

                                            {
    log_FUNC_m(EventDelete);

    ivd_GenInode_t inode;
    string  name;
    ivd_GenInode_t   ownInode    = 0;
    string  oldName;
    cmn_Path movedFrom = a_evt.GetOldPath();
    ivd_GenInode_t   oldOwnInode = 0;
    hsm_FileHeader  *hsmFH = NULL;

    GetIdentify(a_evt, true, inode, name, ownInode, oldName, oldOwnInode);

    hsmFH = FindAndPrepareFH(inode);

    // Write FileID to log so it can be latter used for ivdfile --recall
//    g_fsLog.Write(a_evt.GetFileID(), 0, a_evt.GetOldPath(), "Deleted.");

    if (hsmFH == NULL){
        if (a_evt.GetFileID() == 0){
            goto unlock;
//                g_hsm_fhLock.UnLockByID(inode);
//                return;
        }

        hsmFH = CreateNewFH(inode, a_evt, name, oldName);
        // reference decrement of owners is perform in constructor
        g_hsm_FHCache_p->Insert(hsmFH);
    }

    hsmFH->Event(eDelFile, *m_trans_p, &movedFrom);

    // GetFH and constructor increase ref automaticaly,
    // to prevent others to dereference FH before is handled in Event method
    hsmFH->DecrRef();

unlock:
    g_hsm_fhLock.UnLockByID(inode);
}

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventDismounted ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 188 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{};

Here is the caller graph for this function:

void fs_api::EventDismounted ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 827 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().

                                                {
    log_FUNC_m(EventDismounted);

    ostringstream sstr;
    sstr << "Unmounted file system " << a_evt.GetVolumeID()
         << " on HSM partition " << g_clientConf_p->CfgPartitionName
         << ".";
    log_WriteEvent(sstr.str());
    log_DBG_m(dbg_DETAIL, "Event_UnMount. HSM will GO_DOWN");
}

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventLogMessage ( ivd_FS_Event  )  [inline, virtual, inherited]

Definition at line 184 of file ivd_fs_api.h.

{};

virtual void ivd_FileSystemAPI::EventMetadataChange ( ivd_FS_Event  )  [inline, virtual, inherited]

Definition at line 199 of file ivd_fs_api.h.

{};  // EA, ACL

virtual void ivd_FileSystemAPI::EventMounted ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 180 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{};

Here is the caller graph for this function:

void fs_api::EventMounted ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 721 of file hsm_fs_api.cpp.

References hsm_ActiveFH::ActiveToList(), ClientConf_t::CfgOperationMode, ClientConf_t::CfgPartitionName, ClientConf_t::CfgRecallOnly, ClientConf_t::CfgRecallOnOpen, ClientConf_t::CfgRecallTimeOut, ClientConf_t::CfgWORMTimeout, log_EventLog::ChangeQualifier(), CheckRootMembersForEA(), dbg_DETAIL, dbg_LOW, dbg_NORM, 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, ipc_EXEC_m, 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_FS_Cfg_t::recallOnOpen, ivd_FileSystemAPI::SetConfiguration(), i_HSM_i::SetReady(), ivd_FileSystemAPI::SetRootPath(), hsm_Containers::Start(), ivd_FS_Cfg_t::syncEventTimeout, and ivd_FS_Cfg_t::WORMTimeout.

                                             {
    log_FUNC_m(EventMounted);

    //TODO:Check event status

    log_DBG_m(dbg_DETAIL, "  Event Manager to get Root properties");
    SetRootPath(a_evt.GetRootDir(m_fsUUID));

    if (GetRootPath().empty()) {
        throw ivd_Error(ie_HSM_INVPATH, "Can not get mount point");
    }

    log_DBG_m(dbg_DETAIL, "  Event Manager got Root properties: mount point: "
        << GetRootPath());

    string vol = m_fsUUID;
    string mountPnt = GetRootPath();
    log_WriteEvent("Mounting "
        + vol
        + " on "
        + mountPnt,
        "", 0, "");

    ivd_FS_Cfg_t cfg;
    GetConfiguration(cfg);
    cfg.syncEventTimeout = g_clientConf_p->CfgRecallTimeOut;
    cfg.recallOnOpen = g_clientConf_p->CfgRecallOnOpen;

    if (i_FST_WORM == g_clientConf_p->CfgOperationMode) {
        if (g_clientConf_p->CfgRecallOnly) {
            cfg.operationMode = e_WORMRecallOnly;
            log_DBG_m(dbg_NORM, "RecallOnly set!");
        }
        else {
            cfg.operationMode = e_WORM;
        }
        cfg.WORMTimeout = g_clientConf_p->CfgWORMTimeout;
    }
    else {
        if (g_clientConf_p->CfgRecallOnly) {
            cfg.operationMode = e_RegularRecallOnly;
            log_DBG_m(dbg_NORM, "RecallOnly set!");
        }
        else {
            cfg.operationMode = e_Regular;
        }
        cfg.WORMTimeout = 0;
    }
    SetConfiguration(cfg);

    m_peLog->ChangeQualifier(GetRootPath());
    {
        ostringstream sstr;
        sstr << "Mounted file system " << m_fsUUID
             << " on HSM partition " << g_clientConf_p->CfgPartitionName
             << "."
             << " Max FileID from FSC:" << m_pIHSM->GetLastFscFileID();
        log_WriteEvent(sstr.str());
    }

    if (m_pIHSM->GetLastFscFileID() == 0) {
        // Brand new partition
        // check at least root members to not have EA with (fileID > 0), bug 3965
        CheckRootMembersForEA(*this);
    }


    if (g_mig.GetAPIMode()) {
        log_WriteEvent("Recall only mode: Active entries from HSM DB not read.");
    }
    else {
        log_WriteEvent("Started reading active entries from HSM DB.");
        log_DBG_m(dbg_LOW, "Read active");
        g_hsm_activeList_p->ActiveToList(vol);
        log_WriteEvent("Finished reading active entries from HSM DB.");
    }

    log_DBG_m(dbg_LOW, "Send Partition ID to PM for CORBA NS registration");
    ipc_EXEC_m(
        g_iPM->RegisterFSID(a_evt.GetVolumeID().c_str());
        g_partitionFSID = a_evt.GetVolumeID();
    );

    log_DBG_m(dbg_LOW, "START threads");
    m_pCont->Start();

    log_DBG_m(dbg_LOW, "HSM is prepared to catch events.");

    m_pIHSM->SetReady(true);
}

Here is the call graph for this function:

void ivd_FileSystemAPI::EventMountRequest ( ivd_FS_Event a_evt  )  [virtual, inherited]

Definition at line 343 of file hpux/ivd_fs_api.cpp.

References HSM_ERR_REPLY_d, log_FUNC_m, and ivd_FS_Event::ReplySyncEvent().

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventMove ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 193 of file ivd_fs_api.h.

Referenced by ivd_FileSystemAPI::Run().

{};

Here is the caller graph for this function:

void fs_api::EventMove ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 880 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::GetOldPath(), ivd_FS_Event::GetPathList(), 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.

                                          {
    log_FUNC_m(EventMove);

    ivd_GenInode_t inode;
    string  name;
    ivd_GenInode_t   ownInode    = 0;
    string  oldName;
    cmn_Path movedFrom = a_evt.GetOldPath();
    ivd_GenInode_t   oldOwnInode = 0;
    bool changeName  = false;
    bool changeOwner = false;
    hsm_FileHeader  *hsmFH = NULL;
    ivd_PathList_t pathList;

    // exist two different change name event
    // one is from create and other from mv operation
    // create file must be handled little different
    GetIdentify(a_evt, false, inode, name, ownInode, oldName, oldOwnInode);

    changeName  = name     != oldName;
    changeOwner = ownInode != oldOwnInode;

    if (changeName && !changeOwner) {
        log_DBG_m(dbg_DETAIL, " Changed name not owner " <<
                    IVD_PRINT_ID_FS(inode) <<
                    " name " << name <<
                    " old name " << oldName <<
                    " owner " << IVD_PRINT_ID_FS(ownInode) <<
                    " old owner " << IVD_PRINT_ID_FS(oldOwnInode));
    }
    else if (!changeName && changeOwner) {
        log_DBG_m(dbg_DETAIL, " Changed owner not name " <<
                    IVD_PRINT_ID_FS(inode) <<
                    " name " << name <<
                    " old name " << oldName <<
                    " owner " << IVD_PRINT_ID_FS(ownInode) <<
                    " old owner " << IVD_PRINT_ID_FS(oldOwnInode));
    }
    else if (changeName && changeOwner) {
        log_DBG_m(dbg_DETAIL, " Changed owner and name " <<
                    IVD_PRINT_ID_FS(inode) <<
                    " name " << name <<
                    " old name " << oldName <<
                    " owner " << IVD_PRINT_ID_FS(ownInode) <<
                    " old owner " << IVD_PRINT_ID_FS(oldOwnInode));
    }
    else {
        log_WRN_m(" Change event anounce, but nothing is changed: inode " <<
                    IVD_PRINT_ID_FS(inode) <<
                    " name " << name <<
                    " old name " << oldName <<
                    " owner " << IVD_PRINT_ID_FS(ownInode) <<
                    " old owner " << IVD_PRINT_ID_FS(oldOwnInode));
        return;
        // nothing is changed
    }

    hsmFH = FindAndPrepareFH(inode);

    if (hsmFH == NULL){
        hsmFH = CreateNewFH(inode, a_evt, name, oldName);
        log_DBG_m(dbg_DETAIL, "Create FH." << IVD_PRINT_ID_FS(inode)
            << " path " << hsmFH->MakePath()
            << " old path " << hsmFH->GetOldFullPath());

        // reference decrement of owners is perform in constructor
        g_hsm_FHCache_p->Insert(hsmFH);
    }
    else {  // if (hsmFH == NULL)
        log_DBG_m(dbg_DETAIL, "Got from cache " << IVD_PRINT_ID_FS(inode));
        // Fh got from cache then old values are there
        hsmFH->NewName(name);

        hsm_FileHeader *hsmOwnFH;
        // GetDirFH increment reference of owner
        a_evt.GetPathList(pathList);
        hsmOwnFH = GetDirFH(pathList, pathList.begin());

        // newOwner doesn't change oldpath if is already changed
        hsmFH->NewOwner(hsmOwnFH);
        // decrement reference after assign
        if (hsmOwnFH != NULL) {
            hsmOwnFH->DecrRef();
        }
    } // if (hsmFH == NULL)
    log_DBG_m(dbg_DETAIL, "Change move/rename."
    << " path " << hsmFH->MakePath()
    << " old path " << hsmFH->GetOldFullPath()
    << " moved from " << movedFrom );

    hsmFH->Event(eChgNameOwn, *m_trans_p, &movedFrom);

    DismissFH(hsmFH, inode);
}

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventPreDelete ( ivd_FS_Event  )  [inline, virtual, inherited]

Definition at line 192 of file ivd_fs_api.h.

{};

virtual void ivd_FileSystemAPI::EventPredismount ( ivd_FS_Event  )  [inline, virtual, inherited]

Reimplemented in fs_api.

Definition at line 187 of file ivd_fs_api.h.

{};

void fs_api::EventPredismount ( ivd_FS_Event a_evt  )  [virtual, inherited]

Reimplemented from ivd_FileSystemAPI.

Definition at line 812 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().

                                                 {
    log_FUNC_m(EventPredismount);

    ostringstream sstr;
    sstr << "PreUnmount file system " << a_evt.GetVolumeID() << ".";
    log_WriteEvent(sstr.str());
    log_DBG_m(dbg_DETAIL, "Event_PreUnMount.");

    // Put here whatever ops need to be executed before volume is dimounted.

    // It is sync predismount event.
    // Note: Allways return success, can't fail dismount.
    a_evt.ReplySyncEvent(ivd_FS_OK_Reply);
}

Here is the call graph for this function:

virtual void ivd_FileSystemAPI::EventQueueEmpty ( ivd_FS_Event  )  [inline, virtual, inherited]

Definition at line 178 of file ivd_fs_api.h.

{}; // No events pending on filter event queue.

void ivd_Delay::Fibonacci (  )  [private, inherited]

Definition at line 248 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().

                          {
    log_FUNC_m(Fibonacci);
    m_sleepLevel[0] = 0;
    m_sleepLevel[1] = 1;
    m_levels = 1;
    int *p1 = &m_sleepLevel[0];
    int *p2 = &m_sleepLevel[1];
    int *pe = &m_sleepLevel[m_maxNumOfLevels_c - 1];
    int maxFaktor = m_maxMiliSecWait / m_miliSecWaitUnit;
    int f;
    do {
        f = *p1 + *p2;
        p1++;
        p2++;
        m_levels++;
        *p2 = f;
    } while (  f < maxFaktor
            && p2 < pe);
}

Here is the caller graph for this function:

hsm_FileHeader * fs_api::FindAndPrepareFH ( ivd_GenInode_t  inode  )  [private, inherited]

This methods tries to find File Header and lock it.

Definition at line 414 of file hsm_fs_api.cpp.

References eDoMigAbort, 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().

                                                             {

    log_FUNC_m(FindAndPrepareFH);

    hsm_FileHeader  *hsmFH = NULL;
// fix bug 491
// first try to lock FH. if looked and migration is in progress
// then set willing to abort migration. To get scope quick.
    if (!g_hsm_fhLock.CanLockByID(inode)) {
        hsmFH = g_hsm_FHCache_p->GetFH(inode);
        if (hsmFH != NULL) {
            ivd_USleep(1000); // sleep one mili seconds for synchronization
            if (hsmFH->GetDataMigStat() == eDoMigStart) {
                hsmFH->SetDataMigStat(eDoMigAbort);
            }
        }
        else {
            log_WRN_m("Inode is locked but not in cache. "
                      "Possible when it was just removed. " << IVD_PRINT_ID_FS(inode));

        }
        g_hsm_fhLock.LockByID(inode);
    }

    if (hsmFH == NULL) { // maybe found when locked
        hsmFH = g_hsm_FHCache_p->GetFH(inode);
    }
    return hsmFH;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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 365 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().

                               :

        ivd_FileSystemAPI(a_dev, true),
        m_fsUUID(a_fsUUID),
        m_pIHSM(a_pIHSM),
        m_pCont(a_pCont),
        m_peLog(a_peLog),
        m_initialized(false),
        m_trans_p(NULL)
{
    log_FUNC_m(fs_api);
    string eventPolicy = cmn_GetEnvVariable("HSM_EVENT_RATE_POLICY");
    if (eventPolicy.empty()) {
        // step , max mili sec wait, mili sec wait unit
        m_eventRateRegulation.SetProperties(g_clientConf_p->CfgMaxNumFiles * 4, 10000, 1);
    }
    else {
        m_eventRateRegulation.SetProperties(eventPolicy);
    }
}

Here is the call graph for this function:

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 53 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().

                                                                     {
    log_FUNC_m(fsc_nsCreateDirectoryObj(fileID));

    fsc_nsDirectory *dir_p = static_cast<fsc_nsDirectory*>(g_nsDirCache.Get(a_fileID));
    if (dir_p == NULL) {
        dir_p = new fsc_nsDirectory(a_fileID);
        g_nsDirCache.Insert(dir_p);
        log_DBG_m(dbg_DETAIL, "DirectoryObj is not in cache. Make it. fileID = " 
                              << a_fileID
                              << "  pointer " << dir_p
                                << " refNumber = " 
                             << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber());
    }        
    else {
        log_DBG_m(dbg_DETAIL, "DirectoryObj found in cache. fileID = " 
                                << a_fileID
                                << "  pointer " << dir_p);
    }

    return dir_p;
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_FSC_DECL_d fsc_nsElement* fsc_nsCreateElementObj ( ivd_RecordIDX_t  a_fileID,
nse_Opentype_e  a_openType = nse_STANDARD 
)

Definition at line 110 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.

                                                                  {
    log_FUNC_m(fsc_nsCreateElementObj);

    // check if is in directory cache
    fsc_nsDirectory *dir_p = static_cast<fsc_nsDirectory*>(g_nsDirCache.Get(a_fileID));
    if (dir_p != NULL) {
        log_DBG_m(dbg_DETAIL, "Got in  cache. refNumber = " 
                << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber());
        return dir_p;
    }

    fsc_nsElement_t el(a_fileID);
    if (el.memberIdx > 0) { // is a directory
        dir_p = new fsc_nsDirectory(a_fileID, el, a_openType);
        g_nsDirCache.Insert(dir_p);
        log_DBG_m(dbg_DETAIL, "DirectoryObj is not in cache. Make it. fileID = " 
                              << a_fileID
                              << "  pointer " << dir_p
                              << " refNumber = " 
                              << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber());
        return dir_p;
    }
    else {
        fsc_nsElement *file_p = new fsc_nsElement(a_fileID, el, a_openType);
        log_DBG_m(dbg_DETAIL, "ElementObj fileID = " 
                                << a_fileID
                                << "  pointer " << file_p);
        return file_p;
    }
}

Here is the call graph for this function:

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 77 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().

                                                                     {
    log_FUNC_m(fsc_nsCreateElementObj(bool));
    if (a_isDirectory) {
        fsc_nsDirectory *dir_p = static_cast<fsc_nsDirectory*>(g_nsDirCache.Get(a_fileID));
        if (dir_p != NULL) {
            log_DBG_m(dbg_DETAIL, "DirectoryObj found in cache. fileID = " 
                                    << a_fileID
                                    << "  pointer " << dir_p
                                << " refNumber = " 
                             << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber());
            return dir_p;
        }
        dir_p = new fsc_nsDirectory(a_fileID);
        g_nsDirCache.Insert(dir_p);
        log_DBG_m(dbg_DETAIL, "DirectoryObj is not in cache. Make it. fileID = " 
                                << a_fileID
                                << "  pointer " << dir_p
                                << " refNumber = " 
                             << static_cast<fsc_nsDirectory*>(dir_p)->GetRefNumber());
        return dir_p;
    }
    else {
        fsc_nsElement *file_p = new fsc_nsElement(a_fileID);
        log_DBG_m(dbg_DETAIL, "ElementObj fileID = " 
                                << a_fileID
                                << "  pointer " << file_p);
        return file_p;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

fsc_nsNameMgr* fsc_nsCreateNameObj ( UInt8_t  a_size,
ivd_RecordIDX_t  a_idx 
)

Definition at line 73 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().

                                                                          {
    log_FUNC_m(fsc_nsCreateNameObj);    
    return new fsc_nsNameMgr(a_size, a_idx);
}

Here is the call graph for this function:

Here is the caller graph for this function:

fsc_nsOwnerMgr* fsc_nsCreateOwnerMgrObj ( ivd_RecordIDX_t  a_ownerFileID  ) 

Definition at line 59 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().

                                                                        {
    log_FUNC_m(fsc_nsCreateOwnMemObj);
    return new fsc_nsOwnerMgr(a_ownerFileID);
}

Here is the caller graph for this function:

IVD_FSC_DECL_d void fsc_nsRemoveElementObj ( fsc_nsElement a_dir_p  ) 

Definition at line 144 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().

                                                          {
    log_FUNC_m(fsc_nsRemoveElementObj);
    //log_DBG_m(dbg_DETAIL, "Remove element " << a_nsElement_p);
    //log_DBG_m(dbg_DETAIL, "Remove's fileID = " << a_nsElement_p->GetFileID());

    if (a_nsElement_p->IsDirectory()) {
        log_DBG_m(dbg_DETAIL, "Remove's fileID = " << a_nsElement_p->GetFileID()
                           << " pointer " << a_nsElement_p
                           << " refNumber = " 
                << static_cast<fsc_nsDirectory*>(a_nsElement_p)->GetRefNumber());
        g_nsDirCache.RemoveEl(static_cast<fsc_nsDirectory*>(a_nsElement_p));    
    }
    else {
//        log_DBG_m(dbg_DETAIL, "File element just delete.");
        delete a_nsElement_p;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

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 82 of file df_SplitInfo.cpp.

References at_EA, at_LINK, at_OBJID, at_PROPERTY, at_REPARSE, at_SECURITY, at_SPARSE, cmn_Num2Str(), and ie_DATA_CORRUPTION.

Referenced by fsc_SplitStream_t::Dump(), and fsc_SplitStream_t::Pack().

                                       {
    switch (a_at) {
    case at_SECURITY : return stn_WIN_SECURITY;
    case at_EA       : return stn_WIN_EA;
    case at_LINK     : return stn_WIN_LINK;
    case at_OBJID    : return stn_WIN_OBJID;
    case at_PROPERTY : return stn_WIN_PROPERTY;
    case at_REPARSE  : return stn_WIN_REPARSE;
    case at_SPARSE   : return stn_WIN_SPARSE;
    default :
        throw ivd_InternalError(ie_DATA_CORRUPTION, 
                "Stream type'" + cmn_Num2Str(int(a_at))
                + "' is not known by NSC. Update GetAttrName() helper function in df_SplitInfo.cpp."
                );
    }
    return "UNKNOWN";
}

Here is the call graph for this function:

Here is the caller graph for this function:

df_AttrType_e GetAttrType ( const string &  a_streamName  ) 

Definition at line 50 of file df_SplitInfo.cpp.

References 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().

                                                      {
    if (a_streamName == stn_WIN_SECURITY) { //  "WIN.SEC"  Windows: security (ACL) [META]
        return at_SECURITY;
    }
    else if (a_streamName == stn_WIN_EA) {
        return at_EA;
    }
    else if (a_streamName == stn_WIN_LINK) {
        return at_LINK;
    }
    else if (a_streamName == stn_WIN_OBJID) {
        return at_OBJID;
    }
    else if (a_streamName == stn_WIN_PROPERTY) {
        return at_PROPERTY;
    }
    else if (a_streamName == stn_WIN_REPARSE) {
        return at_REPARSE;
    }
    else if (a_streamName == stn_WIN_SPARSE) {
        return at_SPARSE;
    }
    else {
        throw ivd_InternalError(ie_DATA_CORRUPTION, 
                "Stream '" + a_streamName
                + "' is not known by NSC. Update GetAttrType() helper function in df_SplitInfo.cpp."
                );
    }
    return at_SENTINEL;
}

Here is the caller graph for this function:

UInt32_t ivd_FS_Event::GetCancelReqID ( void   )  [inherited]

Definition at line 753 of file linux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_cancelReqId.

UInt8_t ivd_FS_Event::GetCause ( void   )  [inherited]

Definition at line 495 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_cause.

Referenced by fs_api::EventDataOffline(), and hsm_FileHeader::EventOffline().

                                   {
    log_FUNC_m(GetCause);
    return m_cause;
}

Here is the caller graph for this function:

UInt8_t ivd_FS_Event::GetChnFlag ( void   )  [inherited]

Definition at line 480 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_chnFlag.

ivd_FileSize_t ivd_FS_Event::GetChnSize ( void   )  [inherited]

Definition at line 490 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_chnSize.

ivd_Time_t ivd_FS_Event::GetChnTime ( void   )  [inherited]

Definition at line 485 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_chnTime.

ivd_FileSize_t ivd_FS_Event::GetChunkOff ( void   )  [inline, inherited]

Definition at line 256 of file ivd_fs_api.h.

References ivd_FS_Event::m_fChOff.

Referenced by hsm_FileHeader::EventOffline().

{ return m_fChOff; };

Here is the caller graph for this function:

ivd_FileSize_t ivd_FS_Event::GetChunkSize ( void   )  [inline, inherited]

Definition at line 255 of file ivd_fs_api.h.

References ivd_FS_Event::m_fChSize.

Referenced by hsm_FileHeader::EventOffline().

{ return m_fChSize; };

Here is the caller graph for this function:

void ivd_FileSystemAPI::GetConfiguration ( ivd_FS_Cfg_t cfg  )  [inherited]

Definition at line 331 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().

                                                            {
    log_FUNC_m(GetConfiguration);
    // TODO: Set/Get configuration w/ prvate member.
}

Here is the caller graph for this function:

ivd_FileHandle_t ivd_FileSystemAPI::GetDevHandle ( void   )  [inherited]

Definition at line 353 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FileSystemAPI::m_fd.

                                                     {
    log_FUNC_m(GetDevHandle);
    return m_fd;
}

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 640 of file hsm_fs_api.cpp.

References ClientConf_t::CfgMigrateWithCollocation, hsm_FileHeader::DecrRef(), fs_api::eCreate, hsm_FileHeader::Event(), g_clientConf_p, 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().

                                                              {

    log_FUNC_m(GetDirFH);

    // at least one element is in list (name of FH), owner is next
    if (++a_plIter == a_pathList.end()) {
        return NULL;
    }

    hsm_FileHeader *hsmFH = g_hsm_FHCache_p->GetFH(a_plIter->m_fInode);
    if (hsmFH != NULL){
        // NOTE GetFH alredy increased reference
        return hsmFH;
    }

    hsm_FileHeader *hsmOwnFH = GetDirFH(a_pathList, a_plIter); // try to find owner
    hsm_InoObj     *hsmIObj  = NULL;

    hsmIObj = GetInodeObj(ift_DIR, a_plIter->m_fInode, a_plIter->m_fID);
    // inode reference is increaseased inside constructor or search
    hsmFH = new hsm_FileHeader(hsmOwnFH, hsmIObj, hdb_String(a_plIter->m_fName));
    if (hsmOwnFH != NULL) { // now is used, so decrease temporary reference
        hsmOwnFH->DecrRef();
    }

    ivd_NULLCHK_m(hsmFH, hsm_FileHeader::s_className);

    g_hsm_FHCache_p->InsertDirWithTest(&hsmFH);
    // if directory has not set fileID and is not in HSM lists then add it.
    if (   (hsmFH->GetFileID() == 0)
        && (hsmFH->GetList() == eNoList)
        && (a_plIter->m_fInode != 6) // EXT3_UNDEL_DIR_INO
        && (!g_clientConf_p->CfgMigrateWithCollocation)
       ) {
        log_WRN_m("Directory : '" << hsmFH->GetFullPath()
                << "' has fileID 0 and is not in HSM list for migration. Create event is sent now. INO " << endl
                << IVD_PRINT_ID_FS(hsmFH->GetInode()) );
        // if directory is dirty and not on list then add it as new
        hsmFH->Event(eCreate, *m_trans_p);
    }
    return hsmFH;
}

Here is the call graph for this function:

Here is the caller graph for this function:

UInt32_t ivd_FS_Event::GetErrorCode ( void   )  [inherited]

Definition at line 500 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_errorCode.

ivd_FileID_t ivd_FS_Event::GetFileID ( void   )  [inherited]

Definition at line 453 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().

                                         {
    log_FUNC_m(GetFileID);
    return m_fileID;
}

Here is the caller graph for this function:

ivd_FileType_e ivd_FS_Event::GetFileType ( void   )  [inherited]

Definition at line 469 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_fileType.

Referenced by fs_api::CreateNewFH().

Here is the caller graph for this function:

cmn_Path& ivd_FS_File::GetFullPathRef (  )  [inline, inherited]
string & ivd_FS_Event::GetName ( void   )  [inherited]

Definition at line 430 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_pathList.

Referenced by fs_api::AddGenericEvent().

                                  {
    log_FUNC_m(GetName);
    return m_pathList[0].m_fName;
}

Here is the caller graph for this function:

ivd_GenInode_t ivd_FS_Event::GetOldListOSID ( void   )  [inherited]

Definition at line 659 of file linux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_pathOldList.

                                                {
    log_FUNC_m(GetOldListOSID);
    if (m_pathOldList.empty()) {
        return 0;
    } else {
        return m_pathOldList[0].m_fInode;
    }
}

cmn_Path ivd_FS_Event::GetOldPath (  )  [inline, inherited]

Definition at line 247 of file ivd_fs_api.h.

References ivd_FS_Event::GetPath(), and ivd_FS_Event::m_pathOldList.

Referenced by fs_api::EventDelete(), and fs_api::EventMove().

{ return GetPath(m_pathOldList); };

Here is the call graph for this function:

Here is the caller graph for this function:

void ivd_FS_Event::GetOldPathList ( ivd_PathList_t a_pathList  )  [inline, inherited]

Definition at line 245 of file ivd_fs_api.h.

References ivd_FS_Event::m_pathOldList.

Referenced by fs_api::CreateNewFH(), and GetIdentify().

{ a_pathList = m_pathOldList; };

Here is the caller graph for this function:

ivd_GenInode_t ivd_FS_Event::GetOSID ( void   )  [inherited]

Definition at line 435 of file hpux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_pathList.

Referenced by fs_api::AddGenericEvent(), and fs_api::CreateNewFH().

                                         {
    log_FUNC_m(GetOSID);
    if (m_pathList.empty()) {
        return 0;
    } else {
        return m_pathList[0].m_fInode;
    }
}

Here is the caller graph for this function:

ivd_GenInode_t ivd_FS_Event::GetOwnerOSID ( 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().

                                              {
    log_FUNC_m(GetOwnerOSID);
    if (m_pathList.size() <= 1) {
        return 0;
    } else {
        return m_pathList[1].m_fInode;
    }
}

Here is the caller graph for this function:

cmn_Path ivd_FS_Event::GetPath ( const ivd_PathList_t a_pathList  )  [private, inherited]

Definition at line 458 of file hpux/ivd_fs_api.cpp.

References ivd_FS_Event::GetPath(), and log_FUNC_m.

                                                               {
    log_FUNC_m(GetPath);

    ivd_PathList_t::const_iterator i = a_pathList.begin();
    cmn_Path result(i->m_fName);
    while (++i != a_pathList.end()) {
        result = i->m_fName + result;
    }
    return result;
}

Here is the call graph for this function:

cmn_Path ivd_FS_Event::GetPath (  )  [inline, inherited]

Definition at line 246 of file ivd_fs_api.h.

References ivd_FS_Event::GetPath(), and ivd_FS_Event::m_pathList.

Referenced by fs_api::CreateNewFH(), fs_api::EventDataOffline(), hsm_FileHeader::EventOffline(), ivd_FS_Event::GetOldPath(), and ivd_FS_Event::GetPath().

{ return GetPath(m_pathList); };

Here is the call graph for this function:

Here is the caller graph for this function:

void ivd_FS_Event::GetPathList ( ivd_PathList_t a_pathList  )  [inline, inherited]

Definition at line 244 of file ivd_fs_api.h.

References ivd_FS_Event::m_pathList.

Referenced by fs_api::CreateNewFH(), fs_api::EventDataOffline(), fs_api::EventMove(), and GetIdentify().

{ a_pathList = m_pathList; };

Here is the caller graph for this function:

void ivd_FS_File::GetProperties ( ivd_FS_FileProperty_t a_fileProp  )  [inherited]

Definition at line 912 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, 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_IVDFSRecoverer::CreateParentDir(), hsm_FileHeader::Event(), 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().

                                                                 {
    log_FUNC_m(GetProperties);

    hsm_ioc_fileinfo_t fileInfo;
    fileInfo.id_fs = m_prop.m_Inode;

    log_DBG_m(dbg_DETAIL,
        "Inode to get fileInfo: " <<
        HSM_PRINT_ID_FS(m_prop.m_Inode));

    if (ioctl(m_fd, HSM_IOC_GET_FILE_INFO, &fileInfo) == -1) {
        ostringstream sstr;
        sstr
            << "ioctl(HSM_IOC_GET_FILE_INFO, "
            << HSM_PRINT_ID_FS(m_prop.m_Inode) << ")";

        throw ivd_SysError(errno, sstr.str() );
    };

    if (HSM_FILE_GEN(m_prop.m_Inode) != 0 && fileInfo.id_fs != m_prop.m_Inode) {
        //
        // Input generation id is not 0 and it is different from
        // generation id that is returned from kernel.
        // NOTE: We simulate the system error here.
        //
        ostringstream sstr;
        sstr
            << "Generation ID does not match: ioctl(HSM_IOC_GET_FILE_INFO, "
            << "in: " << HSM_PRINT_ID_FS(m_prop.m_Inode) << " "
            << "out: " << HSM_PRINT_ID_FS(fileInfo.id_fs) << " )";

        throw ivd_SysError(ENXIO, sstr.str());
    };

    a_fileProp.m_chgTime    = fileInfo.chg_time;
    a_fileProp.m_chunkSize  = fileInfo.chunk_size;
    a_fileProp.m_fileID     = fileInfo.file_id;
    a_fileProp.m_fileSize   = fileInfo.file_size;
    a_fileProp.m_Inode      = fileInfo.id_fs;
    a_fileProp.m_dirtyFlag  = fileInfo.flags & ia_F_DIRTY;
    a_fileProp.m_offlineFlag = fileInfo.flags & ia_F_OFFLINE;
    a_fileProp.m_type = cmn_File::FileTypeFromMode(fileInfo.file_mode);

    m_prop = a_fileProp;
    m_gotProp = true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ivd_RequestorInfo_t & ivd_FS_Event::GetRequestorInfo ( void   )  [inherited]
cmn_Path ivd_FS_Event::GetRootDir ( const string &  a_fsUUID = string()  )  [inherited]

Definition at line 518 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().

                                                        {
    log_FUNC_m(GetRootDir);

    //hsm_req_t *req_p = (hsm_req_t *)m_buff_p;
    hsm_req_mount_t *req_p = (hsm_req_mount_t *)m_buff_p;
    int a_major =  req_p->dev_major;
    int a_minor =  req_p->dev_minor;

    char    buf[1024];
    ifstream iFile;

    string    m_FileID(HSM_DEVNAME);
    char      m_procFile[] = "/etc/mnttab";

    // Allow ihsmfs to appear in mnttab
    ivd_Sleep(3);

    ivd_Stat_t stat_buf;
    {
        int err = ivd_STAT(m_procFile, &stat_buf);
        if (err != 0) {
            log_ERR_m("  GetRoot ERROR: file " << m_procFile << " NOT_FOUND.");
            return "";
        }
    }
    iFile.open(m_procFile, ios::in);
    if (!iFile.is_open()) {
        log_ERR_m("  GetRoot ERROR: cannot open file " << m_procFile );
        return "";
    }
    string lineStr;
    while (!iFile.eof()) {
        iFile.getline(buf,1024,'\n');

        if (!iFile.eof()) {

            lineStr = string(buf);

            int pos = lineStr.find(m_FileID,0);

            if (pos >= 0) {
                log_DBG_m(dbg_DETAIL, "  GetRoot find " << m_FileID);
                vector<string> parts = cmn_StrTokenize(lineStr);

                if (parts.size() > 3 ) {

                    int err = lstat(parts[0].c_str(), &stat_buf);

                    if ( err == 0 && S_ISBLK(stat_buf.st_mode)) {

                        if (a_minor == minor(stat_buf.st_rdev) &&
                            a_major == major(stat_buf.st_rdev)) {
                            log_DBG_m(dbg_DETAIL, "  GetRoot GOT root path " << parts[1]);
                            iFile.close();
                            cmn_Path rootPath = parts[1];
//                             a_rootInode = GetRootInode(rootPath);
                            return rootPath;
                        }
                        else {
                            log_DBG_m(dbg_DETAIL, " a_minor == minor(st_dev) "
                                    << a_minor << " == " << minor(stat_buf.st_rdev)
                                    << "   a_major == major(st_dev) "
                                    << a_major << " == " << major(stat_buf.st_rdev));
                        }
                    }
                    else {
                        log_ERR_m(" get stat of " << parts[0].c_str()
                                << "  mode = " << stat_buf.st_mode
                                << "  got err "  << err);
                    }
                }
                else {
                    log_ERR_m(" NOT parts.size() > 3  size = " << parts.size());
                }
            }
        }
    }
    iFile.close();
    log_ERR_m("  GetRoot NOT_FOUND root path");
    return "";
}

Here is the call graph for this function:

Here is the caller graph for this function:

cmn_Path ivd_FileSystemAPI::GetRootPath (  )  [inline, inherited]
UInt32_t ivd_FS_Event::GetStatusCode ( void   )  [inherited]

Definition at line 734 of file linux/ivd_fs_api.cpp.

References log_FUNC_m, and ivd_FS_Event::m_statusCode.

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 739 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().

                                                                        {
    log_FUNC_m(GetStreamHeader);
    return m_file.GetStreamHeader(a_streamName, a_streamSize);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ivd_FilePosition_t ivd_FS_File::GetStreamLeft (  )  [inline, inherited]

Definition at line 388 of file ivd_fs_api.h.

Referenced by i_HSM_i::UnPackFile().

{ return m_file.GetStreamLeft(); };

Here is the caller graph for this function:

string ivd_FS_Event::GetVolumeID ( void   )  [inherited]

Definition at line 513 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().

Here is the caller graph for this function:

void fs_api::Initialize ( void   )  [inherited]

Definition at line 394 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().

                            {
    log_FUNC_m(Initialize);
    m_trans_p = g_hsmDB_p->GetTransObj();
    log_DBG_m(dbg_DETAIL, "Size of fileHeader " << sizeof(hsm_FileHeader));
    log_DBG_m(dbg_DETAIL, "Size of inode " << sizeof(hsm_InoObj));
    m_initialized = true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool ivd_FS_File::IsOfflineProlonged (  )  [inherited]

Definition at line 1022 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().

                                     {
    log_FUNC_m(IsOfflineProlonged);

    if (!m_prop.m_offlineFlag || m_prop.m_type!=ift_FILE) {
        return false;
    }

    string csName(cmn_UTF8ToLocale(m_file.GetFullPathRef()));
    const char *fileNameStr = csName.c_str();

    struct stat stat_buf;
    stat(fileNameStr, &stat_buf);
    int blocksOccupied=stat_buf.st_blocks;
    int bytesPerBlock=stat_buf.st_blksize;

#warning "Should stat_buf.st_blksize be used instead of 512?"
    int blocksExpected = bytesPerBlock / 512;

    log_DBG_m(dbg_DETAIL,  "IsOfflineProlonged (" << fileNameStr << "), blocks occupied=="
        << blocksOccupied << ", blockes expected==" << blocksExpected  );

    return blocksOccupied > blocksExpected;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool ivd_FS_File::IsOpen (  )  [inline, inherited]

Definition at line 401 of file ivd_fs_api.h.

Referenced by hsm_RecallInfoGrp::OpenF().

                  {
        return m_file.IsOpen();
    };

Here is the caller graph for this function:

bool ivd_FileSystemAPI::IsPathTooLong ( UInt32_t  a_len  )  [private, inherited]

Definition at line 187 of file linux/ivd_fs_api.cpp.

References dbg_DETAIL, len, log_DBG_m, log_FUNC_m, and ivd_FileSystemAPI::m_rootPath.

                                                    {
    log_FUNC_m(IsPathTooLong);
    UInt32_t len = a_len;
    len += (m_rootPath.length() + 1);
    log_DBG_m(dbg_DETAIL, "Path length = " << len << ", allowed " << PATH_MAX);
    return (len > PATH_MAX);
}

ivd_FS_Event::ivd_FS_Event ( const ivd_FS_Event a_from  )  [inherited]

Definition at line 417 of file hpux/ivd_fs_api.cpp.

References ivd_FS_Event::ivd_FS_Event(), log_FUNC_m, and ivd_FS_Event::m_buff_p.

                                                     {
    log_FUNC_m(ivd_FS_Event(const &));
    m_buff_p = NULL;
    *this = a_from;
}

Here is the call graph for this function:

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 686 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.

                           :
    m_fd(a_fs_api.GetDevHandle()),
    m_gotProp(false),
    m_prop(),
    m_file(a_fullPath),
    m_fileOp(e_NoOp),
    m_recallOffset(0)  {
    log_FUNC_m(ivd_FS_File(ivd_FileType_e));

    m_prop.m_Inode    = a_inode;
    m_prop.m_fileSize = a_fileSize;
    m_prop.m_type     = a_fileType;

}

Here is the call graph for this function:

ivd_FS_File::ivd_FS_File ( ivd_FileSystemAPI a_fs_api,
const string &  fullPath,
ivd_GenInode_t  a_inode = 0 
) [inherited]

Definition at line 657 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().

                                                                                                      :
    m_fd(a_fs_api.GetDevHandle()),
    m_gotProp(false),
    m_prop(),
    m_file(a_fullPath),
    m_fileOp(e_NoOp),
    m_recallOffset(0)  {
    log_FUNC_m(ivd_FS_File(string));

    ivd_FileInfo_t  fInfo;

    try {
        m_file.StatF(fInfo);
    } catch(ivd_SysError &ie) {
        // intercept 'No such file or directory'
        if (ie.GetError() != ENOENT) {
            throw ie;
        }
    }
    if (a_inode == 0) {
        m_prop.m_Inode = fInfo.idOnFS;
    }
    else {
        m_prop.m_Inode = a_inode;
    }
    m_prop.m_fileSize = fInfo.size;
    m_prop.m_type     = fInfo.type;
}

Here is the call graph for this function:

ivd_CommonArg_e IVD_CMN_DECL_d ivd_ParseCmnArgs ( int  a_argc,
char *  a_argv[] 
)
Warning:
OBSOLETED by cli argument parser (ap_Parser).

Definition at line 423 of file cmn_function.cpp.

References dbg_SetArgs(), dbg_SetProcName(), g_cmn, ivd_Versions::GetVersionString(), ivd_Versions::GetVersionStringDetail(), help(), ivd_Product::m_copyright, ivd_Product::m_copyright2, ivd_Product::m_name, and cmn_Global::prod.

Referenced by main(), and Parse().

                                                             {
    bool version    = false;
    bool detail     = false;
    bool help       = false;
    bool nodaemon   = false;
    int  dbgIdx     = 0;

    dbg_SetProcName(a_argv[0]);

    for (int i=1; i < a_argc; ++i) {
        if (a_argv[i][0] != '-')
            continue;

        if (strcmp(a_argv[i], "--version") == 0) {
            version = true;
        }
        else if (strcmp(a_argv[i], "--detail") == 0) {
            detail = true;
        }
        else if (strcmp(a_argv[i], "--help") == 0) {
            help = true;
        }
        else if (strcmp(a_argv[i], "-h") == 0) {
            help = true;
        }
        else if (strcmp(a_argv[i], "--no-daemon") == 0) {
            nodaemon = true;
        }
        else if (strcmp(a_argv[i], "--dbg") == 0) {
            dbgIdx = i;
        }
    }

    if (dbgIdx > 0) {
        // debug option specified - enable debugging
        dbg_SetArgs(
            dbgIdx+1 < a_argc && a_argv[dbgIdx+1][0] != '-' ?   // level
                a_argv[dbgIdx+1][0] : '\0',
            dbgIdx+2 < a_argc && a_argv[dbgIdx+2][0] != '-' ?   // file
                a_argv[dbgIdx+2] : "",
            dbgIdx+3 < a_argc && a_argv[dbgIdx+3][0] != '-' ?   // flags
                a_argv[dbgIdx+3] : ""
        );
    }

    if (version) {
        cout <<
            g_cmn.prod.m_name << endl <<
            g_cmn.prod.m_copyright << endl << endl;
        if (!g_cmn.prod.m_copyright2.empty()) {
            cout << g_cmn.prod.m_copyright2 << endl << endl;
        }

        if (detail) {
            cout << ivd_Versions::GetVersionStringDetail() << endl;
        }
        else {
            cout << ivd_Versions::GetVersionString() << endl;
        }
        exit(0);
    }

    if (help) {
        return ica_HELP;
    }

    if (nodaemon) {
        return ica_NODAEMON;
    }

    return ica_NO_CMN_ARG;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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 69 of file ivd_fs_api.h.

                          :
        m_fInode(a_fInode),
        m_fID(a_fID),
        m_fName(a_fName) {};

void nsc_ScanForIVDFSRecovery ( const string &  a_partitionName,
i_HSM_ptr  a_ihsm,
ui_MsgWriter a_msgWriter,
bool &