diff options
author | Chuck Lever | 2007-12-10 20:57:16 +0100 |
---|---|---|
committer | Trond Myklebust | 2008-01-30 08:05:52 +0100 |
commit | 5d8515caeb99940f5ed56d22a03aba20bbe7fdcb (patch) | |
tree | b17ec1fc7bf34a73f65bf8c4b9f837beb54a64f9 /fs/nfs/nfs4state.c | |
parent | NFS: Enable NFS client to generate CLIENTID strings with IPv6 addresses (diff) | |
download | kernel-qcow2-linux-5d8515caeb99940f5ed56d22a03aba20bbe7fdcb.tar.gz kernel-qcow2-linux-5d8515caeb99940f5ed56d22a03aba20bbe7fdcb.tar.xz kernel-qcow2-linux-5d8515caeb99940f5ed56d22a03aba20bbe7fdcb.zip |
NFS: eliminate NIPQUAD(clp->cl_addr.sin_addr)
To ensure the NFS client displays IPv6 addresses properly, replace
address family-specific NIPQUAD() invocations with a call to the RPC
client to get a formatted string representing the remote peer's
address.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index bf94c6e0a503..f9c7432471dc 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -758,8 +758,9 @@ static void nfs4_recover_state(struct nfs_client *clp) __module_get(THIS_MODULE); atomic_inc(&clp->cl_count); - task = kthread_run(reclaimer, clp, "%u.%u.%u.%u-reclaim", - NIPQUAD(clp->cl_addr.sin_addr)); + task = kthread_run(reclaimer, clp, "%s-reclaim", + rpc_peeraddr2str(clp->cl_rpcclient, + RPC_DISPLAY_ADDR)); if (!IS_ERR(task)) return; nfs4_clear_recover_bit(clp); @@ -970,8 +971,8 @@ out: module_put_and_exit(0); return 0; out_error: - printk(KERN_WARNING "Error: state recovery failed on NFSv4 server %u.%u.%u.%u with error %d\n", - NIPQUAD(clp->cl_addr.sin_addr), -status); + printk(KERN_WARNING "Error: state recovery failed on NFSv4 server %s" + " with error %d\n", clp->cl_hostname, -status); set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); goto out; } |