Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
internal.h File Reference
#include <linux/fscache-cache.h>
#include <linux/sched.h>

Go to the source code of this file.

Macros

#define FSCACHE_MIN_THREADS   4
 
#define FSCACHE_MAX_THREADS   32
 
#define fscache_hist(hist, start_jif)   do {} while (0)
 
#define fscache_objlist_add(object)   do {} while(0)
 
#define fscache_proc_init()   (0)
 
#define fscache_proc_cleanup()   do {} while (0)
 
#define __fscache_stat(stat)   (NULL)
 
#define fscache_stat(stat)   do {} while (0)
 
#define fscache_stat_d(stat)   do {} while (0)
 
#define dbgprintk(FMT,...)   printk(KERN_DEBUG "[%-6.6s] "FMT"\n", current->comm, ##__VA_ARGS__)
 
#define kenter(FMT,...)   dbgprintk("==> %s("FMT")", __func__, ##__VA_ARGS__)
 
#define kleave(FMT,...)   dbgprintk("<== %s()"FMT"", __func__, ##__VA_ARGS__)
 
#define kdebug(FMT,...)   dbgprintk(FMT, ##__VA_ARGS__)
 
#define kjournal(FMT,...)   no_printk(FMT, ##__VA_ARGS__)
 
#define _enter(FMT,...)   no_printk("==> %s("FMT")", __func__, ##__VA_ARGS__)
 
#define _leave(FMT,...)   no_printk("<== %s()"FMT"", __func__, ##__VA_ARGS__)
 
#define _debug(FMT,...)   no_printk(FMT, ##__VA_ARGS__)
 
#define ____do_kdebug(LEVEL, POINT)
 
#define ___do_kdebug(LEVEL, POINT)   ____do_kdebug(LEVEL, POINT)
 
#define __do_kdebug(POINT)   ___do_kdebug(FSCACHE_DEBUG_LEVEL, POINT)
 
#define FSCACHE_DEBUG_CACHE   0
 
#define FSCACHE_DEBUG_COOKIE   1
 
#define FSCACHE_DEBUG_PAGE   2
 
#define FSCACHE_DEBUG_OPERATION   3
 
#define FSCACHE_POINT_ENTER   1
 
#define FSCACHE_POINT_LEAVE   2
 
#define FSCACHE_POINT_DEBUG   4
 
#define FSCACHE_DEBUG_LEVEL   CACHE
 
#define ASSERT(X)
 
#define ASSERTCMP(X, OP, Y)
 
#define ASSERTIF(C, X)
 
#define ASSERTIFCMP(C, X, OP, Y)
 

Functions

struct fscache_cachefscache_select_cache_for_object (struct fscache_cookie *)
 
void fscache_cookie_init_once (void *)
 
void __fscache_cookie_put (struct fscache_cookie *)
 
 DECLARE_PER_CPU (wait_queue_head_t, fscache_object_cong_wait)
 
int fscache_wait_bit (void *)
 
int fscache_wait_bit_interruptible (void *)
 
void fscache_withdrawing_object (struct fscache_cache *, struct fscache_object *)
 
void fscache_enqueue_object (struct fscache_object *)
 
int fscache_submit_exclusive_op (struct fscache_object *, struct fscache_operation *)
 
int fscache_submit_op (struct fscache_object *, struct fscache_operation *)
 
int fscache_cancel_op (struct fscache_operation *)
 
void fscache_abort_object (struct fscache_object *)
 
void fscache_start_operations (struct fscache_object *)
 
void fscache_operation_gc (struct work_struct *)
 

Variables

struct list_head fscache_cache_list
 
struct rw_semaphore fscache_addremove_sem
 
struct kmem_cachefscache_cookie_jar
 
struct fscache_cookie fscache_fsdef_index
 
struct fscache_cookie_def fscache_fsdef_netfs_def
 
unsigned fscache_defer_lookup
 
unsigned fscache_defer_create
 
