Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cache.c File Reference
#include <linux/jiffies.h>
#include <linux/file.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <net/9p/9p.h>
#include "v9fs.h"
#include "cache.h"

Go to the source code of this file.

Macros

#define CACHETAG_LEN   11
 

Functions

void v9fs_cache_session_get_cookie (struct v9fs_session_info *v9ses)
 
void v9fs_cache_session_put_cookie (struct v9fs_session_info *v9ses)
 
void v9fs_cache_inode_get_cookie (struct inode *inode)
 
void v9fs_cache_inode_put_cookie (struct inode *inode)
 
void v9fs_cache_inode_flush_cookie (struct inode *inode)
 
void v9fs_cache_inode_set_cookie (struct inode *inode, struct file *filp)
 
void v9fs_cache_inode_reset_cookie (struct inode *inode)
 
int __v9fs_fscache_release_page (struct page *page, gfp_t gfp)
 
void __v9fs_fscache_invalidate_page (struct page *page)
 
int __v9fs_readpage_from_fscache (struct inode *inode, struct page *page)
 
int __v9fs_readpages_from_fscache (struct inode *inode, struct address_space *mapping, struct list_head *pages, unsigned *nr_pages)
 
void __v9fs_readpage_to_fscache (struct inode *inode, struct page *page)
 
void __v9fs_fscache_wait_on_page_write (struct inode *inode, struct page *page)
 

Variables

struct fscache_netfs v9fs_cache_netfs
 
struct fscache_cookie_def v9fs_cache_session_index_def
 
struct fscache_cookie_def v9fs_cache_inode_index_def
 

Macro Definition Documentation

#define CACHETAG_LEN   11

Definition at line 34 of file cache.c.

Function Documentation

void __v9fs_fscache_invalidate_page ( struct page page)

Definition at line 291 of file cache.c.

int __v9fs_fscache_release_page ( struct page page,
gfp_t  gfp 
)

Definition at line 281 of file cache.c.

void __v9fs_fscache_wait_on_page_write ( struct inode inode,
struct page page 
)

Definition at line 409 of file cache.c.

int __v9fs_readpage_from_fscache ( struct inode inode,
struct page page 
)

__v9fs_readpage_from_fscache - read a page from cache

Returns 0 if the pages are in cache and a BIO is submitted, 1 if the pages are not in cache and -error otherwise.

Definition at line 321 of file cache.c.

void __v9fs_readpage_to_fscache ( struct inode inode,
struct page page 
)

__v9fs_readpage_to_fscache - write a page to the cache

Definition at line 394 of file cache.c.

int __v9fs_readpages_from_fscache ( struct inode inode,
struct address_space mapping,
struct list_head pages,
unsigned *  nr_pages 
)

__v9fs_readpages_from_fscache - read multiple pages from cache

Returns 0 if the pages are in cache and a BIO is submitted, 1 if the pages are not in cache and -error otherwise.

Definition at line 356 of file cache.c.

void v9fs_cache_inode_flush_cookie ( struct inode inode)

Definition at line 226 of file cache.c.

void v9fs_cache_inode_get_cookie ( struct inode inode)

Definition at line 192 of file cache.c.

void v9fs_cache_inode_put_cookie ( struct inode inode)

Definition at line 213 of file cache.c.

void v9fs_cache_inode_reset_cookie ( struct inode inode)

Definition at line 257 of file cache.c.

void v9fs_cache_inode_set_cookie ( struct inode inode,
struct file filp 
)

Definition at line 239 of file cache.c.

void v9fs_cache_session_get_cookie ( struct v9fs_session_info v9ses)

Definition at line 85 of file cache.c.

void v9fs_cache_session_put_cookie ( struct v9fs_session_info v9ses)

Definition at line 98 of file cache.c.

Variable Documentation

struct fscache_cookie_def v9fs_cache_inode_index_def
Initial value:
= {
.name = "9p.inode",
.get_key = v9fs_cache_inode_get_key,
.get_attr = v9fs_cache_inode_get_attr,
.get_aux = v9fs_cache_inode_get_aux,
.check_aux = v9fs_cache_inode_check_aux,
.now_uncached = v9fs_cache_inode_now_uncached,
}

Definition at line 182 of file cache.c.

struct fscache_netfs v9fs_cache_netfs
Initial value:
= {
.name = "9p",
.version = 0,
}

Definition at line 36 of file cache.c.

struct fscache_cookie_def v9fs_cache_session_index_def
Initial value:
= {
.name = "9P.session",
.get_key = v9fs_cache_session_get_key,
}

Definition at line 79 of file cache.c.