This source file includes following definitions.
- ADIOI_ZOIDFS_Fcntl
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 #include "ad_zoidfs.h"
   9 #include "adio_extern.h"
  10 #include "ad_zoidfs_common.h"
  11 
  12 void ADIOI_ZOIDFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
  13                        int *error_code)
  14 {
  15     int ret;
  16     zoidfs_attr_t attr;
  17     ADIOI_ZOIDFS_object *zoidfs_obj_ptr;
  18     static char myname[] = "ADIOI_ZOIDFS_FCNTL";
  19 
  20     zoidfs_obj_ptr = (ADIOI_ZOIDFS_object*)fd->fs_ptr;
  21 
  22     switch(flag) {
  23     case ADIO_FCNTL_GET_FSIZE:
  24         attr.mask = ZOIDFS_ATTR_SIZE;
  25         NO_STALE(ret, fd, zoidfs_obj_ptr,
  26                  zoidfs_getattr(zoidfs_obj_ptr, &attr, ZOIDFS_NO_OP_HINT));
  27         if ( !(attr.mask & ZOIDFS_ATTR_SIZE) || (ret != ZFS_OK ) ) {
  28             
  29             *error_code = MPIO_Err_create_code(MPI_SUCCESS,
  30                                                MPIR_ERR_RECOVERABLE,
  31                                                myname, __LINE__,
  32                                                ADIOI_ZOIDFS_error_convert(ret),
  33                                                "Error in zoidfs_getattr", 0);
  34             
  35         }
  36         else {
  37             *error_code = MPI_SUCCESS;
  38         }
  39         fcntl_struct->fsize = attr.size;
  40         return;
  41 
  42     case ADIO_FCNTL_SET_DISKSPACE:
  43         ADIOI_GEN_Prealloc(fd, fcntl_struct->diskspace, error_code);
  44         break;
  45 
  46     
  47     case ADIO_FCNTL_SET_ATOMICITY:
  48     default:
  49         *error_code = MPIO_Err_create_code(MPI_SUCCESS,
  50                                            MPIR_ERR_RECOVERABLE,
  51                                            myname, __LINE__,
  52                                            MPI_ERR_ARG,
  53                                            "**flag", "**flag %d", flag);
  54     
  55     }
  56 }
  57 
  58 
  59 
  60