summaryrefslogtreecommitdiffstats
path: root/src/H5Gstab.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-02-10 17:26:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-02-10 17:26:09 (GMT)
commit24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435 (patch)
tree6b2eb3bb1e782c40718204882428e6471b6281ac /src/H5Gstab.c
parent738661ab9f409b8d961ba1402d6c4dd5f99ecb43 (diff)
downloadhdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.zip
hdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.tar.gz
hdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.tar.bz2
[svn-r6387] Purpose:
Bug Fix Description: Metadata cache in parallel I/O can cause hangs in applications which perform independent I/O on chunked datasets, because the metadata cache can attempt to flush out dirty metadata from only a single process, instead of collectively from all processes. Solution: Pass a dataset transfer property list down from every API function which could possibly trigger metadata I/O. Then, split the metadata cache into two sets of entries to allow dirty metadata to be set aside when a hash table collision occurs during independent I/O. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} FreeBSD 4.7 (sleipnir) serial & parallel Misc. update: Updated release_docs/RELEASE
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r--src/H5Gstab.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 9aa46dc..4e35771 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -55,7 +55,7 @@ static herr_t H5G_insert_name(H5G_entry_t *loc, H5G_entry_t *obj,
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_create(H5F_t *f, size_t init, H5G_entry_t *self/*out*/)
+H5G_stab_create(H5F_t *f, hid_t dxpl_id, size_t init, H5G_entry_t *self/*out*/)
{
size_t name; /*offset of "" name */
H5O_stab_t stab; /*symbol table message */
@@ -71,9 +71,9 @@ H5G_stab_create(H5F_t *f, size_t init, H5G_entry_t *self/*out*/)
init = MAX(init, H5HL_SIZEOF_FREE(f) + 2);
/* Create symbol table private heap */
- if (H5HL_create(f, init, &(stab.heap_addr)/*out*/)<0)
+ if (H5HL_create(f, dxpl_id, init, &(stab.heap_addr)/*out*/)<0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap");
- name = H5HL_insert(f, stab.heap_addr, 1, "");
+ name = H5HL_insert(f, dxpl_id, stab.heap_addr, 1, "");
if ((size_t)(-1)==name)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't initialize heap");
@@ -84,7 +84,7 @@ H5G_stab_create(H5F_t *f, size_t init, H5G_entry_t *self/*out*/)
assert(0 == name);
/* Create the B-tree */
- if (H5B_create(f, H5B_SNODE, NULL, &(stab.btree_addr)/*out*/) < 0)
+ if (H5B_create(f, dxpl_id, H5B_SNODE, NULL, &(stab.btree_addr)/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree");
/*
@@ -92,14 +92,14 @@ H5G_stab_create(H5F_t *f, size_t init, H5G_entry_t *self/*out*/)
* since nothing refers to it yet. The link count will be
* incremented if the object is added to the group directed graph.
*/
- if (H5O_create(f, 4 + 2 * H5F_SIZEOF_ADDR(f), self/*out*/) < 0)
+ if (H5O_create(f, dxpl_id, 4 + 2 * H5F_SIZEOF_ADDR(f), self/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header");
/*
* Insert the symbol table message into the object header and the symbol
* table entry.
*/
- if (H5O_modify(self, H5O_STAB, H5O_NEW_MESG, H5O_FLAG_CONSTANT, 1, &stab)<0) {
+ if (H5O_modify(self, H5O_STAB, H5O_NEW_MESG, H5O_FLAG_CONSTANT, 1, &stab, dxpl_id)<0) {
H5O_close(self);
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message");
}
@@ -137,7 +137,7 @@ done:
*/
herr_t
H5G_stab_find(H5G_entry_t *grp_ent, const char *name,
- H5G_entry_t *obj_ent/*out*/)
+ H5G_entry_t *obj_ent/*out*/, hid_t dxpl_id)
{
H5G_bt_ud1_t udata; /*data to pass through B-tree */
H5O_stab_t stab; /*symbol table message */
@@ -151,14 +151,14 @@ H5G_stab_find(H5G_entry_t *grp_ent, const char *name,
assert(name && *name);
/* set up the udata */
- if (NULL == H5O_read(grp_ent, H5O_STAB, 0, &stab))
+ if (NULL == H5O_read(grp_ent, H5O_STAB, 0, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't read message");
udata.operation = H5G_OPER_FIND;
udata.name = name;
udata.heap_addr = stab.heap_addr;
/* search the B-tree */
- if (H5B_find(grp_ent->file, H5B_SNODE, stab.btree_addr, &udata) < 0) {
+ if (H5B_find(grp_ent->file, dxpl_id, H5B_SNODE, stab.btree_addr, &udata) < 0) {
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "not found");
} /* end if */
/* change OBJ_ENT only if found */
@@ -202,7 +202,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_insert(H5G_entry_t *grp_ent, const char *name, H5G_entry_t *obj_ent)
+H5G_stab_insert(H5G_entry_t *grp_ent, const char *name, H5G_entry_t *obj_ent, hid_t dxpl_id)
{
H5O_stab_t stab; /*symbol table message */
H5G_bt_ud1_t udata; /*data to pass through B-tree */
@@ -223,7 +223,7 @@ H5G_stab_insert(H5G_entry_t *grp_ent, const char *name, H5G_entry_t *obj_ent)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot insert name");
/* initialize data to pass through B-tree */
- if (NULL == H5O_read(grp_ent, H5O_STAB, 0, &stab))
+ if (NULL == H5O_read(grp_ent, H5O_STAB, 0, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table");
udata.operation = H5G_OPER_INSERT;
udata.name = name;
@@ -231,7 +231,7 @@ H5G_stab_insert(H5G_entry_t *grp_ent, const char *name, H5G_entry_t *obj_ent)
H5G_ent_copy(&(udata.ent),obj_ent,H5G_COPY_NULL); /* NULL copy here, no copies happens in H5G_node_insert() callback() */
/* insert */
- if (H5B_insert(grp_ent->file, H5B_SNODE, stab.btree_addr, split_ratios, &udata) < 0)
+ if (H5B_insert(grp_ent->file, dxpl_id, H5B_SNODE, stab.btree_addr, split_ratios, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry");
/* update the name offset in the entry */
@@ -257,7 +257,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_remove(H5G_entry_t *grp_ent, const char *name)
+H5G_stab_remove(H5G_entry_t *grp_ent, const char *name, hid_t dxpl_id)
{
H5O_stab_t stab; /*symbol table message */
H5G_bt_ud1_t udata; /*data to pass through B-tree */
@@ -269,7 +269,7 @@ H5G_stab_remove(H5G_entry_t *grp_ent, const char *name)
assert(name && *name);
/* initialize data to pass through B-tree */
- if (NULL==H5O_read(grp_ent, H5O_STAB, 0, &stab))
+ if (NULL==H5O_read(grp_ent, H5O_STAB, 0, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table");
udata.operation = H5G_OPER_REMOVE;
udata.name = name;
@@ -277,7 +277,7 @@ H5G_stab_remove(H5G_entry_t *grp_ent, const char *name)
HDmemset(&(udata.ent), 0, sizeof(udata.ent));
/* remove */
- if (H5B_remove(grp_ent->file, H5B_SNODE, stab.btree_addr, &udata)<0)
+ if (H5B_remove(grp_ent->file, dxpl_id, H5B_SNODE, stab.btree_addr, &udata)<0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry");
done: