summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-08-01 11:12:03 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-08-01 11:12:03 (GMT)
commitfd0d8738e07c602c1871a5052b4fe836c37b8d64 (patch)
treee4bbe74c8732b589e92085af502a990cf7316d8c /src
parent274f71be174c431be6e94b1d4f4c100ff090e749 (diff)
parent823f6a133302f1d6ba904020ad092723d2657d02 (diff)
downloadhdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.zip
hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.tar.gz
hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.tar.bz2
Merge branch 'develop' into h5pl_commit
Diffstat (limited to 'src')
-rw-r--r--src/H5Fprivate.h4
-rw-r--r--src/H5MF.c2
-rw-r--r--src/H5MFsection.c34
-rw-r--r--src/H5Pfcpl.c3
4 files changed, 24 insertions, 19 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..02e3218 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 */
@@ -674,7 +674,7 @@ HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", FUNC, (*sect)->sect_info.
HDfprintf(stderr, "%s: section is dropped\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
- /* Adjust the section if it is not at page end but its size + pgend threshold is at page end */
+ /* Adjust the section if it is not at page end but its size + prem is at page end */
else
if(prem <= H5F_PGEND_META_THRES(udata->f)) {
(*sect)->sect_info.size += prem;
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")