summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-08-13 16:39:21 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-08-13 16:39:21 (GMT)
commit51e16157c29eae46c391e896ed54de8e02ffdfea (patch)
tree0341af144cc2fabc69cee4e039e6d13a58860d08
parent07106823b4792cdb81bb8b6bf9b56af3e919781b (diff)
downloadhdf5-51e16157c29eae46c391e896ed54de8e02ffdfea.zip
hdf5-51e16157c29eae46c391e896ed54de8e02ffdfea.tar.gz
hdf5-51e16157c29eae46c391e896ed54de8e02ffdfea.tar.bz2
[svn-r27504] Change comments/code around to reflect decision to have virtual datasets always
return TRUE when their is_alloc function is called. Tested: ummon
-rw-r--r--src/H5Ddbg.c2
-rw-r--r--src/H5Dint.c12
-rw-r--r--src/H5Doh.c3
-rw-r--r--src/H5Dvirtual.c8
4 files changed, 17 insertions, 8 deletions
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index 7e1d884..4e934f2 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -116,8 +116,6 @@ H5Ddebug(hid_t dset_id)
(void)H5D__chunk_dump_index(dset, H5AC_ind_dxpl_id, stdout);
else if(H5D_CONTIGUOUS == dset->shared->layout.type)
HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr);
- else if(H5D_VIRTUAL == dset->shared->layout.type)
- HDassert(0 && "Not yet implemented...");//VDSINC
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 657f893..dd37beb 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1827,7 +1827,12 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
break;
case H5D_VIRTUAL:
- /* No-op for now VDSINC */
+ /* No-op, as the raw data is stored elsewhere and the global
+ * heap object containing the mapping information is created
+ * when the layout message is encoded. We may wish to move the
+ * creation of the global heap object here at some point, but we
+ * will have to make sure is it always created before the
+ * dataset is closed. */
break;
case H5D_LAYOUT_ERROR:
@@ -1950,7 +1955,7 @@ H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
} /* end block */
case H5D_VIRTUAL:
- /* No-op for now VDSINC */
+ /* No-op, as the raw data is stored elsewhere */
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
@@ -2009,7 +2014,8 @@ H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size)
break;
case H5D_VIRTUAL:
- /* Just set to 0 until private data is implemented VDSINC */
+ /* Just set to 0, as virtual datasets do not actually store raw data
+ */
*storage_size = 0;
break;
diff --git a/src/H5Doh.c b/src/H5Doh.c
index 39a270f..388f4cf 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -398,7 +398,8 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
if(H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info")
} /* end if */
- else if(layout.type == H5D_VIRTUAL && H5D__virtual_is_space_alloc(&layout.storage)) {
+ else if(layout.type == H5D_VIRTUAL
+ && (layout.storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF)) {
size_t virtual_heap_size;
/* Need to write a test for this. No assert here for now because the
* code is reached by h5_verify_cached_stabs() but it is not properly
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 0b88ad5..99c090f 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -1933,8 +1933,12 @@ H5D__virtual_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_ENTER_PACKAGE_NOERR
- /* Need to decide what to do here. For now just return TRUE VDSINC */
- ret_value = TRUE;//storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF;
+ /* Just return TRUE, since the global heap object containing the mappings is
+ * created when the layout message is encoded, and nothing else needs to be
+ * allocated for virtual datasets. This also ensures that the library never
+ * assumes (falsely) that no data is present in the dataset, causing errors.
+ */
+ ret_value = TRUE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__virtual_is_space_alloc() */