Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
nfs_page.h File Reference
#include <linux/list.h>
#include <linux/pagemap.h>
#include <linux/wait.h>
#include <linux/sunrpc/auth.h>
#include <linux/nfs_xdr.h>
#include <linux/kref.h>

Go to the source code of this file.

Data Structures

struct  nfs_page
 
struct  nfs_pageio_ops
 
struct  nfs_pageio_descriptor
 

Macros

#define NFS_WBACK_BUSY(req)   (test_bit(PG_BUSY,&(req)->wb_flags))
 

Enumerations

enum  {
  PG_BUSY = 0, PG_MAPPED, PG_CLEAN, PG_NEED_COMMIT,
  PG_NEED_RESCHED, PG_COMMIT_TO_DS
}
 

Functions

struct nfs_pagenfs_create_request (struct nfs_open_context *ctx, struct inode *inode, struct page *page, unsigned int offset, unsigned int count)
 
void nfs_release_request (struct nfs_page *req)
 
void nfs_pageio_init (struct nfs_pageio_descriptor *desc, struct inode *inode, const struct nfs_pageio_ops *pg_ops, const struct nfs_pgio_completion_ops *compl_ops, size_t bsize, int how)
 
int nfs_pageio_add_request (struct nfs_pageio_descriptor *, struct nfs_page *)
 
void nfs_pageio_complete (struct nfs_pageio_descriptor *desc)
 
void nfs_pageio_cond_complete (struct nfs_pageio_descriptor *, pgoff_t)
 
bool nfs_generic_pg_test (struct nfs_pageio_descriptor *desc, struct nfs_page *prev, struct nfs_page *req)
 
int nfs_wait_on_request (struct nfs_page *)
 
void nfs_unlock_request (struct nfs_page *req)
 
void nfs_unlock_and_release_request (struct nfs_page *req)
 

Macro Definition Documentation

#define NFS_WBACK_BUSY (   req)    (test_bit(PG_BUSY,&(req)->wb_flags))

Definition at line 75 of file nfs_page.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
PG_BUSY 
PG_MAPPED 
PG_CLEAN 
PG_NEED_COMMIT 
PG_NEED_RESCHED 
PG_COMMIT_TO_DS 

Definition at line 24 of file nfs_page.h.

Function Documentation

struct nfs_page* nfs_create_request ( struct nfs_open_context ctx,
struct inode inode,
struct page page,
unsigned int  offset,
unsigned int  count 
)
read

Definition at line 100 of file pagelist.c.

bool nfs_generic_pg_test ( struct nfs_pageio_descriptor desc,
struct nfs_page prev,
struct nfs_page req 
)

Definition at line 229 of file pagelist.c.

int nfs_pageio_add_request ( struct nfs_pageio_descriptor ,
struct nfs_page  
)

Definition at line 405 of file pagelist.c.

void nfs_pageio_complete ( struct nfs_pageio_descriptor desc)

nfs_pageio_complete - Complete I/O on an nfs_pageio_descriptor : pointer to io descriptor

Definition at line 426 of file pagelist.c.

void nfs_pageio_cond_complete ( struct nfs_pageio_descriptor desc,
pgoff_t  index 
)

nfs_pageio_cond_complete - Conditional I/O completion : pointer to io descriptor : page index

It is important to ensure that processes don't try to take locks on non-contiguous ranges of pages as that might deadlock. This function should be called before attempting to wait on a locked nfs_page. It will complete the I/O if the page index 'index' is not contiguous with the existing list of pages in 'desc'.

Definition at line 449 of file pagelist.c.

void nfs_pageio_init ( struct nfs_pageio_descriptor desc,
struct inode inode,
const struct nfs_pageio_ops pg_ops,
const struct nfs_pgio_completion_ops compl_ops,
size_t  bsize,
int  io_flags 
)

nfs_pageio_init - initialise a page io descriptor : pointer to descriptor : pointer to inode : pointer to io function : io block size : extra parameters for the io function

Definition at line 253 of file pagelist.c.

void nfs_release_request ( struct nfs_page req)

Definition at line 203 of file pagelist.c.

void nfs_unlock_and_release_request ( struct nfs_page req)

nfs_unlock_and_release_request - Unlock request and release the nfs_page :

Definition at line 154 of file pagelist.c.

void nfs_unlock_request ( struct nfs_page req)

nfs_unlock_request - Unlock request and wake up sleepers. :

Definition at line 138 of file pagelist.c.

int nfs_wait_on_request ( struct nfs_page req)

nfs_wait_on_request - Wait for a request to complete. : request to wait upon.

Interruptible by fatal signals only. The user is responsible for holding a count on the request.

Definition at line 222 of file pagelist.c.