summaryrefslogtreecommitdiffstats
path: root/src/H5Opkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-28 20:29:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-28 20:29:28 (GMT)
commit1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07 (patch)
treefdee34d1d50b03fc89f543b47c98c57cc3f07314 /src/H5Opkg.h
parent1687720a5fe51d32e1544371eaa75af162f35a31 (diff)
downloadhdf5-1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07.zip
hdf5-1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07.tar.gz
hdf5-1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07.tar.bz2
[svn-r12992] Description:
Add fields for tracking attributes on objects to object header prefix, when using the latest version of the format. Reduce size used to store type of header message from 2 bytes to 1. (If we have >256 message types, we probably have a different problem... :-) Also, add "birth" time for object (i.e. creation time) [named to align with similar fields in file systems] Correct bug in H5Gget_objinfo() - retrieve the ctime field from object info, instead of the mtime field. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r--src/H5Opkg.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 657da10..e8b72e9 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -77,13 +77,13 @@
/*
* Size of object header prefix.
*/
-#define H5O_SIZEOF_HDR_VERS(V) \
+#define H5O_SIZEOF_HDR_VERS(V,SOFS,SOFA) \
(((V) == H5O_VERSION_1) ? \
H5O_ALIGN_OLD(1 + /*version number */ \
1 + /*reserved */ \
2 + /*number of messages */ \
4 + /*reference count */ \
- 4) /*header data size */ \
+ 4) /*chunk data size */ \
: \
(H5O_SIZEOF_MAGIC + /*magic number */ \
1 + /*version number */ \
@@ -92,13 +92,19 @@
4 + /*access time */ \
4 + /*modification time */ \
4 + /*change time */ \
- 4 + /*header data size */ \
+ 4 + /*birth time */ \
+ 2 + /*max compact attributes */ \
+ 2 + /*min dense attributes */ \
+ (SOFS) + /*# of attributes */ \
+ (SOFA) + /*addr of attribute heap */ \
+ (SOFA) + /*addr of attribute name index */ \
+ 4 + /*chunk data size */ \
H5O_SIZEOF_CHKSUM) /*checksum size */ \
)
#define H5O_SIZEOF_HDR_OH(O) \
- H5O_SIZEOF_HDR_VERS((O)->version)
+ H5O_SIZEOF_HDR_VERS((O)->version, (O)->sizeof_size, (O)->sizeof_addr)
#define H5O_SIZEOF_HDR_F(F) \
- H5O_SIZEOF_HDR_VERS(H5F_USE_LATEST_FORMAT(F) ? H5O_VERSION_LATEST : H5O_VERSION_1)
+ H5O_SIZEOF_HDR_VERS(H5F_USE_LATEST_FORMAT(F) ? H5O_VERSION_LATEST : H5O_VERSION_1, H5F_SIZEOF_SIZE(F), H5F_SIZEOF_ADDR(F))
/*
* Size of object header message prefix
@@ -110,7 +116,7 @@
1 + /*flags */ \
3) /*reserved */ \
: \
- (2 + /*message type */ \
+ (1 + /*message type */ \
2 + /*sizeof message data */ \
1) /*flags */ \
)
@@ -188,14 +194,26 @@ struct H5O_t {
H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
/* first field in structure */
- /* General information (stored) */
+ /* General information (not stored) */
+ size_t sizeof_size; /* Size of file sizes */
+ size_t sizeof_addr; /* Size of file addresses */
+
+ /* Object information (stored) */
unsigned version; /*version number */
unsigned nlink; /*link count */
- /* Time information (stored) */
+ /* Time information (stored, for versions > 1) */
time_t atime; /*access time */
time_t mtime; /*modification time */
time_t ctime; /*change time */
+ time_t btime; /*birth time */
+
+ /* Attribute information (stored, for versions > 1) */
+ uint16_t max_compact; /* Maximum # of compact attributes */
+ uint16_t min_dense; /* Minimum # of "dense" attributes */
+ hsize_t nattrs; /* Number of attributes in the group */
+ haddr_t attr_fheap_addr; /* Address of fractal heap for storing "dense" attributes */
+ haddr_t name_bt2_addr; /* Address of v2 B-tree for indexing names of attributes */
/* Message management (stored, indirectly) */
size_t nmesgs; /*number of messages */