summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-04 23:36:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-04 23:36:31 (GMT)
commit607ccd8e85280b3cfe8f63bd91b333215739ecc2 (patch)
treede78b8a478c46c11cc2beb5796c1c55d050820fb
parentcef36b8e7bc68b040ece7d4f43330c2979d4216a (diff)
downloadhdf5-607ccd8e85280b3cfe8f63bd91b333215739ecc2.zip
hdf5-607ccd8e85280b3cfe8f63bd91b333215739ecc2.tar.gz
hdf5-607ccd8e85280b3cfe8f63bd91b333215739ecc2.tar.bz2
[svn-r17010] Description:
Bring file addres proxy additions from r16985 on the revise_chunks branch back into the trunk, for use in allowing fractal heap direct blocks to defer their allocation in the file. Tested on: Mac OS X/32 10.5.7 (amazon) debug & production too minor to require h5committest
-rw-r--r--src/H5F.c1
-rw-r--r--src/H5Fpkg.h1
-rw-r--r--src/H5Fprivate.h3
-rw-r--r--src/H5Fquery.c29
4 files changed, 34 insertions, 0 deletions
diff --git a/src/H5F.c b/src/H5F.c
index fc85688..3af83fa 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -894,6 +894,7 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
f->shared->accum.loc = HADDR_UNDEF;
f->shared->lf = lf;
f->shared->root_addr = HADDR_UNDEF;
+ f->shared->next_proxy_addr = HADDR_MAX;
/*
* Copy the file creation and file access property lists into the
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 49af73e..0f14b46 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -162,6 +162,7 @@ typedef struct H5F_file_t {
haddr_t root_addr; /* Root group address */
H5FO_t *open_objs; /* Open objects in file */
H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */
+ haddr_t next_proxy_addr; /* Next address to use for metadata cache proxy entries */
/* File space allocation information */
unsigned fs_aggr_merge[H5FD_MEM_NTYPES]; /* Flags for whether free space can merge with aggregator(s) */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index cd6bcd0..59bdd10 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -265,6 +265,7 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL))
#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id)
#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno)
+#define H5F_GET_NEXT_PROXY_ADDR(F) ((F)->shared->next_proxy_addr--)
#else /* H5F_PACKAGE */
#define H5F_INTENT(F) (H5F_get_intent(F))
#define H5F_FCPL(F) (H5F_get_fcpl(F))
@@ -287,6 +288,7 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL))
#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F))
#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM)))
+#define H5F_GET_NEXT_PROXY_ADDR(F) (H5F_get_next_proxy_addr(F))
#endif /* H5F_PACKAGE */
@@ -472,6 +474,7 @@ H5_DLL char *H5F_get_name(const H5F_t *f);
H5_DLL hid_t H5F_get_id(H5F_t *file, hbool_t app_ref);
H5_DLL size_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref);
H5_DLL size_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *obj_id_list, hbool_t app_ref);
+H5_DLL haddr_t H5F_get_next_proxy_addr(const H5F_t *f);
/* Functions than retrieve values set/cached from the superblock/FCPL */
H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 275061d..d070b94 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -687,3 +687,32 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_fileno() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_next_proxy_addr
+ *
+ * Purpose: Quick and dirty routine to retrieve the next metadata proxy
+ * address for a file.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
+ *
+ * Return: Success: Address to use for metadata cache proxy
+ * Failure: abort (should not happen)
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * May 19, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+haddr_t
+H5F_get_next_proxy_addr(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_next_proxy_addr)
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ FUNC_LEAVE_NOAPI(f->shared->next_proxy_addr--)
+} /* end H5F_get_next_proxy_addr() */
+