cifs: Optimize readdir on reparse points
Subsystems (2)
PATCH 1/1 cifs: Optimize readdir on reparse points
When listing a directory with thounsands of files and most of them are reparse points, we simply marked all those dentries for revalidation and then sending additional (compounded) create/getinfo/close requests for each of them.
Instead, upon receiving a response from an SMB2_QUERY_DIRECTORY (FileIdFullDirectoryInformation) command, the directory entries that have a file attribute of FILE_ATTRIBUTE_REPARSE_POINT will contain an EaSize field with a reparse tag in it, so we parse it and mark the dentry for revalidation only if it is a DFS or a symlink.
Signed-off-by Paulo Alcantara (SUSE) <[email protected]>
Reviewed-by Pavel Shilovsky <[email protected]>
--- fs/cifs/cifsglob.h | 1 + fs/cifs/readdir.c | 63 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 55 insertions(+), 9 deletions(-)
fs/cifs/cifsglob.h +1 -0
@@ -1693,6 +1693,7 @@ struct cifs_fattr {struct timespec64 cf_atime;struct timespec64 cf_mtime;struct timespec64 cf_ctime; +u32 cf_cifstag; };static inline void free_dfs_info_param (struct dfs_info3_param *param)
fs/cifs/readdir.c +54 -9
92 lines not on this page · raw message
Signature · 1 line
2.24.0