From 7db2d60c3b71f5a7aadb6aed4931df276213a129 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 11 Oct 2010 16:08:21 -0400 Subject: [PATCH] cosmetic: comment describing negative lookup caching /* negative lookup caching * * by caching lookups that result in NOENT, we can avoid sending subsequent * lookups over the wire. a name cache entry is negative when its attributes * pointer is NULL. negative entries are created by three functions: * nfs41_name_cache_remove(), _insert() when called with NULL for the fh and * attributes, and _rename() for the source entry */ Signed-off-by: Casey Bodley --- daemon/name_cache.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/daemon/name_cache.c b/daemon/name_cache.c index 3d55ddf..fa4b2b1 100644 --- a/daemon/name_cache.c +++ b/daemon/name_cache.c @@ -38,11 +38,21 @@ enum { NCLVL2 }; + #define NAME_CACHE_EXPIRATION 20 /* TODO: get from configuration */ /* allow up to 128K of memory for name and attribute cache entries */ #define NAME_CACHE_MAX_SIZE 131072 +/* negative lookup caching + * + * by caching lookups that result in NOENT, we can avoid sending subsequent + * lookups over the wire. a name cache entry is negative when its attributes + * pointer is NULL. negative entries are created by three functions: + * nfs41_name_cache_remove(), _insert() when called with NULL for the fh and + * attributes, and _rename() for the source entry + */ + /* attribute cache */ struct attr_cache_entry {