summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-28 17:43:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-28 17:43:54 (GMT)
commit0bd83631d5ed24fe948a273e8a4d4bd8f128a86c (patch)
treec950f5b5b4e81aa8f45f0ece90cc463e832bb2e0 /src/H5Ocache.c
parent4ef5853e2d4235e57cfe7e6ce0fcb1b9359f8966 (diff)
downloadhdf5-0bd83631d5ed24fe948a273e8a4d4bd8f128a86c.zip
hdf5-0bd83631d5ed24fe948a273e8a4d4bd8f128a86c.tar.gz
hdf5-0bd83631d5ed24fe948a273e8a4d4bd8f128a86c.tar.bz2
[svn-r12990] Description:
When using the latest version of the file format, move the "modification time" information into the object header prefix, which is more efficient. Also add "access time" and "change time" (for metadata) fields, all of which take about the same space as the previous modification time header message. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 8ebb6c2..defc14f 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -273,6 +273,14 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1,
/* Link count */
UINT32DECODE(p, oh->nlink);
+ /* Version-specific fields */
+ if(oh->version > H5O_VERSION_1) {
+ /* Time fields */
+ UINT32DECODE(p, oh->atime);
+ UINT32DECODE(p, oh->mtime);
+ UINT32DECODE(p, oh->ctime);
+ } /* end if */
+
/* First chunk size */
UINT32DECODE(p, chunk_size);
@@ -574,6 +582,11 @@ H5O_assert(oh);
/* Link count */
UINT32ENCODE(p, oh->nlink);
+ /* Time fields */
+ UINT32ENCODE(p, oh->atime);
+ UINT32ENCODE(p, oh->mtime);
+ UINT32ENCODE(p, oh->ctime);
+
/* Chunk size */
UINT32ENCODE(p, (oh->chunk[0].size - H5O_SIZEOF_HDR_OH(oh)));
} /* end if */