mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r20135] Description:
Bring r20134 from metadata journaling merging branch to trunk: Bring changes from metadata journaling branch to "merging" branch: Unify routine to mark a dataset's metadata as changed. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
This commit is contained in:
parent
cf7f31f0c6
commit
cab5c372bf
@ -366,7 +366,8 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
|
||||
|
||||
/* Mark the dataspace as dirty, for later writing to the file */
|
||||
dataset->shared->space_dirty = TRUE;
|
||||
if(H5D_mark(dataset, dxpl_id, H5D_MARK_SPACE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
|
42
src/H5Dint.c
42
src/H5Dint.c
@ -1691,7 +1691,9 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
|
||||
* operation just sets the address and makes it constant)
|
||||
*/
|
||||
if(time_alloc != H5D_ALLOC_CREATE && addr_set)
|
||||
dset->shared->layout_dirty = TRUE;
|
||||
/* Mark the layout as dirty, for later writing to the file */
|
||||
if(H5D_mark(dset, dxpl_id, H5D_MARK_LAYOUT) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
@ -2197,7 +2199,8 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
|
||||
} /* end if */
|
||||
|
||||
/* Mark the dataspace as dirty, for later writing to the file */
|
||||
dset->shared->space_dirty = TRUE;
|
||||
if(H5D_mark(dset, dxpl_id, H5D_MARK_SPACE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
@ -2316,6 +2319,41 @@ done:
|
||||
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
|
||||
} /* end H5D_flush_real() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_mark
|
||||
*
|
||||
* Purpose: Mark some aspect of a dataset as dirty
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* July 4, 2008
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT(H5D_mark)
|
||||
|
||||
/* Check args */
|
||||
HDassert(dataset);
|
||||
HDassert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
|
||||
|
||||
/* Mark aspects of the dataset as dirty */
|
||||
if(flags & H5D_MARK_SPACE)
|
||||
dataset->shared->space_dirty = TRUE;
|
||||
if(flags & H5D_MARK_LAYOUT)
|
||||
dataset->shared->layout_dirty = TRUE;
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_mark() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_flush_cb
|
||||
|
@ -65,6 +65,10 @@
|
||||
|
||||
#define H5D_CHUNK_HASH(D, ADDR) H5F_addr_hash(ADDR, (D)->cache.chunk.nslots)
|
||||
|
||||
/* Flags for marking aspects of a dataset dirty */
|
||||
#define H5D_MARK_SPACE 0x01
|
||||
#define H5D_MARK_LAYOUT 0x02
|
||||
|
||||
|
||||
/****************************/
|
||||
/* Package Private Typedefs */
|
||||
@ -543,6 +547,7 @@ H5_DLL herr_t H5D_check_filters(H5D_t *dataset);
|
||||
H5_DLL herr_t H5D_set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache);
|
||||
H5_DLL herr_t H5D_flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags);
|
||||
|
||||
/* Functions that perform direct serial I/O operations */
|
||||
H5_DLL herr_t H5D_select_read(const H5D_io_info_t *io_info,
|
||||
|
Loading…
Reference in New Issue
Block a user