diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2018-11-18 06:57:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2018-11-18 06:57:09 (GMT) |
commit | 6c99961bb2772dd809ff200bf9a6c456f8e9a1d9 (patch) | |
tree | 02e7f1a6f4bab94a89c114472461a4711563b8e1 | |
parent | d0d360ff2d6afb275836645d01d5d6ddbed39caa (diff) | |
download | hdf5-6c99961bb2772dd809ff200bf9a6c456f8e9a1d9.zip hdf5-6c99961bb2772dd809ff200bf9a6c456f8e9a1d9.tar.gz hdf5-6c99961bb2772dd809ff200bf9a6c456f8e9a1d9.tar.bz2 |
Revert some of the changes to support the original property list value of
metadata read attempts.
-rw-r--r-- | src/H5Fint.c | 5 | ||||
-rw-r--r-- | src/H5Fpkg.h | 1 | ||||
-rw-r--r-- | test/vol.c | 11 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index 9c01c71..1ef5013 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -219,7 +219,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'low' bound for library format versions") if(H5P_set(new_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &f->shared->high_bound) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'high' bound for library format versions") - if(H5P_set(new_plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &(f->shared->orig_read_attempts)) < 0) + if(H5P_set(new_plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &(f->shared->read_attempts)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'read attempts ' flag") if(H5P_set(new_plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set object flush callback") @@ -1046,9 +1046,8 @@ H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_ f->shared->use_tmp_space = !H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI); /* Retrieve the # of read attempts here so that sohm in superblock will get the correct # of attempts */ - if(H5P_get(plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &f->shared->orig_read_attempts) < 0) + if(H5P_get(plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &f->shared->read_attempts) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get the # of read attempts") - f->shared->read_attempts = f->shared->orig_read_attempts; /* When opening file with SWMR access, the # of read attempts is H5F_SWMR_METADATA_READ_ATTEMPTS if not set */ /* When opening file without SWMR access, the # of read attempts is always H5F_METADATA_READ_ATTEMPTS (set or not set) */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 192262c..fc902b0 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -353,7 +353,6 @@ struct H5F_file_t { /* Metadata retry info */ unsigned read_attempts; /* The # of reads to try when reading metadata with checksum */ - unsigned orig_read_attempts; /* Original value from the property: The # of reads to try when reading metadata with checksum */ unsigned retries_nbins; /* # of bins for each retries[] */ uint32_t *retries[H5AC_NTYPES]; /* Track # of read retries for metdata items with checksum */ @@ -265,8 +265,19 @@ test_basic_file_operation(void) * I'm not fighting it, just getting the testing to verify that the VOL * connector property is returned correctly. -QAK, 2018/11/17 */ + /* Set the file close degree to a non-default value, to make the H5Pequal + * work out. This is kinda odd, but the library's current behavior with + * a default value is to return the value chosen (H5F_CLOSE_SEMI) instead + * of the default value (H5F_CLOSE_DEFAULT) from the property and then + * the H5Pequal doesn't detect that the property lists are the same. Since + * this is the documented behavior for file close degree for many years, + * I'm not fighting it, just getting the testing to verify that the VOL + * connector property is returned correctly. -QAK, 2018/11/17 + */ if(H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI) < 0) TEST_ERROR; + if(H5Pset_metadata_read_attempts(fapl_id, 9) < 0) + FAIL_STACK_ERROR /* H5Fcreate */ if ((fid = H5Fcreate(NATIVE_VOL_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) |