diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2014-04-12 10:30:16 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2014-04-12 10:30:16 (GMT) |
commit | 785da34bce9fd2d8d02e1a29927d83fd28cb93fd (patch) | |
tree | e0f7f07752707fe65680ad92bc2785e6ed887e86 /test/vfd.c | |
parent | 9b77c507060264cc24e15a3af84c3257716e47cb (diff) | |
download | hdf5-785da34bce9fd2d8d02e1a29927d83fd28cb93fd.zip hdf5-785da34bce9fd2d8d02e1a29927d83fd28cb93fd.tar.gz hdf5-785da34bce9fd2d8d02e1a29927d83fd28cb93fd.tar.bz2 |
[svn-r25033] Purpose:
Merged r24993 from the trunk.
Adds core VFD write tracking functionality. When enabled, the core VFD
will track dirty regions of the file and only write out the changed
regions. The new H5Pget/set_core_write_tracking() API call controls this
feature. A new "core_paged" VFD target was added to the check-vfd target
in test/Makefile.am that runs all tests with the new write tracking
functionality.
Tested on:
32-bit LE linux (jam)
64-bit LE linux (koala)
64-bit BE linux (ostrich)
Each platform was tested with HDF5_DRIVER set to "core" and "core_paged".
Jam was also tested with the standard sec2 driver.
Diffstat (limited to 'test/vfd.c')
-rw-r--r-- | test/vfd.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -28,6 +28,7 @@ #define FAMILY_SIZE2 (5*KB) #define MULTI_SIZE 128 #define CORE_INCREMENT (4*KB) +#define CORE_PAGE_SIZE (1024 * 1024) #define DSET1_NAME "dset1" #define DSET1_DIM1 1024 #define DSET1_DIM2 32 @@ -376,6 +377,8 @@ test_core(void) char filename[1024]; void *fhandle=NULL; hsize_t file_size; + hbool_t use_write_tracking; + size_t write_tracking_page_size; int *points = NULL, *check = NULL, *p1, *p2; hid_t dset1=-1, space1=-1; hsize_t dims1[2]; @@ -387,6 +390,8 @@ test_core(void) fapl = h5_fileaccess(); if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE) < 0) TEST_ERROR; + if(H5Pset_core_write_tracking(fapl, TRUE, CORE_PAGE_SIZE) < 0) + TEST_ERROR; h5_fixname(FILENAME[1], fapl, filename, sizeof filename); if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) @@ -400,6 +405,14 @@ test_core(void) if(H5FD_CORE != H5Pget_driver(access_fapl)) TEST_ERROR; + /* Check that the backing store write tracking info was saved */ + if(H5Pget_core_write_tracking(fapl, &use_write_tracking, &write_tracking_page_size) < 0) + TEST_ERROR; + if(TRUE != use_write_tracking) + TEST_ERROR; + if(CORE_PAGE_SIZE != write_tracking_page_size) + TEST_ERROR; + /* ...and close the property list */ if (H5Pclose(access_fapl) < 0) TEST_ERROR; |