irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

physPath.hpp File Reference
#include "rods.h"
#include "objInfo.h"
#include "dataObjInpOut.h"
#include "fileRename.h"
#include "miscUtil.h"
#include "structFileSync.h"
#include "structFileExtAndReg.h"
#include "dataObjOpenAndStat.h"
Include dependency graph for physPath.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ORPHAN_DIR   "orphan"
 
#define REPL_DIR   "replica"
 
#define CHK_ORPHAN_CNT_LIMIT   20 /* number of failed check before stopping */
 
#define LOCK_FILE_DIR   "lockFileDir"
 
#define LOCK_FILE_TRAILER   "LOCK_FILE" /* added to end of lock file */
 

Functions

int getFileMode (dataObjInp_t *dataObjInp)
 
int getFileFlags (int l1descInx)
 
int getFilePathName (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, dataObjInp_t *dataObjInp)
 
int getVaultPathPolicy (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, vaultPathPolicy_t *outVaultPathPolicy)
 
int setPathForGraftPathScheme (char *objPath, const char *vaultPath, int addUserName, char *userName, int trimDirCnt, char *outPath)
 
int setPathForRandomScheme (char *objPath, const char *vaultPath, char *userName, char *outPath)
 
int resolveDupFilePath (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, dataObjInp_t *dataObjInp)
 
int getchkPathPerm (rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfo)
 
int getCopiesFromCond (keyValPair_t *condInput)
 
int getWriteFlag (int openFlag)
 
int dataObjChksum (rsComm_t *rsComm, int l1descInx, keyValPair_t *regParam)
 
int _dataObjChksum (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, char **chksumStr)
 
rodsLong_t getSizeInVault (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo)
 
int dataObjChksumAndReg (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, char **chksumStr)
 
int chkAndHandleOrphanFile (rsComm_t *rsComm, char *objPath, char *rescHIer, char *filePath, const char *_resc_name, int replStatus)
 
int renameFilePathToNewDir (rsComm_t *rsComm, char *newDir, fileRenameInp_t *fileRenameInp, int renameFlag, char *)
 
int syncDataObjPhyPath (rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfoHead, char *acLCollection)
 
int syncDataObjPhyPathS (rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfo, char *acLCollection)
 
int syncCollPhyPath (rsComm_t *rsComm, char *collection)
 
int isInVault (dataObjInfo_t *dataObjInfo)
 
int initStructFileOprInp (rsComm_t *rsComm, structFileOprInp_t *structFileOprInp, structFileExtAndRegInp_t *structFileExtAndRegInp, dataObjInfo_t *dataObjInfo)
 
int getDefFileMode ()
 
int getDefDirMode ()
 
int getLogPathFromPhyPath (char *phyPath, const char *rescVaultPath, char *outLogPath)
 
int rsMkOrphanPath (rsComm_t *rsComm, char *objPath, char *orphanPath)
 
int getDataObjLockPath (char *objPath, char **outLockPath)
 
int executeFilesystemLockCommand (int cmd, int type, int fd, struct flock *lock)
 
int fsDataObjLock (char *objPath, int cmd, int type)
 
int fsDataObjUnlock (int cmd, int type, int fd)
 
rodsLong_t getFileMetadataFromVault (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo)
 

Macro Definition Documentation

◆ CHK_ORPHAN_CNT_LIMIT

#define CHK_ORPHAN_CNT_LIMIT   20 /* number of failed check before stopping */

Definition at line 24 of file physPath.hpp.

◆ LOCK_FILE_DIR

#define LOCK_FILE_DIR   "lockFileDir"

Definition at line 27 of file physPath.hpp.

◆ LOCK_FILE_TRAILER

#define LOCK_FILE_TRAILER   "LOCK_FILE" /* added to end of lock file */

Definition at line 28 of file physPath.hpp.

◆ ORPHAN_DIR

#define ORPHAN_DIR   "orphan"

Definition at line 22 of file physPath.hpp.

◆ REPL_DIR

#define REPL_DIR   "replica"

Definition at line 23 of file physPath.hpp.

Function Documentation

◆ _dataObjChksum()

◆ chkAndHandleOrphanFile()

int chkAndHandleOrphanFile ( rsComm_t rsComm,
char *  objPath,
char *  rescHIer,
char *  filePath,
const char *  _resc_name,
int  replStatus 
)

◆ dataObjChksum()

int dataObjChksum ( rsComm_t rsComm,
int  l1descInx,
keyValPair_t regParam 
)

◆ dataObjChksumAndReg()

int dataObjChksumAndReg ( rsComm_t rsComm,
dataObjInfo_t dataObjInfo,
char **  chksumStr 
)

Definition at line 478 of file physPath.cpp.

