summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2006-10-16 22:31:27 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2006-10-16 22:31:27 (GMT)
commit775bd09974b4681672bce3c1a10948bad5d482da (patch)
tree14aaf01cf1198c940af53fe05ad7fcb3ef547189 /test
parentcaf3fa51d8b4082bfa7208a68b835fa5059a78ee (diff)
downloadhdf5-775bd09974b4681672bce3c1a10948bad5d482da.zip
hdf5-775bd09974b4681672bce3c1a10948bad5d482da.tar.gz
hdf5-775bd09974b4681672bce3c1a10948bad5d482da.tar.bz2
[svn-r12766] Made two changes to Direct I/O VFD: first added 3 parameters to H5Pset_fapl_direct to control
memory boundary, file block size, and maximal copy buffer size; second in H5FD_direct_write and H5FD_direct_read, the library checks whether data buffer is aligned. If it is, then write and read the data directly instead of making a copy buffer.
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c5
-rw-r--r--test/vfd.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/test/h5test.c b/test/h5test.c
index ad85a8f..6c9e8ee 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -579,8 +579,9 @@ h5_fileaccess(void)
return -1;
} else if (!HDstrcmp(name, "direct")) {
#ifdef H5_HAVE_DIRECT
- /* Linux direct read() and write() system calls */
- if (H5Pset_fapl_direct(fapl)<0) return -1;
+ /* Linux direct read() and write() system calls. Set memory boundary, file block size,
+ * and copy buffer size to the default values. */
+ if (H5Pset_fapl_direct(fapl, 0, 0, 0)<0) return -1;
#endif
} else {
/* Unknown driver */
diff --git a/test/vfd.c b/test/vfd.c
index 952ed4d..e42f643 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -151,9 +151,10 @@ test_direct(void)
return 0;
#else /*H5_HAVE_DIRECT*/
- /* Set property list and file name for SEC2 driver. */
+ /* Set property list and file name for Direct driver. Set memory alignment boundary
+ * and file block size to 512 which is the minimum for Linux 2.6. */
fapl = h5_fileaccess();
- if(H5Pset_fapl_direct(fapl)<0)
+ if(H5Pset_fapl_direct(fapl, 512, 4096, 64*1024*1024)<0)
TEST_ERROR;
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);