Hello,
It seems that a counter in an MFT entry that is often referred to as a
"hard link counter" (offset 0x12 - 0x13) is increased by one when
Windows adds an 8.3 alias for a file name.
Description of short names in Windows docs:

"When you create a long file name, Windows may also create a short 8.3
form of the name, called the 8.3 alias or short name, and store it on
disk also."

ntfs-3g should differentiate hard links and short names, even if they
are stored on disk in a similar way, and calculate an accurate number
of hard links. I can not provide an established definition of a hard
link from some Linux-related standard, but the following command in
Windows 10 will not show a 8.3 name in its output:
fsutil hardlink list <filename>
>From fsutil documentation:

A hard link is a directory entry for a file. Every file can be
considered to have at least one hard link.
On NTFS volumes, each file can have multiple hard links, so a single
file can appear in many directories (or even in the same directory
with different names).

Considering that this definition is provided by Microsoft, the company
that developed NTFS, and 8.3 names do not make a file "appear in the
same directory with different names" when viewed by File Explorer in
Windows, I think it is safe to tell that a short alias should be
excluded from a number of hard links.
This issue was discovered in the discussion of QDirStat bug (issue #88
on Github).

Best wishes,
Alexander Shchadilov


_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to