Hardlinks

Home » CentOS » Hardlinks
CentOS 2 Comments

Il 17/07/20 10:54, Karl Vogel ha scritto:

Hi Karl,

thank you for your clarification. I will try to rearch this limit (by curiosity)

2 thoughts on - Hardlinks

  • Have a look at https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/docs/xfs_filesystem_structure.pdf

    On page 105 the inode structure is given:

    __uint16_t di_onlink;

    __uint32_t di_nlink

    Page 107 gives more detail:

    di_onlink:
    In v1 inodes, this specifies the number of links to the inode from directories. When the number exceeds 65535,the inode is converted to v2
    and the link count is stored in di_nlink.

    di_nlink:
    Specifies the number of links to the inode from directories. This is maintained for both inode versions for current versions of XFS. Prior to v2 inodes, this field was part of di_pad.

    So, the effect is that whatever version you start with, adding more than
    65535 links will force it to version 2 and give you up to 4,294,967,295
    links!


    J Martin Rushton MBCS

  • Hi Martin,

    thank you very much for your explanation. +1

    Il Ven 17 Lug 2020, 12:14 J Martin Rushton via CentOS
    ha scritto: