]> www.infradead.org Git - users/jedix/linux-maple.git/commit
afs: Use the contained hashtable to search a directory
authorDavid Howells <dhowells@redhat.com>
Mon, 16 Dec 2024 20:41:19 +0000 (20:41 +0000)
committerChristian Brauner <brauner@kernel.org>
Fri, 20 Dec 2024 21:34:09 +0000 (22:34 +0100)
commita5b5beebcf96d5e8a2fc79856c2ac1e93f82478e
tree0b5f2fd78d13bbd05cf47c09ac5846f782da7338
parent836bb70bde6a24a0069866b69d23eb61a00c422a
afs: Use the contained hashtable to search a directory

Each directory image contains a hashtable with 128 buckets to speed up
searching.  Currently, kafs does not use this, but rather iterates over all
the occupied slots in the image as it can share this with readdir.

Switch kafs to use the hashtable for lookups to reduce the latency.  Care
must be taken that the hash chains are acyclic.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20241216204124.3752367-30-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/afs/Makefile
fs/afs/dir.c
fs/afs/dir_edit.c
fs/afs/dir_search.c [new file with mode: 0644]
fs/afs/internal.h