diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2012-03-02 16:18:38 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2012-03-02 16:18:38 (GMT) |
commit | fdf48fa1bf003446c449852b4e1c895fa601ad72 (patch) | |
tree | 018ec41e859c02fb66ebf996dec0d70f52a2cd98 /src/H5Oprivate.h | |
parent | 0a18a098eabbdeb20382b044130b7ef998a3918e (diff) | |
download | hdf5-fdf48fa1bf003446c449852b4e1c895fa601ad72.zip hdf5-fdf48fa1bf003446c449852b4e1c895fa601ad72.tar.gz hdf5-fdf48fa1bf003446c449852b4e1c895fa601ad72.tar.bz2 |
[svn-r22016] Purpose:
- Switch avoid_truncate from bool to enum
- Enable 'EOA' message with latest format.
Description:
Switched the 'avoid truncate' property from a bool
(on/off) to an enum with the following states (for now):
H5F_AVOID_TRUNCATE_OFF : file will always be
truncated at file close
H5F_AVOID_TRUNCATE_EXTEND: file will only be
truncated on file close
if that truncation
results in a smaller
file.
H5F_AVOID_TRUNCATE_ALL: file will never be truncated
on file close.
These may be renamed after RFC discussion ...
This also resulted in a change in the API controlling
the property, as well as the internal querying function.
Also, using the latest format in a fapl when creating a
file will now also trigger writing of an 'EOA' message
and usage of avoid truncate feature. The default setting
in this case is H5F_AVOID_TRUNCATE_EXTEND, as this will
still allow files to reduce in size when space can be
reclaimed.
The above required some changes to expected test cases
since the file format when the latest format is used now
includes an 'EOA' message. A handful of the h5mkgrp test
files had their locations updated, and the cache_tagging
test was updated to account for superblock extension in
the latest case.
The change to an 'enum' required an update to the 'EOA'
message, since there is no longer a one-to-one
correspondence between the avoid truncate property
setting and whether or not to store an EOA. As such, the
avoid truncate property setting has been added into the
EOA message, and a new EOA message struct created,
H5O_eoa_t, to house it along with the EOA value.
(message previously consisted of just the EOA value).
The above change was propogated as needed, including
changes made to the h5extend tool in order to account
for the changes needed in acquiring the EOA value from
the message stored in the superblock extension.
Finally, the test file trunc_detect was renamed
'truncation' since it does more than just test
truncation detection. It was also refactored to account
for the enumerated setting, and divided into three
distinct parts: testing of setting the avoid truncate
property, testing truncation occurence, and testing
truncation detection.
Additionally, in passing:
- Removed unused udata argument from H5FDcoordinate.
- Updated trace file for H5F_avoid_truncate_t type.
Tested:
h5committest and manually on jam w/ check-vfd.
Diffstat (limited to 'src/H5Oprivate.h')
-rw-r--r-- | src/H5Oprivate.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index aeed708..92fc2d6 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -329,6 +329,13 @@ typedef struct H5O_efl_t { H5O_efl_entry_t *slot; /*array of external file entries */ } H5O_efl_t; +/* + * EOA Message + */ +typedef struct H5O_eoa_t { + H5F_avoid_truncate_t avoid_truncate; /* Avoid Truncate setting for the file */ + hsize_t eoa; /* 'EOA' value */ +} H5O_eoa_t; /* * Data Layout Message. |