summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper_cache.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-01-20 21:15:05 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-01-20 21:15:05 (GMT)
commit374359ab290e604b4ec534ab87e077e0217627c3 (patch)
treedcff2993438d77e1e0d5bf2854aa00005f4af3c6 /src/H5Fsuper_cache.c
parent8c48f56e4672e35efe0c2d31887c77abee8f07e1 (diff)
parentaac2bb6182878e3591de390173e769bb761c83e2 (diff)
downloadhdf5-374359ab290e604b4ec534ab87e077e0217627c3.zip
hdf5-374359ab290e604b4ec534ab87e077e0217627c3.tar.gz
hdf5-374359ab290e604b4ec534ab87e077e0217627c3.tar.bz2
[svn-r25988] - merge from trunk
- add new message flag for FAIL_IF_UNKNOWN_ALWAYS - TAG EOA extenstion message with FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE if EOA > EOF and with FAIL_IF_UNKNOWN_ALWAYS if EOA < EOF - add new tests for the above
Diffstat (limited to 'src/H5Fsuper_cache.c')
-rw-r--r--src/H5Fsuper_cache.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index bd29a14..981d050 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -975,16 +975,24 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
if((memb_eof = H5FD_get_eof(lf, mt)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eof request failed")
- if(mesg_flags == H5O_MSG_FLAG_MARK_IF_UNKNOWN && memb_eoa != memb_eof)
- mesg_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN;
+ if(memb_eoa > memb_eof)
+ mesg_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE;
+ else if(memb_eoa != memb_eof)
+ mesg_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS;
}
}
else {
/* Get the current EOA */
if((eoa_msg.memb_eoa[0] = H5FD_get_eoa(lf, H5FD_MEM_SUPER)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
- mesg_flags = (eoa_msg.memb_eoa[0] == rel_eof) ?
- H5O_MSG_FLAG_MARK_IF_UNKNOWN : H5O_MSG_FLAG_FAIL_IF_UNKNOWN;
+
+ if(eoa_msg.memb_eoa[0] > rel_eof)
+ mesg_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE;
+ else if(eoa_msg.memb_eoa[0] < rel_eof)
+ mesg_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS;
+ else
+ mesg_flags = H5O_MSG_FLAG_MARK_IF_UNKNOWN;
+
/* add the base address to the EOA */
eoa_msg.memb_eoa[0] += sblock->base_addr;
}