Classes | Defines | Typedefs | Enumerations | Functions | Variables

Classes for managing object list
[Client]

Collaboration diagram for Classes for managing object list:

Classes

class  hsm_ActiveFH
class  hsm_Containers
class  hsm_DirWaitList
 hsm_DirWaitList class manages files which are "Dirty". More...
class  hsm_FHpVecMgr
 File header pointer vector manager. More...
class  hsm_FHcache
 hsm_FHcache: class, this class hold all active file header in HSM sistem. More...
class  hsm_FHdirty
 hsm_FHdirty class manages files which are "Dirty". More...
class  hsm_FHlist
struct  hsm_JobList
class  hsm_MigByAPI
class  hsm_FHmigc
 hsm_FHmigc class manages files which are "Dirty". More...
class  hsm_ReleaseCandRec
class  hsm_FHrelc
class  hsm_FileHeader
 hsm_FileHeader class describe header of file. More...
class  hsm_InoObj
 Simple class one line description. More...
class  hsm_FreeJobIdxStack
class  hsm_JobElemVecMgr
class  hsm_JobListMgr
class  hsm_ListPos
class  hsm_TimeListElem
class  hsm_TimedList
struct  PathRec_t
 pathRec_s: Structure, which contain pair file I-node / file Name. More...
struct  ExtAttr_t
 Extended attribute structure. More...
struct  Event_t
 event structure of received event More...
struct  ClientConf_t
 ClientConf_s: Structure, which contain all client configuration parameters. More...
struct  hsm_FileProperty_t
struct  DirectoryNames_t
struct  FileReleaseCndPerm_t
struct  FileMigrCndPerm_t

Defines

#define FSC_MAX_CORBA_BUFFERSIZE   (1600 * 1024)
#define CHN_CLEAN_d   0
#define CHN_DATA_d   1
#define CHN_META_d   2
#define CHN_ALTDATA_d   4
#define CHN_HEADER_d   8
#define DELETED_d   16
#define LIST_IS_UP_d   1
#define LIST_IN_RUN_d   2
#define LIST_IS_DOWN_d   0
#define LIST_RUN_d   1
#define LIST_NORUN_d   0
#define FILE_OFFLINE_d   0
#define FILE_DIRTY_d   1

Typedefs

typedef vector< hsm_FileHeader * > hsm_FH_p_v
typedef hsm_FH_p_v::iterator hsm_FH_p_vi
typedef vector< hsm_FHpVecMgr * > hsm_FHpVM_p_v
typedef hsm_FHpVM_p_v::iterator hsm_FHpVM_p_i
typedef list< hsm_FileHeader * > hsm_FH_p_l
typedef hsm_FH_p_l::iterator hsm_FH_p_li
typedef vector< hsm_FileHeader * > hsm_JobElem_v_t
typedef hsm_JobElem_v_t::iterator hsm_JobElem_v_i
typedef hsm_JobElem_v_t::size_type hsm_JobElem_v_st
typedef vector
< hsm_JobElemVecMgr * > 
hsm_Job_p_v_t
 vector of jobs
typedef hsm_Job_p_v_t::iterator hsm_Job_p_v_i
typedef hsm_Job_p_v_t::size_type hsm_Job_p_v_st
typedef list< hsm_TimeListElemhsm_FHtimed_l
typedef hsm_FHtimed_l::iterator hsm_FHtimed_li
typedef list< PathRec_tPathList_t
 Typedef of pathRec structure.
typedef list< PathRec_t >::iterator PathLIter_t
 Iterator for path list (STL container).
typedef hsm_FileHeaderhsm_FHO_p
 pointer to File Header object

Enumerations

enum  hsm_DataMigStat_e {
  eNotInDoMig = 0, eDoMigStart,
  eDoMigAbort
}
 

hsm_FileHeader class describe header of file.

