[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.
This commit is contained in:
Raymond Lu 2012-12-05 15:15:54 -05:00
parent bbeea7dd99
commit 8f3a8710ca
5 changed files with 13 additions and 16 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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))

View File

@ -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) {

View File

@ -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. */