]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Optimize readdir on reparse points
authorPaulo Alcantara (SUSE) <pc@cjr.nz>
Wed, 18 Dec 2019 21:11:37 +0000 (18:11 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Dec 2019 15:04:44 +0000 (09:04 -0600)
commit97ab4f3203ba98489b579ffac38d376dbeeab6cf
tree88c92721b67434a5ae982956cb5f300a6bcd8297
parent44c0bf0cac68c6c35c1fd50178522f7f55814fa0
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) <pc@cjr.nz>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/readdir.c