Hi Daniel,
>> however xrootd uses both fstat() and stat() redundantly or
>> interchangeable and assumes they are the same. (?? I think, I don't
>> know) is this correct? I don't understand how or why xrootd needs to
>> use both fstat and stat to retrieve the same information -- why isn't
>> the initial fstat operation sufficient? what more does a subsequent
>> stat operation provide? why aren't subsequent checks also fstat?
Yes, stat() and fstat() are assumed to return identical results. stat() is
used for files that are not currently opened while fstat() is used for
already opened files. There are many oddities in the root framework that
cause stat() and fstat() to be issued multiple times. While we'd like the
client not to do this; there is little that can be done without spending a
lot of time correcting less than optimal code. So, the server simply has to
manage misbehaving clients.
Andy
|