diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2022-11-24 15:09:04 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-04-26 09:04:59 -0400 |
commit | c4c649ab413ba6a785b25f0edbb12f617c87db2a (patch) | |
tree | 18c9bad0dc5ff090a86ba109c92488697b7d489a /fs/lockd/host.c | |
parent | dcb779fcd4ed5984ad15991d574943d12a8693d1 (diff) | |
download | linux-stable-c4c649ab413ba6a785b25f0edbb12f617c87db2a.tar.gz linux-stable-c4c649ab413ba6a785b25f0edbb12f617c87db2a.tar.bz2 linux-stable-c4c649ab413ba6a785b25f0edbb12f617c87db2a.zip |
NFSD: Convert filecache to rhltable
While we were converting the nfs4_file hashtable to use the kernel's
resizable hashtable data structure, Neil Brown observed that the
list variant (rhltable) would be better for managing nfsd_file items
as well. The nfsd_file hash table will contain multiple entries for
the same inode -- these should be kept together on a list. And, it
could be possible for exotic or malicious client behavior to cause
the hash table to resize itself on every insertion.
A nice simplification is that rhltable_lookup() can return a list
that contains only nfsd_file items that match a given inode, which
enables us to eliminate specialized hash table helper functions and
use the default functions provided by the rhashtable implementation).
Since we are now storing nfsd_file items for the same inode on a
single list, that effectively reduces the number of hash entries
that have to be tracked in the hash table. The mininum bucket count
is therefore lowered.
Light testing with fstests generic/531 show no regressions.
Suggested-by: Neil Brown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/lockd/host.c')
0 files changed, 0 insertions, 0 deletions