summaryrefslogtreecommitdiffstats
path: root/src/H5Fpkg.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-08-07 21:32:36 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-08-07 21:32:36 (GMT)
commit2df9af6ae8fd7bf4658e702b3e5046382dc5a852 (patch)
tree8192f956e40224566862d7d4ff640e61bba6ae45 /src/H5Fpkg.h
parentc827f0450cf1324cb972b90d70b2d8d4faecdb9e (diff)
downloadhdf5-2df9af6ae8fd7bf4658e702b3e5046382dc5a852.zip
hdf5-2df9af6ae8fd7bf4658e702b3e5046382dc5a852.tar.gz
hdf5-2df9af6ae8fd7bf4658e702b3e5046382dc5a852.tar.bz2
[svn-r15450] Purpose: Fix various problems that were occurring when using mounted files.
Description: Moved mount table from top file structure to shared file structure. Moved parent out of mount table and back into top file structure. mounted files can now be accessed from any handle of the parent file. Changes to how files are closed. Stricter cycle checking on mounted files. Removed unused function H5F_has_mount(). Tested: kagiso, smirom, linew (h5committest)
Diffstat (limited to 'src/H5Fpkg.h')
-rw-r--r--src/H5Fpkg.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 288ef8a..594ed50 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -62,6 +62,22 @@
/* Mask for removing private file access flags */
#define H5F_ACC_PUBLIC_FLAGS 0x00ffu
+/* A record of the mount table */
+typedef struct H5F_mount_t {
+ struct H5G_t *group; /* Mount point group held open */
+ struct H5F_t *file; /* File mounted at that point */
+} H5F_mount_t;
+
+/*
+ * The mount table describes what files are attached to (mounted on) the file
+ * to which this table belongs.
+ */
+typedef struct H5F_mtab_t {
+ unsigned nmounts;/* Number of children which are mounted */
+ unsigned nalloc; /* Number of mount slots allocated */
+ H5F_mount_t *child; /* An array of mount records */
+} H5F_mtab_t;
+
/*
* Define the structure to store the file information for HDF5 files. One of
* these structures is allocated per file, not per H5Fopen(). That is, set of
@@ -74,6 +90,7 @@ typedef struct H5F_file_t {
unsigned nrefs; /* Ref count for times file is opened */
uint8_t status_flags; /* File status flags */
unsigned flags; /* Access Permissions for file */
+ H5F_mtab_t mtab; /* File mount table */
/* Cached values from FCPL/superblock */
unsigned sym_leaf_k; /* Size of leaves in symbol tables */
@@ -114,23 +131,6 @@ typedef struct H5F_file_t {
H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */
} H5F_file_t;
-/* A record of the mount table */
-typedef struct H5F_mount_t {
- struct H5G_t *group; /* Mount point group held open */
- struct H5F_t *file; /* File mounted at that point */
-} H5F_mount_t;
-
-/*
- * The mount table describes what files are attached to (mounted on) the file
- * to which this table belongs.
- */
-typedef struct H5F_mtab_t {
- struct H5F_t *parent;/* Parent file */
- unsigned nmounts;/* Number of children which are mounted */
- unsigned nalloc; /* Number of mount slots allocated */
- H5F_mount_t *child; /* An array of mount records */
-} H5F_mtab_t;
-
/*
* This is the top-level file descriptor. One of these structures is
* allocated every time H5Fopen() is called although they may contain pointers
@@ -148,7 +148,8 @@ struct H5F_t {
H5FO_t *obj_count; /* # of time each object is opened through top file structure */
hid_t file_id; /* ID of this file */
hbool_t closing; /* File is in the process of being closed */
- H5F_mtab_t mtab; /* File mount table */
+ struct H5F_t *parent; /* Parent file that this file is mounted to */
+ unsigned nmounts; /* Number of children mounted to this file */
};
/*****************************/