diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-12-15 09:48:59 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-12-15 09:48:59 (GMT) |
commit | 4fe9d56f786f1f43e06655fa238ac7b11a194ba1 (patch) | |
tree | 7b1d0a0d729a2fe508efb0c46360d5204edec7b1 /src/H5EApkg.h | |
parent | e9da1c3460abdb32496f9271edf2a2dbbaa4e72b (diff) | |
download | hdf5-4fe9d56f786f1f43e06655fa238ac7b11a194ba1.zip hdf5-4fe9d56f786f1f43e06655fa238ac7b11a194ba1.tar.gz hdf5-4fe9d56f786f1f43e06655fa238ac7b11a194ba1.tar.bz2 |
[svn-r28658] Manual merge of revise_chunks and alpha branch.
Tested on: Unbuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
Autotools serial (C++ Fortran)
Autotools parallel (MPICH 3.1.4, Fortran)
CMake serial (CMake 3.3.2)
Diffstat (limited to 'src/H5EApkg.h')
-rw-r--r-- | src/H5EApkg.h | 82 |
1 files changed, 55 insertions, 27 deletions
diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 3af1b2c..147a612 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -14,12 +14,12 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * Tuesday, June 17, 2008 + * Programmer: Quincey Koziol <koziol@hdfgroup.org> + * Tuesday, June 17, 2008 * - * Purpose: This file contains declarations which are visible only within - * the H5EA package. Source files outside the H5EA package should - * include H5EAprivate.h instead. + * Purpose: This file contains declarations which are visible only within + * the H5EA package. Source files outside the H5EA package should + * include H5EAprivate.h instead. */ #if !(defined(H5EA_FRIEND) | defined(H5EA_MODULE)) #error "Do not include this file outside the H5EA package!" @@ -32,7 +32,7 @@ #include "H5EAprivate.h" /* Other private headers needed by this file */ -#include "H5FLprivate.h" /* Free Lists */ +#include "H5FLprivate.h" /* Free Lists */ /**************************/ @@ -95,10 +95,10 @@ /* General metadata fields */ \ H5EA_METADATA_PREFIX_SIZE(TRUE) \ \ - /* Sanity-checking fields */ \ + /* Sanity-checking fields */ \ + (i)->hdr->sizeof_addr /* File address of array owning the block */ \ \ - /* Extensible Array Index Block specific fields */ \ + /* Extensible Array Index Block specific fields */ \ + ((size_t)(i)->hdr->cparam.idx_blk_elmts * (size_t)(i)->hdr->cparam.raw_elmt_size) /* Elements in index block */ \ + ((i)->ndblk_addrs * (i)->hdr->sizeof_addr) /* Data block addresses in index block */ \ + ((i)->nsblk_addrs * (i)->hdr->sizeof_addr) /* Super block addresses in index block */ \ @@ -109,31 +109,31 @@ /* General metadata fields */ \ H5EA_METADATA_PREFIX_SIZE(TRUE) \ \ - /* Sanity-checking fields */ \ + /* Sanity-checking fields */ \ + (s)->hdr->sizeof_addr /* File address of array owning the block */ \ + (s)->hdr->arr_off_size /* Offset of the block in the array */ \ \ - /* Extensible Array Super Block specific fields */ \ + /* Extensible Array Super Block specific fields */ \ + ((s)->ndblks * (s)->dblk_page_init_size) /* Data block 'page init' bitmasks in super block (can be 0 if no pages) */ \ + ((s)->ndblks * (s)->hdr->sizeof_addr) /* Data block addresses in super block */ \ ) /* Size of the extensible array data block prefix on disk */ -#define H5EA_DBLOCK_PREFIX_SIZE(d) ( \ +#define H5EA_DBLOCK_PREFIX_SIZE(d) ( \ /* General metadata fields */ \ H5EA_METADATA_PREFIX_SIZE(TRUE) \ \ - /* Sanity-checking fields */ \ + /* Sanity-checking fields */ \ + (d)->hdr->sizeof_addr /* File address of array owning the block */ \ + (d)->hdr->arr_off_size /* Offset of the block in the array */ \ ) /* Size of the extensible array data block on disk */ -#define H5EA_DBLOCK_SIZE(d) ( \ +#define H5EA_DBLOCK_SIZE(d) ( \ /* Data block prefix size */ \ H5EA_DBLOCK_PREFIX_SIZE(d) \ \ - /* Extensible Array Data Block specific fields */ \ + /* Extensible Array Data Block specific fields */ \ + ((d)->nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) /* Elements in data block */ \ + ((d)->npages * H5EA_SIZEOF_CHKSUM) /* Checksum for each page */ \ ) @@ -191,6 +191,7 @@ typedef struct H5EA_hdr_t { haddr_t addr; /* Address of header in file */ size_t size; /* Size of header in file */ H5F_t *f; /* Pointer to file for extensible array */ + hbool_t swmr_write; /* Flag indicating the file is opened with SWMR-write access */ size_t file_rc; /* Reference count of files using array header */ hbool_t pending_delete; /* Array is pending deletion */ size_t sizeof_addr; /* Size of file addresses */ @@ -206,6 +207,33 @@ typedef struct H5EA_hdr_t { /* Client information (not stored) */ void *cb_ctx; /* Callback context */ + + /* Flush depencency parent information (not stored) */ + haddr_t fd_parent_addr; /* Address of flush dependency parent, + * if any. This field is initialized + * to HADDR_UNDEF. If the extensible + * array is being used to index a + * chunked data set and the data set + * metadata is modified by a SWMR + * writer, this field will be set equal + * to the object header proxy that is + * the flush dependency parent of the + * extensible array header. + * + * The field is used to avoid duplicate + * setups of the flush dependency + * relationship, and to allow the + * extensible array header to destroy + * the flush dependency on receipt of + * an eviction notification from the + * metadata cache. + */ + H5AC_info_t *fd_parent_ptr; /* Pointer to flush dependency parent, + * if it exists, otherwise NULL. (See + * comment for fd_parent_addr above for + * further details) + */ + } H5EA_hdr_t; /* The extensible array index block information */ @@ -219,9 +247,9 @@ typedef struct H5EA_iblock_t { haddr_t *sblk_addrs; /* Buffer for addresses of super blocks in index block */ /* Internal array information (not stored) */ - H5EA_hdr_t *hdr; /* Shared array header info */ - haddr_t addr; /* Address of this index block on disk */ - size_t size; /* Size of index block on disk */ + H5EA_hdr_t *hdr; /* Shared array header info */ + haddr_t addr; /* Address of this index block on disk */ + size_t size; /* Size of index block on disk */ /* Computed/cached values (not stored) */ size_t nsblks; /* # of super blocks whose data block addresses are in index block */ @@ -240,10 +268,10 @@ typedef struct H5EA_sblock_t { uint8_t *page_init; /* Bitmap of whether a data block page is initialized */ /* Internal array information (not stored) */ - H5EA_hdr_t *hdr; /* Shared array header info */ - H5EA_iblock_t *parent; /* Parent object for super block (index block) */ - haddr_t addr; /* Address of this index block on disk */ - size_t size; /* Size of index block on disk */ + H5EA_hdr_t *hdr; /* Shared array header info */ + H5EA_iblock_t *parent; /* Parent object for super block (index block) */ + haddr_t addr; /* Address of this index block on disk */ + size_t size; /* Size of index block on disk */ /* Computed/cached values (not stored) */ unsigned idx; /* Super block index within the extensible array */ @@ -264,10 +292,10 @@ typedef struct H5EA_dblock_t { void *elmts; /* Buffer for elements stored in data block */ /* Internal array information (not stored) */ - H5EA_hdr_t *hdr; /* Shared array header info */ + H5EA_hdr_t *hdr; /* Shared array header info */ void *parent; /* Parent object for data block (index or super block) */ - haddr_t addr; /* Address of this data block on disk */ - size_t size; /* Size of data block on disk */ + haddr_t addr; /* Address of this data block on disk */ + size_t size; /* Size of data block on disk */ /* Computed/cached values (not stored) */ size_t nelmts; /* Number of elements in block */ @@ -283,10 +311,10 @@ typedef struct H5EA_dbk_page_t { void *elmts; /* Buffer for elements stored in data block page */ /* Internal array information (not stored) */ - H5EA_hdr_t *hdr; /* Shared array header info */ + H5EA_hdr_t *hdr; /* Shared array header info */ H5EA_sblock_t *parent; /* Parent object for data block page (super block) */ haddr_t addr; /* Address of this data block page on disk */ - size_t size; /* Size of data block page on disk */ + size_t size; /* Size of data block page on disk */ /* Computed/cached values (not stored) */ /* <none> */ @@ -360,7 +388,7 @@ H5_DLLVAR const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1]; H5_DLLVAR const H5EA_class_t H5EA_CLS_TEST[1]; /* Array of extensible array client ID -> client class mappings */ -extern const H5EA_class_t *const H5EA_client_class_g[H5EA_NUM_CLS_ID]; +H5_DLLVAR const H5EA_class_t *const H5EA_client_class_g[H5EA_NUM_CLS_ID]; /******************************/ |