diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-07-05 22:12:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-07-05 22:12:05 (GMT) |
commit | 97f51bfde14d16893b9556216e643a34f751b5f1 (patch) | |
tree | bd66d865cd68aed4565403c843f3d6d187f90104 /src/H5Dio.c | |
parent | c7cb8e6adc4c980d7e3e83fa06d0ea95a23fb00b (diff) | |
download | hdf5-97f51bfde14d16893b9556216e643a34f751b5f1.zip hdf5-97f51bfde14d16893b9556216e643a34f751b5f1.tar.gz hdf5-97f51bfde14d16893b9556216e643a34f751b5f1.tar.bz2 |
[svn-r15321] Description:
Disable dataset caching when journaling is enabled.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.5.2 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r-- | src/H5Dio.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index 76f97db..7483153 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -213,7 +213,7 @@ done: */ herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, - hid_t file_space_id, hid_t plist_id, const void *buf) + hid_t file_space_id, hid_t dxpl_id, const void *buf) { H5D_t *dset = NULL; const H5S_t *mem_space = NULL; @@ -223,7 +223,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, FUNC_ENTER_API_META(H5Dwrite, dset_id, FAIL) H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id, - plist_id, buf); + dxpl_id, buf); /* check arguments */ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET))) @@ -248,10 +248,10 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, } /* end if */ /* Get the default dataset transfer property list if the user didn't provide one */ - if(H5P_DEFAULT == plist_id) - plist_id= H5P_DATASET_XFER_DEFAULT; + if(H5P_DEFAULT == dxpl_id) + dxpl_id= H5P_DATASET_XFER_DEFAULT; else - if(TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER)) + if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") if(!buf && H5S_GET_SELECT_NPOINTS(file_space) != 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer") @@ -264,9 +264,14 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, buf = &fake_char; /* write raw data */ - if(H5D_write(dset, mem_type_id, mem_space, file_space, plist_id, buf) < 0) + if(H5D_write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") + /* Check if journaling is enabled on this file and flush the metadata now */ + if(dset->shared->journaling_enabled) + if(H5D_flush_real(dset, dxpl_id, (unsigned)H5F_FLUSH_NONE) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info") + done: FUNC_LEAVE_API_META(ret_value) } /* end H5Dwrite() */ |