summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-13 15:36:47 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-13 15:36:47 (GMT)
commit5cae95154903ecd6564f0712e42168892df17b7d (patch)
treeffc18b449e49921bbe15cb7a02c6b2f0785f3324 /src/H5C.c
parent46ef9d9c266b704ba93ed55296ed2ebab600a2a4 (diff)
downloadhdf5-5cae95154903ecd6564f0712e42168892df17b7d.zip
hdf5-5cae95154903ecd6564f0712e42168892df17b7d.tar.gz
hdf5-5cae95154903ecd6564f0712e42168892df17b7d.tar.bz2
[svn-r27] ./src/H5B.c
./src/H5Bprivate.h The B-tree K value comes from a combination of the B-tree subclass and the file. ./src/H5C.c ./src/H5F.c ./src/hdf5lims.h ./src/hdf5type.h Removed the B-tree size parameter and added an array of B-tree K values. Also added symbol table node K value. ./src/H5Eprivate.h ./src/H5Eproto.h Added H5E_LINK for errors involving link counts. ./src/H5G.c Inserting something into a directory with H5G_insert() increments the link count in the object header. The root object should always have a link count of at least 1. ./src/H5Gnode.c ./src/H5Gprivate.h The symbol table node K value comes from the file instead of being a constant. ./src/H5Olink.c Added an assert(), fixed a hard-link bug.
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c45
1 files changed, 37 insertions, 8 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 1ed0c31..67f4d72 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -36,6 +36,7 @@ static char RcsId[] = "@(#)$Revision$";
/* private header files */
#include "H5private.h" /* Generic Functions */
+#include "H5Bprivate.h" /* B-tree subclass names */
#include "H5Cprivate.h" /* Template information */
#define PABLO_MASK H5C_mask
@@ -48,7 +49,8 @@ static intn interface_initialize_g = FALSE;
/* Define the library's default file creation template (constants in hdf5lims.h) */
const file_create_temp_t default_file_create={
HDF5_USERBLOCK_DEFAULT, /* Default user-block size */
- HDF5_BTREEPAGE_DEFAULT, /* Default B-tree page size */
+ HDF5_SYM_LEAF_K_DEFAULT, /* Default 1/2 rank for symtab leaf nodes */
+ HDF5_BTREE_K_DEFAULT, /* Default 1/2 rank for btree internal nodes */
HDF5_OFFSETSIZE_DEFAULT, /* Default offset size */
HDF5_LENGTHSIZE_DEFAULT, /* Default length size */
HDF5_BOOTBLOCK_VERSION, /* Current Boot-Block version # */
@@ -293,6 +295,11 @@ done:
DESCRIPTION
This function retrieves the value of a specific parameter from a
template
+
+ MODIFICATIONS
+ Robb Matzke, 13 Aug 1997
+ Removed H5_BTREE_SIZE and replaced it with H5_SYM_LEAF_K and
+ H5_SYM_INTERN_K.
--------------------------------------------------------------------------*/
herr_t H5Cgetparm(hatom_t tid, file_create_param_t parm, VOIDP buf)
{
@@ -324,9 +331,13 @@ herr_t H5Cgetparm(hatom_t tid, file_create_param_t parm, VOIDP buf)
*(uintn *)buf=template->length_size;
break;
- case H5_BTREE_SIZE:
- *(uintn *)buf=template->btree_page_size;
- break;
+ case H5_SYM_LEAF_K:
+ *(uintn *)buf=template->sym_leaf_k;
+ break;
+
+ case H5_SYM_INTERN_K:
+ *(uintn *)buf = template->btree_k[H5B_SNODE_ID];
+ break;
case H5_BOOTBLOCK_VER:
*(uint8 *)buf=template->bootblock_ver;
@@ -377,11 +388,17 @@ done:
SUCCEED/FAIL
DESCRIPTION
This function stores the value of a specific parameter for a template
+
+ MODIFICATIONS
+ Robb Matzke, 13 Aug 1997
+ Removed H5_BTREE_SIZE and replaced it with H5_SYM_LEAF_K and
+ H5_SYM_INTERN_K.
--------------------------------------------------------------------------*/
herr_t H5Csetparm(hatom_t tid, file_create_param_t parm, const VOIDP buf)
{
file_create_temp_t *template; /* template to query */
herr_t ret_value = SUCCEED;
+ uintn val;
FUNC_ENTER(H5Csetparm, H5C_init_interface, FAIL);
@@ -408,10 +425,22 @@ herr_t H5Csetparm(hatom_t tid, file_create_param_t parm, const VOIDP buf)
template->length_size=*(const uintn *)buf;
break;
- case H5_BTREE_SIZE:
- template->btree_page_size=*(const uintn *)buf;
- break;
-
+ case H5_SYM_LEAF_K:
+ val = *(const uintn *)buf;
+ if (val<2) {
+ HGOTO_ERROR (H5E_ARGS, H5E_BADRANGE, FAIL);
+ }
+ template->sym_leaf_k = val;
+ break;
+
+ case H5_SYM_INTERN_K:
+ val = *(const uintn *)buf;
+ if (val<2) {
+ HGOTO_ERROR (H5E_ARGS, H5E_BADRANGE, FAIL);
+ }
+ template->btree_k[H5B_SNODE_ID] = val;
+ break;
+
case H5_BOOTBLOCK_VER:
template->bootblock_ver=*(const uint8 *)buf;
break;