unsigned fscache_debug
 
struct kobjectfscache_root
 
struct workqueue_structfscache_object_wq
 
struct workqueue_structfscache_op_wq
 
const char fscache_object_states_short [FSCACHE_OBJECT__NSTATES][5]
 

Macro Definition Documentation

#define ____do_kdebug (   LEVEL,
  POINT 
)
Value:
(FSCACHE_POINT_##POINT << (FSCACHE_DEBUG_ ## LEVEL * 3))))

Definition at line 365 of file internal.h.

#define ___do_kdebug (   LEVEL,
  POINT 
)    ____do_kdebug(LEVEL, POINT)

Definition at line 368 of file internal.h.

#define __do_kdebug (   POINT)    ___do_kdebug(FSCACHE_DEBUG_LEVEL, POINT)

Definition at line 370 of file internal.h.

#define __fscache_stat (   stat)    (NULL)

Definition at line 268 of file internal.h.

#define _debug (   FMT,
  ... 
)    no_printk(FMT, ##__VA_ARGS__)

Definition at line 357 of file internal.h.

#define _enter (   FMT,
  ... 
)    no_printk("==> %s("FMT")", __func__, ##__VA_ARGS__)

Definition at line 355 of file internal.h.

#define _leave (   FMT,
  ... 
)    no_printk("<== %s()"FMT"", __func__, ##__VA_ARGS__)

Definition at line 356 of file internal.h.

#define ASSERT (   X)
Value:
do { \
if (unlikely(!(X))) { \
printk(KERN_ERR "\n"); \
printk(KERN_ERR "FS-Cache: Assertion failed\n"); \
BUG(); \
} \
} while (0)

Definition at line 391 of file internal.h.

#define ASSERTCMP (   X,
  OP,
 
)
Value:
do { \
if (unlikely(!((X) OP (Y)))) { \
printk(KERN_ERR "\n"); \
printk(KERN_ERR "FS-Cache: Assertion failed\n"); \
printk(KERN_ERR "%lx " #OP " %lx is false\n", \
(unsigned long)(X), (unsigned long)(Y)); \
BUG(); \
} \
} while (0)

Definition at line 400 of file internal.h.

#define ASSERTIF (   C,
  X 
)
Value:
do { \
if (unlikely((C) && !(X))) { \
printk(KERN_ERR "\n"); \
printk(KERN_ERR "FS-Cache: Assertion failed\n"); \
BUG(); \
} \
} while (0)

Definition at line 411 of file internal.h.

#define ASSERTIFCMP (   C,
  X,
  OP,
 
)
Value:
do { \
if (unlikely((C) && !((X) OP (Y)))) { \
printk(KERN_ERR "\n"); \
printk(KERN_ERR "FS-Cache: Assertion failed\n"); \
printk(KERN_ERR "%lx " #OP " %lx is false\n", \
(unsigned long)(X), (unsigned long)(Y)); \
BUG(); \
} \
} while (0)

Definition at line 420 of file internal.h.

#define dbgprintk (   FMT,
  ... 
)    printk(KERN_DEBUG "[%-6.6s] "FMT"\n", current->comm, ##__VA_ARGS__)

Definition at line 321 of file internal.h.

#define FSCACHE_DEBUG_CACHE   0

Definition at line 373 of file internal.h.

#define FSCACHE_DEBUG_COOKIE   1

Definition at line 374 of file internal.h.

#define FSCACHE_DEBUG_LEVEL   CACHE

Definition at line 383 of file internal.h.

#define FSCACHE_DEBUG_OPERATION   3

Definition at line 376 of file internal.h.

#define FSCACHE_DEBUG_PAGE   2

Definition at line 375 of file internal.h.

#define fscache_hist (   hist,
  start_jif 
)    do {} while (0)

Definition at line 75 of file internal.h.

#define FSCACHE_MAX_THREADS   32

Definition at line 29 of file internal.h.