More...
enum  hsm_JobStatus_e {
  hjs_NOTUSED = 0, hjs_PREPARATION,
  hjs_WAITFORDOMIG, hjs_DOMIG,
  hjs_WAITFORCOMPLETEMIG, hjs_COMPLETEMIG,
  hjs_MIGFAILED, hjs_RECALL
}
 

Job list manager manage vector of jobs Each vector contain pointer to vector of job elements.

More...
enum  hsm_List_e {
  eNoList = 0, eDirtyList,
  eMigCndList, ePreJobList,
  eJobList, eRelCndList,
  eDirWaitList, eNoList = 0,
  eDirtyList, eMigCndList,
  ePreJobList, eJobList,
  eRelCndList, eDirWaitList
}
 

List type enum used to know where File Header object is.

More...
enum  hsm_Dependence_e {
  eNoDepend = 0, eLock,
  ePull, ePush
}
 

dependency resolve

More...
enum  Event_e {
  eUnknown = 0, ePreMount,
  eMount, eUmount,
  eOpen, eRelease,
  eChgName, eDelFile,
  eChgData, eOffline,
  eChgAttr, eChgMeta
}
 

event type enum

More...
enum  hsm_List_e {
  eNoList = 0, eDirtyList,
  eMigCndList, ePreJobList,
  eJobList, eRelCndList,
  eDirWaitList, eNoList = 0,
  eDirtyList, eMigCndList,
  ePreJobList, eJobList,
  eRelCndList, eDirWaitList
}
 

List type enum used to know where File Header object is.

More...

Functions

hsm_FileHeaderhsmGetDirFH (hdb_DirNode_t &a_dir)
 helper function that return directory FH First try to get it from cache and if can't create it by itself using DB Function baze on HSMDB directory tree.
hsm_FileHeaderhsmGetDirFH (cmn_Path a_path)
 helper function that return directory FH First try to get it from cache and if can't create it by itself using DB.
hsm_FileHeaderhsmGetFH (cmn_Path &a_filePath, ivd_FS_FileProperty_t &a_fileProp)
 helper function that check for FH in cache othervice create it.
bool hsm_CheckFile2hsmdbRec (ivd_RecordIDX_t a_fileID, hsm_FileHeader *a_fh)
hsm_InoObjGetInodeObj (ivd_FileType_e a_fType, ivd_GenInode_t a_inode, ivd_FileID_t a_fileID=0, hsm_ChgFlag_t a_inodeChgFlag=0)

Variables

hsm_ActiveFHg_hsm_activeList_p
i_FSC_var g_iFSC
cmn_LockID< ivd_GenInode_tg_hsm_fhLock
hsm_FHcacheg_hsm_FHCache_p
cmn_Mutex g_jobList_x
cmn_Condition g_jobList_c
hsm_MigByAPI g_mig
hsm_FHrelcg_hsm_relcList_p
i_PartitionManager_var g_iPM
 pointer to File Header object
cmn_Mutex fhObjCount_x_g
Int32_t fhObjCount_g
hsm_HL7MessageProxyg_hl7proxy_p
map< cmn_Path, hsm_hl7ServerInfog_directoryHL7Table
hsm_JobListMgrg_hsm_preJobList_p

Detailed Description

See also:
hsm_FHcache
hsm_FHdirty
hsm_FHlist
hsm_FHmigc
hsm_FileHeader
hsm_InoObj
hsm_joblistmgr

Define Documentation

#define CHN_ALTDATA_d   4

Definition at line 50 of file hsm_common.h.

#define CHN_CLEAN_d   0

Definition at line 47 of file hsm_common.h.

#define CHN_DATA_d   1

Definition at line 48 of file hsm_common.h.

#define CHN_HEADER_d   8

Definition at line 51 of file hsm_common.h.

#define CHN_META_d   2

Definition at line 49 of file hsm_common.h.

#define DELETED_d   16

Definition at line 52 of file hsm_common.h.

#define FILE_DIRTY_d   1

Definition at line 62 of file hsm_common.h.