References _dataObjChksum(), addKeyVal(), CHKSUM_KW, clearKeyVal(), modDataObjMeta_t::dataObjInfo, IN_PDMO_KW, LOG_NOTICE, DataObjInfo::objPath, modDataObjMeta_t::regParam, DataObjInfo::rescHier, rodsLog(), rsModDataObjMeta(), and irods.pypyodbc::status.

Referenced by _rsDataObjGet().

Here is the call graph for this function:

◆ executeFilesystemLockCommand()

int executeFilesystemLockCommand ( int  cmd,
int  type,
int  fd,
struct flock *  lock 
)

◆ fsDataObjLock()

int fsDataObjLock ( char *  objPath,
int  cmd,
int  type 
)

Definition at line 1268 of file physPath.cpp.

References generate_iadmin_commands_for_41_to_42_upgrade::cmd, executeFilesystemLockCommand(), FILE_OPEN_ERR, getDataObjLockPath(), irods.pypyodbc::lock, LOG_DEBUG, LOG_ERROR, NULL, rodsLogError(), irods.pypyodbc::status, and type.

Referenced by _rsDataObjLock().

Here is the call graph for this function:

◆ fsDataObjUnlock()

int fsDataObjUnlock ( int  cmd,
int  type,
int  fd 
)

Definition at line 1302 of file physPath.cpp.

References generate_iadmin_commands_for_41_to_42_upgrade::cmd, executeFilesystemLockCommand(), irods.pypyodbc::lock, LOG_DEBUG, rodsLogError(), irods.pypyodbc::status, and type.

Referenced by _rsDataObjUnlock().

Here is the call graph for this function:

◆ getchkPathPerm()

◆ getCopiesFromCond()

int getCopiesFromCond ( keyValPair_t condInput)

Definition at line 369 of file physPath.cpp.

References ALL_COPIES, COPIES_KW, getValByKey(), and NULL.

Here is the call graph for this function:

◆ getDataObjLockPath()

int getDataObjLockPath ( char *  objPath,
char **  outLockPath 
)

Definition at line 1185 of file physPath.cpp.

References irods::error::code(), irods::get_full_path_for_unmoved_configs(), LOCK_FILE_DIR, LOCK_FILE_TRAILER, irods::log(), MAX_NAME_LEN, NULL, irods::error::ok(), PASS, rstrcpy(), and USER__NULL_INPUT_ERR.

Referenced by fsDataObjLock().

Here is the call graph for this function:

◆ getDefDirMode()

int getDefDirMode ( )

Definition at line 1070 of file physPath.cpp.

References irods::CFG_DEFAULT_DIR_MODE_KW(), DEFAULT_DIR_MODE, and terminate_irods_processes::e.

Referenced by _rsFileCreate(), _rsFileStageToCache(), _rsFileSyncToArch(), _rsStructFileBundle(), bulkProcAndRegSubfile(), createBunDirForBulkPut(), createPhyBundleDir(), l3Mkdir(), mountFileDir(), procCacheDir(), regPhySubFile(), regSubfile(), univ_mss_file_chmod(), and univ_mss_file_mkdir().

Here is the call graph for this function:

◆ getDefFileMode()

int getDefFileMode ( )

Definition at line 1057 of file physPath.cpp.

References irods::CFG_DEFAULT_FILE_MODE_KW(), DEFAULT_FILE_MODE, and terminate_irods_processes::e.

Referenced by getFileMode(), irods_file_open(), test_source_replica_for_write_permissions(), and univ_mss_file_chmod().

Here is the call graph for this function:

◆ getFileFlags()

int getFileFlags ( int  l1descInx)

Definition at line 70 of file physPath.cpp.

References l1desc::dataObjInp, L1desc, NULL, and DataObjInp::openFlags.

Referenced by l3Open().

◆ getFileMetadataFromVault()

rodsLong_t getFileMetadataFromVault ( rsComm_t rsComm,
dataObjInfo_t dataObjInfo 
)

Definition at line 1315 of file physPath.cpp.

References addKeyVal(), DataObjInfo::condInput, FILE_CTIME_KW, FILE_GID_KW, FILE_MODE_KW, FILE_MTIME_KW, FILE_UID_KW, DataObjInfo::filePath, l3Stat(), LOG_DEBUG, NULL, rodsLog(), SHORT_STR_LEN, rodsStat::st_ctim, rodsStat::st_gid, rodsStat::st_mode, rodsStat::st_mtim, rodsStat::st_size, rodsStat::st_uid, irods.pypyodbc::status, SYS_PATH_IS_NOT_A_FILE, and TIME_LEN.

Referenced by filePathReg().

Here is the call graph for this function:

◆ getFileMode()

int getFileMode ( dataObjInp_t dataObjInp)

Definition at line 48 of file physPath.cpp.

References DataObjInp::createMode, getDefFileMode(), and NULL.

Referenced by l3Create(), l3CreateByObjInfo(), l3FileGetSingleBuf(), l3FilePutSingleBuf(), l3FileStage(), l3FileSync(), and l3Open().

