diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2008-08-21 21:54:44 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2008-08-21 21:54:44 (GMT) |
commit | 5a50fca18dd2ffd58160c38486cc4f0de8fdc460 (patch) | |
tree | c3641352ff45ae108d17a48e181be8effc68140d /src/H5MF.c | |
parent | a3349271e9d9bccf269c1d88140167c6db405f68 (diff) | |
download | hdf5-5a50fca18dd2ffd58160c38486cc4f0de8fdc460.zip hdf5-5a50fca18dd2ffd58160c38486cc4f0de8fdc460.tar.gz hdf5-5a50fca18dd2ffd58160c38486cc4f0de8fdc460.tar.bz2 |
[svn-r15514] Purpose:
- EOA logging update
Description:
- EOA values will now be written to the journal
file in their own transaction when the EOA
changes.
- The EOA will be udpated in the HDF5 file's
superblock before the recovery process begins.
This should prevent some loss of raw data as the
file won't be getting truncated upon file open as
it will read the correct EOA value from the
superblock.
- Removed storing of EOA in journal entry messages
since they're in their own transaction.
- Updated tests to reflect change of transaction
formats. Regenerated smoke test files to account
for new entry types, and tweaked transaction number
tests to reflect change in size of journal entries.
- Large testfiles (in test/testfiles) should now
unzip when ./configure is run.
- When journal file is supplied but contains no
complete transactions, instead of reporting
an error, h5recover now informs the user of said
nonexistant transactions, and opens/closes the
hdf5 file with the journal recovered flag set.
- Other various organizational changes to h5recover,
included a bit more added to verbose output.
Tested:
- kagiso, smirom
Diffstat (limited to 'src/H5MF.c')
-rw-r--r-- | src/H5MF.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -28,6 +28,7 @@ /* Module Setup */ /****************/ +#define H5C2_PACKAGE /*suppress error about including H5C2pkg */ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ @@ -35,6 +36,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5C2pkg.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5MFprivate.h" /* File memory management */ @@ -96,7 +98,8 @@ static hbool_t H5MF_alloc_overflow(const H5F_t *f, hsize_t size); haddr_t H5MF_alloc(const H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) { - haddr_t ret_value; + haddr_t ret_value, new_eoa; + herr_t result; FUNC_ENTER_NOAPI(H5MF_alloc, HADDR_UNDEF) @@ -111,6 +114,20 @@ H5MF_alloc(const H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) /* Allocate space from the virtual file layer */ if(HADDR_UNDEF == (ret_value = H5FD_alloc(f->shared->lf, type, dxpl_id, size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed") + + /* Check for journaling in progress */ + if (f->shared->cache2->mdj_enabled == 1) { + + /* get updated EOA value */ + if (HADDR_UNDEF ==(new_eoa = H5FDget_eoa(f->shared->lf, H5FD_MEM_DEFAULT))) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, \ + "file get eoa request failed") + + /* journal the updated EOA value */ + if(SUCCEED != H5C2_jb__eoa(&(f->shared->cache2->mdj_jbrb), new_eoa)) + HGOTO_ERROR(H5E_CACHE, H5E_CANTJOURNAL, FAIL, \ + "H5C2_jb__eoa() failed.") + } /* end if */ /* Convert absolute file address to relative file address */ HDassert(ret_value >= f->shared->base_addr); |