NFS: Further optimisations for 'ls -l'
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 28 Sep 2021 18:33:44 +0000 (14:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:30:03 +0000 (11:30 +0200)
commit88d24e83a268007564f9222b177c1381b9e794cd
tree42a7b886eba35c9531849d15486889a8d7210a3d
parent1dcc308898e7b0b6b3cf688f45a4b3e556e8a78a
NFS: Further optimisations for 'ls -l'

[ Upstream commit ff81dfb5d721fff87bd516c558847f6effb70031 ]

If a user is doing 'ls -l', we have a heuristic in GETATTR that tells
the readdir code to try to use READDIRPLUS in order to refresh the inode
attributes. In certain cirumstances, we also try to invalidate the
remaining directory entries in order to ensure this refresh.

If there are multiple readers of the directory, we probably should avoid
invalidating the page cache, since the heuristic breaks down in that
situation anyway.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/dir.c
include/linux/nfs_fs.h