diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2008-08-07 21:49:05 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2008-08-07 21:49:05 (GMT) |
commit | e980307ed9ee9acc414c6166e5f76282fc44bacd (patch) | |
tree | 9c79db2c965b1df62d50bde9f0cad71456b40310 /src/H5Fpkg.h | |
parent | a5de140500d6655c80272b82c748a23440539273 (diff) | |
download | hdf5-e980307ed9ee9acc414c6166e5f76282fc44bacd.zip hdf5-e980307ed9ee9acc414c6166e5f76282fc44bacd.tar.gz hdf5-e980307ed9ee9acc414c6166e5f76282fc44bacd.tar.bz2 |
[svn-r15451] 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:
committest in 1.8 branch. Committing now due to the urgency of the fix. No
changes here are specific to the trunk, but I will keep an eye on the daily
tests.
Diffstat (limited to 'src/H5Fpkg.h')
-rw-r--r-- | src/H5Fpkg.h | 37 |
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 */ }; /*****************************/ |