summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-08-17 19:12:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-08-17 19:12:59 (GMT)
commitcc89b8a605dfc7370cb760e6c3d7339cbf1e9884 (patch)
tree82e0552ea6a80a2e362fdc77960a3483648aae75 /src/H5FDcore.c
parent5ef0237e2fe5ac6aee0d97fdc6bcf22f72d47162 (diff)
downloadhdf5-cc89b8a605dfc7370cb760e6c3d7339cbf1e9884.zip
hdf5-cc89b8a605dfc7370cb760e6c3d7339cbf1e9884.tar.gz
hdf5-cc89b8a605dfc7370cb760e6c3d7339cbf1e9884.tar.bz2
[svn-r1572] Changes since 19990810
---------------------- ./MANIFEST ./src/H5FDmulti.c [NEW] ./src/H5FDmulti.h [NEW] ./src/Makefile.in ./src/hdf5.h The split driver was reimplemented as a more general "multi" driver which is capable of splitting data into multiple files like the family driver except the partioning is done by memory usage type instead of address. The H5Pset_fapl_split() function just calls H5Pset_fapl_multi() with arguments which prepare to split the address space into two files: meta and raw data. This is the first version. I plan to allow the open() call to relax a bit which would allow one to open an hdf5 file when only the meta-data file is present. This would allow a very large file to be split and stored on tape and the relatively small meta file to be mirrored on disk to allow limited browsing of the file (any request for raw data would fail). ./src/H5private.h ./src/H5F.c ./src/H5FD.c ./src/H5FDprivate.h ./src/H5FDpublic.h ./src/H5FDcore.c ./src/H5FDfamily.c ./src/H5FDmpio.c ./src/H5FDsec2.c Added the ability for a file driver to store information in the superblock which would be needed if the file were opened again later for reading. The format is driver-defined which allows users to extend it however they like. ./doc/html/H5.format.html Added information about the new driver information block of the superblock. This is where file drivers store information they need in order to reopen the file later. ./src/H5F.c ./src/H5Fprivate.h ./src/H5FD.c ./src/H5FDprivate.h ./src/H5FDpublic.h ./src/H5FDcore.c ./src/H5FDfamily.c ./src/H5FDmpio.c ./src/H5FDsec2.c ./src/H5Fistore.c ./src/H5R.c The file access properties and the file access property list were decoupled, which allows the property list to more cleanly contain properties for various levels of the file and which allows the property list to be modified more cleanly when opening files. ./src/H5.c ./src/H5FDpublic.h Removed H5FD_MEM_META and H5FD_MEM_GROUP since they're never used. ./src/H5D.c Changed the way we detect the MPIO driver in all these special cases. ./src/H5F.c ./src/H5Rpublic.h ./test/tfile.c The default file sizeof(offset) was changed to be a function of haddr_t instead of hsize_t. THE H5RPUBLIC.H DEFINITIONS WILL HAVE PROBLEMS IF THE USER CREATES A FILE WITH NON-DEFAULT OFFSET AND SIZE SIZES! ./src/H5F.c Fixed an uninitialized memory access bug in file closing related to the VFL. ./src/H5T.c ./src/H5Tpublic.h Added an H5T_NATIVE_HADDR predefined datatype which corresponds to the `haddr_t' type. ./test/Makefile.in Reformatted long lines. ./test/big.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/external.c Removed the H5F_ACC_DEBUG flag from file creation/open calls. ./test/big.c Plugged a memory leak. ./test/h5test.c Added support for the `multi' driver. Removed #warning about not having the stdio driver. Plans are to not implement it since the sec2 driver serves the same purpose and testing didn't show any difference in execution times between the two.
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 4be868e..9920678 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -67,6 +67,7 @@ typedef struct H5FD_core_fapl_t {
(size_t)((A)+(Z))<(size_t)(A))
/* Prototypes */
+static void *H5FD_core_fapl_get(H5FD_t *_file);
static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_core_close(H5FD_t *_file);
@@ -82,7 +83,11 @@ static herr_t H5FD_core_write(H5FD_t *_file, hid_t fapl_id, haddr_t addr,
static const H5FD_class_t H5FD_core_g = {
"core", /*name */
MAXADDR, /*maxaddr */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
sizeof(H5FD_core_fapl_t), /*fapl_size */
+ H5FD_core_fapl_get, /*fapl_get */
NULL, /*fapl_copy */
NULL, /*fapl_free */
0, /*dxpl_size */
@@ -189,6 +194,33 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/)
/*-------------------------------------------------------------------------
+ * Function: H5FD_core_fapl_get
+ *
+ * Purpose: Returns a copy of the file access properties.
+ *
+ * Return: Success: Ptr to new file access properties.
+ *
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Friday, August 13, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5FD_core_fapl_get(H5FD_t *_file)
+{
+ H5FD_core_t *file = (H5FD_core_t*)_file;
+ H5FD_core_fapl_t *fa = calloc(1, sizeof(H5FD_core_fapl_t));
+
+ fa->increment = file->increment;
+ return fa;
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5FD_core_open
*
* Purpose: Create memory as an HDF5 file.
@@ -426,7 +458,7 @@ H5FD_core_read(H5FD_t *_file, hid_t dxpl_id/*unused*/, haddr_t addr,
memcpy(buf, file->mem+addr, nbytes);
size -= nbytes;
addr += nbytes;
- (char*)buf += nbytes;
+ buf = (char*)buf + nbytes;
}
/* Read zeros for the part which is after the EOF markers */