Cygwin Filesystem Performance degradation 1.7.5 vs 1.7.7, and methods for improving performance
Derry Shribman
derry@hola.org
Mon Oct 4 11:22:00 GMT 2010
Hi,
> It doesn't matter anyway. If you don't fetch st_nlink to recognize
> files with more than one link, then st_ino doesn't matter anymore
> and it can also just be a hash value. What does it mean to have
> two files with the same inode number on the same device, both having
> a link count of 1? A broken filesystem?
Fact is that st_nlink usage is very rare.
And these below examples show it.
So why do some applications such as below have st_ino but no st_nlink? because
they use st_ino as a shortcut for checking whether the file is the same ('fast
path') - and if the ino is not the same, they do a slow path file compare.
Derry
On 10/4/2010 12:28 PM, Corinna Vinschen wrote:
> On Oct 3 23:57, Derry Shribman wrote:
>> Hi,
>>
>>> BZZZT. Thanks for playing.
>>> find cvs-1.12.13 -type f | xargs grep 'st_ino'
>>> shows 35 different uses of the st_ino member of struct stat.
>>
>> grep st_nlink: zero results.
>>
>>> find make-3.81 -type f | xargs grep 'st_ino' |wc
>>> shows 11 different uses of the st_ino member of struct stat.
>>
>> grep st_nlink: zero results.
>>
>> st_ino information IS retrieved.
>>
>> See Yoni's post of the cygtest.c application to test the stat()
>> performance: It calls NtQueryDirectoryFile() with
>> FILE_ID_BOTH_DIR_INFO, at st_ino is in fdi.FileId field.
>
> It doesn't matter anyway. If you don't fetch st_nlink to recognize
> files with more than one link, then st_ino doesn't matter anymore
> and it can also just be a hash value. What does it mean to have
> two files with the same inode number on the same device, both having
> a link count of 1? A broken filesystem?
>
>
> Corinna
>
More information about the Cygwin-developers
mailing list