NFS construct consistent co_ownerid for v4.1
As stated in section 2.4 of RFC 5661, subsequent instances of the client need to present the same co_ownerid. Concatinate the client's IP dot address, host name, and the rpc_auth pseudoflavor to form the co_ownerid. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
27dc1cd3ad
commit
c7a360b05b
@@ -50,6 +50,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/sunrpc/bc_xprt.h>
|
#include <linux/sunrpc/bc_xprt.h>
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
#include <linux/utsname.h>
|
||||||
|
|
||||||
#include "nfs4_fs.h"
|
#include "nfs4_fs.h"
|
||||||
#include "delegation.h"
|
#include "delegation.h"
|
||||||
@@ -4572,27 +4573,16 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
|
|||||||
*p = htonl((u32)clp->cl_boot_time.tv_nsec);
|
*p = htonl((u32)clp->cl_boot_time.tv_nsec);
|
||||||
args.verifier = &verifier;
|
args.verifier = &verifier;
|
||||||
|
|
||||||
while (1) {
|
args.id_len = scnprintf(args.id, sizeof(args.id),
|
||||||
args.id_len = scnprintf(args.id, sizeof(args.id),
|
"%s/%s.%s/%u",
|
||||||
"%s/%s %u",
|
clp->cl_ipaddr,
|
||||||
clp->cl_ipaddr,
|
init_utsname()->nodename,
|
||||||
rpc_peeraddr2str(clp->cl_rpcclient,
|
init_utsname()->domainname,
|
||||||
RPC_DISPLAY_ADDR),
|
clp->cl_rpcclient->cl_auth->au_flavor);
|
||||||
clp->cl_id_uniquifier);
|
|
||||||
|
|
||||||
status = rpc_call_sync(clp->cl_rpcclient, &msg, 0);
|
status = rpc_call_sync(clp->cl_rpcclient, &msg, 0);
|
||||||
|
if (!status)
|
||||||
if (status != -NFS4ERR_CLID_INUSE)
|
status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags);
|
||||||
break;
|
|
||||||
|
|
||||||
if (signalled())
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (++clp->cl_id_uniquifier == 0)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags);
|
|
||||||
dprintk("<-- %s status= %d\n", __func__, status);
|
dprintk("<-- %s status= %d\n", __func__, status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user