Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
delegation.c File Reference
#include <linux/completion.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/nfs4.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_xdr.h>
#include "nfs4_fs.h"
#include "delegation.h"
#include "internal.h"

Go to the source code of this file.

Functions

void nfs_mark_delegation_referenced (struct nfs_delegation *delegation)
 
int nfs4_have_delegation (struct inode *inode, fmode_t flags)
 
void nfs_inode_reclaim_delegation (struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res)
 
int nfs_inode_set_delegation (struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res)
 
int nfs_client_return_marked_delegations (struct nfs_client *clp)
 
void nfs_inode_return_delegation_noreclaim (struct inode *inode)
 
int nfs4_inode_return_delegation (struct inode *inode)
 
void nfs_server_return_all_delegations (struct nfs_server *server)
 
void nfs_remove_bad_delegation (struct inode *inode)
 
 EXPORT_SYMBOL_GPL (nfs_remove_bad_delegation)
 
void nfs_expire_all_delegation_types (struct nfs_client *clp, fmode_t flags)
 
void nfs_expire_all_delegations (struct nfs_client *clp)
 
void nfs_expire_unreferenced_delegations (struct nfs_client *clp)
 
int nfs_async_inode_return_delegation (struct inode *inode, const nfs4_stateid *stateid)
 
struct inodenfs_delegation_find_inode (struct nfs_client *clp, const struct nfs_fh *fhandle)
 
void nfs_delegation_mark_reclaim (struct nfs_client *clp)
 
void nfs_delegation_reap_unclaimed (struct nfs_client *clp)
 
int nfs_delegations_present (struct nfs_client *clp)
 
bool nfs4_copy_delegation_stateid (nfs4_stateid *dst, struct inode *inode, fmode_t flags)
 

Function Documentation

EXPORT_SYMBOL_GPL ( nfs_remove_bad_delegation  )
bool nfs4_copy_delegation_stateid ( nfs4_stateid dst,
struct inode inode,
fmode_t  flags 
)

nfs4_copy_delegation_stateid - Copy inode's state ID information : stateid data structure to fill in : inode to check : delegation type requirement

Returns "true" and fills in "dst->data" * if inode had a delegation, otherwise "false" is returned.

Definition at line 695 of file delegation.c.

int nfs4_have_delegation ( struct inode inode,
fmode_t  flags 
)

nfs_have_delegation - check if inode has a delegation : inode to check : delegation types to check for

Returns one if inode has the indicated delegation, otherwise zero.

Definition at line 50 of file delegation.c.

int nfs4_inode_return_delegation ( struct inode inode)

nfs_inode_return_delegation - synchronously return a delegation : inode to process

This routine will always flush any dirty data to disk on the assumption that if we need to return the delegation, then we should stop caching.

Returns zero on success, or a negative errno value.

Definition at line 391 of file delegation.c.

int nfs_async_inode_return_delegation ( struct inode inode,
const nfs4_stateid stateid 
)

nfs_async_inode_return_delegation - asynchronously return a delegation : inode to process : state ID information

Returns zero on success, or a negative errno value.

Definition at line 539 of file delegation.c.

int nfs_client_return_marked_delegations ( struct nfs_client clp)

nfs_client_return_marked_delegations - return previously marked delegations : nfs_client to process

Note that this function is designed to be called by the state manager thread. For this reason, it cannot flush the dirty data, since that could deadlock in case of a state recovery error.

Returns zero on success, or a negative errno value.

Definition at line 325 of file delegation.c.

struct inode* nfs_delegation_find_inode ( struct nfs_client clp,
const struct nfs_fh fhandle 
)
read

nfs_delegation_find_inode - retrieve the inode associated with a delegation : client state handle : filehandle from a delegation recall

Returns pointer to inode matching "fhandle," or NULL if a matching inode cannot be found.

Definition at line 590 of file delegation.c.

void nfs_delegation_mark_reclaim ( struct nfs_client clp)

nfs_delegation_mark_reclaim - mark all delegations as needing to be reclaimed : nfs_client to process

Definition at line 619 of file delegation.c.

void nfs_delegation_reap_unclaimed ( struct nfs_client clp)

nfs_delegation_reap_unclaimed - reap unclaimed delegations after reboot recovery is done : nfs_client to process

Definition at line 634 of file delegation.c.

int nfs_delegations_present ( struct nfs_client clp)

nfs_delegations_present - check for existence of delegations : client state handle

Returns one if there are any nfs_delegation structures attached to this nfs_client.

Definition at line 671 of file delegation.c.

void nfs_expire_all_delegation_types ( struct nfs_client clp,
fmode_t  flags 
)

nfs_expire_all_delegation_types : client to process : delegation types to expire

Definition at line 488 of file delegation.c.

void nfs_expire_all_delegations ( struct nfs_client clp)

nfs_expire_all_delegations : client to process

Definition at line 499 of file delegation.c.

void nfs_expire_unreferenced_delegations ( struct nfs_client clp)

nfs_expire_unreferenced_delegations - Eliminate unused delegations : nfs_client to process

Definition at line 520 of file delegation.c.

void nfs_inode_reclaim_delegation ( struct inode inode,
struct rpc_cred *  cred,
struct nfs_openres res 
)

nfs_inode_reclaim_delegation - process a delegation reclaim request : inode to process : credential to use for request : new delegation state from server

Definition at line 131 of file delegation.c.

void nfs_inode_return_delegation_noreclaim ( struct inode inode)

nfs_inode_return_delegation_noreclaim - return delegation, don't reclaim opens : inode to process

Does not protect against delegation reclaims, therefore really only safe to be called from nfs4_clear_inode().

Definition at line 368 of file delegation.c.

int nfs_inode_set_delegation ( struct inode inode,
struct rpc_cred *  cred,
struct nfs_openres res 
)

nfs_inode_set_delegation - set up a delegation on an inode : inode to which delegation applies : cred to use for subsequent delegation processing : new delegation state from server

Returns zero on success, or a negative errno value.

Definition at line 226 of file delegation.c.

void nfs_mark_delegation_referenced ( struct nfs_delegation *  delegation)

nfs_mark_delegation_referenced - set delegation's REFERENCED flag : delegation to process

Definition at line 38 of file delegation.c.

void nfs_remove_bad_delegation ( struct inode inode)

Definition at line 470 of file delegation.c.

void nfs_server_return_all_delegations ( struct nfs_server server)

nfs_super_return_all_delegations - return delegations for one superblock : sb to process

Definition at line 420 of file delegation.c.