exfat: reduce FAT chain traversal
authorYuezhang Mo <Yuezhang.Mo@sony.com>
Thu, 12 Sep 2024 08:57:06 +0000 (16:57 +0800)
committerNamjae Jeon <linkinjeon@kernel.org>
Mon, 25 Nov 2024 08:08:27 +0000 (17:08 +0900)
commit8a3f5711ad74db9881b289a6e34d7f3b700df720
tree921c983ed0f0581900e725a6967c29fdf458f502
parent6b151eb5df78dc1a1ea7c862834199e08ea11c7b
exfat: reduce FAT chain traversal

Before this commit, ->dir and ->entry of exfat_inode_info record the
first cluster of the parent directory and the directory entry index
starting from this cluster.

The directory entry set will be gotten during write-back-inode/rmdir/
unlink/rename. If the clusters of the parent directory are not
continuous, the FAT chain will be traversed from the first cluster of
the parent directory to find the cluster where ->entry is located.

After this commit, ->dir records the cluster where the first directory
entry in the directory entry set is located, and ->entry records the
directory entry index in the cluster, so that there is almost no need
to access the FAT when getting the directory entry set.

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Reviewed-by: Daniel Palmer <daniel.palmer@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/dir.c
fs/exfat/exfat_fs.h
fs/exfat/namei.c