diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2008-03-13 20:57:47 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2008-03-13 20:57:47 (GMT) |
commit | cbdca772735710a372dcf57915d3bc5bff58ef07 (patch) | |
tree | 932a3008ef2fce2c5dfe7821c6576cfb00c88f2d /src/H5C2pkg.h | |
parent | d1a21a4553d3f7603eb4086770696931d79b4647 (diff) | |
download | hdf5-cbdca772735710a372dcf57915d3bc5bff58ef07.zip hdf5-cbdca772735710a372dcf57915d3bc5bff58ef07.tar.gz hdf5-cbdca772735710a372dcf57915d3bc5bff58ef07.tar.bz2 |
[svn-r14736] Purpose: Updating journal entry logging code, and adding tests.
Description: Journal entry logging code has been upgraded. The code
now accurately tracks transactions that have made it
to disk, and converts data from binary to hex for
entry into the journal file. Various other minor
code modifications have been made based on suggestions
by John Mainzer.
More tests have been added to verify the functionality
of the logging code. Specifically, tests have been
written to verify functionality of the ring buffer, to
check validity of journal messages produced, and to
verify that transaction tracking is functioning
appropriately.
Tested: kagiso, smirom, linew, duty
Diffstat (limited to 'src/H5C2pkg.h')
-rw-r--r-- | src/H5C2pkg.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/H5C2pkg.h b/src/H5C2pkg.h index 30d1f42..6c3a0de 100644 --- a/src/H5C2pkg.h +++ b/src/H5C2pkg.h @@ -130,14 +130,22 @@ * ring buffer needs to switch to writing to the next * journal buffer. * - * rb_free_space: The amount of space remaining in the entire ring - * buffer. This is needed to determine if writes to - * the ring buffer need to loop around to the top of - * the chunk of allocated memory. + * rb_space_to_rollover: The amount of space left at the end of the ring + * buffer, starting at the head pointer, and ending at + * the end of the ring buffer's allocate space. This + * is used to keep track of when a rollover to the start + * of the ring buffer must occur. + * + * rb_free_space: The amount of unused space in the ring buffer. * * head: A pointer to the location in the active journal buffer * that is to be written to. * + * trans_tracking: An array of size num_bufs that reports the last + * transaction successfully written into each buffer. This + * is used when the buffers are flushed to determine which + * is the last transaction successfully on disk. + * * buf: Array of char pointers to each journal buffer in the * ring buffer. This is allocated as a single chunk of * memory, and thus data can be written past a buffer @@ -170,9 +178,10 @@ struct H5C2_jbrb_t char * hdf5_file_name; hbool_t header_present; size_t cur_buf_free_space; + size_t rb_space_to_rollover; size_t rb_free_space; char * head; - unsigned long (*trans_on_disk_record)[]; + unsigned long (*trans_tracking)[]; char *((*buf)[]); }; |