summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2012-12-05 20:15:54 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2012-12-05 20:15:54 (GMT)
commit8f3a8710ca0df1a18bc200612b2e50acafd8da1a (patch)
treed465d6ac97e878539de49f940914defa97549364
parentbbeea7dd9999b040cc94299e03bac6bea28ee0ee (diff)
downloadhdf5-8f3a8710ca0df1a18bc200612b2e50acafd8da1a.zip
hdf5-8f3a8710ca0df1a18bc200612b2e50acafd8da1a.tar.gz
hdf5-8f3a8710ca0df1a18bc200612b2e50acafd8da1a.tar.bz2
[svn-r23078] I took out O_SYNC flag from the code. I used it to do performance test. But
we decided not to support it. Tested on koala.
-rw-r--r--hl/test/dectris_hl_perf.c10
-rw-r--r--perform/dectris_perf.c10
-rw-r--r--src/H5F.c6
-rw-r--r--src/H5FDsec2.c2
-rw-r--r--src/H5Fpublic.h1
5 files changed, 13 insertions, 16 deletions
diff --git a/hl/test/dectris_hl_perf.c b/hl/test/dectris_hl_perf.c
index 1938410..c18fe1c 100644
--- a/hl/test/dectris_hl_perf.c
+++ b/hl/test/dectris_hl_perf.c
@@ -275,7 +275,7 @@ test_direct_write_uncompressed_data(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, DIRECT_UNCOMPRESSED_DSET, H5P_DEFAULT)) < 0)
@@ -340,7 +340,7 @@ test_direct_write_compressed_data(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, DIRECT_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
@@ -411,7 +411,7 @@ test_compressed_write(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, REG_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
@@ -499,7 +499,7 @@ test_no_compress_write(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, REG_NO_COMPRESS_DSET, H5P_DEFAULT)) < 0)
@@ -568,7 +568,7 @@ test_unix_write(void)
TESTING("Write compressed data to a Unix file");
/* create file*/
- flag = O_WRONLY|O_SYNC;
+ flag = O_WRONLY;
/* Start the timer */
gettimeofday(&timeval_start,NULL);
diff --git a/perform/dectris_perf.c b/perform/dectris_perf.c
index 34bfb9e..0be1aa1 100644
--- a/perform/dectris_perf.c
+++ b/perform/dectris_perf.c
@@ -273,7 +273,7 @@ test_direct_write_uncompressed_data(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, DIRECT_UNCOMPRESSED_DSET, H5P_DEFAULT)) < 0)
@@ -338,7 +338,7 @@ test_direct_write_compressed_data(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, DIRECT_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
@@ -409,7 +409,7 @@ test_compressed_write(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, REG_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
@@ -497,7 +497,7 @@ test_no_compress_write(hid_t fapl_id)
gettimeofday(&timeval_start,NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SYNC, fapl_id)) < 0)
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
if((dataset = H5Dopen(file, REG_NO_COMPRESS_DSET, H5P_DEFAULT)) < 0)
@@ -566,7 +566,7 @@ test_unix_write(void)
TESTING("Write compressed data to a Unix file");
/* create file*/
- flag = O_WRONLY|O_SYNC;
+ flag = O_WRONLY;
/* Start the timer */
gettimeofday(&timeval_start,NULL);
diff --git a/src/H5F.c b/src/H5F.c
index d864e88..12c25cd 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1261,7 +1261,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
* way for us to detect it here anyway).
*/
if(drvr->cmp)
- tent_flags = flags & ~(H5F_ACC_CREAT|H5F_ACC_TRUNC|H5F_ACC_EXCL|H5F_ACC_SYNC);
+ tent_flags = flags & ~(H5F_ACC_CREAT|H5F_ACC_TRUNC|H5F_ACC_EXCL);
else
tent_flags = flags;
@@ -1464,9 +1464,9 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
if(!filename || !*filename)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name")
/* In this routine, we only accept the following flags:
- * H5F_ACC_SYNC, H5F_ACC_EXCL, H5F_ACC_TRUNC and H5F_ACC_DEBUG
+ * H5F_ACC_EXCL, H5F_ACC_TRUNC and H5F_ACC_DEBUG
*/
- if(flags & ~(H5F_ACC_SYNC | H5F_ACC_EXCL | H5F_ACC_TRUNC | H5F_ACC_DEBUG))
+ if(flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC | H5F_ACC_DEBUG))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags")
/* The H5F_ACC_EXCL and H5F_ACC_TRUNC flags are mutually exclusive */
if((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC))
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index b65fee9..241609d 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -357,8 +357,6 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
o_flags |= O_CREAT;
if(H5F_ACC_EXCL & flags)
o_flags |= O_EXCL;
- if(H5F_ACC_SYNC & flags)
- o_flags |= O_SYNC;
/* Open the file */
if((fd = HDopen(name, o_flags, 0666)) < 0) {
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 7b7acb4..f32b3e0 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -48,7 +48,6 @@
#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists*/
#define H5F_ACC_DEBUG (H5CHECK 0x0008u) /*print debug info */
#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */
-#define H5F_ACC_SYNC (H5CHECK 0x0020u) /*no filesystem caching */
/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
* parent file. */