diff options
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index dc3f46a..1bccdaf 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -421,7 +421,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl { fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); } - H5E_END_TRY; + H5E_END_TRY if (!fa || (H5P_FILE_ACCESS_DEFAULT == fapl_id)) { if (H5FD_multi_populate_config(NULL, NULL, NULL, NULL, TRUE, &default_fa) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTSET, "can't setup default driver configuration", @@ -491,7 +491,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char _memb_name[mt] = NULL; _memb_addr[mt] = HADDR_UNDEF; } - END_MEMBERS; + END_MEMBERS /* The file access properties */ _memb_fapl[H5FD_MEM_SUPER] = meta_plist_id; @@ -555,7 +555,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char if (!_memb_name[mmt] || !_memb_name[mmt][0]) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1); } - END_MEMBERS; + END_MEMBERS /* * Initialize driver specific information. No need to copy it into the FA @@ -577,7 +577,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char "can't set sec2 driver on member FAPL", -1); } } - END_MEMBERS; + END_MEMBERS return ret_value; } @@ -706,7 +706,7 @@ H5FD_multi_sb_size(H5FD_t *_file) UNIQUE_MEMBERS (file->fa.memb_map, mt) { nseen++; } - END_MEMBERS; + END_MEMBERS /* Addresses and EOA markers */ nbytes += nseen * 2 * 8; @@ -716,7 +716,7 @@ H5FD_multi_sb_size(H5FD_t *_file) size_t n = strlen(file->fa.memb_name[mt]) + 1; nbytes += (n + 7) & ~((size_t)0x0007); } - END_MEMBERS; + END_MEMBERS return nbytes; } @@ -784,7 +784,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out p += sizeof(haddr_t); nseen++; } - END_MEMBERS; + END_MEMBERS if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen * 2, buf + 8, NULL, H5P_DEFAULT) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); @@ -797,7 +797,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out for (i = n; i % 8; i++) *p++ = '\0'; } - END_MEMBERS; + END_MEMBERS return 0; } /* end H5FD_multi_sb_encode() */ @@ -848,7 +848,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) memb_eoa[mt] = HADDR_UNDEF; memb_name[mt] = NULL; } - END_MEMBERS; + END_MEMBERS /* * Read the map and count the unique members. @@ -864,7 +864,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) UNIQUE_MEMBERS (map, mt) { nseen++; } - END_MEMBERS; + END_MEMBERS buf += 8; /* Decode Address and EOA values */ @@ -879,7 +879,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) memb_addr[_unmapped] = *ap++; memb_eoa[_unmapped] = *ap++; } - END_MEMBERS; + END_MEMBERS /* Decode name templates */ UNIQUE_MEMBERS (map, mt) { @@ -887,7 +887,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) memb_name[_unmapped] = (const char *)buf; buf += (n + 7) & ~((unsigned)0x0007); } - END_MEMBERS; + END_MEMBERS /* * Use the mapping saved in the superblock in preference to the one @@ -900,14 +900,14 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) ALL_MEMBERS (mt) { file->fa.memb_map[mt] = map[mt]; } - END_MEMBERS; + END_MEMBERS /* Close files which are unused now */ memset(in_use, 0, sizeof in_use); UNIQUE_MEMBERS (map, mt) { in_use[mt] = TRUE; } - END_MEMBERS; + END_MEMBERS ALL_MEMBERS (mt) { if (!in_use[mt] && file->memb[mt]) { (void)H5FDclose(file->memb[mt]); @@ -915,7 +915,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) } file->fa.memb_map[mt] = map[mt]; } - END_MEMBERS; + END_MEMBERS } /* Commit member starting addresses and name templates */ @@ -927,7 +927,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) file->fa.memb_name[mt] = my_strdup(memb_name[mt]); } } - END_MEMBERS; + END_MEMBERS if (compute_next(file) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1); @@ -945,7 +945,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) */ file->memb_eoa[mt] = memb_eoa[mt]; } - END_MEMBERS; + END_MEMBERS return 0; } /* end H5FD_multi_sb_decode() */ @@ -1016,7 +1016,7 @@ H5FD_multi_fapl_copy(const void *_old_fa) } } } - END_MEMBERS; + END_MEMBERS if (nerrors) { ALL_MEMBERS (mt) { @@ -1025,7 +1025,7 @@ H5FD_multi_fapl_copy(const void *_old_fa) if (new_fa->memb_name[mt]) free(new_fa->memb_name[mt]); } - END_MEMBERS; + END_MEMBERS free(new_fa); H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't release object on error", NULL); } @@ -1059,7 +1059,7 @@ H5FD_multi_fapl_free(void *_fa) if (fa->memb_name[mt]) free(fa->memb_name[mt]); } - END_MEMBERS; + END_MEMBERS free(fa); return 0; @@ -1108,7 +1108,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr { fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); } - H5E_END_TRY; + H5E_END_TRY if (!fa || (H5P_FILE_ACCESS_DEFAULT == fapl_id) || (H5FD_MULTI != H5Pget_driver(fapl_id))) { char *env = getenv(HDF5_DRIVER); @@ -1136,7 +1136,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr else file->fa.memb_name[mt] = NULL; } - END_MEMBERS; + END_MEMBERS file->fa.relax = fa->relax; file->flags = flags; file->name = my_strdup(name); @@ -1169,7 +1169,7 @@ error: if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]); } - END_MEMBERS; + END_MEMBERS if (file->name) free(file->name); free(file); @@ -1211,7 +1211,7 @@ H5FD_multi_close(H5FD_t *_file) } } } - END_MEMBERS; + END_MEMBERS if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1); @@ -1222,7 +1222,7 @@ H5FD_multi_close(H5FD_t *_file) if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]); } - END_MEMBERS; + END_MEMBERS free(file->name); free(file); @@ -1266,7 +1266,7 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2) cmp = 1; } } - END_MEMBERS; + END_MEMBERS assert(cmp || out_mt < H5FD_MEM_NTYPES); if (out_mt >= H5FD_MEM_NTYPES) return cmp; @@ -1364,7 +1364,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) { memb_eoa = H5FDget_eoa(file->memb[mt], mt); } - H5E_END_TRY; + H5E_END_TRY if (HADDR_UNDEF == memb_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", @@ -1387,7 +1387,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (memb_eoa > eoa) eoa = memb_eoa; } - END_MEMBERS; + END_MEMBERS } else { H5FD_mem_t mmt = file->fa.memb_map[type]; @@ -1400,7 +1400,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) { eoa = H5FDget_eoa(file->memb[mmt], mmt); } - H5E_END_TRY; + H5E_END_TRY if (HADDR_UNDEF == eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", @@ -1478,7 +1478,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) { status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); } - H5E_END_TRY; + H5E_END_TRY if (status < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1); @@ -1519,7 +1519,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) { tmp_eof = H5FDget_eof(file->memb[mt], type); } - H5E_END_TRY; + H5E_END_TRY if (HADDR_UNDEF == tmp_eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", @@ -1541,7 +1541,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) if (tmp_eof > eof) eof = tmp_eof; } - END_MEMBERS; + END_MEMBERS } else { H5FD_mem_t mmt = file->fa.memb_map[type]; @@ -1555,7 +1555,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) { eof = H5FDget_eof(file->memb[mmt], mmt); } - H5E_END_TRY; + H5E_END_TRY if (HADDR_UNDEF == eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", @@ -1636,7 +1636,7 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) if (file->memb[mt]) file->memb[mt]->paged_aggr = file->pub.paged_aggr; } - END_MEMBERS; + END_MEMBERS } if (HADDR_UNDEF == (addr = H5FDalloc(file->memb[mmt], mmt, dxpl_id, size))) @@ -1838,7 +1838,7 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) if (H5FDflush(file->memb[mt], dxpl_id, closing) < 0) nerrors++; } - H5E_END_TRY; + H5E_END_TRY } } if (nerrors) @@ -1876,7 +1876,7 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) if (H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0) nerrors++; } - H5E_END_TRY; + H5E_END_TRY } } if (nerrors) @@ -1920,10 +1920,10 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw) break; } /* end if */ } - H5E_END_TRY; + H5E_END_TRY } /* end if */ } - END_MEMBERS; + END_MEMBERS /* Try to unlock the member files that are locked before error is encountered */ if (nerrors) { @@ -1935,7 +1935,7 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw) if (H5FDunlock(file->memb[k]) < 0) nerrors++; } - H5E_END_TRY; + H5E_END_TRY } /* end for */ } /* end if */ @@ -1972,7 +1972,7 @@ H5FD_multi_unlock(H5FD_t *_file) if (H5FDunlock(file->memb[mt]) < 0) nerrors++; } - END_MEMBERS; + END_MEMBERS if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1); @@ -2001,7 +2001,7 @@ compute_next(H5FD_multi_t *file) ALL_MEMBERS (mt) { file->memb_next[mt] = HADDR_UNDEF; } - END_MEMBERS; + END_MEMBERS UNIQUE_MEMBERS (file->fa.memb_map, mt1) { UNIQUE_MEMBERS2(file->fa.memb_map, mt2) @@ -2011,12 +2011,12 @@ compute_next(H5FD_multi_t *file) file->memb_next[mt1] = file->fa.memb_addr[mt2]; } } - END_MEMBERS; + END_MEMBERS if (HADDR_UNDEF == file->memb_next[mt1]) { file->memb_next[mt1] = HADDR_MAX; /*last member*/ } } - END_MEMBERS; + END_MEMBERS return 0; } @@ -2064,13 +2064,13 @@ open_members(H5FD_multi_t *file) { file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF); } - H5E_END_TRY; + H5E_END_TRY if (!file->memb[mt]) { if (!file->fa.relax || (file->flags & H5F_ACC_RDWR)) nerrors++; } } - END_MEMBERS; + END_MEMBERS if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1); @@ -2107,7 +2107,7 @@ H5FD_multi_delete(const char *filename, hid_t fapl_id) { fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); } - H5E_END_TRY; + H5E_END_TRY if (!fa) { char *env = getenv(HDF5_DRIVER); @@ -2137,7 +2137,7 @@ H5FD_multi_delete(const char *filename, hid_t fapl_id) if (H5FDdelete(full_filename, fa->memb_fapl[mt]) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_BADVALUE, "error deleting member files", -1); } - END_MEMBERS; + END_MEMBERS return 0; } /* end H5FD_multi_delete() */ |