#define FILE_OFFLINE_d   0

Definition at line 61 of file hsm_common.h.

#define FSC_MAX_CORBA_BUFFERSIZE   (1600 * 1024)

Definition at line 38 of file hsm_containers.h.

#define LIST_IN_RUN_d   2

Definition at line 55 of file hsm_common.h.

#define LIST_IS_DOWN_d   0

Definition at line 56 of file hsm_common.h.

#define LIST_IS_UP_d   1

Definition at line 54 of file hsm_common.h.

#define LIST_NORUN_d   0

Definition at line 59 of file hsm_common.h.

#define LIST_RUN_d   1

Definition at line 58 of file hsm_common.h.


Typedef Documentation

typedef list<hsm_FileHeader*> hsm_FH_p_l

Definition at line 42 of file hsm_FHlist.h.

typedef hsm_FH_p_l::iterator hsm_FH_p_li

Definition at line 43 of file hsm_FHlist.h.

Definition at line 38 of file hsm_FHcache.h.

typedef hsm_FH_p_v::iterator hsm_FH_p_vi

Definition at line 41 of file hsm_FHcache.h.

pointer to File Header object

Definition at line 194 of file include/ivd/hsm_FileHeader.h.

typedef hsm_FHpVM_p_v::iterator hsm_FHpVM_p_i

Definition at line 85 of file hsm_FHcache.h.

Definition at line 84 of file hsm_FHcache.h.

Definition at line 61 of file hsm_TimedList.h.

typedef hsm_FHtimed_l::iterator hsm_FHtimed_li

Definition at line 62 of file hsm_TimedList.h.

typedef hsm_Job_p_v_t::iterator hsm_Job_p_v_i

Definition at line 192 of file hsm_joblistmgr.h.

typedef hsm_Job_p_v_t::size_type hsm_Job_p_v_st

Definition at line 193 of file hsm_joblistmgr.h.

vector of jobs

Definition at line 191 of file hsm_joblistmgr.h.

typedef hsm_JobElem_v_t::iterator hsm_JobElem_v_i

Definition at line 80 of file hsm_joblistmgr.h.

typedef hsm_JobElem_v_t::size_type hsm_JobElem_v_st

Definition at line 81 of file hsm_joblistmgr.h.

Definition at line 77 of file hsm_joblistmgr.h.

typedef list<PathRec_t> PathList_t

Typedef of pathRec structure.

Typedef for list (STL container), which contain pairs file I-node / file Name as members.

Definition at line 125 of file hsm_common.h.

typedef list<PathRec_t>::iterator PathLIter_t

Iterator for path list (STL container).

Definition at line 129 of file hsm_common.h.


Enumeration Type Documentation

enum Event_e

event type enum

Enumerator:
eUnknown 
ePreMount 
eMount 
eUmount 
eOpen 
eRelease 
eChgName 
eDelFile 
eChgData 
eOffline 
eChgAttr 
eChgMeta 

Definition at line 67 of file hsm_common.h.

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

hsm_FileHeader class describe header of file.

This class include Inode class and \ is part of migration class

Author:
Andrej Jamsek, HERMES SoftLab
Enumerator:
eNotInDoMig 
eDoMigStart 
eDoMigAbort 

Definition at line 66 of file client/hsmlist/hsm_FileHeader.h.

             {
    eNotInDoMig = 0,
    eDoMigStart,
    eDoMigAbort
} hsm_DataMigStat_e;

dependency resolve

Enumerator:
eNoDepend 
eLock 
ePull 
ePush 

Definition at line 59 of file hsm_listcmn.h.

             {
    eNoDepend = 0,  // no dependency -> migrate
    eLock, // has depend to  FHD but is locked  ->  try migrate latter
    ePull, // has depend to  FHD and is FHD is pull to list of dependent FH -> migrate
    ePush  // has depend to  FHD but is moved to FHD list  -> skip it, will be mig by another list
} hsm_Dependence_e;

