diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-11-03 16:33:19 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-11-03 16:33:19 (GMT) |
commit | 17468defc73260c184a1a9539a7597c541986b05 (patch) | |
tree | f611d7e2e997e250a83db389637edeae37ca95f6 | |
parent | d935aa3555e6951688b8e6c9b9cc8a59b75f58c1 (diff) | |
download | hdf5-17468defc73260c184a1a9539a7597c541986b05.zip hdf5-17468defc73260c184a1a9539a7597c541986b05.tar.gz hdf5-17468defc73260c184a1a9539a7597c541986b05.tar.bz2 |
Change file memory type for extending to default, and correct error in
backward compatibility for multi VFD.
-rw-r--r-- | src/H5FDmulti.c | 10 | ||||
-rw-r--r-- | src/H5Fsuper.c | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index a0ee8a8..38d0ae3 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1358,8 +1358,12 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) H5Eclear2(H5E_DEFAULT); mmt = file->fa.memb_map[type]; - if(H5FD_MEM_DEFAULT == mmt) - mmt = type; + if(H5FD_MEM_DEFAULT == mmt) { + if(H5FD_MEM_DEFAULT == type) + mmt = H5FD_MEM_SUPER; + else + mmt = type; + } /* end if */ /* Handle backward compatibility in a quick and simple way. v1.6 library * had EOA for the entire virtual file. But it wasn't meaningful. So v1.8 @@ -1371,7 +1375,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) * address, the EOAs of v1.6 and v1.8 files are the same. It won't cause * any trouble. (Please see Issue 2598 in Jira) SLU - 2011/6/21 */ - if(H5FD_MEM_SUPER == type && file->memb_eoa[H5FD_MEM_SUPER] > 0 && eoa > file->memb_eoa[H5FD_MEM_SUPER]) + if(H5FD_MEM_SUPER == mmt && file->memb_eoa[H5FD_MEM_SUPER] > 0 && eoa > (file->memb_next[H5FD_MEM_SUPER] / 2)) return 0; assert(eoa >= file->fa.memb_addr[mmt]); diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 5bda9d7..66b34bc 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -474,7 +474,7 @@ H5F__super_read(H5F_t *f, hid_t dxpl_id, hbool_t initial_read) } /* end if */ /* (Account for the stored EOA being absolute offset -NAF) */ - if(H5F__set_eoa(f, H5FD_MEM_SUPER, udata.stored_eof - sblock->base_addr) < 0) + if(H5F__set_eoa(f, H5FD_MEM_DEFAULT, udata.stored_eof - sblock->base_addr) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file") /* Decode the optional superblock extension info */ |