diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-10-19 22:30:57 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-10-19 22:30:57 (GMT) |
commit | 1d3b4f6ac9075a2f6ee0c7055e7b5763c346eb78 (patch) | |
tree | 9587bc673aead454d70ae026e32a0a970a015ef5 /src/H5F.c | |
parent | 8a391887be263e0ba7f1ba659dcf6559b5a5e01a (diff) | |
download | hdf5-1d3b4f6ac9075a2f6ee0c7055e7b5763c346eb78.zip hdf5-1d3b4f6ac9075a2f6ee0c7055e7b5763c346eb78.tar.gz hdf5-1d3b4f6ac9075a2f6ee0c7055e7b5763c346eb78.tar.bz2 |
Moved the 'cache image + SWMR' check from H5Fcreate/open to H5F_open.
Prep for the VOL merge.
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -443,8 +443,6 @@ done: hid_t H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) { - hbool_t ci_load = FALSE; /* whether MDC ci load requested */ - hbool_t ci_write = FALSE; /* whether MDC CI write requested */ H5F_t *new_file = NULL; /*file struct for new file */ hid_t dxpl_id = H5AC_ind_read_dxpl_id; /*dxpl used by library */ hid_t ret_value; /*return value */ @@ -490,12 +488,6 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, dxpl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to create file") - /* Check to see if both SWMR and cache image are requested. Fail if so */ - if(H5C_cache_image_status(new_file, &ci_load, &ci_write) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MDC cache image status") - if((ci_load || ci_write) && (flags & (H5F_ACC_SWMR_READ | H5F_ACC_SWMR_WRITE))) - HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, FAIL, "can't have both SWMR and cache image") - /* Get an atom for the file */ if((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file") @@ -554,8 +546,6 @@ done: hid_t H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) { - hbool_t ci_load = FALSE; /* whether MDC ci load requested */ - hbool_t ci_write = FALSE; /* whether MDC CI write requested */ H5F_t *new_file = NULL; /*file struct for new file */ hid_t dxpl_id = H5AC_ind_read_dxpl_id; /*dxpl used by library */ hid_t ret_value; /*return value */ @@ -585,12 +575,6 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open file") - /* Check to see if both SWMR and cache image are requested. Fail if so */ - if(H5C_cache_image_status(new_file, &ci_load, &ci_write) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MDC cache image status") - if((ci_load || ci_write) && (flags & (H5F_ACC_SWMR_READ | H5F_ACC_SWMR_WRITE))) - HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, FAIL, "can't have both SWMR and cache image") - /* Get an atom for the file */ if((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle") @@ -1649,7 +1633,7 @@ H5Fstart_swmr_write(hid_t file_id) /* Flush the superblock extension */ if(H5F_flush_tagged_metadata(file, file->shared->sblock->ext_addr, H5AC_ind_read_dxpl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush superblock extension") /* Flush data buffers */ if(H5F__flush(file, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id, FALSE) < 0) |