diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2015-06-19 04:12:36 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2015-06-19 04:12:36 (GMT) |
commit | 87bb643dbbebe154d3c5412ab356f0e5de08d8de (patch) | |
tree | ab2b672b2d491cee4fcb58dd2924ef75a3859067 /src/H5FDfamily.c | |
parent | 524d0abc13958d5376ecc963b8a4c0bfd1d88cc4 (diff) | |
download | hdf5-87bb643dbbebe154d3c5412ab356f0e5de08d8de.zip hdf5-87bb643dbbebe154d3c5412ab356f0e5de08d8de.tar.gz hdf5-87bb643dbbebe154d3c5412ab356f0e5de08d8de.tar.bz2 |
[svn-r27247] Bring revisions #27072 - #27084 from trunk to revise_chunks. h5committested.
Diffstat (limited to 'src/H5FDfamily.c')
-rw-r--r-- | src/H5FDfamily.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index e79e1cf..8660f1f 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -587,26 +587,25 @@ H5FD_family_sb_decode(H5FD_t *_file, const char UNUSED *name, const unsigned cha * h5repart is being used to change member file size. h5repart will open * files for read and write. When the files are closed, metadata will be * flushed to the files and updated to this new size */ - if(file->mem_newsize) { + if(file->mem_newsize) file->memb_size = file->pmem_size = file->mem_newsize; - HGOTO_DONE(ret_value) - } /* end if */ - - /* Default - use the saved member size */ - if(file->pmem_size == H5F_FAMILY_DEFAULT) - file->pmem_size = msize; + else { + /* Default - use the saved member size */ + if(file->pmem_size == H5F_FAMILY_DEFAULT) + file->pmem_size = msize; - /* Check if member size from file access property is correct */ - if(msize != file->pmem_size) { - char err_msg[128]; + /* Check if member size from file access property is correct */ + if(msize != file->pmem_size) { + char err_msg[128]; - HDsnprintf(err_msg, sizeof(err_msg), "Family member size should be %lu. But the size from file access property is %lu", (unsigned long)msize, (unsigned long)file->pmem_size); - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, err_msg) - } /* end if */ + HDsnprintf(err_msg, sizeof(err_msg), "Family member size should be %lu. But the size from file access property is %lu", (unsigned long)msize, (unsigned long)file->pmem_size); + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, err_msg) + } /* end if */ - /* Update member file size to the size saved in the superblock. - * That's the size intended to be. */ - file->memb_size = msize; + /* Update member file size to the size saved in the superblock. + * That's the size intended to be. */ + file->memb_size = msize; + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -686,14 +685,11 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, /* Check for new family file size. It's used by h5repart only. */ if(H5P_exist_plist(plist, H5F_ACS_FAMILY_NEWSIZE_NAME) > 0) { - hsize_t fam_newsize = 0; /* New member size, when repartitioning */ - /* Get the new family file size */ - if(H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &fam_newsize) < 0) + if(H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &file->mem_newsize) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get new family member size") - /* Store information for later */ - file->mem_newsize = fam_newsize; /* New member size passed in through property */ + /* Set flag for later */ file->repart_members = TRUE; } /* end if */ |