diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-06-19 02:13:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-06-19 02:13:26 (GMT) |
commit | b246f9d5eda4a8de5fb7f0f7fa9b8783db03a1ed (patch) | |
tree | 26ecafbdfa72ee83af110a48314999f6831d57a1 /src/H5Ocache.c | |
parent | 26e2b6fefbe2bd8bce15d28564f94110a62fefb1 (diff) | |
download | hdf5-b246f9d5eda4a8de5fb7f0f7fa9b8783db03a1ed.zip hdf5-b246f9d5eda4a8de5fb7f0f7fa9b8783db03a1ed.tar.gz hdf5-b246f9d5eda4a8de5fb7f0f7fa9b8783db03a1ed.tar.bz2 |
[svn-r12422] Purpose:
Bug fix
Description:
Don't attempt to merge object header messages when a file is opened
read-only.
Mark the object header dirty when messages are merged, as well as the
particular message affected.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r-- | src/H5Ocache.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c index ae98df7..728ac6e 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -255,7 +255,8 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1, continue; } /* end if */ - if(H5O_NULL_ID == id && oh->nmesgs > 0 && + if((H5F_get_intent(f) & H5F_ACC_RDWR) && + H5O_NULL_ID == id && oh->nmesgs > 0 && H5O_NULL_ID == oh->mesg[oh->nmesgs - 1].type->id && oh->mesg[oh->nmesgs - 1].chunkno == chunkno) { /* combine adjacent null messages */ @@ -294,6 +295,10 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1, } /* end for */ } /* end while */ + /* Mark the object header dirty if we've merged a message */ + if(merged_null_msgs) + oh->cache_info.is_dirty = TRUE; + /* Sanity check for the correct # of messages in object header */ if((oh->nmesgs + skipped_msgs + merged_null_msgs) != nmesgs) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - too few messages") |