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
Go to the documentation of this file.
1 
4 /* physPath.h - header file for physPath.c
5  */
6 
7 
8 
9 #ifndef PHYS_PATH_HPP
10 #define PHYS_PATH_HPP
11 
12 #include "rods.h"
13 #include "objInfo.h"
14 #include "dataObjInpOut.h"
15 #include "fileRename.h"
16 #include "miscUtil.h"
17 #include "structFileSync.h"
18 #include "structFileExtAndReg.h"
19 #include "dataObjOpenAndStat.h"
20 
21 #define ORPHAN_DIR "orphan"
22 #define REPL_DIR "replica"
23 #define CHK_ORPHAN_CNT_LIMIT 20 /* number of failed check before stopping */
24 // =-=-=-=-=-=-=-
25 // JMC - backport 4598
26 #define LOCK_FILE_DIR "lockFileDir"
27 #define LOCK_FILE_TRAILER "LOCK_FILE" /* added to end of lock file */ // JMC - backport 4604
28 // =-=-=-=-=-=-=-
29 
30 
31 extern "C" {
32 
33  int
34  getFileMode( dataObjInp_t *dataObjInp );
35 
36  int
37  getFileFlags( int l1descInx );
38  int
39  getFilePathName( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo,
40  dataObjInp_t *dataObjInp );
41  int
42  getVaultPathPolicy( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo,
43  vaultPathPolicy_t *outVaultPathPolicy );
44  int
45  setPathForGraftPathScheme( char *objPath, const char *vaultPath, int addUserName,
46  char *userName, int trimDirCnt, char *outPath );
47  int
48  setPathForRandomScheme( char *objPath, const char *vaultPath, char *userName,
49  char *outPath );
50  int
51  resolveDupFilePath( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo,
52  dataObjInp_t *dataObjInp );
53  int
54  getchkPathPerm( rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfo );
55  int
56  getCopiesFromCond( keyValPair_t *condInput );
57  int
58  getWriteFlag( int openFlag );
59  int
60  dataObjChksum( rsComm_t *rsComm, int l1descInx, keyValPair_t *regParam );
61  int
62  _dataObjChksum( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, char **chksumStr );
64  getSizeInVault( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo );
65  int
66  dataObjChksumAndReg( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo,
67  char **chksumStr );
68  int
69  chkAndHandleOrphanFile( rsComm_t *rsComm, char* objPath, char* rescHIer, char *filePath,
70  const char *_resc_name, int replStatus );
71  int
72  renameFilePathToNewDir( rsComm_t *rsComm, char *newDir,
73  fileRenameInp_t *fileRenameInp, int renameFlag, char* );
74  int
75  syncDataObjPhyPath( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
76  dataObjInfo_t *dataObjInfoHead, char *acLCollection );
77  int
78  syncDataObjPhyPathS( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
79  dataObjInfo_t *dataObjInfo, char *acLCollection );
80  int
81  syncCollPhyPath( rsComm_t *rsComm, char *collection );
82  int
83  isInVault( dataObjInfo_t *dataObjInfo );
84  int
85  initStructFileOprInp( rsComm_t *rsComm, structFileOprInp_t *structFileOprInp,
86  structFileExtAndRegInp_t *structFileExtAndRegInp,
87  dataObjInfo_t *dataObjInfo );
88  int
90  int
91  getDefDirMode();
92  int
93  getLogPathFromPhyPath( char *phyPath, const char *rescVaultPath, char *outLogPath );
94  int
95  rsMkOrphanPath( rsComm_t *rsComm, char *objPath, char *orphanPath );
96 // =-=-=-=-=-=-=-
97 // JMC - backport 4598
98  int
99  getDataObjLockPath( char *objPath, char **outLockPath );
100  int
101  executeFilesystemLockCommand( int cmd, int type, int fd, struct flock * lock );
102  int
103  fsDataObjLock( char *objPath, int cmd, int type );
104  int
105  fsDataObjUnlock( int cmd, int type, int fd );
106 // =-=-=-=-=-=-=-
107 
108  rodsLong_t
109  getFileMetadataFromVault( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo );
110 }
111 
112 #endif /* PHYS_PATH_H */
setPathForRandomScheme
int setPathForRandomScheme(char *objPath, const char *vaultPath, char *userName, char *outPath)
Definition: physPath.cpp:202
getchkPathPerm
int getchkPathPerm(rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfo)
Definition: physPath.cpp:312
rsComm_t
Definition: rcConnect.h:145
getDefDirMode
int getDefDirMode()
Definition: physPath.cpp:1070
vaultPathPolicy_t
Definition: rodsDef.h:353
structFileSync.h
getFilePathName
int getFilePathName(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, dataObjInp_t *dataObjInp)
Definition: physPath.cpp:87
setPathForGraftPathScheme
int setPathForGraftPathScheme(char *objPath, const char *vaultPath, int addUserName, char *userName, int trimDirCnt, char *outPath)
Definition: physPath.cpp:230
StructFileExtAndRegInp
Definition: structFileExtAndReg.h:7
syncDataObjPhyPathS
int syncDataObjPhyPathS(rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfo, char *acLCollection)
Definition: physPath.cpp:763
dataObjChksum
int dataObjChksum(rsComm_t *rsComm, int l1descInx, keyValPair_t *regParam)
renameFilePathToNewDir
int renameFilePathToNewDir(rsComm_t *rsComm, char *newDir, fileRenameInp_t *fileRenameInp, int renameFlag, char *)
Definition: physPath.cpp:652
fileRenameInp_t
Definition: fileRename.h:7
getDefFileMode
int getDefFileMode()
Definition: physPath.cpp:1057
getFileFlags
int getFileFlags(int l1descInx)
Definition: physPath.cpp:70
dataObjInpOut.h
generate_iadmin_commands_for_41_to_42_upgrade.cmd
list cmd
Definition: generate_iadmin_commands_for_41_to_42_upgrade.py:19
getDataObjLockPath
int getDataObjLockPath(char *objPath, char **outLockPath)
Definition: physPath.cpp:1185
getFileMetadataFromVault
rodsLong_t getFileMetadataFromVault(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo)
Definition: physPath.cpp:1315
dataObjChksumAndReg
int dataObjChksumAndReg(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, char **chksumStr)
Definition: physPath.cpp:478
irods.pypyodbc.lock
lock
Definition: pypyodbc.py:66
rsMkOrphanPath
int rsMkOrphanPath(rsComm_t *rsComm, char *objPath, char *orphanPath)
Definition: physPath.cpp:1127
DataObjInp
Definition: dataObjInpOut.h:65
chkAndHandleOrphanFile
int chkAndHandleOrphanFile(rsComm_t *rsComm, char *objPath, char *rescHIer, char *filePath, const char *_resc_name, int replStatus)
Definition: physPath.cpp:526
syncDataObjPhyPath
int syncDataObjPhyPath(rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfoHead, char *acLCollection)
Definition: physPath.cpp:742
getWriteFlag
int getWriteFlag(int openFlag)
Definition: physPath.cpp:386
getCopiesFromCond
int getCopiesFromCond(keyValPair_t *condInput)
Definition: physPath.cpp:369
getSizeInVault
rodsLong_t getSizeInVault(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo)
Definition: physPath.cpp:396
fsDataObjLock
int fsDataObjLock(char *objPath, int cmd, int type)
Definition: physPath.cpp:1268
dataObjOpenAndStat.h
getVaultPathPolicy
int getVaultPathPolicy(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, vaultPathPolicy_t *outVaultPathPolicy)
Definition: physPath.cpp:154
objInfo.h
StructFileOprInp
Definition: structFileSync.h:8
isInVault
int isInVault(dataObjInfo_t *dataObjInfo)
Definition: physPath.cpp:1034
fileRename.h
executeFilesystemLockCommand
int executeFilesystemLockCommand(int cmd, int type, int fd, struct flock *lock)
Definition: physPath.cpp:1246
getLogPathFromPhyPath
int getLogPathFromPhyPath(char *phyPath, const char *rescVaultPath, char *outLogPath)
Definition: physPath.cpp:1083
getFileMode
int getFileMode(dataObjInp_t *dataObjInp)
Definition: physPath.cpp:48
resolveDupFilePath
int resolveDupFilePath(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, dataObjInp_t *dataObjInp)
Definition: physPath.cpp:279
miscUtil.h
_dataObjChksum
int _dataObjChksum(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, char **chksumStr)
Definition: physPath.cpp:421
KeyValPair
Definition: objInfo.h:120
type
int type
Definition: filesystem.cpp:103
DataObjInfo
Definition: objInfo.h:129
initStructFileOprInp
int initStructFileOprInp(rsComm_t *rsComm, structFileOprInp_t *structFileOprInp, structFileExtAndRegInp_t *structFileExtAndRegInp, dataObjInfo_t *dataObjInfo)
structFileExtAndReg.h
rods.h
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
fsDataObjUnlock
int fsDataObjUnlock(int cmd, int type, int fd)
Definition: physPath.cpp:1302
syncCollPhyPath
int syncCollPhyPath(rsComm_t *rsComm, char *collection)
Definition: physPath.cpp:912