summaryrefslogtreecommitdiffstats
path: root/src/H5Cimage.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-08 14:40:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-08 15:48:21 (GMT)
commitcdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3 (patch)
treed2effdc8a5999cb263ec0d0f607ed36d45fd3160 /src/H5Cimage.c
parent29874423bf155e23cfdc1920336c91674865f417 (diff)
downloadhdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.zip
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.gz
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.bz2
Merge changes from develop
Comments and whitespace Skip file-locking and cache changes
Diffstat (limited to 'src/H5Cimage.c')
-rw-r--r--src/H5Cimage.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index b6c49ce..e876265 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -423,33 +423,33 @@ done:
* Function: H5C__deserialize_prefetched_entry()
*
* Purpose: Deserialize the supplied prefetched entry entry, and return
- * a pointer to the deserialized entry in *entry_ptr_ptr.
- * If successful, remove the prefetched entry from the cache,
- * and free it. Insert the deserialized entry into the cache.
- *
- * Note that the on disk image of the entry is not freed --
- * a pointer to it is stored in the deserialized entries'
- * image_ptr field, and its image_up_to_date field is set to
- * TRUE unless the entry is dirtied by the deserialize call.
- *
- * If the prefetched entry is a flush dependency child,
- * destroy that flush dependency prior to calling the
- * deserialize callback. If appropriate, the flush dependency
- * relationship will be recreated by the cache client.
- *
- * If the prefetched entry is a flush dependency parent,
- * destroy the flush dependency relationship with all its
- * children. As all these children must be prefetched entries,
- * recreate these flush dependency relationships with
- * deserialized entry after it is inserted in the cache.
- *
- * Since deserializing a prefetched entry is semantically
- * equivalent to a load, issue an entry loaded nofification
- * if the notify callback is defined.
+ * a pointer to the deserialized entry in *entry_ptr_ptr.
+ * If successful, remove the prefetched entry from the cache,
+ * and free it. Insert the deserialized entry into the cache.
+ *
+ * Note that the on disk image of the entry is not freed --
+ * a pointer to it is stored in the deserialized entries'
+ * image_ptr field, and its image_up_to_date field is set to
+ * TRUE unless the entry is dirtied by the deserialize call.
+ *
+ * If the prefetched entry is a flush dependency child,
+ * destroy that flush dependency prior to calling the
+ * deserialize callback. If appropriate, the flush dependency
+ * relationship will be recreated by the cache client.
+ *
+ * If the prefetched entry is a flush dependency parent,
+ * destroy the flush dependency relationship with all its
+ * children. As all these children must be prefetched entries,
+ * recreate these flush dependency relationships with
+ * deserialized entry after it is inserted in the cache.
+ *
+ * Since deserializing a prefetched entry is semantically
+ * equivalent to a load, issue an entry loaded nofification
+ * if the notify callback is defined.
*
* Return: SUCCEED on success, and FAIL on failure.
*
- * Note that *entry_ptr_ptr is undefined on failure.
+ * Note that *entry_ptr_ptr is undefined on failure.
*
* Programmer: John Mainzer, 8/10/15
*
@@ -685,15 +685,17 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
*
* 1) Set pf_entry_ptr->image_ptr to NULL. Since we have already
* transferred the buffer containing the image to *ds_entry_ptr,
- * this is not a memory leak.
+ * this is not a memory leak.
*
* 2) Call H5C__flush_single_entry() with the H5C__FLUSH_INVALIDATE_FLAG
* and H5C__FLUSH_CLEAR_ONLY_FLAG flags set.
*/
pf_entry_ptr->image_ptr = NULL;
+
if (pf_entry_ptr->is_dirty) {
HDassert(pf_entry_ptr->in_slist);
flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG;
+
} /* end if */
if (H5C__flush_single_entry(f, pf_entry_ptr, flush_flags) < 0)