Here is the call graph for this function:

◆ getFilePathName()

◆ getLogPathFromPhyPath()

int getLogPathFromPhyPath ( char *  phyPath,
const char *  rescVaultPath,
char *  outLogPath 
)

Definition at line 1083 of file physPath.cpp.

References getLocalZoneInfo(), MAX_NAME_LEN, NULL, irods.pypyodbc::status, USER__NULL_INPUT_ERR, and zoneInfo::zoneName.

Referenced by mountFileDir().

Here is the call graph for this function:

◆ getSizeInVault()

rodsLong_t getSizeInVault ( rsComm_t rsComm,
dataObjInfo_t dataObjInfo 
)

Definition at line 396 of file physPath.cpp.

References DataObjInfo::filePath, l3Stat(), LOG_DEBUG, NULL, rodsLog(), rodsStat::st_mode, rodsStat::st_size, irods.pypyodbc::status, and SYS_PATH_IS_NOT_A_FILE.

Referenced by _rsDataObjClose(), resolveDupFilePath(), and syncDataObjPhyPathS().

Here is the call graph for this function:

◆ getVaultPathPolicy()

◆ getWriteFlag()

◆ initStructFileOprInp()

int initStructFileOprInp ( rsComm_t rsComm,
structFileOprInp_t structFileOprInp,
structFileExtAndRegInp_t structFileExtAndRegInp,
dataObjInfo_t dataObjInfo 
)

◆ isInVault()

int isInVault ( dataObjInfo_t dataObjInfo)

Definition at line 1034 of file physPath.cpp.

References irods::error::code(), DataObjInfo::filePath, irods::get_vault_path_for_hier_string(), has_prefix(), irods::log(), irods::error::ok(), PASSMSG, DataObjInfo::rescHier, and SYS_INTERNAL_NULL_INPUT_ERR.

Referenced by syncDataObjPhyPathS().

Here is the call graph for this function:

◆ renameFilePathToNewDir()

◆ resolveDupFilePath()

int resolveDupFilePath ( rsComm_t rsComm,
dataObjInfo_t dataObjInfo,
dataObjInp_t dataObjInp 
)

Definition at line 279 of file physPath.cpp.

References chkAndHandleOrphanFile(), DataObjInp::condInput, FILE_PATH_KW, DataObjInfo::filePath, getSizeInVault(), getValByKey(), MAX_NAME_LEN, NAME_LEN, NULL, DataObjInfo::objPath, DataObjInfo::replNum, DataObjInfo::replStatus, DataObjInfo::rescHier, DataObjInfo::rescName, and SYS_PATH_IS_NOT_A_FILE.

Referenced by l3CreateByObjInfo(), l3FilePutSingleBuf(), and regPhySubFile().

Here is the call graph for this function:

◆ rsMkOrphanPath()

int rsMkOrphanPath ( rsComm_t rsComm,
char *  objPath,
char *  orphanPath 
)

Definition at line 1127 of file physPath.cpp.

References addKeyVal(), CAT_NAME_EXISTS_AS_COLLECTION, rsComm_t::clientUser, CollInp::collName, CollInp::condInput, LOG_ERROR, MAX_NAME_LEN, RECURSIVE_OPR__KW, rodsLog(), rodsLogError(), userInfo_t::rodsZone, rsCollCreate(), rstrcpy(), splitPathByKey(), irods.pypyodbc::status, and userInfo_t::userName.

Referenced by dataObjUnlinkS().

Here is the call graph for this function:

◆ setPathForGraftPathScheme()

int setPathForGraftPathScheme ( char *  objPath,
const char *  vaultPath,
int  addUserName,
char *  userName,
int  trimDirCnt,
char *  outPath 
)

Definition at line 230 of file physPath.cpp.

References LOG_ERROR, MAX_NAME_LEN, NULL, rodsLog(), and USER_STRLEN_TOOLONG.

Referenced by getFilePathName().

Here is the call graph for this function:

◆ setPathForRandomScheme()

int setPathForRandomScheme ( char *  objPath,
const char *  vaultPath,
char *  userName,
char *  outPath 
)

Definition at line 202 of file physPath.cpp.

References LOG_ERROR, MAX_NAME_LEN, NULL, rodsLog(), splitPathByKey(), and irods.pypyodbc::status.

Referenced by getFilePathName().

Here is the call graph for this function:

◆ syncCollPhyPath()

◆ syncDataObjPhyPath()

int syncDataObjPhyPath ( rsComm_t rsComm,
dataObjInp_t dataObjInp,
dataObjInfo_t dataObjInfoHead,
char *  acLCollection 
)

Definition at line 742 of file physPath.cpp.

References DataObjInfo::next, NULL, irods.pypyodbc::status, and syncDataObjPhyPathS().

Referenced by _rsDataObjRename().

Here is the call graph for this function:

◆ syncDataObjPhyPathS()