Can you describe in more detail exactly why this information is needed/how it is used?
This is a complex and lengthy answer if answered in full, and is a large part of the AFIO value add. The housekeeping done during handle open is used throughout AFIO to skip work in later operations under the assumption that handle opens are not common.
Limiting the discussion to just the problem of race free filesystem on POSIX, imagine the problem of opening the sibling of a file in a directory whose path is constantly changing. POSIX does not provide an API for opening the parent directory of an open file descriptor. To work around this, you must first get the canonical current path of the open file descriptor, strip off the end, open that directory and then use that as a base directory for opening a file with the same leafname as your original file. You then loop all that if you fail to open that leafname, or the leafname opened has a different inode. Once you have the correct parent directory, you can open the sibling. This is an example of where caching the stat_t of handle during open saves syscalls and branches in more performance important APIs later on.
Sorry for asking a question again (and I'm sure Niall will ignore it because he judges it as 'disrespectful, petty, or juvenile', but perhaps somebody else can answer this): In another mail you said AFIO wouldn't cache anything, thus must do a lot of syscalls over and over again, which is the reason for it to be slow. How does that relate to what you said above? Sorry if I misunderstood something - again. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu