Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
cache.c File Reference
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/slab.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kmod.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <asm/uaccess.h>
#include <linux/poll.h>
#include <linux/seq_file.h>
#include <linux/proc_fs.h>
#include <linux/net.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <linux/pagemap.h>
#include <asm/ioctls.h>
#include <linux/sunrpc/types.h>
#include <linux/sunrpc/cache.h>
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
#include "netns.h"

Go to the source code of this file.

Data Structures

struct  thread_deferred_req
 
struct  cache_queue
 
struct  cache_request
 
struct  cache_reader
 
struct  handle
 

Macros

#define RPCDBG_FACILITY   RPCDBG_CACHE
 
#define DFR_HASHSIZE   (PAGE_SIZE/sizeof(struct list_head))
 
#define DFR_HASH(item)   ((((long)item)>>4 ^ (((long)item)>>13)) % DFR_HASHSIZE)
 
#define DFR_MAX   300 /* ??? */
 
#define isodigit(c)   (isdigit(c) && c <= '7')
 

Functions

struct cache_headsunrpc_cache_lookup (struct cache_detail *detail, struct cache_head *key, int hash)
 
 EXPORT_SYMBOL_GPL (sunrpc_cache_lookup)
 
struct cache_headsunrpc_cache_update (struct cache_detail *detail, struct cache_head *new, struct cache_head *old, int hash)
 
 EXPORT_SYMBOL_GPL (sunrpc_cache_update)
 
int cache_check (struct cache_detail *detail, struct cache_head *h, struct cache_req *rqstp)
 
 EXPORT_SYMBOL_GPL (cache_check)
 
void sunrpc_init_cache_detail (struct cache_detail *cd)
 
 EXPORT_SYMBOL_GPL (sunrpc_init_cache_detail)
 
void sunrpc_destroy_cache_detail (struct cache_detail *cd)
 
 EXPORT_SYMBOL_GPL (sunrpc_destroy_cache_detail)
 
void cache_flush (void)
 
 EXPORT_SYMBOL_GPL (cache_flush)
 
void cache_purge (struct cache_detail *detail)
 
 EXPORT_SYMBOL_GPL (cache_purge)
 
void cache_clean_deferred (void *owner)
 
void qword_add (char **bpp, int *lp, char *str)
 
 EXPORT_SYMBOL_GPL (qword_add)
 
void qword_addhex (char **bpp, int *lp, char *buf, int blen)
 
 EXPORT_SYMBOL_GPL (qword_addhex)
 
int sunrpc_cache_pipe_upcall (struct cache_detail *detail, struct cache_head *h, void(*cache_request)(struct cache_detail *, struct cache_head *, char **, int *))
 
 EXPORT_SYMBOL_GPL (sunrpc_cache_pipe_upcall)
 
int qword_get (char **bpp, char *dest, int bufsize)
 
 EXPORT_SYMBOL_GPL (qword_get)
 
void __init cache_initialize (void)
 
int cache_register_net (struct cache_detail *cd, struct net *net)
 
 EXPORT_SYMBOL_GPL (cache_register_net)
 
void cache_unregister_net (struct cache_detail *cd, struct net *net)
 
 EXPORT_SYMBOL_GPL (cache_unregister_net)
 
struct cache_detailcache_create_net (struct cache_detail *tmpl, struct net *net)
 
 EXPORT_SYMBOL_GPL (cache_create_net)
 
void cache_destroy_net (struct cache_detail *cd, struct net *net)
 
 EXPORT_SYMBOL_GPL (cache_destroy_net)
 
int sunrpc_cache_register_pipefs (struct dentry *parent, const char *name, umode_t umode, struct cache_detail *cd)
 
 EXPORT_SYMBOL_GPL (sunrpc_cache_register_pipefs)
 
void sunrpc_cache_unregister_pipefs (struct cache_detail *cd)
 
 EXPORT_SYMBOL_GPL (sunrpc_cache_unregister_pipefs)
 

Variables

struct file_operations cache_file_operations_pipefs
 
struct file_operations content_file_operations_pipefs
 
struct file_operations cache_flush_operations_pipefs
 

Macro Definition Documentation

#define DFR_HASH (   item)    ((((long)item)>>4 ^ (((long)item)>>13)) % DFR_HASHSIZE)

Definition at line 528 of file cache.c.

#define DFR_HASHSIZE   (PAGE_SIZE/sizeof(struct list_head))

Definition at line 527 of file cache.c.

#define DFR_MAX   300 /* ??? */

Definition at line 530 of file cache.c.

#define isodigit (   c)    (isdigit(c) && c <= '7')

Definition at line 1204 of file cache.c.

#define RPCDBG_FACILITY   RPCDBG_CACHE

