File inode numbers in Cygwin

Lavrentiev, Anton (NIH/NLM/NCBI) [C] lavr@ncbi.nlm.nih.gov
Sun Aug 8 21:31:05 GMT 2021


Hi all,

I have a question that might have been asked on here before, but I wasn't able to find it, so here it goes:

In Cygwin, it seems like for the local native file system (NTFS), file inode numbers (struct stat::st_ino)
get generated by hashing the file names, rather than them being tied to any underlying NTFS structure.
Hashing creates enormous values, which are ridiculous when, for example, they appear in the output of
"ls" or "find ... -ls" (take a look at the first column):

756886212375058592   1944 -rw-r--r--   1
 76842668642019062   5124 -rw-r--r--   1
 22236523160543609   3968 -rw-r--r--   1
199847233464684144   2196 -rw-r--r--   1
 25332747904353951   1704 -rw-r--r--   1
144678138029403288   2092 -rw-r--r--   1
496803333894707846   2304 -rw-r--r--   1
  1125899906965241   9736 -rw-------   1
105834591243939239  37616 -rw-r--r--   1
 35747322042356092  13176 -rw-r--r--   1
  1125899906965242  29932 -rw-------   1
2099521851284814243  16396 -rw-r--r--   1
10542363777720944191  12848 -rw-r--r--   1
    1688849860377295  19880 -rw-------   1
   24488322973875959  15808 -rw-r--r--   1
   16325548649265885   8820 -rw-r--r--   1
   26458647810840719    136 -rw-r--r--   1
   26458647810904505   1740 -rw-r--r--   1
   68116944363996494   1740 -rw-r--r--   1
   52072870691507121   4320 -rw-r--r--   1
    1125899906965472  17556 -rw-------   1
    1125899906965490  10956 -rw-------   1
   65865144550731394    292 -rw-r--r--   1
  278941701920304249   1364 -rw-r--r--   1
 7004223320468079341  39144 -rw-r--r--   1
  435160313994792954  31172 -rw-r--r--   1
  333266372426149018  14396 -rw-r--r--   1

So the question:  was there any reason that the native NTFS file IDs (which are quite reasonable) weren't used
for inode numbers?

Thanks,

Anton Lavrentiev
Contractor NIH/NLM/NCBI



More information about the Cygwin mailing list