summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2017-06-09 19:01:07 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2017-07-18 04:28:31 (GMT)
commit66efce85e7ad9430d5e58d529d7b7a55b0d4ac5f (patch)
tree1608fee88c35f04a39a383aa139ae263a4cf1f38 /src
parent26390d02df919476ff3d293293dacbcaba9a4c24 (diff)
downloadhdf5-66efce85e7ad9430d5e58d529d7b7a55b0d4ac5f.zip
hdf5-66efce85e7ad9430d5e58d529d7b7a55b0d4ac5f.tar.gz
hdf5-66efce85e7ad9430d5e58d529d7b7a55b0d4ac5f.tar.bz2
Changes made based on RFC review comments
Test the changes in a branch via daily testing.
Diffstat (limited to 'src')
-rw-r--r--src/H5Fprivate.h4
-rw-r--r--src/H5MF.c2
-rw-r--r--src/H5MFsection.c32
-rw-r--r--src/H5Pfcpl.c3
4 files changed, 23 insertions, 18 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 6f68a62..eba48de 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -549,9 +549,11 @@
#define H5F_FILE_SPACE_PAGE_SIZE_DEF 4096
/* For paged aggregation: minimum value for file space page size */
#define H5F_FILE_SPACE_PAGE_SIZE_MIN 512
+/* For paged aggregation: maxiumum value for file space page size: 1 gigabyte */
+#define H5F_FILE_SPACE_PAGE_SIZE_MAX 1024*1024*1024
/* For paged aggregation: drop free-space with size <= this threshold for small meta section */
-#define H5F_FILE_SPACE_PGEND_META_THRES 10
+#define H5F_FILE_SPACE_PGEND_META_THRES 0
/* Default for threshold for alignment (can be set via H5Pset_alignment()) */
#define H5F_ALIGN_DEF 1
diff --git a/src/H5MF.c b/src/H5MF.c
index e54d809..d7af56a 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1519,7 +1519,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of fsm */
H5F_mem_page_t fs_type; /* Free space type */
hbool_t reset_ring = FALSE; /* Whether the ring was set */
- htri_t ret_value = FAIL; /* Return value */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 02fc2d9..14e0ad1 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -130,27 +130,27 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
/* Class info for "small" free space sections */
H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
/* Class variables */
- H5MF_FSPACE_SECT_SMALL, /* Section type */
- 0, /* Extra serialized size */
- H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */
- NULL, /* Class private info */
+ H5MF_FSPACE_SECT_SMALL, /* Section type */
+ 0, /* Extra serialized size */
+ H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */
+ NULL, /* Class private info */
/* Class methods */
- NULL, /* Initialize section class */
- NULL, /* Terminate section class */
+ NULL, /* Initialize section class */
+ NULL, /* Terminate section class */
/* Object methods */
- H5MF_sect_small_add, /* Add section */
- NULL, /* Serialize section */
+ H5MF_sect_small_add, /* Add section */
+ NULL, /* Serialize section */
H5MF_sect_deserialize, /* Deserialize section */
- H5MF_sect_small_can_merge, /* Can sections merge? */
- H5MF_sect_small_merge, /* Merge sections */
- H5MF_sect_small_can_shrink, /* Can section shrink container?*/
- H5MF_sect_small_shrink, /* Shrink container w/section */
- H5MF_sect_free, /* Free section */
- H5MF_sect_valid, /* Check validity of section */
- H5MF_sect_split, /* Split section node for alignment */
- NULL, /* Dump debugging for section */
+ H5MF_sect_small_can_merge, /* Can sections merge? */
+ H5MF_sect_small_merge, /* Merge sections */
+ NULL, /* Can section shrink container?*/
+ NULL, /* Shrink container w/section */
+ H5MF_sect_free, /* Free section */
+ H5MF_sect_valid, /* Check validity of section */
+ H5MF_sect_split, /* Split section node for alignment */
+ NULL, /* Dump debugging for section */
}};
/* Class info for "large" free space sections */
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 5383aae..6b0d2c0 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -1472,6 +1472,9 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size)
if(fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN)
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to less than 512")
+ if(fsp_size > H5F_FILE_SPACE_PAGE_SIZE_MAX)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to more than 1GB")
+
/* Set the value*/
if(H5P_set(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &fsp_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space page size")