Job list manager manage vector of jobs Each vector contain pointer to vector of job elements.

The number of jobs is limited by constructor. When all reserved jobs are used then wait condition is trigged.

It is not possible to increase the number of job in run time except if job list mutex is used, but have in mind that lock each joblist method is will slow down performance. limitation of number of jobs is good. there is not benefit of 1000 of jobs concure for resources at same time.

Author:
Dejan Volk, HERMES SoftLab
See also:
<reference>
Enumerator:
hjs_NOTUSED 
hjs_PREPARATION 
hjs_WAITFORDOMIG 
hjs_DOMIG 
hjs_WAITFORCOMPLETEMIG 
hjs_COMPLETEMIG 
hjs_MIGFAILED 
hjs_RECALL 

Definition at line 66 of file hsm_joblistmgr.h.

             {
    hjs_NOTUSED = 0,
    hjs_PREPARATION,
    hjs_WAITFORDOMIG,
    hjs_DOMIG,
    hjs_WAITFORCOMPLETEMIG,
    hjs_COMPLETEMIG,
    hjs_MIGFAILED,
    hjs_RECALL
} hsm_JobStatus_e;

enum hsm_List_e

List type enum used to know where File Header object is.

Enumerator:
eNoList 
eDirtyList 
eMigCndList 
ePreJobList 
eJobList 
eRelCndList 
eDirWaitList 
eNoList 
eDirtyList 
eMigCndList 
ePreJobList 
eJobList 
eRelCndList 
eDirWaitList 

Definition at line 46 of file hsm_listcmn.h.

             {
    eNoList = 0,
    eDirtyList,    
    eMigCndList,     
    ePreJobList,   
    eJobList,
    eRelCndList,
    eDirWaitList
} hsm_List_e;

enum hsm_List_e

List type enum used to know where File Header object is.

Enumerator:
eNoList 
eDirtyList 
eMigCndList 
ePreJobList 
eJobList 
eRelCndList 
eDirWaitList 
eNoList 
eDirtyList 
eMigCndList 
ePreJobList 
eJobList 
eRelCndList 
eDirWaitList 

Definition at line 85 of file hsm_common.h.

             {
    eNoList = 0,
    eDirtyList,    
    eMigCndList,     
    ePreJobList,   
    eJobList,   
    eRelCndList,
    eDirWaitList
} hsm_List_e;


Function Documentation

hsm_InoObj* GetInodeObj ( ivd_FileType_e  a_fType,
ivd_GenInode_t  a_inode,
ivd_FileID_t  a_fileID = 0,
hsm_ChgFlag_t  a_inodeChgFlag = 0 
)

Definition at line 243 of file hsm_InoObj.cpp.

References dbg_DETAIL, file, g_fs_api_p, GetInodeObj(), ivd_FS_File::GetProperties(), ivd_NULLCHK_m, log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_chunkSize, ivd_FS_FileProperty_t::m_dirtyFlag, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_FileProperty_t::m_offlineFlag, ivd_FS_FileProperty_t::m_type, and s_className.

