• Paulo Alcantara (SUSE)'s avatar
    cifs: Optimize readdir on reparse points · 046aca3c
    Paulo Alcantara (SUSE) authored
    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: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
    Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    046aca3c
readdir.c 26.2 KB