NFS: Readdirplus can't help lookup for case insensitive filesystems
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 19 Feb 2022 14:56:45 +0000 (09:56 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 2 Mar 2022 13:43:39 +0000 (08:43 -0500)
If the filesystem is case insensitive, then readdirplus can't help with
cache misses, since it won't return case folded variants of the filename.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c

index 098fc1bdaac8f32458dcabbe4e2ed0274f6f6369..dcfc44411787d64d50a270c0040071d5e2d5c108 100644 (file)
@@ -696,6 +696,8 @@ void nfs_readdir_record_entry_cache_miss(struct inode *dir)
 
 static void nfs_lookup_advise_force_readdirplus(struct inode *dir)
 {
+       if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE))
+               return;
        nfs_readdir_record_entry_cache_miss(dir);
 }