Commit adfa6f98 authored by David Howells's avatar David Howells Committed by Trond Myklebust
Browse files

NFS: Rename struct nfs4_client to struct nfs_client



Rename struct nfs4_client to struct nfs_client so that it can become the basis
for a general client record for NFS2 and NFS3 in addition to NFS4.

Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 5ae1fbce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ void nfs_callback_down(void)
static int nfs_callback_authenticate(struct svc_rqst *rqstp)
{
	struct in_addr *addr = &rqstp->rq_addr.sin_addr;
	struct nfs4_client *clp;
	struct nfs_client *clp;

	/* Don't talk to strangers */
	clp = nfs4_find_client(addr);
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 
unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res)
{
	struct nfs4_client *clp;
	struct nfs_client *clp;
	struct nfs_delegation *delegation;
	struct nfs_inode *nfsi;
	struct inode *inode;
@@ -56,7 +56,7 @@ unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres

unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy)
{
	struct nfs4_client *clp;
	struct nfs_client *clp;
	struct inode *inode;
	unsigned res;
	
+12 −12
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st
 */
int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res)
{
	struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_inode *nfsi = NFS_I(inode);
	struct nfs_delegation *delegation;
	int status = 0;
@@ -176,7 +176,7 @@ static void nfs_msync_inode(struct inode *inode)
 */
int __nfs_inode_return_delegation(struct inode *inode)
{
	struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_inode *nfsi = NFS_I(inode);
	struct nfs_delegation *delegation;
	int res = 0;
@@ -208,7 +208,7 @@ int __nfs_inode_return_delegation(struct inode *inode)
 */
void nfs_return_all_delegations(struct super_block *sb)
{
	struct nfs4_client *clp = NFS_SB(sb)->nfs4_state;
	struct nfs_client *clp = NFS_SB(sb)->nfs4_state;
	struct nfs_delegation *delegation;
	struct inode *inode;

@@ -232,7 +232,7 @@ void nfs_return_all_delegations(struct super_block *sb)

int nfs_do_expire_all_delegations(void *ptr)
{
	struct nfs4_client *clp = ptr;
	struct nfs_client *clp = ptr;
	struct nfs_delegation *delegation;
	struct inode *inode;

@@ -258,7 +258,7 @@ int nfs_do_expire_all_delegations(void *ptr)
	module_put_and_exit(0);
}

void nfs_expire_all_delegations(struct nfs4_client *clp)
void nfs_expire_all_delegations(struct nfs_client *clp)
{
	struct task_struct *task;

@@ -276,7 +276,7 @@ void nfs_expire_all_delegations(struct nfs4_client *clp)
/*
 * Return all delegations following an NFS4ERR_CB_PATH_DOWN error.
 */
void nfs_handle_cb_pathdown(struct nfs4_client *clp)
void nfs_handle_cb_pathdown(struct nfs_client *clp)
{
	struct nfs_delegation *delegation;
	struct inode *inode;
@@ -299,7 +299,7 @@ void nfs_handle_cb_pathdown(struct nfs4_client *clp)

struct recall_threadargs {
	struct inode *inode;
	struct nfs4_client *clp;
	struct nfs_client *clp;
	const nfs4_stateid *stateid;

	struct completion started;
@@ -310,7 +310,7 @@ static int recall_thread(void *data)
{
	struct recall_threadargs *args = (struct recall_threadargs *)data;
	struct inode *inode = igrab(args->inode);
	struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_inode *nfsi = NFS_I(inode);
	struct nfs_delegation *delegation;

@@ -371,7 +371,7 @@ int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *s
/*
 * Retrieve the inode associated with a delegation
 */
struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nfs_fh *fhandle)
struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle)
{
	struct nfs_delegation *delegation;
	struct inode *res = NULL;
@@ -389,7 +389,7 @@ struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nf
/*
 * Mark all delegations as needing to be reclaimed
 */
void nfs_delegation_mark_reclaim(struct nfs4_client *clp)
void nfs_delegation_mark_reclaim(struct nfs_client *clp)
{
	struct nfs_delegation *delegation;
	spin_lock(&clp->cl_lock);
@@ -401,7 +401,7 @@ void nfs_delegation_mark_reclaim(struct nfs4_client *clp)
/*
 * Reap all unclaimed delegations after reboot recovery is done
 */
void nfs_delegation_reap_unclaimed(struct nfs4_client *clp)
void nfs_delegation_reap_unclaimed(struct nfs_client *clp)
{
	struct nfs_delegation *delegation, *n;
	LIST_HEAD(head);
@@ -423,7 +423,7 @@ void nfs_delegation_reap_unclaimed(struct nfs4_client *clp)

int nfs4_copy_delegation_stateid(nfs4_stateid *dst, struct inode *inode)
{
	struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_client *clp = NFS_SERVER(inode)->nfs4_state;
	struct nfs_inode *nfsi = NFS_I(inode);
	struct nfs_delegation *delegation;
	int res = 0;
+5 −5
Original line number Diff line number Diff line
@@ -29,13 +29,13 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st
int __nfs_inode_return_delegation(struct inode *inode);
int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid);

struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nfs_fh *fhandle);
struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle);
void nfs_return_all_delegations(struct super_block *sb);
void nfs_expire_all_delegations(struct nfs4_client *clp);
void nfs_handle_cb_pathdown(struct nfs4_client *clp);
void nfs_expire_all_delegations(struct nfs_client *clp);
void nfs_handle_cb_pathdown(struct nfs_client *clp);

void nfs_delegation_mark_reclaim(struct nfs4_client *clp);
void nfs_delegation_reap_unclaimed(struct nfs4_client *clp);
void nfs_delegation_mark_reclaim(struct nfs_client *clp);
void nfs_delegation_reap_unclaimed(struct nfs_client *clp);

/* NFSv4 delegation-related procedures */
int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid);
+6 −6
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ static struct rpc_pipe_ops idmap_upcall_ops = {
};

void
nfs_idmap_new(struct nfs4_client *clp)
nfs_idmap_new(struct nfs_client *clp)
{
	struct idmap *idmap;

@@ -138,7 +138,7 @@ nfs_idmap_new(struct nfs4_client *clp)
}

void
nfs_idmap_delete(struct nfs4_client *clp)
nfs_idmap_delete(struct nfs_client *clp)
{
	struct idmap *idmap = clp->cl_idmap;

@@ -491,27 +491,27 @@ static unsigned int fnvhash32(const void *buf, size_t buflen)
	return (hash);
}

int nfs_map_name_to_uid(struct nfs4_client *clp, const char *name, size_t namelen, __u32 *uid)
int nfs_map_name_to_uid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid)
{
	struct idmap *idmap = clp->cl_idmap;

	return nfs_idmap_id(idmap, &idmap->idmap_user_hash, name, namelen, uid);
}

int nfs_map_group_to_gid(struct nfs4_client *clp, const char *name, size_t namelen, __u32 *uid)
int nfs_map_group_to_gid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid)
{
	struct idmap *idmap = clp->cl_idmap;

	return nfs_idmap_id(idmap, &idmap->idmap_group_hash, name, namelen, uid);
}

int nfs_map_uid_to_name(struct nfs4_client *clp, __u32 uid, char *buf)
int nfs_map_uid_to_name(struct nfs_client *clp, __u32 uid, char *buf)
{
	struct idmap *idmap = clp->cl_idmap;

	return nfs_idmap_name(idmap, &idmap->idmap_user_hash, uid, buf);
}
int nfs_map_gid_to_group(struct nfs4_client *clp, __u32 uid, char *buf)
int nfs_map_gid_to_group(struct nfs_client *clp, __u32 uid, char *buf)
{
	struct idmap *idmap = clp->cl_idmap;

Loading