mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
NFSv4.1: use EXCHGID4_FLAG_USE_PNFS_DS for DS server
[ Upstream commit51d674a5e4] After receiving the location(s) of the DS server(s) in the GETDEVINCEINFO, create the request for the clientid to such server and indicate that the client is connecting to a DS. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Stable-dep-of:806a3bc421("NFSv4.1: fix pnfs MDS=DS session trunking") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
839e07de9a
commit
f86a2c2ea0
@@ -231,6 +231,8 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
|
|||||||
__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
|
__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
|
||||||
__set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags);
|
__set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags);
|
||||||
|
|
||||||
|
if (test_bit(NFS_CS_DS, &cl_init->init_flags))
|
||||||
|
__set_bit(NFS_CS_DS, &clp->cl_flags);
|
||||||
/*
|
/*
|
||||||
* Set up the connection to the server before we add add to the
|
* Set up the connection to the server before we add add to the
|
||||||
* global list.
|
* global list.
|
||||||
@@ -993,6 +995,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv,
|
|||||||
if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
|
if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
|
||||||
__set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
|
__set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
|
||||||
|
|
||||||
|
__set_bit(NFS_CS_DS, &cl_init.init_flags);
|
||||||
/*
|
/*
|
||||||
* Set an authflavor equual to the MDS value. Use the MDS nfs_client
|
* Set an authflavor equual to the MDS value. Use the MDS nfs_client
|
||||||
* cl_ipaddr so as to use the same EXCHANGE_ID co_ownerid as the MDS
|
* cl_ipaddr so as to use the same EXCHANGE_ID co_ownerid as the MDS
|
||||||
|
|||||||
@@ -8794,6 +8794,8 @@ nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred,
|
|||||||
#ifdef CONFIG_NFS_V4_1_MIGRATION
|
#ifdef CONFIG_NFS_V4_1_MIGRATION
|
||||||
calldata->args.flags |= EXCHGID4_FLAG_SUPP_MOVED_MIGR;
|
calldata->args.flags |= EXCHGID4_FLAG_SUPP_MOVED_MIGR;
|
||||||
#endif
|
#endif
|
||||||
|
if (test_bit(NFS_CS_DS, &clp->cl_flags))
|
||||||
|
calldata->args.flags |= EXCHGID4_FLAG_USE_PNFS_DS;
|
||||||
msg.rpc_argp = &calldata->args;
|
msg.rpc_argp = &calldata->args;
|
||||||
msg.rpc_resp = &calldata->res;
|
msg.rpc_resp = &calldata->res;
|
||||||
task_setup_data.callback_data = calldata;
|
task_setup_data.callback_data = calldata;
|
||||||
@@ -8871,6 +8873,8 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cre
|
|||||||
/* Save the EXCHANGE_ID verifier session trunk tests */
|
/* Save the EXCHANGE_ID verifier session trunk tests */
|
||||||
memcpy(clp->cl_confirm.data, argp->verifier.data,
|
memcpy(clp->cl_confirm.data, argp->verifier.data,
|
||||||
sizeof(clp->cl_confirm.data));
|
sizeof(clp->cl_confirm.data));
|
||||||
|
if (resp->flags & EXCHGID4_FLAG_USE_PNFS_DS)
|
||||||
|
set_bit(NFS_CS_DS, &clp->cl_flags);
|
||||||
out:
|
out:
|
||||||
trace_nfs4_exchange_id(clp, status);
|
trace_nfs4_exchange_id(clp, status);
|
||||||
rpc_put_task(task);
|
rpc_put_task(task);
|
||||||
|
|||||||
Reference in New Issue
Block a user