Definition at line 38 of file cache.c.

Function Documentation

int cache_check ( struct cache_detail detail,
struct cache_head h,
struct cache_req rqstp 
)

Definition at line 256 of file cache.c.

void cache_clean_deferred ( void owner)

Definition at line 694 of file cache.c.

struct cache_detail* cache_create_net ( struct cache_detail tmpl,
struct net net 
)
read

Definition at line 1660 of file cache.c.

void cache_destroy_net ( struct cache_detail cd,
struct net net 
)

Definition at line 1679 of file cache.c.

void cache_flush ( void  )

Definition at line 493 of file cache.c.

void __init cache_initialize ( void  )

Definition at line 1636 of file cache.c.

void cache_purge ( struct cache_detail detail)

Definition at line 502 of file cache.c.

int cache_register_net ( struct cache_detail cd,
struct net net 
)

Definition at line 1641 of file cache.c.

void cache_unregister_net ( struct cache_detail cd,
struct net net 
)

Definition at line 1653 of file cache.c.

EXPORT_SYMBOL_GPL ( sunrpc_cache_lookup  )
EXPORT_SYMBOL_GPL ( sunrpc_cache_update  )
EXPORT_SYMBOL_GPL ( cache_check  )
EXPORT_SYMBOL_GPL ( sunrpc_init_cache_detail  )
EXPORT_SYMBOL_GPL ( sunrpc_destroy_cache_detail  )
EXPORT_SYMBOL_GPL ( cache_flush  )
EXPORT_SYMBOL_GPL ( cache_purge  )
EXPORT_SYMBOL_GPL ( qword_add  )
EXPORT_SYMBOL_GPL ( qword_addhex  )
EXPORT_SYMBOL_GPL ( sunrpc_cache_pipe_upcall  )
EXPORT_SYMBOL_GPL ( qword_get  )
EXPORT_SYMBOL_GPL ( cache_register_net  )
EXPORT_SYMBOL_GPL ( cache_unregister_net  )
EXPORT_SYMBOL_GPL ( cache_create_net  )
EXPORT_SYMBOL_GPL ( cache_destroy_net  )
EXPORT_SYMBOL_GPL ( sunrpc_cache_register_pipefs  )
EXPORT_SYMBOL_GPL ( sunrpc_cache_unregister_pipefs  )
void qword_add ( char **  bpp,
int lp,
char str 
)

Definition at line 1046 of file cache.c.

void qword_addhex ( char **  bpp,
int lp,
char buf,
int  blen 
)

Definition at line 1082 of file cache.c.

int qword_get ( char **  bpp,
char dest,
int  bufsize 
)

Definition at line 1205 of file cache.c.

struct cache_head* sunrpc_cache_lookup ( struct cache_detail detail,
struct cache_head key,
int  hash 
)
read

Definition at line 59 of file cache.c.

int sunrpc_cache_pipe_upcall ( struct cache_detail detail,
struct cache_head h,
void(*)(struct cache_detail *, struct cache_head *, char **, int *)  cache_request 
)

Definition at line 1143 of file cache.c.

int sunrpc_cache_register_pipefs ( struct dentry parent,
const char name,
umode_t  umode,
struct cache_detail cd 
)

Definition at line 1803 of file cache.c.

void sunrpc_cache_unregister_pipefs ( struct cache_detail cd)

Definition at line 1823 of file cache.c.

struct cache_head* sunrpc_cache_update ( struct cache_detail detail,
struct cache_head new,
struct cache_head old,
int  hash 
)
read

Definition at line 144 of file cache.c.

void sunrpc_destroy_cache_detail ( struct cache_detail cd)

Definition at line 365 of file cache.c.

void sunrpc_init_cache_detail ( struct cache_detail cd)

Definition at line 347 of file cache.c.

Variable Documentation

struct file_operations cache_file_operations_pipefs
Initial value:
= {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = cache_read_pipefs,
.write = cache_write_pipefs,
.poll = cache_poll_pipefs,
.unlocked_ioctl = cache_ioctl_pipefs,
.open = cache_open_pipefs,
.release = cache_release_pipefs,
}

Definition at line 1732 of file cache.c.

struct file_operations cache_flush_operations_pipefs
Initial value:
= {
.open = open_flush_pipefs,
.read = read_flush_pipefs,
.write = write_flush_pipefs,
.release = release_flush_pipefs,
.llseek = no_llseek,
}

Definition at line 1795 of file cache.c.

struct file_operations content_file_operations_pipefs
Initial value:
= {
.open = content_open_pipefs,
.read = seq_read,
.llseek = seq_lseek,
.release = content_release_pipefs,
}

Definition at line 1757 of file cache.c.