Motr  M0
cache.c File Reference
#include "lib/trace.h"
#include "stob/cache.h"
#include "motr/magic.h"
#include "stob/stob.h"
Include dependency graph for cache.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_STOB
 
#define LEVEL   M0_DEBUG
 

Functions

 M0_TL_DESCR_DEFINE (stob_cache, "cached stobs", static, struct m0_stob, so_cache_linkage, so_cache_magic, M0_STOB_CACHE_MAGIC, M0_STOB_CACHE_HEAD_MAGIC)
 
 M0_TL_DEFINE (stob_cache, static, struct m0_stob)
 
M0_INTERNAL int m0_stob_cache_init (struct m0_stob_cache *cache, uint64_t idle_size, m0_stob_cache_eviction_cb_t eviction_cb)
 
M0_INTERNAL void m0_stob_cache_fini (struct m0_stob_cache *cache)
 
M0_INTERNAL bool m0_stob_cache__invariant (const struct m0_stob_cache *cache)
 
static void stob_cache_evict (struct m0_stob_cache *cache, struct m0_stob *stob)
 
static void stob_cache_idle_del (struct m0_stob_cache *cache, struct m0_stob *stob)
 
static void stob_cache_idle_moveto (struct m0_stob_cache *cache, struct m0_stob *stob)
 
M0_INTERNAL void m0_stob_cache_add (struct m0_stob_cache *cache, struct m0_stob *stob)
 
M0_INTERNAL void m0_stob_cache_idle (struct m0_stob_cache *cache, struct m0_stob *stob)
 
M0_INTERNAL struct m0_stobm0_stob_cache_lookup (struct m0_stob_cache *cache, const struct m0_fid *stob_fid)
 
M0_INTERNAL void m0_stob_cache_purge (struct m0_stob_cache *cache, int nr)
 
M0_INTERNAL void m0_stob_cache_lock (struct m0_stob_cache *cache)
 
M0_INTERNAL void m0_stob_cache_unlock (struct m0_stob_cache *cache)
 
M0_INTERNAL bool m0_stob_cache_is_locked (const struct m0_stob_cache *cache)
 
M0_INTERNAL bool m0_stob_cache_is_not_locked (const struct m0_stob_cache *cache)
 
M0_INTERNAL void m0_stob_cache__print (struct m0_stob_cache *cache)
 

Macro Definition Documentation

◆ LEVEL

#define LEVEL   M0_DEBUG

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_STOB

Definition at line 22 of file cache.c.