#define FSCACHE_MIN_THREADS   4

Definition at line 28 of file internal.h.

#define fscache_objlist_add (   object)    do {} while(0)

Definition at line 114 of file internal.h.

#define FSCACHE_POINT_DEBUG   4

Definition at line 380 of file internal.h.

#define FSCACHE_POINT_ENTER   1

Definition at line 378 of file internal.h.

#define FSCACHE_POINT_LEAVE   2

Definition at line 379 of file internal.h.

#define fscache_proc_cleanup (   void)    do {} while (0)

Definition at line 137 of file internal.h.

#define fscache_proc_init (   void)    (0)

Definition at line 136 of file internal.h.

#define fscache_stat (   stat)    do {} while (0)

Definition at line 269 of file internal.h.

#define fscache_stat_d (   stat)    do {} while (0)

Definition at line 270 of file internal.h.

#define kdebug (   FMT,
  ... 
)    dbgprintk(FMT, ##__VA_ARGS__)

Definition at line 326 of file internal.h.

#define kenter (   FMT,
  ... 
)    dbgprintk("==> %s("FMT")", __func__, ##__VA_ARGS__)

Definition at line 324 of file internal.h.

#define kjournal (   FMT,
  ... 
)    no_printk(FMT, ##__VA_ARGS__)

Definition at line 328 of file internal.h.

#define kleave (   FMT,
  ... 
)    dbgprintk("<== %s()"FMT"", __func__, ##__VA_ARGS__)

Definition at line 325 of file internal.h.

Function Documentation

void __fscache_cookie_put ( struct fscache_cookie )

Definition at line 492 of file cookie.c.

DECLARE_PER_CPU ( wait_queue_head_t  ,
fscache_object_cong_wait   
)
void fscache_abort_object ( struct fscache_object )

Definition at line 245 of file operation.c.

int fscache_cancel_op ( struct fscache_operation )

Definition at line 286 of file operation.c.

void fscache_cookie_init_once ( void )

Definition at line 33 of file cookie.c.

void fscache_enqueue_object ( struct fscache_object )

Definition at line 753 of file object.c.

void fscache_operation_gc ( struct work_struct )

Definition at line 387 of file operation.c.

struct fscache_cache* fscache_select_cache_for_object ( struct fscache_cookie )
read

Definition at line 94 of file cache.c.

void fscache_start_operations ( struct fscache_object )

Definition at line 256 of file operation.c.

int fscache_submit_exclusive_op ( struct fscache_object ,
struct fscache_operation  
)

Definition at line 80 of file operation.c.

int fscache_submit_op ( struct fscache_object ,
struct fscache_operation  
)

Definition at line 180 of file operation.c.

int fscache_wait_bit ( void )

Definition at line 203 of file main.c.

int fscache_wait_bit_interruptible ( void )

Definition at line 213 of file main.c.

void fscache_withdrawing_object ( struct fscache_cache ,
struct fscache_object  
)

Definition at line 707 of file object.c.

Variable Documentation

struct rw_semaphore fscache_addremove_sem
struct list_head fscache_cache_list
struct kmem_cache* fscache_cookie_jar

Definition at line 20 of file cookie.c.

unsigned fscache_debug

Definition at line 37 of file main.c.

unsigned fscache_defer_create

Definition at line 31 of file main.c.

unsigned fscache_defer_lookup

Definition at line 25 of file main.c.

struct fscache_cookie fscache_fsdef_index

Definition at line 56 of file fsdef.c.

struct fscache_cookie_def fscache_fsdef_netfs_def

Definition at line 69 of file fsdef.c.

const char fscache_object_states_short[FSCACHE_OBJECT__NSTATES][5]

Definition at line 36 of file object.c.

struct workqueue_struct* fscache_object_wq

Definition at line 44 of file main.c.

struct workqueue_struct* fscache_op_wq

Definition at line 45 of file main.c.

struct kobject* fscache_root

Definition at line 43 of file main.c.