• Darrick J. Wong's avatar
    xfs: create a hashname function for parent pointers · fb102fe7
    Darrick J. Wong authored
    Although directory entry and parent pointer recordsets look very similar
    (name -> ino), there's one major difference between them: a file can be
    hardlinked from multiple parent directories with the same filename.
    This is common in shared container environments where a base directory
    tree might be hardlink-copied multiple times.  IOWs the same 'ls'
    program might be hardlinked to multiple /srv/*/bin/ls paths.
    
    We don't want parent pointer operations to bog down on hash collisions
    between the same dirent name, so create a special hash function that
    mixes in the parent directory inode number.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    fb102fe7
attr.c 16.3 KB