From 5ca445dfc6fb352f2a74e238e29f4708273974ec Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 21 Aug 2015 21:02:55 +0200 Subject: [PATCH] FS module docs: Add documentation for entry_cache_add_missing(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was missed when introducing the feature in hrev49558. Thanks Jérôme for the pointer! Also add a note explaining that update operations on cached entries and the removal of uncached entries are safe. --- docs/user/drivers/fs_modules.dox | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/user/drivers/fs_modules.dox b/docs/user/drivers/fs_modules.dox index e386f195a9..80e2c0e9e9 100644 --- a/docs/user/drivers/fs_modules.dox +++ b/docs/user/drivers/fs_modules.dox @@ -316,6 +316,16 @@ entry_cache_add() function when it encounters an entry that might not yet be known to the entry cache and entry_cache_remove() when a directory entry has been removed. + The entry cache can also be used for negative caching. If the file system + determines that the requested entry is not present during a lookup, it can + cache this lookup failure by calling entry_cache_add_missing(). Further + calls to fs_vnode_ops::lookup() for the missing entry will then be + avoided. + Note that it is safe to call entry_cache_add() and + entry_cache_add_missing() with the same directory/name pair previously + given to either function to update a cache entry, without needing to call + entry_cache_remove() first. It is also safe to call entry_cache_remove() + for pairs that have never been added to the cache. */ // TODO: