summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-07-18 23:16:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-07-18 23:16:08 (GMT)
commit99992db34d0384895abfd8aeeb5b2d5202a91c07 (patch)
tree07ce97b278519d3a9efa49307e13a11910486a7a /src
parent28b4826a812c193b94b8d43b91fb3048d97d2eb5 (diff)
downloadhdf5-99992db34d0384895abfd8aeeb5b2d5202a91c07.zip
hdf5-99992db34d0384895abfd8aeeb5b2d5202a91c07.tar.gz
hdf5-99992db34d0384895abfd8aeeb5b2d5202a91c07.tar.bz2
[svn-r21122] Description:
Bring r21120 from trunk to 1.8 branch: Check in ugly version of fix for Jira #7638. I'm going to leave the issue open in Jira and when the library has been refactored to use shared file pointers (instead of top file pointers) for file operations, I'll uncomment the check in src/H5Oshared.c Tested on: Mac OS X/32 10.6.8 (amazon) w/debug (too small for h5committest)
Diffstat (limited to 'src')
-rw-r--r--src/H5Oshared.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index a5e3efc..6e2beca 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -243,8 +243,17 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
* new object header. Adjust the reference count on that
* object header.
*/
- if(shared->file->shared != f->shared)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "interfile hard links are not allowed")
+ /* Unfortunately, it is possible for the shared->file pointer to become
+ * invalid if the oh is kept in cache (which is contained in
+ * shared->file->shared while shared->file is closed. Just ignore
+ * shared->file until the "top-level" file pointer is removed at some
+ * point in the future. -NAF */
+ /* This is related to Jira issue #7638 and should be uncommented after
+ * the library has been refactored to shift to using shared file
+ * pointers for file operations, instead of using top file pointers.
+ * -QAK */
+ /*if(shared->file->shared != f->shared)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "interfile hard links are not allowed")*/
/* Build the object location for the shared message's object header */
oloc.file = f;
@@ -579,7 +588,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_copy_file(H5F_t UNUSED *file_src, H5F_t *file_dst,
+H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
hbool_t UNUSED *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata,
hid_t dxpl_id)
@@ -610,7 +619,7 @@ H5O_shared_copy_file(H5F_t UNUSED *file_src, H5F_t *file_dst,
/* Copy the shared object from source to destination */
dst_oloc.file = file_dst;
- src_oloc.file = shared_src->file;
+ src_oloc.file = file_src;
src_oloc.addr = shared_src->u.loc.oh_addr;
if(H5O_copy_header_map(&src_oloc, &dst_oloc, dxpl_id, cpy_info, FALSE,
NULL, NULL) < 0)