summaryrefslogtreecommitdiffstats
path: root/src/H5Fpkg.h
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2009-04-04 03:58:27 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2009-04-04 03:58:27 (GMT)
commit2bb8a8044afbaa3312dd9dae279b14fab1a6884d (patch)
tree15096c73eabe92d7621411e2a43a5ae920a911d7 /src/H5Fpkg.h
parent7788ad94856eeefbc06d521f0b7351131cd7a140 (diff)
downloadhdf5-2bb8a8044afbaa3312dd9dae279b14fab1a6884d.zip
hdf5-2bb8a8044afbaa3312dd9dae279b14fab1a6884d.tar.gz
hdf5-2bb8a8044afbaa3312dd9dae279b14fab1a6884d.tar.bz2
[svn-r16670] Interrim checkin of journal file modifications supporting recognition
and rejection of attempts to apply the wrong journal file to a corrupt HDF5 file. Specifically, I made the following changes: 1) Moved all journaling data into the journaling in progress superblock extension message. 2) Added a "magic number" to the journaling in progress message, with the same "magic number being added to the header of the associated journal file. 3) Modifications to library test code to support the above. 4) Modified h5recover to examine the supplied hdf5 file, determine if it is in fact a HDF5 file, if so determine if it is marked as having journaling in progress, and if it does, extract the contents of the journaling in progress super block extension message. 5) Modified h5recover to examine the supplied journal file, determine if it is in fact a HDF5 journal file, and if so, extract the data from its header. 6) Modified h5recover to refuse to apply the supplied journal file to the supplied HDF5 file unless the "magic numbers" obtained from these files matches. 7) Added an examine option to h5recover that causes it to examine and report on the supplied files, but do nothing. This option exists primarily to facilitate testing, but I expect that some users will find it useful as well. 8) Added test code to exercise items 4-7. Note that while I have tried to cover the more likely cases, this test code is extremely cursory. In particular, the code to examine the supplied HDF5 file is barely tested at all. Need a library of HDF5 files exibiting the full range of possible super block and super block extension message structures to test this properly. 9) In passing, tighened up the code that controls dumps of "possibly significant" differences between the contents of the control and recovered data sets in the h5recover. It should now ignore one integer matches in what appears to be garbage raw data. Tested: serial and parallel on Phoenix serial and parallel on Jam serial on Linew serial on Liberty All tests were done in debug mode.
Diffstat (limited to 'src/H5Fpkg.h')
-rw-r--r--src/H5Fpkg.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 08a53a5..1318eb8 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -138,7 +138,12 @@ typedef struct H5F_file_t {
struct H5G_t *root_grp; /* Open root group */
H5FO_t *open_objs; /* Open objects in file */
H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */
- hbool_t mdc_jrnl_enabled; /* TRUE iff journaling is in progress */
+ hbool_t mdc_jnl_enabled; /* TRUE iff journaling is in progress */
+ int32_t mdc_jnl_magic; /* journal file magic -- if defined */
+ size_t mdc_jnl_file_name_len; /* journal file name length */
+ char mdc_jnl_file_name[H5C2__MAX_JOURNAL_FILE_NAME_LEN + 1];
+ /* journal file name -- if defined */
+/* todo -- delete the following lines. -- JRM */
haddr_t mdc_jrnl_block_loc; /* Rel addr of mdc journal block */
hsize_t mdc_jrnl_block_len; /* Length of mdc journal block */
} H5F_file_t;