diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-01 03:08:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-01 03:08:05 (GMT) |
commit | b75cad230650d7f5f5f509f346bf955978e9188c (patch) | |
tree | bc7899fc81bab82ae43b17209e9d5c1e4a59715e /src | |
parent | 4ae986e29a8196793bffd77f762f65cb8aba4c23 (diff) | |
download | hdf5-b75cad230650d7f5f5f509f346bf955978e9188c.zip hdf5-b75cad230650d7f5f5f509f346bf955978e9188c.tar.gz hdf5-b75cad230650d7f5f5f509f346bf955978e9188c.tar.bz2 |
[svn-r5498] Purpose:
Code Bug Fix
Description:
Under certain [obscure] circumstances, an object header would get paged out
of the metadata cache, and when it was accessed again and brought back into
the cache, and immediately had additional metadata added to it (an
attribute, usually, or perhaps adding an object to a group), and needed to
be extended with a continuation message, but there was no room in any
existing object header chunks for the continuation message and an existing
object header message needed to be moved to the new object header chunk (I
told you it was obscure :-), the object header message moved to the new
chunk (not the new metadata being added) would get corrupted. *whew* :-)
Solution:
Actually copy the "raw" object header message information of the object
header message being moved to the new chunk, instead of relying on the
"native" object header message information being re-encoded when the object
header is flushed. This is because when an object header is paged out of
the metadata cache and subsequently brought back in, the "native"
information pointer in memory is reset to NULL and only the "raw"
information exists.
Platforms tested:
Solaris 2.7 (arabica) & FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5O.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1890,6 +1890,8 @@ H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size) oh->mesg[i].chunkno = oh->mesg[found_other].chunkno; oh->mesg[found_other].dirty = TRUE; + /* Copy the message to the new location */ + HDmemcpy(p+H5O_SIZEOF_MSGHDR(f),oh->mesg[found_other].raw,oh->mesg[found_other].raw_size); oh->mesg[found_other].raw = p + H5O_SIZEOF_MSGHDR(f); oh->mesg[found_other].chunkno = chunkno; p += H5O_SIZEOF_MSGHDR(f) + oh->mesg[found_other].raw_size; |