summaryrefslogtreecommitdiffstats
path: root/src/H5Pfapl.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-07 02:51:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-07 02:51:54 (GMT)
commitfda704377ebca6f980d7e842935977bb45f34d34 (patch)
tree6055a171c97afb62157e3f61f6bf8942dd9bab26 /src/H5Pfapl.c
parentfb1059e507cab041e2fd6bf294b12843a1ddf1c7 (diff)
downloadhdf5-fda704377ebca6f980d7e842935977bb45f34d34.zip
hdf5-fda704377ebca6f980d7e842935977bb45f34d34.tar.gz
hdf5-fda704377ebca6f980d7e842935977bb45f34d34.tar.bz2
[svn-r17971] Description:
Allow the core VFD to properly support opening backing store files through symbolic links and have the external links in the file be treated in the same way as for the sec2 driver. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r--src/H5Pfapl.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index e082e9c..486bda3 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -101,18 +101,23 @@
#define H5F_ACS_FAMILY_OFFSET_DEF 0
/* Definition for new member size of family driver. It's private
* property only used by h5repart */
-#define H5F_ACS_FAMILY_NEWSIZE_SIZE sizeof(hsize_t)
-#define H5F_ACS_FAMILY_NEWSIZE_DEF 0
+#define H5F_ACS_FAMILY_NEWSIZE_SIZE sizeof(hsize_t)
+#define H5F_ACS_FAMILY_NEWSIZE_DEF 0
/* Definition for whether to convert family to sec2 driver. It's private
* property only used by h5repart */
-#define H5F_ACS_FAMILY_TO_SEC2_SIZE sizeof(hbool_t)
-#define H5F_ACS_FAMILY_TO_SEC2_DEF FALSE
+#define H5F_ACS_FAMILY_TO_SEC2_SIZE sizeof(hbool_t)
+#define H5F_ACS_FAMILY_TO_SEC2_DEF FALSE
/* Definition for data type in multi file driver */
#define H5F_ACS_MULTI_TYPE_SIZE sizeof(H5FD_mem_t)
#define H5F_ACS_MULTI_TYPE_DEF H5FD_MEM_DEFAULT
/* Definition for 'use latest format version' flag */
#define H5F_ACS_LATEST_FORMAT_SIZE sizeof(hbool_t)
#define H5F_ACS_LATEST_FORMAT_DEF FALSE
+/* Definition for whether to query the file descriptor from the core VFD
+ * instead of the memory address. (Private to library)
+ */
+#define H5F_ACS_WANT_POSIX_FD_SIZE sizeof(hbool_t)
+#define H5F_ACS_WANT_POSIX_FD_DEF FALSE
/******************/
@@ -204,6 +209,7 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass)
hbool_t family_to_sec2 = H5F_ACS_FAMILY_TO_SEC2_DEF; /* Default ?? for family VFD */
H5FD_mem_t mem_type = H5F_ACS_MULTI_TYPE_DEF; /* Default file space type for multi VFD */
hbool_t latest_format = H5F_ACS_LATEST_FORMAT_DEF; /* Default setting for "use the latest version of the format" flag */
+ hbool_t want_posix_fd = H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5P_facc_reg_prop)
@@ -280,6 +286,11 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass)
if(H5P_register(pclass, H5F_ACS_LATEST_FORMAT_NAME, H5F_ACS_LATEST_FORMAT_SIZE, &latest_format, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ /* Register the private property of whether to retrieve the file descriptor from the core VFD */
+ /* (used internally to the library only) */
+ if(H5P_register(pclass, H5F_ACS_WANT_POSIX_FD_NAME, H5F_ACS_WANT_POSIX_FD_SIZE, &want_posix_fd, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_facc_reg_prop() */