Referenced by fs_api::GetDirFH(), GetInodeObj(), and hsm_FHrelc::Truncate().

                                                       {
    log_FUNC_m(GetInodeObj);
    log_DBG_m(dbg_DETAIL, "a_inodeChgFlag=" << a_inodeChgFlag
                       << ", a_fType" << hex << a_fType << dec
                       << ", a_inode" << a_inode
                       << ", a_fileID" << a_fileID);
//    ivd_FileID_t   fileID;
//    ivd_FileSize_t chnkSize;
    ivd_FS_FileProperty_t fileProp;

    try {
        ivd_FS_File file(*g_fs_api_p, a_inode);
        file.GetProperties(fileProp);
    }
    catch (ivd_SysError) {  // can't
        log_DBG_m(dbg_DETAIL, "File is deleted.");
        // if can't found then is DELETTED
        // maybe DELETE state is not set it
        a_inodeChgFlag |= CHG_DELETED_d;
//DEL        if (!(a_inodeChgFlag & CHG_DELETED_d)) {
//DEL            throw ivd_InternalError(ie_IMPOSSIBLE, "File is not DELETTED and can't got its properties.", true);
//DEL        }

        fileProp.m_type   = a_fType;
        fileProp.m_Inode  = a_inode;
        fileProp.m_fileID = a_fileID;
        fileProp.m_chunkSize   = 0;
        fileProp.m_fileSize    = 0;
        fileProp.m_offlineFlag = false;
        fileProp.m_dirtyFlag   = false;
    }
//    hsm_InoObj *hsmIObj = new hsm_InoObj(a_inode, fileID, chnkSize, g_hsm_fileHeaderSize);
    hsm_InoObj *hsmIObj = new hsm_InoObj(fileProp, a_inodeChgFlag);

    ivd_NULLCHK_m(hsmIObj, hsm_InoObj::s_className);
    return hsmIObj;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool hsm_CheckFile2hsmdbRec ( ivd_RecordIDX_t  a_fileID,
hsm_FileHeader a_fh 
)

Definition at line 2341 of file hsm_FileHeader.cpp.

References hdb_file2hdbID_t::circList, g_File2hdbID_p, hsm_CheckFile2hsmdbRec(), log_FUNC_m, log_WRN_m, NULL, fio_RelFile::ReadRec(), hdb_file2hdbID_t::relCandIdx, and hsm_ListPos::SetCircList().

Referenced by hsm_FileHeader::AddToReleaseCanList(), hsm_FileHeader::CompleteMigIsDone(), hsm_CheckFile2hsmdbRec(), and hsm_FileHeader::Recalled().

                                                                            {
    log_FUNC_m(hsm_CheckFile2hsmdbRec);
    // this record must be zero befor is set.
    hdb_file2hdbID_t file2hsmdbRec;
    g_File2hdbID_p->ReadRec(a_fileID, &file2hsmdbRec, 1);
    if (file2hsmdbRec.circList != 0) {
        ostringstream sstr;
        sstr << "file2hsmdbRec already used! " << file2hsmdbRec << endl;
        if (a_fh != NULL) {
            sstr << "Release candidate position mem are updated." << endl;
            sstr << *a_fh;
            a_fh->SetCircList(file2hsmdbRec.circList, file2hsmdbRec.relCandIdx);
        }
        log_WRN_m(sstr.str());
        // update members
        return true;
    }
    return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

hsm_FileHeader* hsmGetDirFH ( cmn_Path  a_path  ) 

helper function that return directory FH First try to get it from cache and if can't create it by itself using DB.

Function baze on path.

Definition at line 2279 of file hsm_FileHeader.cpp.

References ivd_FS_File::Close(), dbg_DETAIL, dbg_NORM, hsm_FileHeader::DecrRef(), ivd_FS_File::e_Cache, file, g_fs_api_p, g_hsm_FHCache_p, hsm_FHcache::GetFH(), cmn_Path::GetFileName(), ivd_FS_File::GetProperties(), ivd_FileSystemAPI::GetRootPath(), hsmGetDirFH(), hsm_FHcache::InsertDirWithTest(), log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_Inode, NULL, ivd_FS_File::Open(), and cmn_Path::UpPath().

                                             {
    log_FUNC_m(hsmGetDirFH(cmn_Path));

    if (a_path.length() <= g_fs_api_p->GetRootPath().length()) {
        return NULL; // no more parents
    }

    log_DBG_m(dbg_DETAIL, "Find FH from path: " << a_path );

    ivd_FS_FileProperty_t fileProp;
    try {
        ivd_FS_File file(*g_fs_api_p, a_path);
        file.Open(ivd_FS_File::e_Cache);
        file.GetProperties(fileProp);
        file.Close();
    }
    catch (ivd_SysError &ise) {
        log_DBG_m(dbg_NORM, "Can't get general inode of: '" << a_path
                    << "'. Dir probably not exist.");
        throw;
    }

    hsm_FileHeader *fileHdr = g_hsm_FHCache_p->GetFH(fileProp.m_Inode);
    if (fileHdr == NULL) {  // directory not found in cache
        // create it from DB and add to cache
        hsm_FileHeader *ownFH = hsmGetDirFH(a_path.UpPath());

        hsm_InoObj *hsmIObj = new hsm_InoObj(fileProp, 0);

        fileHdr = new hsm_FileHeader(ownFH, hsmIObj, hdb_String(a_path.GetFileName()));
        if (ownFH != NULL){// now is used, so decrease temporary reference
            ownFH->DecrRef();
        }

        // if FH exist in cache then cache delete inserted and
        // return that from cache
        g_hsm_FHCache_p->InsertDirWithTest(&fileHdr);
    }
    return fileHdr;
}

Here is the call graph for this function:

hsm_FileHeader* hsmGetDirFH ( hdb_DirNode_t a_dir  ) 

helper function that return directory FH First try to get it from cache and if can't create it by itself using DB Function baze on HSMDB directory tree.

Definition at line 2206 of file hsm_FileHeader.cpp.

References ivd_FS_File::Close(), dbg_DETAIL, dbg_NORM, hsm_FileHeader::DecrRef(), ivd_FS_File::e_Cache, file, hdb_DirNode_t::fileID, g_fs_api_p, g_hsm_FHCache_p, hdb_DirNode_t::generalInode, hsm_FHcache::GetFH(), ivd_FS_File::GetProperties(), ivd_FileSystemAPI::GetRootPath(), hdbReadNameOwnRec(), hsmdbGetPath(), hsmGetDirFH(), hsm_FHcache::InsertDirWithTest(), ivd_NULLCHK_m, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, ivd_FS_FileProperty_t::m_chunkSize, ivd_FS_FileProperty_t::m_dirtyFlag, ivd_FS_FileProperty_t::m_fileID, ivd_FS_FileProperty_t::m_fileSize, ivd_FS_FileProperty_t::m_Inode, ivd_FS_FileProperty_t::m_offlineFlag, ivd_FS_FileProperty_t::m_type, hdb_DirNode_t::nameOwnIdx, NULL, ivd_FS_File::Open(), path, and s_className.

Referenced by hsmGetDirFH(), hsmGetFH(), hsm_FileHeader::InitActive(), and hsm_FHrelc::Truncate().

                                                   {
    log_FUNC_m(hsmGetDirFH);
    // try to find FH by inode
    ivd_FS_FileProperty_t fileProp;
    hsm_ChgFlag_t  inodeChgFlag = 0;

    // find proper general inode
// -------------- previous code got from inside of if block
        hdb_String name;
        hdb_DirNode_t ownDir;
        ivd_RecordIDX_t dirIdx;
        // get dir name and ownerDirNode record
        hdbReadNameOwnRec(a_dir.nameOwnIdx, dirIdx, name, ownDir);
// add to find proper general inode
    try {
        ivd_FS_File file(*g_fs_api_p, a_dir.generalInode, a_dir.fileID);

        cmn_Path path =  g_fs_api_p->GetRootPath() + hsmdbGetPath(ownDir) + name;
        log_DBG_m(dbg_DETAIL, "Path to find gen Inode " << path );
        //HPUX - The file needs to be opened ( to be in the kernel cache )
        file.Open(ivd_FS_File::e_Cache, path);

        file.GetProperties(fileProp);
        file.Close();

        // got current inode from FS
        if (a_dir.generalInode != fileProp.m_Inode) {
            log_DBG_m(dbg_NORM, "INO changed. from DB " << IVD_PRINT_ID_FS(a_dir.generalInode)
                            <<  " from FS " << IVD_PRINT_ID_FS(fileProp.m_Inode));
            a_dir.generalInode = fileProp.m_Inode;
        }
    }
    catch (ivd_SysError &ise) {
        log_DBG_m(dbg_NORM, "Can't get general inode of fileID " << a_dir.fileID
                    << " Dir probably not exist.");

        inodeChgFlag = CHG_DELETED_d;

        fileProp.m_type   = ift_DIR;
        fileProp.m_Inode  = a_dir.generalInode;
        fileProp.m_fileID = a_dir.fileID;
        fileProp.m_chunkSize   = 0;
        fileProp.m_fileSize    = 0;
        fileProp.m_offlineFlag = false;
        fileProp.m_dirtyFlag   = false;
    }

    hsm_FileHeader *fileHdr = g_hsm_FHCache_p->GetFH(a_dir.generalInode);
    if (fileHdr == NULL) {  // directory not found in cache
        // create it from DB and add to cache
        hsm_FileHeader *ownFH = NULL;
        if (ownDir.nameOwnIdx > 0) {  // if has owner get it
            // ivoke to recursion, call itself
            ownFH = hsmGetDirFH(ownDir);
        }
        hsm_InoObj *hsmIObj = new hsm_InoObj(fileProp, inodeChgFlag);
        ivd_NULLCHK_m(hsmIObj, hsm_InoObj::s_className);

        fileHdr = new hsm_FileHeader(ownFH, hsmIObj, name);
        if (ownFH != NULL){// now is used, so decrease temporary reference
            ownFH->DecrRef();
        }
//        fileHdr = new hsm_FileHeader(ownFH, hsmIObj, ift_DIR, name);
        ivd_NULLCHK_m(fileHdr, hsm_FileHeader::s_className);

        // if FH exist in cache then cache delete inserted and
        // return that from cache
        g_hsm_FHCache_p->InsertDirWithTest(&fileHdr);
    }
    return fileHdr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

hsm_FileHeader* hsmGetFH ( cmn_Path a_filePath,
ivd_FS_FileProperty_t a_fileProp 
)

helper function that check for FH in cache othervice create it.

Definition at line 2321 of file hsm_FileHeader.cpp.

References hsm_FileHeader::DecrRef(), g_hsm_FHCache_p, hsm_FHcache::GetFH(), cmn_Path::GetFileName(), hsmGetDirFH(), hsmGetFH(), hsm_FHcache::Insert(), log_FUNC_m, ivd_FS_FileProperty_t::m_Inode, NULL, and cmn_Path::UpPath().

Referenced by hsmGetFH(), and i_HSM_i::TrigEfficientRecall().

                                                                                  {
    log_FUNC_m(hsmGetFH);

    hsm_FileHeader *fileHdr = g_hsm_FHCache_p->GetFH(a_fileProp.m_Inode);

    if (fileHdr == NULL) {
        hsm_FileHeader *fileOwnHdr = hsmGetDirFH(a_filePath.UpPath()); // and no file name
        hsm_InoObj *inodeObj = new hsm_InoObj(a_fileProp, 0);

        fileHdr = new hsm_FileHeader(fileOwnHdr, inodeObj ,hdb_String(a_filePath.GetFileName()));;
        if (fileOwnHdr != NULL) {
        // increment is perform inside hsmGetDirFH inside constructor or cache search
        // now is decrement
            fileOwnHdr->DecrRef(); // this directory is dereferenced by release candidate
        }
        g_hsm_FHCache_p->Insert(fileHdr);
    }
    return fileHdr;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 78 of file hsm_FileHeader.cpp.

Referenced by fs_api::EventDelay().

hsm_HL7MessageProxy* g_hl7proxy_p
i_FSC_var g_iFSC

Definition at line 67 of file ivd-hsm.cpp.

Referenced by FileInfoCache::CheckFiles(), and main().

i_PartitionManager_var g_iPM

pointer to File Header object

global object for fileheader locking

Definition at line 66 of file ivd-hsm.cpp.

Definition at line 75 of file i_hsm_impl.cpp.