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)  

objDesc.cpp
Go to the documentation of this file.
1 
4 /* objDesc.c - L1 type operation. Will call low level l1desc drivers
5  */
6 
7 #include "rcMisc.h"
8 #include "rodsDef.h"
9 #include "objDesc.hpp"
10 #include "dataObjOpr.hpp"
11 #include "rodsDef.h"
12 #include "rsGlobalExtern.hpp"
13 #include "fileChksum.h"
14 #include "modDataObjMeta.h"
15 #include "objMetaOpr.hpp"
16 #include "collection.hpp"
17 #include "resource.hpp"
18 #include "dataObjClose.h"
19 #include "rcGlobalExtern.h"
20 #include "genQuery.h"
21 #include "rsGenQuery.hpp"
22 #include "rsGetHierFromLeafId.hpp"
23 #include "rsQuerySpecColl.hpp"
24 #include "rsDataObjClose.hpp"
25 
28 #include "irods_stacktrace.hpp"
29 #include "irods_re_structs.hpp"
30 #include "get_hier_from_leaf_id.h"
31 
32 int
34  memset( L1desc, 0, sizeof( L1desc ) );
35  return 0;
36 }
37 
38 int
40  int i;
41 
42  for ( i = 3; i < NUM_L1_DESC; i++ ) {
43  if ( L1desc[i].inuseFlag <= FD_FREE ) {
45  return i;
46  };
47  }
48 
50  "allocL1desc: out of L1desc" );
51 
52  return SYS_OUT_OF_FILE_DESC;
53 }
54 
55 int
57  int i;
58 
59  for ( i = 3; i < NUM_L1_DESC; i++ ) {
60  if ( L1desc[i].inuseFlag == FD_INUSE ) {
61  return 1;
62  };
63  }
64  return 0;
65 }
66 
67 int
69  memset( SpecCollDesc, 0, sizeof( SpecCollDesc ) );
70  return 0;
71 }
72 
73 int
75  int i;
76 
77  for ( i = 1; i < NUM_SPEC_COLL_DESC; i++ ) {
78  if ( SpecCollDesc[i].inuseFlag <= FD_FREE ) {
80  return i;
81  };
82  }
83 
85  "allocSpecCollDesc: out of SpecCollDesc" );
86 
87  return SYS_OUT_OF_FILE_DESC;
88 }
89 
90 int
91 freeSpecCollDesc( int specCollInx ) {
92  if ( specCollInx < 1 || specCollInx >= NUM_SPEC_COLL_DESC ) {
94  "freeSpecCollDesc: specCollInx %d out of range", specCollInx );
96  }
97 
98  if ( SpecCollDesc[specCollInx].dataObjInfo != NULL ) {
99  freeDataObjInfo( SpecCollDesc[specCollInx].dataObjInfo );
100  }
101 
102  memset( &SpecCollDesc[specCollInx], 0, sizeof( specCollDesc_t ) );
103 
104  return 0;
105 }
106 
107 int
109  int i;
110 
111  if ( rsComm == NULL ) {
112  return 0;
113  }
114  for ( i = 3; i < NUM_L1_DESC; i++ ) {
115  if ( L1desc[i].inuseFlag == FD_INUSE &&
116  L1desc[i].l3descInx > 2 ) {
117  l3Close( rsComm, i );
118  }
119  }
120  return 0;
121 }
122 
123 int
124 freeL1desc( int l1descInx ) {
125  if ( l1descInx < 3 || l1descInx >= NUM_L1_DESC ) {
127  "freeL1desc: l1descInx %d out of range", l1descInx );
129  }
130 
131  if ( L1desc[l1descInx].dataObjInfo != NULL ) {
132  freeDataObjInfo( L1desc[l1descInx].dataObjInfo );
133  }
134 
135  if ( L1desc[l1descInx].otherDataObjInfo != NULL ) {
136  freeAllDataObjInfo( L1desc[l1descInx].otherDataObjInfo );
137  }
138 
139  if ( L1desc[l1descInx].replDataObjInfo != NULL ) {
140  freeDataObjInfo( L1desc[l1descInx].replDataObjInfo );
141  }
142 
143  if ( L1desc[l1descInx].dataObjInpReplFlag == 1 &&
144  L1desc[l1descInx].dataObjInp != NULL ) {
145  clearDataObjInp( L1desc[l1descInx].dataObjInp );
146  free( L1desc[l1descInx].dataObjInp );
147  }
148  memset( &L1desc[l1descInx], 0, sizeof( l1desc_t ) );
149 
150  return 0;
151 }
152 
153 int
154 fillL1desc( int l1descInx, dataObjInp_t *dataObjInp,
155  dataObjInfo_t *dataObjInfo, int replStatus, rodsLong_t dataSize ) {
156  keyValPair_t *condInput;
157  char *tmpPtr;
158 
159  // Initialize the bytesWritten to -1 rather than 0. If this is negative then we
160  // know no bytes have been written. This is so that zero length files can be handled
161  // similarly to non-zero length files.
162  L1desc[l1descInx].bytesWritten = -1;
163 
164  char* resc_hier = getValByKey( &dataObjInp->condInput, RESC_HIER_STR_KW );
165  if ( dataObjInfo->rescHier[0] == '\0' && resc_hier ) {
166  snprintf( dataObjInfo->rescHier, sizeof( dataObjInfo->rescHier ), "%s", resc_hier );
167  }
168 
169 
170  condInput = &dataObjInp->condInput;
171  char* in_pdmo = getValByKey( condInput, IN_PDMO_KW );
172  if ( in_pdmo != NULL ) {
173  rstrcpy( L1desc[l1descInx].in_pdmo, in_pdmo, MAX_NAME_LEN );
174  }
175  else {
176  rstrcpy( L1desc[l1descInx].in_pdmo, "", MAX_NAME_LEN );
177  }
178 
179  const auto open_type{getValByKey(condInput, OPEN_TYPE_KW)};
180  if (open_type) {
181  L1desc[l1descInx].openType = std::atoi(open_type);
182  }
183 
184  if ( dataObjInp != NULL ) {
185  /* always repl the .dataObjInp */
186  L1desc[l1descInx].dataObjInp = ( dataObjInp_t* )malloc( sizeof( dataObjInp_t ) );
187  replDataObjInp( dataObjInp, L1desc[l1descInx].dataObjInp );
188  L1desc[l1descInx].dataObjInpReplFlag = 1;
189  }
190  else {
191  /* XXXX this can be a problem in rsDataObjClose */
192  L1desc[l1descInx].dataObjInp = NULL;
193  }
194 
195  L1desc[l1descInx].dataObjInfo = dataObjInfo;
196  if ( dataObjInp != NULL ) {
197  L1desc[l1descInx].oprType = dataObjInp->oprType;
198  }
199  L1desc[l1descInx].replStatus = replStatus;
200  L1desc[l1descInx].dataSize = dataSize;
201  if ( condInput != NULL && condInput->len > 0 ) {
202  if ( ( tmpPtr = getValByKey( condInput, REG_CHKSUM_KW ) ) != NULL ) {
203  L1desc[l1descInx].chksumFlag = REG_CHKSUM;
204  rstrcpy( L1desc[l1descInx].chksum, tmpPtr, NAME_LEN );
205  }
206  else if ( ( tmpPtr = getValByKey( condInput, VERIFY_CHKSUM_KW ) ) !=
207  NULL ) {
208  L1desc[l1descInx].chksumFlag = VERIFY_CHKSUM;
209  rstrcpy( L1desc[l1descInx].chksum, tmpPtr, NAME_LEN );
210  }
211  }
212 
213  return 0;
214 }
215 
216 int
217 initDataObjInfoWithInp( dataObjInfo_t *dataObjInfo, dataObjInp_t *dataObjInp ) {
218  char *rescName = 0, *dataType = 0, *filePath = 0;
219  keyValPair_t *condInput = 0;
220 
221  condInput = &dataObjInp->condInput;
222  memset( dataObjInfo, 0, sizeof( dataObjInfo_t ) );
223  rstrcpy( dataObjInfo->objPath, dataObjInp->objPath, MAX_NAME_LEN );
224 
225  rescName = getValByKey( condInput, RESC_NAME_KW );
226  if ( rescName != NULL ) {
227  rstrcpy( dataObjInfo->rescName, rescName, NAME_LEN );
228  }
229 
230  char* rescHier = getValByKey( &dataObjInp->condInput, RESC_HIER_STR_KW );
231  if ( rescHier ) {
232  rstrcpy( dataObjInfo->rescHier, rescHier, MAX_NAME_LEN );
233  }
234  else {
235  rstrcpy( dataObjInfo->rescHier, rescName, MAX_NAME_LEN ); // in kw else
236  }
237 
238  irods::error ret = resc_mgr.hier_to_leaf_id(dataObjInfo->rescHier,dataObjInfo->rescId);
239  if( !ret.ok() ) {
240  irods::log(PASS(ret));
241  }
242 
243  snprintf( dataObjInfo->dataMode, SHORT_STR_LEN, "%d", dataObjInp->createMode );
244 
245  dataType = getValByKey( condInput, DATA_TYPE_KW );
246  if ( dataType != NULL ) {
247  rstrcpy( dataObjInfo->dataType, dataType, NAME_LEN );
248  }
249  else {
250  rstrcpy( dataObjInfo->dataType, "generic", NAME_LEN );
251  }
252 
253  filePath = getValByKey( condInput, FILE_PATH_KW );
254  if ( filePath != NULL ) {
255  rstrcpy( dataObjInfo->filePath, filePath, MAX_NAME_LEN );
256  }
257 
258  return 0;
259 }
260 
261 int
263  int index;
264  for ( index = 3; index < NUM_L1_DESC; index++ ) {
265  if ( L1desc[index].dataObjInfo == dataObjInfo ) {
266  return index;
267  }
268  }
269  return -1;
270 }
271 
272 /* getNumThreads - get the number of threads.
273  * inpNumThr - 0 - server decide
274  * < 0 - NO_THREADING
275  * > 0 - num of threads wanted
276  */
277 
278 int
279 getNumThreads( rsComm_t *rsComm, rodsLong_t dataSize, int inpNumThr,
280  keyValPair_t *condInput, char *destRescHier, char *srcRescHier, int oprType ) {
281  ruleExecInfo_t rei;
282  dataObjInp_t doinp;
283  int status;
284  int numDestThr = -1;
285  int numSrcThr = -1;
286 
287 
288  if ( inpNumThr == NO_THREADING ) {
289  return 0;
290  }
291 
292  if ( dataSize < 0 ) {
293  return 0;
294  }
295 
296  if ( dataSize <= MIN_SZ_FOR_PARA_TRAN ) {
297  if ( inpNumThr > 0 ) {
298  inpNumThr = 1;
299  }
300  else {
301  return 0;
302  }
303  }
304 
305  if ( getValByKey( condInput, NO_PARA_OP_KW ) != NULL ) {
306  /* client specify no para opr */
307  return 1;
308  }
309 
310  memset( &doinp, 0, sizeof( doinp ) );
311  doinp.numThreads = inpNumThr;
312 
313  doinp.dataSize = dataSize;
314  doinp.oprType = oprType;
315 
316  initReiWithDataObjInp( &rei, rsComm, &doinp );
317 
318  if (destRescHier && strlen(destRescHier)) {
319 
320  // get resource (hierarchy) location
321  std::string location;
322  irods::error ret = irods::get_loc_for_hier_string( destRescHier, location );
323  if ( !ret.ok() ) {
324  irods::log( PASSMSG( "getNumThreads - failed in get_loc_for_hier_string", ret ) );
326  free(rei.condInputData);
327  return -1;
328  }
329 
330  irods::error err = irods::is_hier_live( destRescHier );
331  if ( err.ok() ) {
332  // fill rei.condInputData with resource properties
333  ret = irods::get_resc_properties_as_kvp(destRescHier, rei.condInputData);
334  if ( !ret.ok() ) {
335  irods::log( PASSMSG( "getNumThreads - failed in get_resc_properties_as_kvp", ret ) );
336  }
337 
338  // PEP
339  status = applyRule( "acSetNumThreads", NULL, &rei, NO_SAVE_REI );
340 
341  if ( status < 0 ) {
343  "getNumThreads: acSetNumThreads error, status = %d",
344  status );
345  }
346  else {
347 
348  numDestThr = rei.status;
349  if ( numDestThr == 0 ) {
351  free(rei.condInputData);
352  return 0;
353  }
354  else if ( numDestThr == 1 && srcRescHier == NULL &&
355  isLocalHost( location.c_str() ) ) {
356  /* one thread and resource on local host */
358  free(rei.condInputData);
359  return 0;
360  }
361  }
362  }
363  }
364 
365  if (destRescHier && strlen(destRescHier) && srcRescHier && strlen(srcRescHier)) {
366  if ( numDestThr > 0 && strcmp( destRescHier, srcRescHier ) == 0 ) {
368  free(rei.condInputData);
369 
370  return numDestThr;
371  }
372 
373  // get resource (hierarchy) location
374  std::string location;
375  irods::error ret = irods::get_loc_for_hier_string( destRescHier, location );
376  if ( !ret.ok() ) {
377  irods::log( PASSMSG( "getNumThreads - failed in get_loc_for_hier_string", ret ) );
379  free(rei.condInputData);
380 
381  return -1;
382  }
383 
384  irods::error err = irods::is_hier_live( srcRescHier );
385  if ( err.ok() ) {
386  // fill rei.condInputData with resource properties
387  ret = irods::get_resc_properties_as_kvp(destRescHier, rei.condInputData);
388  if ( !ret.ok() ) {
389  irods::log( PASSMSG( "getNumThreads - failed in get_resc_properties_as_kvp", ret ) );
390  }
391 
392  // PEP
393  status = applyRule( "acSetNumThreads", NULL, &rei, NO_SAVE_REI );
394 
395  if ( status < 0 ) {
397  "getNumThreads: acSetNumThreads error, status = %d",
398  status );
399  }
400  else {
401  numSrcThr = rei.status;
402  if ( numSrcThr == 0 ) {
404  free(rei.condInputData);
405 
406  return 0;
407  }
408  }
409  }
410  }
411 
412  if ( numDestThr > 0 ) {
414  free(rei.condInputData);
415  if ( getValByKey( condInput, RBUDP_TRANSFER_KW ) != NULL ) {
416  return 1;
417  }
418  else {
419  return numDestThr;
420  }
421  }
422  if ( numSrcThr > 0 ) {
424  free(rei.condInputData);
425  if ( getValByKey( condInput, RBUDP_TRANSFER_KW ) != NULL ) {
426  return 1;
427  }
428  else {
429  return numSrcThr;
430  }
431  }
432  /* should not be here. do one with no resource */
433  status = applyRule( "acSetNumThreads", NULL, &rei, NO_SAVE_REI );
435  free(rei.condInputData);
436  if ( status < 0 ) {
438  "getNumThreads: acGetNumThreads error, status = %d",
439  status );
440  return 0;
441  }
442  else {
443  if ( rei.status > 0 ) {
444  return rei.status;
445  }
446  else {
447  return 0;
448  }
449  }
450 }
451 
452 int
453 initDataOprInp( dataOprInp_t *dataOprInp, int l1descInx, int oprType ) {
454  dataObjInfo_t *dataObjInfo;
455  dataObjInp_t *dataObjInp;
456  char *tmpStr;
457 
458 
459  dataObjInfo = L1desc[l1descInx].dataObjInfo;
460  dataObjInp = L1desc[l1descInx].dataObjInp;
461 
462  memset( dataOprInp, 0, sizeof( dataOprInp_t ) );
463 
464  dataOprInp->oprType = oprType;
465  dataOprInp->numThreads = dataObjInp->numThreads;
466  dataOprInp->offset = dataObjInp->offset;
467  if ( oprType == PUT_OPR ) {
468  if ( dataObjInp->dataSize > 0 ) {
469  dataOprInp->dataSize = dataObjInp->dataSize;
470  }
471  dataOprInp->destL3descInx = L1desc[l1descInx].l3descInx;
472  }
473  else if ( oprType == GET_OPR ) {
474  if ( dataObjInfo->dataSize > 0 ) {
475  dataOprInp->dataSize = dataObjInfo->dataSize;
476  }
477  else {
478  dataOprInp->dataSize = dataObjInp->dataSize;
479  }
480  dataOprInp->srcL3descInx = L1desc[l1descInx].l3descInx;
481  }
482  else if ( oprType == SAME_HOST_COPY_OPR ) {
483  int srcL1descInx = L1desc[l1descInx].srcL1descInx;
484  int srcL3descInx = L1desc[srcL1descInx].l3descInx;
485  dataOprInp->dataSize = L1desc[srcL1descInx].dataObjInfo->dataSize;
486  dataOprInp->destL3descInx = L1desc[l1descInx].l3descInx;
487  dataOprInp->srcL3descInx = srcL3descInx;
488  }
489  else if ( oprType == COPY_TO_REM_OPR ) {
490  int srcL1descInx = L1desc[l1descInx].srcL1descInx;
491  int srcL3descInx = L1desc[srcL1descInx].l3descInx;
492  dataOprInp->dataSize = L1desc[srcL1descInx].dataObjInfo->dataSize;
493  dataOprInp->srcL3descInx = srcL3descInx;
494  }
495  else if ( oprType == COPY_TO_LOCAL_OPR ) {
496  int srcL1descInx = L1desc[l1descInx].srcL1descInx;
497  dataOprInp->dataSize = L1desc[srcL1descInx].dataObjInfo->dataSize;
498  dataOprInp->destL3descInx = L1desc[l1descInx].l3descInx;
499  }
500  if ( getValByKey( &dataObjInp->condInput, STREAMING_KW ) != NULL ) {
501  addKeyVal( &dataOprInp->condInput, STREAMING_KW, "" );
502  }
503 
504  if ( getValByKey( &dataObjInp->condInput, NO_PARA_OP_KW ) != NULL ) {
505  addKeyVal( &dataOprInp->condInput, NO_PARA_OP_KW, "" );
506  }
507 
508  if ( getValByKey( &dataObjInp->condInput, RBUDP_TRANSFER_KW ) != NULL ) {
509 
510  /* only do unix fs */
511  // JMC - legacy resource - int rescTypeInx = dataObjInfo->rescInfo->rescTypeInx;
512  // JMC - legacy resource - if (RescTypeDef[rescTypeInx].driverType == UNIX_FILE_TYPE)
513  std::string type;
515 
516  if ( !err.ok() ) {
517  irods::log( PASS( err ) );
518  }
519  else {
520  if ( irods::RESOURCE_TYPE_NATIVE == type ) { // JMC ::
521  addKeyVal( &dataOprInp->condInput, RBUDP_TRANSFER_KW, "" );
522  }
523  }
524  }
525 
526  if ( getValByKey( &dataObjInp->condInput, VERY_VERBOSE_KW ) != NULL ) {
527  addKeyVal( &dataOprInp->condInput, VERY_VERBOSE_KW, "" );
528  }
529 
530  if ( ( tmpStr = getValByKey( &dataObjInp->condInput, RBUDP_SEND_RATE_KW ) ) !=
531  NULL ) {
532  addKeyVal( &dataOprInp->condInput, RBUDP_SEND_RATE_KW, tmpStr );
533  }
534 
535  if ( ( tmpStr = getValByKey( &dataObjInp->condInput, RBUDP_PACK_SIZE_KW ) ) !=
536  NULL ) {
537  addKeyVal( &dataOprInp->condInput, RBUDP_PACK_SIZE_KW, tmpStr );
538  }
539 
540  return 0;
541 }
542 
543 int
545  dataObjInfo_t* destDataObjInfo,
546  dataObjInfo_t* srcDataObjInfo,
547  const char* _resc_name ) {
548 
549 
550  memset( destDataObjInfo, 0, sizeof( dataObjInfo_t ) );
551  *destDataObjInfo = *srcDataObjInfo;
552  memset( &destDataObjInfo->condInput, 0, sizeof( destDataObjInfo->condInput ) );
553  replKeyVal( &srcDataObjInfo->condInput, &destDataObjInfo->condInput );
554 
555  destDataObjInfo->filePath[0] = '\0';
556  rstrcpy( destDataObjInfo->rescName, _resc_name, NAME_LEN );
557 
558  // initialize the destination resource hierarchy to the root resource
559  rstrcpy( destDataObjInfo->rescHier, _resc_name, MAX_NAME_LEN ); // orphan right now
560  irods::error ret = resc_mgr.hier_to_leaf_id(_resc_name,destDataObjInfo->rescId);
561  if( !ret.ok() ) {
562  irods::log(PASS(ret));
563  }
564 
565  destDataObjInfo->replNum = destDataObjInfo->dataId = 0;
566 
567  return 0;
568 }
569 
570 int
571 convL3descInx( int l3descInx ) {
572  if ( l3descInx <= 2 || FileDesc[l3descInx].inuseFlag == 0 ||
573  FileDesc[l3descInx].rodsServerHost == NULL ) {
574  return l3descInx;
575  }
576 
577  if ( FileDesc[l3descInx].rodsServerHost->localFlag == LOCAL_HOST ) {
578  return l3descInx;
579  }
580  else {
581  return FileDesc[l3descInx].fd;
582  }
583 }
584 
586  // look for a free collHandle_t
587  for (std::vector<collHandle_t>::iterator it = CollHandle.begin(); it != CollHandle.end(); ++it) {
588  if (it->inuseFlag <= FD_FREE) {
589  it->inuseFlag = FD_INUSE;
590  return it - CollHandle.begin();
591  }
592  }
593 
594  // if none found make a new one
595  collHandle_t my_coll_handle;
596  memset(&my_coll_handle, 0, sizeof(collHandle_t));
597 
598  // mark as in use
599  my_coll_handle.inuseFlag = FD_INUSE;
600 
601  // add to vector
602  CollHandle.push_back(my_coll_handle);
603 
604  // return index
605  return CollHandle.size() - 1;
606 }
607 
608 int freeCollHandle( int handleInx ) {
609  if ( handleInx < 0 || static_cast<std::size_t>(handleInx) >= CollHandle.size() ) {
611  "freeCollHandle: handleInx %d out of range", handleInx );
613  }
614 
615  /* don't free specColl. It is in cache */
616  clearCollHandle( &CollHandle[handleInx], 1 );
617  memset( &CollHandle[handleInx], 0, sizeof( collHandle_t ) );
618 
619  return 0;
620 }
621 
622 int
623 rsInitQueryHandle( queryHandle_t *queryHandle, rsComm_t *rsComm ) {
624  if ( queryHandle == NULL || rsComm == NULL ) {
625  return USER__NULL_INPUT_ERR;
626  }
627 
628  queryHandle->conn = rsComm;
629  queryHandle->connType = RS_COMM;
630  queryHandle->querySpecColl = ( funcPtr ) rsQuerySpecColl;
631  queryHandle->genQuery = ( funcPtr ) rsGenQuery;
632  queryHandle->getHierForId = ( funcPtr ) rsGetHierFromLeafId;
633 
634  return 0;
635 }
636 
637 int
638 allocAndSetL1descForZoneOpr( int remoteL1descInx, dataObjInp_t *dataObjInp,
639  rodsServerHost_t *remoteZoneHost, openStat_t *openStat ) {
640  int l1descInx;
641  dataObjInfo_t *dataObjInfo;
642 
643  l1descInx = allocL1desc();
644  if ( l1descInx < 0 ) {
645  return l1descInx;
646  }
647  L1desc[l1descInx].remoteL1descInx = remoteL1descInx;
648  L1desc[l1descInx].oprType = REMOTE_ZONE_OPR;
649  L1desc[l1descInx].remoteZoneHost = remoteZoneHost;
650  /* always repl the .dataObjInp */
651  L1desc[l1descInx].dataObjInp = ( dataObjInp_t* )malloc( sizeof( dataObjInp_t ) );
652  replDataObjInp( dataObjInp, L1desc[l1descInx].dataObjInp );
653  L1desc[l1descInx].dataObjInpReplFlag = 1;
654  dataObjInfo = L1desc[l1descInx].dataObjInfo =
655  ( dataObjInfo_t* )malloc( sizeof( dataObjInfo_t ) );
656  bzero( dataObjInfo, sizeof( dataObjInfo_t ) );
657  rstrcpy( dataObjInfo->objPath, dataObjInp->objPath, MAX_NAME_LEN );
658 
659  if ( openStat != NULL ) {
660  dataObjInfo->dataSize = openStat->dataSize;
661  rstrcpy( dataObjInfo->dataMode, openStat->dataMode, SHORT_STR_LEN );
662  rstrcpy( dataObjInfo->dataType, openStat->dataType, NAME_LEN );
663  L1desc[l1descInx].l3descInx = openStat->l3descInx;
664  L1desc[l1descInx].replStatus = openStat->replStatus;
665  }
666 
667  return l1descInx;
668 }
QueryHandle
Definition: miscUtil.h:81
RBUDP_SEND_RATE_KW
#define RBUDP_SEND_RATE_KW
Definition: rodsKeyWdDef.h:78
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
getValByKey
char * getValByKey(const keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:675
DataObjInp::objPath
char objPath[(1024+64)]
Definition: dataObjInpOut.h:66
L1desc
l1desc_t L1desc[1026]
Definition: irods_server_globals.cpp:29
RESC_NAME_KW
#define RESC_NAME_KW
Definition: rodsKeyWdDef.h:19
NULL
#define NULL
Definition: rodsDef.h:70
rsComm_t
Definition: rcConnect.h:145
fileChksum.h
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
l1desc::remoteZoneHost
rodsServerHost_t * remoteZoneHost
Definition: objDesc.hpp:59
rodsServerHost::localFlag
int localFlag
Definition: rodsConnect.h:68
irods::RESOURCE_TYPE_NATIVE
const std::string RESOURCE_TYPE_NATIVE("unixfilesystem")
DataOprInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:134
specCollDesc::inuseFlag
int inuseFlag
Definition: querySpecColl.h:11
modDataObjMeta.h
initDataObjInfoForRepl
int initDataObjInfoForRepl(dataObjInfo_t *destDataObjInfo, dataObjInfo_t *srcDataObjInfo, const char *_resc_name)
Definition: objDesc.cpp:544
freeCollHandle
int freeCollHandle(int handleInx)
Definition: objDesc.cpp:608
isL1descInuse
int isL1descInuse()
Definition: objDesc.cpp:56
RBUDP_TRANSFER_KW
#define RBUDP_TRANSFER_KW
Definition: rodsKeyWdDef.h:76
irods_stacktrace.hpp
RuleExecInfo::status
int status
Definition: irods_re_structs.hpp:19
PASS
#define PASS(prev_error_)
Definition: irods_error.hpp:118
resc_mgr
irods::resource_manager resc_mgr
Definition: irods_resource_manager.cpp:31
l1desc::dataSize
rodsLong_t dataSize
Definition: objDesc.hpp:46
collHandle_t
Definition: miscUtil.h:97
DataObjInp::dataSize
rodsLong_t dataSize
Definition: dataObjInpOut.h:70
NO_SAVE_REI
#define NO_SAVE_REI
Definition: rodsDef.h:103
CollHandle
std::vector< collHandle_t > CollHandle
Definition: irods_server_globals.cpp:31
DataOprInp::srcL3descInx
int srcL3descInx
Definition: dataObjInpOut.h:125
allocSpecCollDesc
int allocSpecCollDesc()
Definition: objDesc.cpp:74
DataObjInfo::dataType
char dataType[64]
Definition: objInfo.h:133
specCollDesc
Definition: querySpecColl.h:9
rcMisc.h
irods::is_hier_live
error is_hier_live(const std::string &)
Definition: irods_resource_backport.cpp:234
freeDataObjInfo
int freeDataObjInfo(dataObjInfo_t *dataObjInfo)
Definition: rcMisc.cpp:544
l1desc::remoteL1descInx
int remoteL1descInx
Definition: objDesc.hpp:52
DataObjInfo::rescId
rodsLong_t rescId
Definition: objInfo.h:164
DataOprInp::numThreads
int numThreads
Definition: dataObjInpOut.h:124
PUT_OPR
#define PUT_OPR
Definition: dataObjInpOut.h:167
l1desc::dataObjInfo
dataObjInfo_t * dataObjInfo
Definition: objDesc.hpp:42
DataObjInfo::rescHier
char rescHier[(1024+64)]
Definition: objInfo.h:132
LOCAL_HOST
#define LOCAL_HOST
Definition: rodsConnect.h:44
QueryHandle::getHierForId
funcPtr getHierForId
Definition: miscUtil.h:86
DataObjInfo::condInput
keyValPair_t condInput
Definition: objInfo.h:161
irods_resource_backport.hpp
l1desc::oprType
int oprType
Definition: objDesc.hpp:37
STREAMING_KW
#define STREAMING_KW
Definition: rodsKeyWdDef.h:47
irods::get_resc_type_for_hier_string
error get_resc_type_for_hier_string(const std::string &, std::string &)
Definition: irods_resource_backport.cpp:677
l1desc::l3descInx
int l3descInx
Definition: objDesc.hpp:35
PASSMSG
#define PASSMSG(message_, prev_error_)
Definition: irods_error.hpp:119
l1desc::chksumFlag
int chksumFlag
Definition: objDesc.hpp:49
rcGlobalExtern.h
DataObjInfo::filePath
char filePath[(1024+64)]
Definition: objInfo.h:137
SAME_HOST_COPY_OPR
#define SAME_HOST_COPY_OPR
Definition: dataObjInpOut.h:169
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
NO_THREADING
#define NO_THREADING
Definition: rodsDef.h:100
DataObjInfo::dataId
rodsLong_t dataId
Definition: objInfo.h:143
closeAllL1desc
int closeAllL1desc(rsComm_t *rsComm)
Definition: objDesc.cpp:108
GET_OPR
#define GET_OPR
Definition: dataObjInpOut.h:168
OpenStat::dataType
char dataType[64]
Definition: dataObjOpenAndStat.h:10
l1desc::openType
int openType
Definition: objDesc.hpp:38
DATA_TYPE_KW
#define DATA_TYPE_KW
Definition: rodsKeyWdDef.h:23
clearDataObjInp
void clearDataObjInp(void *)
Definition: rcMisc.cpp:1475
SYS_OUT_OF_FILE_DESC
@ SYS_OUT_OF_FILE_DESC
Definition: rodsErrorTable.h:86
irods::get_resc_properties_as_kvp
error get_resc_properties_as_kvp(const std::string &, keyValPair_t *)
Definition: irods_resource_backport.cpp:500
initReiWithDataObjInp
int initReiWithDataObjInp(ruleExecInfo_t *rei, rsComm_t *rsComm, dataObjInp_t *dataObjIn)
Definition: irods_re_structs.cpp:164
allocCollHandle
int allocCollHandle()
Definition: objDesc.cpp:585
REG_CHKSUM_KW
#define REG_CHKSUM_KW
Definition: rodsKeyWdDef.h:15
OpenStat::replStatus
int replStatus
Definition: dataObjOpenAndStat.h:13
RuleExecInfo::condInputData
keyValPair_t * condInputData
Definition: irods_re_structs.hpp:34
rsGlobalExtern.hpp
NO_PARA_OP_KW
#define NO_PARA_OP_KW
Definition: rodsKeyWdDef.h:54
initDataOprInp
int initDataOprInp(dataOprInp_t *dataOprInp, int l1descInx, int oprType)
Definition: objDesc.cpp:453
RESC_HIER_STR_KW
#define RESC_HIER_STR_KW
Definition: rodsKeyWdDef.h:225
l1desc::inuseFlag
int inuseFlag
Definition: objDesc.hpp:36
objDesc.hpp
freeAllDataObjInfo
int freeAllDataObjInfo(dataObjInfo_t *dataObjInfoHead)
Definition: rcMisc.cpp:561
get_hier_from_leaf_id.h
l1desc::dataObjInpReplFlag
int dataObjInpReplFlag
Definition: objDesc.hpp:40
fillL1desc
int fillL1desc(int l1descInx, dataObjInp_t *dataObjInp, dataObjInfo_t *dataObjInfo, int replStatus, rodsLong_t dataSize)
Definition: objDesc.cpp:154
NUM_SPEC_COLL_DESC
#define NUM_SPEC_COLL_DESC
Definition: querySpecColl.h:16
OPEN_TYPE_KW
#define OPEN_TYPE_KW
Definition: rodsKeyWdDef.h:95
rodsDef.h
VERY_VERBOSE_KW
#define VERY_VERBOSE_KW
Definition: rodsKeyWdDef.h:77
l3Close
int l3Close(rsComm_t *rsComm, int l1descInx)
Definition: rsDataObjClose.cpp:723
FD_FREE
#define FD_FREE
Definition: fileOpr.hpp:20
DataObjInp
Definition: dataObjInpOut.h:65
rsDataObjClose.hpp
genQuery.h
l1desc::dataObjInp
dataObjInp_t * dataObjInp
Definition: objDesc.hpp:41
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
COPY_TO_REM_OPR
#define COPY_TO_REM_OPR
Definition: dataObjInpOut.h:171
RBUDP_PACK_SIZE_KW
#define RBUDP_PACK_SIZE_KW
Definition: rodsKeyWdDef.h:79
COPY_TO_LOCAL_OPR
#define COPY_TO_LOCAL_OPR
Definition: dataObjInpOut.h:170
REG_CHKSUM
#define REG_CHKSUM
Definition: objDesc.hpp:29
RS_COMM
@ RS_COMM
Definition: miscUtil.h:77
DataObjInfo::replNum
int replNum
Definition: objInfo.h:140
initDataObjInfoWithInp
int initDataObjInfoWithInp(dataObjInfo_t *dataObjInfo, dataObjInp_t *dataObjInp)
Definition: objDesc.cpp:217
rsGetHierFromLeafId
int rsGetHierFromLeafId(rsComm_t *, get_hier_inp_t *, get_hier_out_t **)
Definition: rsGetHierFromLeafId.cpp:8
initSpecCollDesc
int initSpecCollDesc()
Definition: objDesc.cpp:68
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
l1desc::srcL1descInx
int srcL1descInx
Definition: objDesc.hpp:50
getL1descIndexByDataObjInfo
int getL1descIndexByDataObjInfo(const dataObjInfo_t *dataObjInfo)
Definition: objDesc.cpp:262
collection.hpp
irods::log
void log(const error &)
Definition: irods_log.cpp:13
REMOTE_ZONE_OPR
#define REMOTE_ZONE_OPR
Definition: dataObjInpOut.h:189
OpenStat
Definition: dataObjOpenAndStat.h:8
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
dataObjClose.h
freeSpecCollDesc
int freeSpecCollDesc(int specCollInx)
Definition: objDesc.cpp:91
irods::error
Definition: irods_error.hpp:23
allocL1desc
int allocL1desc()
Definition: objDesc.cpp:39
NUM_L1_DESC
#define NUM_L1_DESC
Definition: objDesc.hpp:24
DataObjInp::createMode
int createMode
Definition: dataObjInpOut.h:67
QueryHandle::genQuery
funcPtr genQuery
Definition: miscUtil.h:85
FD_INUSE
#define FD_INUSE
Definition: fileOpr.hpp:21
FileDesc
fileDesc_t FileDesc[1026]
Definition: irods_server_globals.cpp:28
freeL1desc
int freeL1desc(int l1descInx)
Definition: objDesc.cpp:124
IN_PDMO_KW
#define IN_PDMO_KW
Definition: rodsKeyWdDef.h:227
irods_hierarchy_parser.hpp
irods::resource_manager::hier_to_leaf_id
error hier_to_leaf_id(const std::string &, rodsLong_t &)
Definition: irods_resource_manager.cpp:1082
allocAndSetL1descForZoneOpr
int allocAndSetL1descForZoneOpr(int remoteL1descInx, dataObjInp_t *dataObjInp, rodsServerHost_t *remoteZoneHost, openStat_t *openStat)
Definition: objDesc.cpp:638
rodsServerHost
Definition: rodsConnect.h:62
DataObjInfo::rescName
char rescName[64]
Definition: objInfo.h:131
DataOprInp::offset
rodsLong_t offset
Definition: dataObjInpOut.h:132
DataObjInp::oprType
int oprType
Definition: dataObjInpOut.h:72
l1desc::bytesWritten
rodsLong_t bytesWritten
Definition: objDesc.hpp:45
fileDesc_t::fd
int fd
Definition: fileOpr.hpp:32
VERIFY_CHKSUM_KW
#define VERIFY_CHKSUM_KW
Definition: rodsKeyWdDef.h:16
RuleExecInfo
Definition: irods_re_structs.hpp:18
MIN_SZ_FOR_PARA_TRAN
#define MIN_SZ_FOR_PARA_TRAN
Definition: rodsDef.h:89
rsInitQueryHandle
int rsInitQueryHandle(queryHandle_t *queryHandle, rsComm_t *rsComm)
Definition: objDesc.cpp:623
irods_re_structs.hpp
DataOprInp
Definition: dataObjInpOut.h:122
KeyValPair::len
int len
Definition: objInfo.h:121
DataOprInp::destL3descInx
int destL3descInx
Definition: dataObjInpOut.h:126
collHandle_t::inuseFlag
int inuseFlag
Definition: miscUtil.h:99
isLocalHost
int isLocalHost(const char *hostAddr)
Definition: rodsConnect.cpp:955
rsQuerySpecColl.hpp
applyRule
int applyRule(char *inAction, msParamArray_t *inMsParamArray, ruleExecInfo_t *rei, int reiSaveFlag)
Definition: irods_re_structs.cpp:65
replDataObjInp
int replDataObjInp(dataObjInp_t *srcDataObjInp, dataObjInp_t *destDataObjInp)
Definition: rcMisc.cpp:765
QueryHandle::conn
void * conn
Definition: miscUtil.h:82
resource.hpp
l1desc::replStatus
int replStatus
Definition: objDesc.hpp:48
clearCollHandle
int clearCollHandle(collHandle_t *collHandle, int freeSpecColl)
Definition: miscUtil.cpp:1359
OpenStat::l3descInx
int l3descInx
Definition: dataObjOpenAndStat.h:12
DataObjInfo::objPath
char objPath[(1024+64)]
Definition: objInfo.h:130
SHORT_STR_LEN
#define SHORT_STR_LEN
Definition: rodsDef.h:67
QueryHandle::connType
connType_t connType
Definition: miscUtil.h:83
l1desc
Definition: objDesc.hpp:34
rsGenQuery.hpp
DataOprInp::oprType
int oprType
Definition: dataObjInpOut.h:123
rsGetHierFromLeafId.hpp
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
dataObjOpr.hpp
DataObjInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:74
QueryHandle::querySpecColl
funcPtr querySpecColl
Definition: miscUtil.h:84
irods::get_loc_for_hier_string
error get_loc_for_hier_string(const std::string &_hier, std::string &_loc)
Definition: irods_resource_backport.cpp:633
SYS_FILE_DESC_OUT_OF_RANGE
@ SYS_FILE_DESC_OUT_OF_RANGE
Definition: rodsErrorTable.h:87
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
OpenStat::dataSize
rodsLong_t dataSize
Definition: dataObjOpenAndStat.h:9
initL1desc
int initL1desc()
Definition: objDesc.cpp:33
KeyValPair
Definition: objInfo.h:120
rsQuerySpecColl
int rsQuerySpecColl(rsComm_t *rsComm, dataObjInp_t *querySpecCollInp, genQueryOut_t **genQueryOut)
Definition: rsQuerySpecColl.cpp:37
DataObjInp::offset
rodsLong_t offset
Definition: dataObjInpOut.h:69
clearKeyVal
int clearKeyVal(keyValPair_t *condInput)
Definition: rcMisc.cpp:1047
getNumThreads
int getNumThreads(rsComm_t *rsComm, rodsLong_t dataSize, int inpNumThr, keyValPair_t *condInput, char *destRescHier, char *srcRescHier, int oprType)
Definition: objDesc.cpp:279
irods::error::ok
bool ok()
Definition: irods_error.cpp:258
FILE_PATH_KW
#define FILE_PATH_KW
Definition: rodsKeyWdDef.h:28
convL3descInx
int convL3descInx(int l3descInx)
Definition: objDesc.cpp:571
type
int type
Definition: filesystem.cpp:103
DataObjInfo
Definition: objInfo.h:129
DataObjInfo::dataSize
rodsLong_t dataSize
Definition: objInfo.h:134
OpenStat::dataMode
char dataMode[32]
Definition: dataObjOpenAndStat.h:11
rsGenQuery
int rsGenQuery(rsComm_t *rsComm, genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut)
Definition: rsGenQuery.cpp:604
DataOprInp::dataSize
rodsLong_t dataSize
Definition: dataObjInpOut.h:133
DataObjInp::numThreads
int numThreads
Definition: dataObjInpOut.h:71
DataObjInfo::dataMode
char dataMode[32]
Definition: objInfo.h:148
SpecCollDesc
specCollDesc_t SpecCollDesc[100]
Definition: irods_server_globals.cpp:30
replKeyVal
int replKeyVal(const keyValPair_t *srcCondInput, keyValPair_t *destCondInput)
Definition: rcMisc.cpp:739
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
VERIFY_CHKSUM
#define VERIFY_CHKSUM
Definition: objDesc.hpp:30
objMetaOpr.hpp
USER__NULL_INPUT_ERR
@ USER__NULL_INPUT_ERR
Definition: rodsErrorTable.h:247