summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-06-02 21:00:23 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-06-02 21:00:23 (GMT)
commit769694294033cf2021b506cde1302af5fdb2ebff (patch)
tree6eb63c4e19e009f217164f91d16250cb21edbbc5 /src/H5F.c
parentc02d9c7c0d4e526837445306bb35eb108db92ff5 (diff)
downloadhdf5-769694294033cf2021b506cde1302af5fdb2ebff.zip
hdf5-769694294033cf2021b506cde1302af5fdb2ebff.tar.gz
hdf5-769694294033cf2021b506cde1302af5fdb2ebff.tar.bz2
[svn-r10847] Purpose: Bug fix
Description: See details from Bug #213. Family member file size wasn't saved anywhere in file. When family file is opened, the first member size determine the member size. Solution: This is the fourth step of checkin. A test suit is added for h5repart, including a program to generate the test files, a script file to run h5repart, and a program to verify repartitioned files can be opened by the library. There's a change from the first step of checkin. Family name template is no longer saved in the superblock because different pathname can make the name different. In the third step of checkin, h5repart has been modified. If h5repart is used to change the size of family member file, the new size(actual member size) is saved in the superblock. In the second step of checkin, multi driver is checked against the driver name saved in superblock. Wrong driver will result in a failure with an error message indicating multi driver should be used. This change includes split driver because it's a special case for multi driver. In the first step of checkin. Family member size and name template(unused at this stage) are saved in file superblock. When file is reopened,the size passed in thrin superblock. A different size will trigger a failure with an error message indicating the right size. Wrong driver to open family file will cause a failure, too. Platforms tested: h5committest and fuss. Misc. update: MANIFEST
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 9cd0ddb..468fcaa 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -212,6 +212,7 @@ H5F_init_interface(void)
void *driver_info = H5F_ACS_FILE_DRV_INFO_DEF;
H5F_close_degree_t close_degree = H5F_CLOSE_DEGREE_DEF;
hsize_t family_offset = H5F_ACS_FAMILY_OFFSET_DEF;
+ hsize_t family_newsize = H5F_ACS_FAMILY_NEWSIZE_DEF;
H5FD_mem_t mem_type = H5F_ACS_MULTI_TYPE_DEF;
/* File mount property class variable.
@@ -361,7 +362,11 @@ H5F_init_interface(void)
/* Register the offset of family driver info */
if(H5P_register(acs_pclass,H5F_ACS_FAMILY_OFFSET_NAME,H5F_ACS_FAMILY_OFFSET_SIZE, &family_offset,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
-
+
+ /* Register the private property of new family file size. It's used by h5repart only. */
+ if(H5P_register(acs_pclass,H5F_ACS_FAMILY_NEWSIZE_NAME,H5F_ACS_FAMILY_NEWSIZE_SIZE, &family_newsize,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
/* Register the data type of multi driver info */
if(H5P_register(acs_pclass,H5F_ACS_MULTI_TYPE_NAME,H5F_ACS_MULTI_TYPE_SIZE, &mem_type,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
@@ -2630,7 +2635,6 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_entry_t *root_ent, haddr_t addr
if (H5FD_sb_decode(lf, driver_name, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to decode driver information")
- p += driver_size; /* advance past driver information section */
/* Compute driver info block checksum */
assert(sizeof(chksum) == sizeof(shared->drvr_chksum));