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>

authored by Andy Adamson and committed by Trond Myklebust c7a360b0 27dc1cd3

+10 -20
+10 -20
fs/nfs/nfs4proc.c
··· 50 50 #include <linux/module.h> 51 51 #include <linux/sunrpc/bc_xprt.h> 52 52 #include <linux/xattr.h> 53 + #include <linux/utsname.h> 53 54 54 55 #include "nfs4_fs.h" 55 56 #include "delegation.h" ··· 4573 4572 *p = htonl((u32)clp->cl_boot_time.tv_nsec); 4574 4573 args.verifier = &verifier; 4575 4574 4576 - while (1) { 4577 - args.id_len = scnprintf(args.id, sizeof(args.id), 4578 - "%s/%s %u", 4579 - clp->cl_ipaddr, 4580 - rpc_peeraddr2str(clp->cl_rpcclient, 4581 - RPC_DISPLAY_ADDR), 4582 - clp->cl_id_uniquifier); 4575 + args.id_len = scnprintf(args.id, sizeof(args.id), 4576 + "%s/%s.%s/%u", 4577 + clp->cl_ipaddr, 4578 + init_utsname()->nodename, 4579 + init_utsname()->domainname, 4580 + clp->cl_rpcclient->cl_auth->au_flavor); 4583 4581 4584 - status = rpc_call_sync(clp->cl_rpcclient, &msg, 0); 4585 - 4586 - if (status != -NFS4ERR_CLID_INUSE) 4587 - break; 4588 - 4589 - if (signalled()) 4590 - break; 4591 - 4592 - if (++clp->cl_id_uniquifier == 0) 4593 - break; 4594 - } 4595 - 4596 - status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags); 4582 + status = rpc_call_sync(clp->cl_rpcclient, &msg, 0); 4583 + if (!status) 4584 + status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags); 4597 4585 dprintk("<-- %s status= %d\n", __func__, status); 4598 4586 return status; 4599 4587 }