IOR
aiori-POSIX.c
Go to the documentation of this file.
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4 /******************************************************************************\
5 * *
6 * Copyright (c) 2003, The Regents of the University of California *
7 * See the file COPYRIGHT for a complete copyright notice and license. *
8 * *
9 ********************************************************************************
10 *
11 * Implement of abstract I/O interface for POSIX.
12 *
13 \******************************************************************************/
14 
15 #ifdef HAVE_CONFIG_H
16 # include "config.h"
17 #endif
18 
19 #include <stdio.h>
20 #include <stdlib.h>
21 
22 #ifdef __linux__
23 # include <sys/ioctl.h> /* necessary for: */
24 # define __USE_GNU /* O_DIRECT and */
25 # include <fcntl.h> /* IO operations */
26 # undef __USE_GNU
27 #endif /* __linux__ */
28 
29 #include <errno.h>
30 #include <fcntl.h> /* IO operations */
31 #include <sys/stat.h>
32 #include <assert.h>
33 
34 
35 #ifdef HAVE_LINUX_LUSTRE_LUSTRE_USER_H
36 # include <linux/lustre/lustre_user.h>
37 #elif defined(HAVE_LUSTRE_LUSTRE_USER_H)
38 # include <lustre/lustre_user.h>
39 #endif
40 #ifdef HAVE_GPFS_H
41 # include <gpfs.h>
42 #endif
43 #ifdef HAVE_GPFS_FCNTL_H
44 # include <gpfs_fcntl.h>
45 #endif
46 
47 #ifdef HAVE_BEEGFS_BEEGFS_H
48 #include <beegfs/beegfs.h>
49 #include <dirent.h>
50 #include <libgen.h>
51 #endif
52 
53 #include "ior.h"
54 #include "aiori.h"
55 #include "iordef.h"
56 #include "utilities.h"
57 
58 #ifndef open64 /* necessary for TRU64 -- */
59 # define open64 open /* unlikely, but may pose */
60 #endif /* not open64 */ /* conflicting prototypes */
61 
62 #ifndef lseek64 /* necessary for TRU64 -- */
63 # define lseek64 lseek /* unlikely, but may pose */
64 #endif /* not lseek64 */ /* conflicting prototypes */
65 
66 #ifndef O_BINARY /* Required on Windows */
67 # define O_BINARY 0
68 #endif
69 
70 /**************************** P R O T O T Y P E S *****************************/
71 static IOR_offset_t POSIX_Xfer(int, void *, IOR_size_t *,
73 static void POSIX_Fsync(void *, IOR_param_t *);
74 static void POSIX_Sync(IOR_param_t * );
75 
76 /************************** O P T I O N S *****************************/
77 typedef struct{
78  /* in case of a change, please update depending MMAP module too */
79  int direct_io;
81 
82 
83 option_help * POSIX_options(void ** init_backend_options, void * init_values){
84  posix_options_t * o = malloc(sizeof(posix_options_t));
85 
86  if (init_values != NULL){
87  memcpy(o, init_values, sizeof(posix_options_t));
88  }else{
89  o->direct_io = 0;
90  }
91 
92  *init_backend_options = o;
93 
94  option_help h [] = {
95  {0, "posix.odirect", "Direct I/O Mode", OPTION_FLAG, 'd', & o->direct_io},
97  };
98  option_help * help = malloc(sizeof(h));
99  memcpy(help, h, sizeof(h));
100  return help;
101 }
102 
103 
104 /************************** D E C L A R A T I O N S ***************************/
105 
106 
108  .name = "POSIX",
109  .name_legacy = NULL,
110  .create = POSIX_Create,
111  .mknod = POSIX_Mknod,
112  .open = POSIX_Open,
113  .xfer = POSIX_Xfer,
114  .close = POSIX_Close,
115  .delete = POSIX_Delete,
116  .get_version = aiori_get_version,
117  .fsync = POSIX_Fsync,
118  .get_file_size = POSIX_GetFileSize,
119  .statfs = aiori_posix_statfs,
120  .mkdir = aiori_posix_mkdir,
121  .rmdir = aiori_posix_rmdir,
122  .access = aiori_posix_access,
123  .stat = aiori_posix_stat,
124  .get_options = POSIX_options,
125  .enable_mdtest = true,
126  .sync = POSIX_Sync
127 };
128 
129 /***************************** F U N C T I O N S ******************************/
130 
131 
132 #ifdef HAVE_GPFS_FCNTL_H
133 void gpfs_free_all_locks(int fd)
134 {
135  int rc;
136  struct {
137  gpfsFcntlHeader_t header;
138  gpfsFreeRange_t release;
139  } release_all;
140  release_all.header.totalLength = sizeof(release_all);
141  release_all.header.fcntlVersion = GPFS_FCNTL_CURRENT_VERSION;
142  release_all.header.fcntlReserved = 0;
143 
144  release_all.release.structLen = sizeof(release_all.release);
145  release_all.release.structType = GPFS_FREE_RANGE;
146  release_all.release.start = 0;
147  release_all.release.length = 0;
148 
149  rc = gpfs_fcntl(fd, &release_all);
150  if (verbose >= VERBOSE_0 && rc != 0) {
151  EWARNF("gpfs_fcntl(%d, ...) release all locks hint failed.", fd);
152  }
153 }
154 void gpfs_access_start(int fd, IOR_offset_t length, IOR_param_t *param, int access)
155 {
156  int rc;
157  struct {
158  gpfsFcntlHeader_t header;
159  gpfsAccessRange_t access;
160  } take_locks;
161 
162  take_locks.header.totalLength = sizeof(take_locks);
163  take_locks.header.fcntlVersion = GPFS_FCNTL_CURRENT_VERSION;
164  take_locks.header.fcntlReserved = 0;
165 
166  take_locks.access.structLen = sizeof(take_locks.access);
167  take_locks.access.structType = GPFS_ACCESS_RANGE;
168  take_locks.access.start = param->offset;
169  take_locks.access.length = length;
170  take_locks.access.isWrite = (access == WRITE);
171 
172  rc = gpfs_fcntl(fd, &take_locks);
173  if (verbose >= VERBOSE_2 && rc != 0) {
174  EWARNF("gpfs_fcntl(%d, ...) access range hint failed.", fd);
175  }
176 }
177 
178 void gpfs_access_end(int fd, IOR_offset_t length, IOR_param_t *param, int access)
179 {
180  int rc;
181  struct {
182  gpfsFcntlHeader_t header;
183  gpfsFreeRange_t free;
184  } free_locks;
185 
186 
187  free_locks.header.totalLength = sizeof(free_locks);
188  free_locks.header.fcntlVersion = GPFS_FCNTL_CURRENT_VERSION;
189  free_locks.header.fcntlReserved = 0;
190 
191  free_locks.free.structLen = sizeof(free_locks.free);
192  free_locks.free.structType = GPFS_FREE_RANGE;
193  free_locks.free.start = param->offset;
194  free_locks.free.length = length;
195 
196  rc = gpfs_fcntl(fd, &free_locks);
197  if (verbose >= VERBOSE_2 && rc != 0) {
198  EWARNF("gpfs_fcntl(%d, ...) free range hint failed.", fd);
199  }
200 }
201 
202 #endif
203 
204 #ifdef HAVE_BEEGFS_BEEGFS_H
205 
206 int mkTempInDir(char* dirPath)
207 {
208  unsigned long len = strlen(dirPath) + 8;
209  char* tmpfilename = (char*)malloc(sizeof (char)*len+1);
210  snprintf(tmpfilename, len, "%s/XXXXXX", dirPath);
211 
212  int fd = mkstemp(tmpfilename);
213  unlink(tmpfilename);
214  free(tmpfilename);
215 
216  return fd;
217 }
218 
219 bool beegfs_getStriping(char* dirPath, u_int16_t* numTargetsOut, unsigned* chunkSizeOut)
220 {
221  bool retVal = false;
222 
223  int fd = mkTempInDir(dirPath);
224  if (fd) {
225  unsigned stripePattern = 0;
226  retVal = beegfs_getStripeInfo(fd, &stripePattern, chunkSizeOut, numTargetsOut);
227  close(fd);
228  }
229 
230  return retVal;
231 }
232 
233 bool beegfs_isOptionSet(int opt) {
234  return opt != -1;
235 }
236 
237 bool beegfs_compatibleFileExists(char* filepath, int numTargets, int chunkSize)
238 {
239  int fd = open(filepath, O_RDWR);
240 
241  if (fd == -1)
242  return false;
243 
244  unsigned read_stripePattern = 0;
245  u_int16_t read_numTargets = 0;
246  int read_chunkSize = 0;
247 
248  bool retVal = beegfs_getStripeInfo(fd, &read_stripePattern, &read_chunkSize, &read_numTargets);
249 
250  close(fd);
251 
252  return retVal && read_numTargets == numTargets && read_chunkSize == chunkSize;
253 }
254 
255 /*
256  * Create a file on a BeeGFS file system with striping parameters
257  */
258 bool beegfs_createFilePath(char* filepath, mode_t mode, int numTargets, int chunkSize)
259 {
260  bool retVal = false;
261  char* dirTmp = strdup(filepath);
262  char* dir = dirname(dirTmp);
263  DIR* parentDirS = opendir(dir);
264  if (!parentDirS) {
265  ERRF("Failed to get directory: %s", dir);
266  }
267  else
268  {
269  int parentDirFd = dirfd(parentDirS);
270  if (parentDirFd < 0)
271  {
272  ERRF("Failed to get directory descriptor: %s", dir);
273  }
274  else
275  {
276  bool isBeegfs = beegfs_testIsBeeGFS(parentDirFd);
277  if (!isBeegfs)
278  {
279  WARN("Not a BeeGFS file system");
280  }
281  else
282  {
283  if ( !beegfs_isOptionSet(numTargets)
284  || !beegfs_isOptionSet(chunkSize)) {
285  u_int16_t defaultNumTargets = 0;
286  unsigned defaultChunkSize = 0;
287  bool haveDefaults = beegfs_getStriping(dir,
288  &defaultNumTargets,
289  &defaultChunkSize);
290  if (!haveDefaults)
291  ERR("Failed to get default BeeGFS striping values");
292 
293  numTargets = beegfs_isOptionSet(numTargets) ?
294  numTargets : defaultNumTargets;
295  chunkSize = beegfs_isOptionSet(chunkSize) ?
296  chunkSize : defaultChunkSize;
297  }
298 
299  char* filenameTmp = strdup(filepath);
300  char* filename = basename(filepath);
301  bool isFileCreated = beegfs_compatibleFileExists(filepath, numTargets, chunkSize)
302  || beegfs_createFile(parentDirFd, filename,
303  mode, numTargets, chunkSize);
304  if (!isFileCreated)
305  ERR("Could not create file");
306  retVal = true;
307  free(filenameTmp);
308  }
309  }
310  closedir(parentDirS);
311  }
312  free(dirTmp);
313  return retVal;
314 }
315 #endif /* HAVE_BEEGFS_BEEGFS_H */
316 
317 
318 /*
319  * Creat and open a file through the POSIX interface.
320  */
321 void *POSIX_Create(char *testFileName, IOR_param_t * param)
322 {
323  int fd_oflag = O_BINARY;
324  int mode = 0664;
325  int *fd;
326 
327  fd = (int *)malloc(sizeof(int));
328  if (fd == NULL)
329  ERR("Unable to malloc file descriptor");
331  if (o->direct_io == TRUE){
332  set_o_direct_flag(&fd_oflag);
333  }
334 
335  if(param->dryRun)
336  return 0;
337 
338 #ifdef HAVE_LUSTRE_LUSTRE_USER_H
339 /* Add a #define for FASYNC if not available, as it forms part of
340  * the Lustre O_LOV_DELAY_CREATE definition. */
341 #ifndef FASYNC
342 #define FASYNC 00020000 /* fcntl, for BSD compatibility */
343 #endif
344 
345  if (param->lustre_set_striping) {
346  /* In the single-shared-file case, task 0 has to creat the
347  file with the Lustre striping options before any other processes
348  open the file */
349  if (!param->filePerProc && rank != 0) {
350  MPI_CHECK(MPI_Barrier(testComm), "barrier error");
351  fd_oflag |= O_RDWR;
352  *fd = open64(testFileName, fd_oflag, mode);
353  if (*fd < 0)
354  ERRF("open64(\"%s\", %d, %#o) failed",
355  testFileName, fd_oflag, mode);
356  } else {
357  struct lov_user_md opts = { 0 };
358 
359  /* Setup Lustre IOCTL striping pattern structure */
360  opts.lmm_magic = LOV_USER_MAGIC;
361  opts.lmm_stripe_size = param->lustre_stripe_size;
362  opts.lmm_stripe_offset = param->lustre_start_ost;
363  opts.lmm_stripe_count = param->lustre_stripe_count;
364 
365  /* File needs to be opened O_EXCL because we cannot set
366  * Lustre striping information on a pre-existing file.*/
367 
368  fd_oflag |=
369  O_CREAT | O_EXCL | O_RDWR | O_LOV_DELAY_CREATE;
370  *fd = open64(testFileName, fd_oflag, mode);
371  if (*fd < 0) {
372  fprintf(stdout, "\nUnable to open '%s': %s\n",
373  testFileName, strerror(errno));
374  MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1),
375  "MPI_Abort() error");
376  } else if (ioctl(*fd, LL_IOC_LOV_SETSTRIPE, &opts)) {
377  char *errmsg = "stripe already set";
378  if (errno != EEXIST && errno != EALREADY)
379  errmsg = strerror(errno);
380  fprintf(stdout,
381  "\nError on ioctl for '%s' (%d): %s\n",
382  testFileName, *fd, errmsg);
383  MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1),
384  "MPI_Abort() error");
385  }
386  if (!param->filePerProc)
387  MPI_CHECK(MPI_Barrier(testComm),
388  "barrier error");
389  }
390  } else {
391 #endif /* HAVE_LUSTRE_LUSTRE_USER_H */
392 
393  fd_oflag |= O_CREAT | O_RDWR;
394 
395 #ifdef HAVE_BEEGFS_BEEGFS_H
396  if (beegfs_isOptionSet(param->beegfs_chunkSize)
397  || beegfs_isOptionSet(param->beegfs_numTargets)) {
398  bool result = beegfs_createFilePath(testFileName,
399  mode,
400  param->beegfs_numTargets,
401  param->beegfs_chunkSize);
402  if (result) {
403  fd_oflag &= ~O_CREAT;
404  } else {
405  EWARN("BeeGFS tuning failed");
406  }
407  }
408 #endif /* HAVE_BEEGFS_BEEGFS_H */
409 
410  *fd = open64(testFileName, fd_oflag, mode);
411  if (*fd < 0)
412  ERRF("open64(\"%s\", %d, %#o) failed",
413  testFileName, fd_oflag, mode);
414 
415 #ifdef HAVE_LUSTRE_LUSTRE_USER_H
416  }
417 
418  if (param->lustre_ignore_locks) {
419  int lustre_ioctl_flags = LL_FILE_IGNORE_LOCK;
420  if (ioctl(*fd, LL_IOC_SETFLAGS, &lustre_ioctl_flags) == -1)
421  ERRF("ioctl(%d, LL_IOC_SETFLAGS, ...) failed", *fd);
422  }
423 #endif /* HAVE_LUSTRE_LUSTRE_USER_H */
424 
425 #ifdef HAVE_GPFS_FCNTL_H
426  /* in the single shared file case, immediately release all locks, with
427  * the intent that we can avoid some byte range lock revocation:
428  * everyone will be writing/reading from individual regions */
429  if (param->gpfs_release_token ) {
430  gpfs_free_all_locks(*fd);
431  }
432 #endif
433  return ((void *)fd);
434 }
435 
436 /*
437  * Creat a file through mknod interface.
438  */
439 int POSIX_Mknod(char *testFileName)
440 {
441  int ret;
442 
443  ret = mknod(testFileName, S_IFREG | S_IRUSR, 0);
444  if (ret < 0)
445  ERR("mknod failed");
446 
447  return ret;
448 }
449 
450 /*
451  * Open a file through the POSIX interface.
452  */
453 void *POSIX_Open(char *testFileName, IOR_param_t * param)
454 {
455  int fd_oflag = O_BINARY;
456  int *fd;
457 
458  fd = (int *)malloc(sizeof(int));
459  if (fd == NULL)
460  ERR("Unable to malloc file descriptor");
461 
463  if (o->direct_io == TRUE)
464  set_o_direct_flag(&fd_oflag);
465 
466  fd_oflag |= O_RDWR;
467 
468  if(param->dryRun)
469  return 0;
470 
471  *fd = open64(testFileName, fd_oflag);
472  if (*fd < 0)
473  ERRF("open64(\"%s\", %d) failed", testFileName, fd_oflag);
474 
475 #ifdef HAVE_LUSTRE_LUSTRE_USER_H
476  if (param->lustre_ignore_locks) {
477  int lustre_ioctl_flags = LL_FILE_IGNORE_LOCK;
478  if (verbose >= VERBOSE_1) {
479  fprintf(stdout,
480  "** Disabling lustre range locking **\n");
481  }
482  if (ioctl(*fd, LL_IOC_SETFLAGS, &lustre_ioctl_flags) == -1)
483  ERRF("ioctl(%d, LL_IOC_SETFLAGS, ...) failed", *fd);
484  }
485 #endif /* HAVE_LUSTRE_LUSTRE_USER_H */
486 
487 #ifdef HAVE_GPFS_FCNTL_H
488  if(param->gpfs_release_token) {
489  gpfs_free_all_locks(*fd);
490  }
491 #endif
492  return ((void *)fd);
493 }
494 
495 /*
496  * Write or read access to file using the POSIX interface.
497  */
498 static IOR_offset_t POSIX_Xfer(int access, void *file, IOR_size_t * buffer,
499  IOR_offset_t length, IOR_param_t * param)
500 {
501  int xferRetries = 0;
502  long long remaining = (long long)length;
503  char *ptr = (char *)buffer;
504  long long rc;
505  int fd;
506 
507  if(param->dryRun)
508  return length;
509 
510  fd = *(int *)file;
511 
512 #ifdef HAVE_GPFS_FCNTL_H
513  if (param->gpfs_hint_access) {
514  gpfs_access_start(fd, length, param, access);
515  }
516 #endif
517 
518 
519  /* seek to offset */
520  if (lseek64(fd, param->offset, SEEK_SET) == -1)
521  ERRF("lseek64(%d, %lld, SEEK_SET) failed", fd, param->offset);
522 
523  while (remaining > 0) {
524  /* write/read file */
525  if (access == WRITE) { /* WRITE */
526  if (verbose >= VERBOSE_4) {
527  fprintf(stdout,
528  "task %d writing to offset %lld\n",
529  rank,
530  param->offset + length - remaining);
531  }
532  rc = write(fd, ptr, remaining);
533  if (rc == -1)
534  ERRF("write(%d, %p, %lld) failed",
535  fd, (void*)ptr, remaining);
536  if (param->fsyncPerWrite == TRUE)
537  POSIX_Fsync(&fd, param);
538  } else { /* READ or CHECK */
539  if (verbose >= VERBOSE_4) {
540  fprintf(stdout,
541  "task %d reading from offset %lld\n",
542  rank,
543  param->offset + length - remaining);
544  }
545  rc = read(fd, ptr, remaining);
546  if (rc == 0)
547  ERRF("read(%d, %p, %lld) returned EOF prematurely",
548  fd, (void*)ptr, remaining);
549  if (rc == -1)
550  ERRF("read(%d, %p, %lld) failed",
551  fd, (void*)ptr, remaining);
552  }
553  if (rc < remaining) {
554  fprintf(stdout,
555  "WARNING: Task %d, partial %s, %lld of %lld bytes at offset %lld\n",
556  rank,
557  access == WRITE ? "write()" : "read()",
558  rc, remaining,
559  param->offset + length - remaining);
560  if (param->singleXferAttempt == TRUE)
561  MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1),
562  "barrier error");
563  if (xferRetries > MAX_RETRY)
564  ERR("too many retries -- aborting");
565  }
566  assert(rc >= 0);
567  assert(rc <= remaining);
568  remaining -= rc;
569  ptr += rc;
570  xferRetries++;
571  }
572 #ifdef HAVE_GPFS_FCNTL_H
573  if (param->gpfs_hint_access) {
574  gpfs_access_end(fd, length, param, access);
575  }
576 #endif
577  return (length);
578 }
579 
580 /*
581  * Perform fsync().
582  */
583 static void POSIX_Fsync(void *fd, IOR_param_t * param)
584 {
585  if (fsync(*(int *)fd) != 0)
586  EWARNF("fsync(%d) failed", *(int *)fd);
587 }
588 
589 
590 static void POSIX_Sync(IOR_param_t * param)
591 {
592  int ret = system("sync");
593  if (ret != 0){
594  FAIL("Error executing the sync command, ensure it exists.");
595  }
596 }
597 
598 
599 /*
600  * Close a file through the POSIX interface.
601  */
602 void POSIX_Close(void *fd, IOR_param_t * param)
603 {
604  if(param->dryRun)
605  return;
606  if (close(*(int *)fd) != 0)
607  ERRF("close(%d) failed", *(int *)fd);
608  free(fd);
609 }
610 
611 /*
612  * Delete a file through the POSIX interface.
613  */
614 void POSIX_Delete(char *testFileName, IOR_param_t * param)
615 {
616  if(param->dryRun)
617  return;
618  if (unlink(testFileName) != 0){
619  EWARNF("[RANK %03d]: unlink() of file \"%s\" failed\n",
620  rank, testFileName);
621  }
622 }
623 
624 /*
625  * Use POSIX stat() to return aggregate file size.
626  */
628  char *testFileName)
629 {
630  if(test->dryRun)
631  return 0;
632  struct stat stat_buf;
633  IOR_offset_t aggFileSizeFromStat, tmpMin, tmpMax, tmpSum;
634 
635  if (stat(testFileName, &stat_buf) != 0) {
636  ERRF("stat(\"%s\", ...) failed", testFileName);
637  }
638  aggFileSizeFromStat = stat_buf.st_size;
639 
640  if (test->filePerProc == TRUE) {
641  MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpSum, 1,
642  MPI_LONG_LONG_INT, MPI_SUM, testComm),
643  "cannot total data moved");
644  aggFileSizeFromStat = tmpSum;
645  } else {
646  MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpMin, 1,
647  MPI_LONG_LONG_INT, MPI_MIN, testComm),
648  "cannot total data moved");
649  MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpMax, 1,
650  MPI_LONG_LONG_INT, MPI_MAX, testComm),
651  "cannot total data moved");
652  if (tmpMin != tmpMax) {
653  if (rank == 0) {
654  WARN("inconsistent file size by different tasks");
655  }
656  /* incorrect, but now consistent across tasks */
657  aggFileSizeFromStat = tmpMin;
658  }
659  }
660 
661  return (aggFileSizeFromStat);
662 }
static void POSIX_Fsync(void *, IOR_param_t *)
Definition: aiori-POSIX.c:583
int lustre_stripe_count
Definition: ior.h:195
int lustre_stripe_size
Definition: ior.h:196
void set_o_direct_flag(int *fd)
Definition: utilities.c:160
#define ERR(MSG)
Definition: iordef.h:184
#define LAST_OPTION
Definition: option.h:37
#define VERBOSE_0
Definition: iordef.h:101
int filePerProc
Definition: ior.h:111
void * POSIX_Open(char *testFileName, IOR_param_t *param)
Definition: aiori-POSIX.c:453
int POSIX_Mknod(char *testFileName)
Definition: aiori-POSIX.c:439
CURLcode rc
Definition: aiori-S3.c:121
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
Definition: aiori.c:185
int gpfs_release_token
Definition: ior.h:203
#define EWARNF(FORMAT,...)
Definition: iordef.h:156
ior_aiori_t posix_aiori
Definition: aiori-POSIX.c:107
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
Definition: aiori.c:180
int fsyncPerWrite
Definition: ior.h:162
int lustre_start_ost
Definition: ior.h:197
#define WRITE
Definition: iordef.h:95
#define EWARN(MSG)
Definition: iordef.h:169
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t *param)
Definition: aiori.c:155
void * backend_options
Definition: ior.h:158
void * POSIX_Create(char *testFileName, IOR_param_t *param)
Definition: aiori-POSIX.c:321
char * aiori_get_version()
Definition: aiori.c:200
#define O_BINARY
Definition: aiori-POSIX.c:67
MPI_Comm testComm
Definition: utilities.c:60
void POSIX_Delete(char *testFileName, IOR_param_t *param)
Definition: aiori-POSIX.c:614
option_help * POSIX_options(void **init_backend_options, void *init_values)
Definition: aiori-POSIX.c:83
#define MPI_CHECK(MPI_STATUS, MSG)
Definition: iordef.h:224
int dryRun
Definition: ior.h:98
IOR_offset_t POSIX_GetFileSize(IOR_param_t *test, MPI_Comm testComm, char *testFileName)
Definition: aiori-POSIX.c:627
int singleXferAttempt
Definition: ior.h:161
#define open64
Definition: aiori-POSIX.c:59
#define FAIL(...)
Definition: utilities.h:42
#define MAX_RETRY
Definition: iordef.h:110
static void POSIX_Sync(IOR_param_t *)
Definition: aiori-POSIX.c:590
static IOR_param_t param
Definition: mdtest.c:170
int beegfs_numTargets
Definition: ior.h:206
long long int IOR_size_t
Definition: iordef.h:123
#define WARN(MSG)
Definition: iordef.h:144
#define VERBOSE_2
Definition: iordef.h:103
int lustre_ignore_locks
Definition: ior.h:199
void POSIX_Close(void *fd, IOR_param_t *param)
Definition: aiori-POSIX.c:602
#define lseek64
Definition: aiori-POSIX.c:63
IOR_offset_t offset
Definition: ior.h:126
#define VERBOSE_4
Definition: iordef.h:105
int errno
int aiori_posix_stat(const char *path, struct stat *buf, IOR_param_t *param)
Definition: aiori.c:195
int aiori_posix_access(const char *path, int mode, IOR_param_t *param)
Definition: aiori.c:190
#define VERBOSE_1
Definition: iordef.h:102
int verbose
Definition: utilities.c:59
char * name
Definition: aiori.h:68
#define ERRF(FORMAT,...)
Definition: iordef.h:175
long long int IOR_offset_t
Definition: iordef.h:122
int rank
Definition: utilities.c:57
int gpfs_hint_access
Definition: ior.h:202
#define TRUE
Definition: iordef.h:75
int lustre_set_striping
Definition: ior.h:198
static struct cephfs_options o
Definition: aiori-CEPHFS.c:48
int beegfs_chunkSize
Definition: ior.h:207
static IOR_offset_t POSIX_Xfer(int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
Definition: aiori-POSIX.c:498
#define NULL
Definition: iordef.h:79