summaryrefslogtreecommitdiffstats
path: root/src/H5Bprivate.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2012-02-27 16:34:55 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2012-02-27 16:34:55 (GMT)
commit73c139e29b45941dfc4e558d9096a0869a184260 (patch)
tree422cc12e6675238cd92edadc078fa427a4f6bcd0 /src/H5Bprivate.h
parente2cd00055204f6b264002e70b21a6e2ca4c98c77 (diff)
downloadhdf5-73c139e29b45941dfc4e558d9096a0869a184260.zip
hdf5-73c139e29b45941dfc4e558d9096a0869a184260.tar.gz
hdf5-73c139e29b45941dfc4e558d9096a0869a184260.tar.bz2
[svn-r21989] Purpose: Add SWMR capability to v1 b-tree
Description: Adds SWMR capability to v1 b-trees, and the chunk index using v1 b-trees. With this implementation, flush dependencies are always on when in the cache. This will allow attritbutes to be used for "checkpointing" data when object header dependencies are fixed - i.e. if a writer writes data before an attribute in that dataset's object header, then if a reader sees the updated attribute the written data is guaranteed to be visible, as long as that dataset's b-tree nodes are evicted from the reader's cache. Also adds support for compression with SWMR. Also fixes earray implementation to not free (reuse) the file space for deleted chunks and outdated versions of compressed chunks when doing SWMR writes. These should eventually be added to a timeout list. Adds testing for these cases. Tested: durandal
Diffstat (limited to 'src/H5Bprivate.h')
-rw-r--r--src/H5Bprivate.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index 83a357b..a7b303d 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -100,6 +100,7 @@ typedef struct H5B_shared_t {
size_t sizeof_len; /* Size of file lengths (in bytes) */
uint8_t *page; /* Disk page */
size_t *nkey; /* Offsets of each native key in native key buffer */
+ hbool_t swmr_write; /* Whether we are doing SWMR writes */
} H5B_shared_t;
/*
@@ -138,6 +139,10 @@ typedef struct H5B_class_t {
herr_t (*decode)(const H5B_shared_t*, const uint8_t*, void*);
herr_t (*encode)(const H5B_shared_t*, uint8_t*, const void*);
herr_t (*debug_key)(FILE*, int, int, const void*, const void*);
+
+ /* flush dependency functions */
+ herr_t (*create_flush_dep)(void*, void *, void *);
+ herr_t (*update_flush_dep)(void*, void *, void *, void*);
} H5B_class_t;
/* Information about B-tree */
@@ -157,25 +162,30 @@ typedef struct H5B_info_t {
/* Library-private Function Prototypes */
/***************************************/
H5_DLL herr_t H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- void *udata, haddr_t *addr_p/*out*/);
+ void *udata, void *parent, haddr_t *addr_p/*out*/);
H5_DLL herr_t H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
+ haddr_t addr, void *udata, void *parent);
H5_DLL herr_t H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
+ haddr_t addr, void *udata, void *parent);
H5_DLL herr_t H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, H5B_operator_t op, void *udata);
+ haddr_t addr, H5B_operator_t op, void *udata, void *parent);
H5_DLL herr_t H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, H5B_info_t *bt_info, H5B_operator_t op, void *udata);
+ haddr_t addr, H5B_info_t *bt_info, H5B_operator_t op, void *udata,
+ void *parent);
H5_DLL herr_t H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
+ haddr_t addr, void *udata, void *parent);
H5_DLL herr_t H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
+ haddr_t addr, void *udata, void *parent);
H5_DLL H5B_shared_t *H5B_shared_new(const H5F_t *f, const H5B_class_t *type,
size_t sizeof_rkey);
H5_DLL herr_t H5B_shared_free(void *_shared);
+H5_DLL htri_t H5B_support(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
+ haddr_t addr, void *udata, void *parent, void *child);
+H5_DLL herr_t H5B_unsupport(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
+ haddr_t addr, void *udata, void *parent, void *child);
H5_DLL herr_t H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream,
int indent, int fwidth, const H5B_class_t *type, void *udata);
H5_DLL htri_t H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr);
+ haddr_t addr, void *parent);
#endif /* _H5Bprivate_H */