root/ompi/mca/io/romio321/romio/adio/ad_panfs/ad_panfs_open6.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. ADIOI_PANFS_Open6

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /*
   3  *   ad_panfs_open.c
   4  *
   5  *   Copyright (C) 2001 University of Chicago.
   6  *   See COPYRIGHT notice in top-level directory.
   7  */
   8 
   9 #include "ad_panfs.h"
  10 #include <string.h>
  11 #include <pan_fs_client_cw_mode.h>
  12 #define TEMP_BUFFER_SIZE 64
  13 
  14 void ADIOI_PANFS_Open6(ADIO_File fd, int *error_code)
  15 {
  16     char *value;
  17     int perm, old_mask, amode, flag;
  18     static char myname[] = "ADIOI_PANFS_OPEN6";
  19 
  20     if (fd->perm == ADIO_PERM_NULL) {
  21         old_mask = umask(022);
  22         umask(old_mask);
  23         perm = ~old_mask & 0666;
  24     }
  25     else
  26         perm = fd->perm;
  27 
  28     amode = 0;
  29     if (fd->access_mode & ADIO_CREATE) {
  30         pan_fs_client_layout_agg_type_t layout_type = PAN_FS_CLIENT_LAYOUT_TYPE__DEFAULT;
  31         unsigned long int layout_stripe_unit = 0;
  32         unsigned long int layout_parity_stripe_width = 0;
  33         unsigned long int layout_parity_stripe_depth = 0;
  34         unsigned long int layout_total_num_comps = 0;
  35         unsigned long int layout_max_faults = 2;
  36         pan_fs_client_layout_visit_t layout_visit_policy = PAN_FS_CLIENT_LAYOUT_VISIT__ROUND_ROBIN;
  37         pan_fs_client_raidn_encoding_t layout_encoding = PAN_FS_CLIENT_LAYOUT_RAIDN_ENCODING_RS;
  38         int myrank;
  39 
  40         MPI_Comm_rank(fd->comm, &myrank);
  41 
  42         *error_code = MPI_SUCCESS;
  43         value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL + 1) * sizeof(char));
  44         ADIOI_Info_get(fd->info, "panfs_layout_type", MPI_MAX_INFO_VAL, value, &flag);
  45         if (flag) {
  46             layout_type = strtoul(value, NULL, 10);
  47         }
  48         ADIOI_Info_get(fd->info, "panfs_layout_stripe_unit", MPI_MAX_INFO_VAL, value, &flag);
  49         if (flag) {
  50             layout_stripe_unit = strtoul(value, NULL, 10);
  51         }
  52         ADIOI_Info_get(fd->info, "panfs_layout_total_num_comps", MPI_MAX_INFO_VAL, value, &flag);
  53         if (flag) {
  54             layout_total_num_comps = strtoul(value, NULL, 10);
  55         }
  56         ADIOI_Info_get(fd->info, "panfs_layout_parity_stripe_width", MPI_MAX_INFO_VAL,
  57                        value, &flag);
  58         if (flag) {
  59             layout_parity_stripe_width = strtoul(value, NULL, 10);
  60         }
  61         ADIOI_Info_get(fd->info, "panfs_layout_parity_stripe_depth", MPI_MAX_INFO_VAL,
  62                        value, &flag);
  63         if (flag) {
  64             layout_parity_stripe_depth = strtoul(value, NULL, 10);
  65         }
  66         ADIOI_Info_get(fd->info, "panfs_layout_max_faults", MPI_MAX_INFO_VAL, value, &flag);
  67         if (flag) {
  68             layout_max_faults = strtoul(value, NULL, 10);
  69         }
  70         ADIOI_Info_get(fd->info, "panfs_layout_visit_policy", MPI_MAX_INFO_VAL, value, &flag);
  71         if (flag) {
  72             layout_visit_policy = strtoul(value, NULL, 10);
  73         }
  74         ADIOI_Info_get(fd->info, "panfs_layout_encoding", MPI_MAX_INFO_VAL, value, &flag);
  75         if (flag) {
  76             layout_encoding = strtoul(value, NULL, 10);
  77         }
  78         ADIOI_Free(value);
  79 
  80         amode = amode | O_CREAT;
  81         /* Check for valid set of hints
  82          *
  83          * Note that RAID0 has been dropped.  In the event PAN_FS_CLIENT_LAYOUT_TYPE__RAID0
  84          * enumeraion no longer exists, the following check will still be correct.
  85          *
  86          * The enumerations looks as follows:
  87          *
  88          * enum pan_fs_client_layout_agg_type_e {
  89          * PAN_FS_CLIENT_LAYOUT_TYPE__INVALID                 = 0,    - *INVALID
  90          * PAN_FS_CLIENT_LAYOUT_TYPE__DEFAULT                 = 1,    - VALID
  91          * PAN_FS_CLIENT_LAYOUT_TYPE__RAID0                   = 2,    - *INVALID
  92          * PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE   = 3,    - VALID
  93          * PAN_FS_CLIENT_LAYOUT_TYPE__RAID10                  = 4,    - VALID
  94          * PAN_FS_CLIENT_LAYOUT_TYPE__RAIDN_PARITY_STRIPE     = 5     - VALID
  95          * };
  96          */
  97         if (((layout_type < PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) &&
  98              (layout_type != PAN_FS_CLIENT_LAYOUT_TYPE__DEFAULT)) ||
  99             (layout_type > PAN_FS_CLIENT_LAYOUT_TYPE__RAIDN_PARITY_STRIPE)) {
 100             FPRINTF(stderr, "%s: panfs_layout_type is not a valid value: %u.\n", myname,
 101                     layout_type);
 102             MPI_Abort(MPI_COMM_WORLD, 1);
 103         }
 104         if (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAIDN_PARITY_STRIPE) {
 105             if ((layout_stripe_unit == 0) ||
 106                 (layout_parity_stripe_width == 0) ||
 107                 (layout_parity_stripe_depth == 0) || (layout_total_num_comps == 0)) {
 108                 if (layout_stripe_unit == 0) {
 109                     FPRINTF(stderr,
 110                             "%s: MPI_Info does not contain the panfs_layout_stripe_unit hint which is necessary to specify a valid RAIDN parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 111                             myname);
 112                 }
 113                 if (layout_total_num_comps == 0) {
 114                     FPRINTF(stderr,
 115                             "%s: MPI_Info does not contain the panfs_layout_total_num_comps hint which is necessary to specify a valid RAIDN parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 116                             myname);
 117                 }
 118                 if (layout_parity_stripe_width == 0) {
 119                     FPRINTF(stderr,
 120                             "%s: MPI_Info does not contain the panfs_layout_parity_stripe_width hint which is necessary to specify a valid RAIDN parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 121                             myname);
 122                 }
 123                 if (layout_parity_stripe_depth == 0) {
 124                     FPRINTF(stderr,
 125                             "%s: MPI_Info does not contain the panfs_layout_parity_stripe_depth hint which is necessary to specify a valid RAIDN parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 126                             myname);
 127                 }
 128                 MPI_Abort(MPI_COMM_WORLD, 1);
 129             }
 130             /* as of 6.0.x release, we only support max_faults == 2 */
 131             if (layout_max_faults != 2) {
 132                 FPRINTF(stderr,
 133                         "%s: panfs_layout_max_faults is not a valid value. Setting default of 2\n",
 134                         myname);
 135                 layout_max_faults = 2;
 136             }
 137             /* as of 6.0.x release, we only support RS enconding */
 138             if (layout_encoding != PAN_FS_CLIENT_LAYOUT_RAIDN_ENCODING_RS) {
 139                 FPRINTF(stderr,
 140                         "%s: panfs_layout_encoding is not a valid value: %u. Setting to default of %u\n",
 141                         myname, layout_encoding, PAN_FS_CLIENT_LAYOUT_RAIDN_ENCODING_RS);
 142                 layout_encoding = PAN_FS_CLIENT_LAYOUT_RAIDN_ENCODING_RS;
 143             }
 144         }
 145         if (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) {
 146             if ((layout_stripe_unit == 0) ||
 147                 (layout_parity_stripe_width == 0) ||
 148                 (layout_parity_stripe_depth == 0) || (layout_total_num_comps == 0)) {
 149                 if (layout_stripe_unit == 0) {
 150                     FPRINTF(stderr,
 151                             "%s: MPI_Info does not contain the panfs_layout_stripe_unit hint which is necessary to specify a valid RAID5 parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 152                             myname);
 153                 }
 154                 if (layout_total_num_comps == 0) {
 155                     FPRINTF(stderr,
 156                             "%s: MPI_Info does not contain the panfs_layout_total_num_comps hint which is necessary to specify a valid RAID5 parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 157                             myname);
 158                 }
 159                 if (layout_parity_stripe_width == 0) {
 160                     FPRINTF(stderr,
 161                             "%s: MPI_Info does not contain the panfs_layout_parity_stripe_width hint which is necessary to specify a valid RAID5 parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 162                             myname);
 163                 }
 164                 if (layout_parity_stripe_depth == 0) {
 165                     FPRINTF(stderr,
 166                             "%s: MPI_Info does not contain the panfs_layout_parity_stripe_depth hint which is necessary to specify a valid RAID5 parity stripe layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 167                             myname);
 168                 }
 169                 MPI_Abort(MPI_COMM_WORLD, 1);
 170             }
 171             if ((layout_visit_policy < PAN_FS_CLIENT_LAYOUT_VISIT__ROUND_ROBIN) ||
 172                 (layout_visit_policy > PAN_FS_CLIENT_LAYOUT_VISIT__ROUND_ROBIN_WITH_HASHED_OFFSET))
 173             {
 174                 FPRINTF(stderr, "%s: panfs_layout_visit_policy is not a valid value: %u.\n", myname,
 175                         layout_visit_policy);
 176                 MPI_Abort(MPI_COMM_WORLD, 1);
 177             }
 178         }
 179         if (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID10) {
 180             if ((layout_stripe_unit == 0) || (layout_total_num_comps == 0)) {
 181                 if (layout_stripe_unit == 0) {
 182                     FPRINTF(stderr,
 183                             "%s: MPI_Info does not contain the panfs_layout_stripe_unit hint which is necessary to specify a valid RAID10 layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 184                             myname);
 185                 }
 186                 if (layout_total_num_comps == 0) {
 187                     FPRINTF(stderr,
 188                             "%s: MPI_Info does not contain the panfs_layout_total_num_comps hint which is necessary to specify a valid RAID10 layout to the PAN_FS_CLIENT_LAYOUT_CREATE_FILE ioctl.\n",
 189                             myname);
 190                 }
 191                 MPI_Abort(MPI_COMM_WORLD, 1);
 192             }
 193             if ((layout_visit_policy < PAN_FS_CLIENT_LAYOUT_VISIT__ROUND_ROBIN) ||
 194                 (layout_visit_policy > PAN_FS_CLIENT_LAYOUT_VISIT__ROUND_ROBIN_WITH_HASHED_OFFSET))
 195             {
 196                 FPRINTF(stderr, "%s: panfs_layout_visit_policy is not a valid value: %u.\n", myname,
 197                         layout_visit_policy);
 198                 MPI_Abort(MPI_COMM_WORLD, 1);
 199             }
 200         }
 201         /* Create the file via ioctl() or open(). ADIOI_PANFS_Open's caller
 202          * already optimizes performance by only calling this function with
 203          * ADIO_CREATE on rank 0.  Therefore, we don't need to worry about
 204          * implementing that optimization here. */
 205         if ((layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) ||
 206             (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID10) ||
 207             (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAIDN_PARITY_STRIPE)) {
 208             pan_fs_client_layout_create_args_t file_create_args;
 209             int fd_dir;
 210             char *slash;
 211             struct stat stat_buf;
 212             int err;
 213             char *path;
 214 
 215             /* Check that the file does not exist before
 216              * trying to create it.  The ioctl itself should
 217              * be able to handle this condition.  Currently,
 218              * the ioctl will return successfully if the file
 219              * has been previously created.  Filed bug 33862
 220              * to track the problem.
 221              */
 222             err = stat(fd->filename, &stat_buf);
 223             if ((err == -1) && (errno != ENOENT)) {
 224                 FPRINTF(stderr, "%s: Unexpected I/O Error calling stat() on PanFS file: %s.\n",
 225                         myname, strerror(errno));
 226                 MPI_Abort(MPI_COMM_WORLD, 1);
 227             }
 228             else if (err == 0) {
 229                 /* ensure that we have the same semantics here and in the call to creat(). In the latter, we do not
 230                  * use O_EXCL so a create on an existing file should not fail.
 231                  */
 232                 FPRINTF(stderr,
 233                         "%s: Cannot create PanFS file with ioctl when file already exists, using open() syscall.\n",
 234                         myname);
 235                 goto use_open_syscall;
 236             }
 237             else {
 238                 /* (err == -1) && (errno == ENOENT) */
 239                 /* File does not exist */
 240                 path = ADIOI_Strdup(fd->filename);
 241                 slash = strrchr(path, '/');
 242                 if (!slash)
 243                     ADIOI_Strncpy(path, ".", 2);
 244                 else {
 245                     if (slash == path)
 246                         *(path + 1) = '\0';
 247                     else
 248                         *slash = '\0';
 249                 }
 250 
 251                 /* create PanFS object */
 252                 memset(&file_create_args, 0, sizeof(pan_fs_client_layout_create_args_t));
 253                 /* open directory */
 254                 fd_dir = open(path, O_RDONLY);
 255                 if (fd_dir < 0) {
 256                     FPRINTF(stderr,
 257                             "%s: I/O Error opening parent directory to create PanFS file using ioctl: %s.\n",
 258                             myname, strerror(errno));
 259                     MPI_Abort(MPI_COMM_WORLD, 1);
 260                 }
 261                 else {
 262                     char *file_name_ptr = fd->filename;
 263                     slash = strrchr(fd->filename, '/');
 264                     if (slash) {
 265                         file_name_ptr = slash + 1;
 266                     }
 267                     /* create file in the directory */
 268                     file_create_args.mode = perm;
 269                     file_create_args.version = PAN_FS_CLIENT_LAYOUT_VERSION;
 270                     file_create_args.flags = PAN_FS_CLIENT_LAYOUT_CREATE_F__NONE;
 271                     ADIOI_Strncpy(file_create_args.filename, file_name_ptr,
 272                                   strlen(fd->filename) + 1);
 273                     file_create_args.layout.agg_type = layout_type;
 274                     file_create_args.layout.layout_is_valid = 1;
 275                     if (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAIDN_PARITY_STRIPE) {
 276                         file_create_args.layout.u.raidn_parity_stripe.total_num_comps =
 277                             layout_total_num_comps;
 278                         file_create_args.layout.u.raidn_parity_stripe.parity_stripe_width =
 279                             layout_parity_stripe_width;
 280                         file_create_args.layout.u.raidn_parity_stripe.parity_stripe_depth =
 281                             layout_parity_stripe_depth;
 282                         file_create_args.layout.u.raidn_parity_stripe.stripe_unit =
 283                             layout_stripe_unit;
 284                         file_create_args.layout.u.raidn_parity_stripe.max_faults =
 285                             layout_max_faults;
 286                         file_create_args.layout.u.raidn_parity_stripe.encoding = layout_encoding;
 287                     }
 288                     else if (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) {
 289                         file_create_args.layout.u.raid1_5_parity_stripe.total_num_comps =
 290                             layout_total_num_comps;
 291                         file_create_args.layout.u.raid1_5_parity_stripe.parity_stripe_width =
 292                             layout_parity_stripe_width;
 293                         file_create_args.layout.u.raid1_5_parity_stripe.parity_stripe_depth =
 294                             layout_parity_stripe_depth;
 295                         file_create_args.layout.u.raid1_5_parity_stripe.stripe_unit =
 296                             layout_stripe_unit;
 297                         file_create_args.layout.u.raid1_5_parity_stripe.layout_visit_policy =
 298                             layout_visit_policy;
 299                     }
 300                     else if (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID10) {
 301                         file_create_args.layout.u.raid10.total_num_comps = layout_total_num_comps;
 302                         file_create_args.layout.u.raid10.stripe_unit = layout_stripe_unit;
 303                         file_create_args.layout.u.raid10.layout_visit_policy = layout_visit_policy;
 304                     }
 305                     err = ioctl(fd_dir, PAN_FS_CLIENT_LAYOUT_CREATE_FILE, &file_create_args);
 306                     if (err < 0) {
 307                         FPRINTF(stderr,
 308                                 "%s: I/O Error doing ioctl on parent directory to create PanFS file using ioctl: %s.\n",
 309                                 myname, strerror(errno));
 310                         MPI_Abort(MPI_COMM_WORLD, 1);
 311                     }
 312                     err = close(fd_dir);
 313                 }
 314                 ADIOI_Free(path);
 315             }
 316         }
 317         else {
 318           use_open_syscall:;
 319             int create_fd = open(fd->filename, amode, perm);
 320             if (create_fd != -1) {
 321                 close(create_fd);
 322             }
 323             else {
 324                 FPRINTF(stderr, "%s: I/O Error creating PanFS file using open: %s.\n", myname,
 325                         strerror(errno));
 326                 MPI_Abort(MPI_COMM_WORLD, 1);
 327             }
 328         }
 329     }
 330     if (fd->access_mode & ADIO_RDONLY)
 331         amode = amode | O_RDONLY;
 332     if (fd->access_mode & ADIO_WRONLY)
 333         amode = amode | O_WRONLY;
 334     if (fd->access_mode & ADIO_RDWR)
 335         amode = amode | O_RDWR;
 336     if (fd->access_mode & ADIO_EXCL)
 337         amode = amode | O_EXCL;
 338 
 339     value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL + 1) * sizeof(char));
 340     ADIOI_Info_get(fd->info, "panfs_concurrent_write", MPI_MAX_INFO_VAL, value, &flag);
 341     if (flag) {
 342         unsigned long int concurrent_write = strtoul(value, NULL, 10);
 343         if (concurrent_write == 1) {
 344             amode = amode | O_CONCURRENT_WRITE;
 345         }
 346     }
 347     ADIOI_Free(value);
 348 
 349     fd->fd_sys = open(fd->filename, amode, perm);
 350     fd->fd_direct = -1;
 351 
 352     if (fd->fd_sys != -1) {
 353         int rc;
 354         char temp_buffer[TEMP_BUFFER_SIZE];
 355         pan_fs_client_layout_query_args_t file_query_args;
 356         memset(&file_query_args, 0, sizeof(pan_fs_client_layout_query_args_t));
 357         file_query_args.version = PAN_FS_CLIENT_LAYOUT_VERSION;
 358         rc = ioctl(fd->fd_sys, PAN_FS_CLIENT_LAYOUT_QUERY_FILE, &file_query_args);
 359         if (rc < 0) {
 360             /* Error - set layout type to unknown */
 361             ADIOI_Info_set(fd->info, "panfs_layout_type", "PAN_FS_CLIENT_LAYOUT_TYPE__INVALID");
 362         }
 363         else {
 364             ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u", file_query_args.layout.agg_type);
 365             ADIOI_Info_set(fd->info, "panfs_layout_type", temp_buffer);
 366             if (file_query_args.layout.layout_is_valid == 1) {
 367                 switch (file_query_args.layout.agg_type) {
 368                 case PAN_FS_CLIENT_LAYOUT_TYPE__RAIDN_PARITY_STRIPE:
 369                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 370                                    file_query_args.layout.u.raidn_parity_stripe.stripe_unit);
 371                     ADIOI_Info_set(fd->info, "panfs_layout_stripe_unit", temp_buffer);
 372                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 373                                    file_query_args.layout.u.raidn_parity_stripe.
 374                                    parity_stripe_width);
 375                     ADIOI_Info_set(fd->info, "panfs_layout_parity_stripe_width", temp_buffer);
 376                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 377                                    file_query_args.layout.u.raidn_parity_stripe.
 378                                    parity_stripe_depth);
 379                     ADIOI_Info_set(fd->info, "panfs_layout_parity_stripe_depth", temp_buffer);
 380                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 381                                    file_query_args.layout.u.raidn_parity_stripe.total_num_comps);
 382                     ADIOI_Info_set(fd->info, "panfs_layout_total_num_comps", temp_buffer);
 383                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 384                                    file_query_args.layout.u.raidn_parity_stripe.max_faults);
 385                     ADIOI_Info_set(fd->info, "panfs_layout_max_faults", temp_buffer);
 386                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 387                                    file_query_args.layout.u.raidn_parity_stripe.encoding);
 388                     ADIOI_Info_set(fd->info, "panfs_layout_encoding", temp_buffer);
 389                     break;
 390                 case PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE:
 391                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 392                                    file_query_args.layout.u.raid1_5_parity_stripe.stripe_unit);
 393                     ADIOI_Info_set(fd->info, "panfs_layout_stripe_unit", temp_buffer);
 394                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 395                                    file_query_args.layout.u.raid1_5_parity_stripe.
 396                                    parity_stripe_width);
 397                     ADIOI_Info_set(fd->info, "panfs_layout_parity_stripe_width", temp_buffer);
 398                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 399                                    file_query_args.layout.u.raid1_5_parity_stripe.
 400                                    parity_stripe_depth);
 401                     ADIOI_Info_set(fd->info, "panfs_layout_parity_stripe_depth", temp_buffer);
 402                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 403                                    file_query_args.layout.u.raid1_5_parity_stripe.total_num_comps);
 404                     ADIOI_Info_set(fd->info, "panfs_layout_total_num_comps", temp_buffer);
 405                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 406                                    file_query_args.layout.u.raid1_5_parity_stripe.
 407                                    layout_visit_policy);
 408                     ADIOI_Info_set(fd->info, "panfs_layout_visit_policy", temp_buffer);
 409                     break;
 410                 case PAN_FS_CLIENT_LAYOUT_TYPE__RAID10:
 411                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 412                                    file_query_args.layout.u.raid10.stripe_unit);
 413                     ADIOI_Info_set(fd->info, "panfs_layout_stripe_unit", temp_buffer);
 414                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 415                                    file_query_args.layout.u.raid10.total_num_comps);
 416                     ADIOI_Info_set(fd->info, "panfs_layout_total_num_comps", temp_buffer);
 417                     ADIOI_Snprintf(temp_buffer, TEMP_BUFFER_SIZE, "%u",
 418                                    file_query_args.layout.u.raid10.layout_visit_policy);
 419                     ADIOI_Info_set(fd->info, "panfs_layout_visit_policy", temp_buffer);
 420                     break;
 421                 case PAN_FS_CLIENT_LAYOUT_TYPE__INVALID:
 422                 case PAN_FS_CLIENT_LAYOUT_TYPE__DEFAULT:
 423                     MPI_Info_set(fd->info, "panfs_layout_type",
 424                                  "PAN_FS_CLIENT_LAYOUT_TYPE__INVALID");
 425                 default:
 426                     break;
 427                 }
 428             }
 429         }
 430     }
 431 
 432     if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND))
 433         fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
 434 
 435     if (fd->fd_sys == -1) {
 436         *error_code = ADIOI_Err_create_code(myname, fd->filename, errno);
 437     }
 438     else
 439         *error_code = MPI_SUCCESS;
 440 }

/* [<][>][^][v][top][bottom][index][help] */