summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2013-10-10 13:21:07 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2013-10-10 13:21:07 (GMT)
commitdfd9816c8d5ea707dfb2a19adad3176c7a15c5d2 (patch)
tree2444b8b5f3311512f8ab2df0691ab571ee0ab122 /src/H5AC.c
parent39fc26566e18ac81c43986ed2013676e2918ded2 (diff)
downloadhdf5-dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2.zip
hdf5-dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2.tar.gz
hdf5-dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2.tar.bz2
[svn-r24279] Merge of r24278 from revise_chunks.
Changes the MD cache so that writing v-1 B-tree nodes under SWMR semantics will fail. Tested on: jam (previously tested on more platforms)
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index c075069..46b5785 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1359,6 +1359,14 @@ H5AC_protect(H5F_t *f,
if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR) && rw == H5AC_WRITE)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
+ /* FIXME: (temporary)
+ * Check to ensure that version 1 B-tree nodes are not being protected
+ * under SWMR writes. This will be replaced with a more extensive
+ * SWMR-safe metadata check in the future.
+ */
+ if((H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) && H5AC_BT_ID == type->id)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "can't protect/write version 1 B-tree nodes under SWMR writes")
+
#if H5AC__TRACE_FILE_ENABLED
/* For the protect call, only the addr and type id is really necessary
* in the trace file. Include the size of the entry protected as a