diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-11-30 08:12:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-11-30 08:12:26 (GMT) |
commit | c42a36b093535d8c3a96cb539918423d220891a2 (patch) | |
tree | 7ede61abe27f4bbfbfb3a3aecedfdb97634c208a /test/swmr_common.c | |
parent | a9946535de1cbb1158d8cc78d62c8cc8d978e476 (diff) | |
download | hdf5-c42a36b093535d8c3a96cb539918423d220891a2.zip hdf5-c42a36b093535d8c3a96cb539918423d220891a2.tar.gz hdf5-c42a36b093535d8c3a96cb539918423d220891a2.tar.bz2 |
[svn-r24478] Description:
Review Vailin's "metadata retry" code and make various cleanups to it.
Also, disallow SWMR access for non-latest format and for non-POSIX VFDs.
Tested on:
Mac OSX/64 10.9.0 (amazon) w/gcc 4.8 and make check-vfd
Diffstat (limited to 'test/swmr_common.c')
-rw-r--r-- | test/swmr_common.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/test/swmr_common.c b/test/swmr_common.c index 651e88e..6cbd5e2 100644 --- a/test/swmr_common.c +++ b/test/swmr_common.c @@ -257,17 +257,19 @@ shutdown_symbols(void) int print_metadata_retries_info(hid_t fid) { - H5F_retries_info_t info; - unsigned power; - unsigned i, j; + H5F_retry_info_t info; + unsigned i; /* Retrieve the collection of retries */ - if(H5Fget_metadata_read_retries_info(fid, &info) < 0) + if(H5Fget_metadata_read_retry_info(fid, &info) < 0) return (-1); /* Print information for each non-NULL retries[i] */ - for(i = 0; i < NUM_METADATA_READ_RETRIES; i++) { - if(info.retries[i] == NULL) + for(i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) { + unsigned power; + unsigned j; + + if(NULL == info.retries[i]) continue; fprintf(stderr, "Metadata read retries for item %u:\n", i); @@ -277,13 +279,14 @@ print_metadata_retries_info(hid_t fid) fprintf(stderr, "\t# of retries for %u - %u retries: %u\n", power, (power * 10) - 1, info.retries[i][j]); power *= 10; - } - } + } /* end for */ + } /* end for */ /* Free memory for each non-NULL retries[i] */ - for(i = 0; i < NUM_METADATA_READ_RETRIES; i++) { + for(i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) if(info.retries[i] != NULL) free(info.retries[i]); - } + return 0; } /* print_metadata_retries_info() */ + |