summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-10-02 20:48:50 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-10-02 20:48:50 (GMT)
commitb1b98cfafe5acb229037e391c1e33812aa53b3bb (patch)
treeee0faf492285b76ffcfdab58001ac993c71588df /src/H5C.c
parent5025be74eaf8b85d51ce74b6076c8c625dc9b9c2 (diff)
downloadhdf5-b1b98cfafe5acb229037e391c1e33812aa53b3bb.zip
hdf5-b1b98cfafe5acb229037e391c1e33812aa53b3bb.tar.gz
hdf5-b1b98cfafe5acb229037e391c1e33812aa53b3bb.tar.bz2
F ix off-by-one bug affecting metadata-read retries: retries == tries - 1.
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 372e184..033f1ec 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -7189,7 +7189,7 @@ H5C_load_entry(H5F_t * f,
/* Get the on-disk entry image */
if ( 0 == (type->flags & H5C__CLASS_SKIP_READS) ) {
- unsigned retries; /* The # of retries */
+ unsigned tries; /* The # of retries */
htri_t chk_ret; /* return from verify_chksum callback */
size_t actual_len = len; /* The actual length, after speculative */
/* reads have been resolved */
@@ -7376,13 +7376,13 @@ H5C_load_entry(H5F_t * f,
}
/* Calculate and track the # of retries */
- if ((retries = h5_retry_retries(&retry)) != 0) { /* Does not track 0 retry */
+ if ((tries = h5_retry_tries(&retry)) > 1) { /* Does not track 0 retry */
if ( H5F_track_metadata_read_retries(f, (unsigned)type->mem_type,
- retries) < 0)
+ tries - 1) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, \
- "cannot track read tries = %u ", retries)
+ "cannot track read tries = %u ", tries)
}
/* Set the final length (in case it wasn't set earlier) */