summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/cache.h
diff options
context:
space:
mode:
authorTrond Myklebust2018-10-01 16:41:57 +0200
committerJ. Bruce Fields2018-10-29 21:58:04 +0100
commit736c6625de666f3fd0b47428f10568154033151a (patch)
treee31ce544fa5a48126213abf0834e064a5c642435 /fs/nfsd/cache.h
parentknfsd: Further simplify the cache lookup (diff)
downloadkernel-qcow2-linux-736c6625de666f3fd0b47428f10568154033151a.tar.gz
kernel-qcow2-linux-736c6625de666f3fd0b47428f10568154033151a.tar.xz
kernel-qcow2-linux-736c6625de666f3fd0b47428f10568154033151a.zip
knfsd: Improve lookup performance in the duplicate reply cache using an rbtree
Use an rbtree to ensure the lookup/insert of an entry in a DRC bucket is O(log(N)). Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/cache.h')
-rw-r--r--fs/nfsd/cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/cache.h b/fs/nfsd/cache.h
index 745c861237ca..4a98537efb0f 100644
--- a/fs/nfsd/cache.h
+++ b/fs/nfsd/cache.h
@@ -30,6 +30,7 @@ struct svc_cacherep {
struct sockaddr_in6 k_addr;
} c_key;
+ struct rb_node c_node;
struct list_head c_lru;
unsigned char c_state, /* unused, inprog, done */
c_type, /* status, buffer */