diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-03-27 20:25:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-03-27 20:25:03 (GMT) |
commit | 7e9738f290af26d1bf4ab9db64544d9a89505f0a (patch) | |
tree | e5e0986486cbd1440a6acd3adf14cc533c70cfe0 /src/H5FDpublic.h | |
parent | 30aa868e1082ddd7cc59b4f0716434f4a02fcbdd (diff) | |
download | hdf5-7e9738f290af26d1bf4ab9db64544d9a89505f0a.zip hdf5-7e9738f290af26d1bf4ab9db64544d9a89505f0a.tar.gz hdf5-7e9738f290af26d1bf4ab9db64544d9a89505f0a.tar.bz2 |
[svn-r5096] Purpose:
Bug Fix
Description:
The H5Gget_objinfo() function was not setting the 'fileno' field in the
H5G_stat_t struct passed in.
Solution:
Added a "file serial number" to each file currently open in the library
and put that in the 'fileno' field. If a file is opened twice (with
H5Fopen) and the VFL driver detects that it is the same file (i.e. the
two file structures have the same "shared file info" in the library's
memory structures), they will have the same serial number.
This serial number has two drawbacks:
- If a VFL driver doesn't/can't detect that two calls to H5Fopen with
the same file actually _are_ the same file, each will get a
different serial number
- If the same file is closed and re-opened, the serial number will be
different.
It is be possible to fix the second drawback for many VFL drivers, but it
would be a lot of effort and probably isn't worth it until we've got a
good reason to do it. Dunno if we'll ever be able to fix the first
drawback...
Platforms tested:
FreeBSD 4.5 (sleipnir)
VS: ----------------------------------------------------------------------
Diffstat (limited to 'src/H5FDpublic.h')
-rw-r--r-- | src/H5FDpublic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index d288307..81a63f5 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -153,6 +153,7 @@ typedef struct H5FD_free_t { struct H5FD_t { hid_t driver_id; /*driver ID for this file*/ const H5FD_class_t *cls; /*constant class info */ + unsigned long fileno[2]; /* File serial number */ unsigned long feature_flags; /* VFL Driver feature Flags */ hsize_t threshold; /* Threshold for alignment */ |