You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ed0be7b7fa
Work on the fsck tool seems to have settled an old doubt about the order of dentry keys with the same hash. The name length is not considered at all, despite sharing the same field with the hash; the order is decided by comparing the strings of the original unnormalized names. Because of our incorrect assumptions, some files are listed but don't open. This is relatively rare though, since it depends on collisions of the 22-bit hash happening inside a single directory. To fix it, split the APFS_QUERY_MULTIPLE flag into APFS_QUERY_ANY_NAME and APFS_QUERY_ANY_NUMBER, so that queries can return all records with a given hash and let apfs_inode_by_name() decide which one is correct. Also mask away the filemane length. All testing has been for ascii filenames in case-insensitive volumes, so a small degree of uncertainty remains. Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>