Skip to content

Commit 4840c00

Browse files
olgakorn1amschuma-ntap
authored andcommitted
NFSv4.1 another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server
Previously in order to mark the communication with the DS server, we tried to use NFS_CS_DS in cl_flags. However, this flag would only be saved for the DS server and in case where DS equals MDS, the client would not find a matching nfs_client in nfs_match_client that represents the MDS (but is also a DS). Instead, don't rely on the NFS_CS_DS but instead use NFS_CS_PNFS. Fixes: 379e4ad ("NFSv4.1: fixup use EXCHGID4_FLAG_USE_PNFS_DS for DS server") Signed-off-by: Olga Kornievskaia <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 2f1f310 commit 4840c00

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

fs/nfs/nfs4client.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
231231
__set_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags);
232232
__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
233233
__set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags);
234-
235-
if (test_bit(NFS_CS_DS, &cl_init->init_flags))
236-
__set_bit(NFS_CS_DS, &clp->cl_flags);
234+
if (test_bit(NFS_CS_PNFS, &cl_init->init_flags))
235+
__set_bit(NFS_CS_PNFS, &clp->cl_flags);
237236
/*
238237
* Set up the connection to the server before we add add to the
239238
* global list.
@@ -1013,7 +1012,6 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv,
10131012
if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
10141013
__set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
10151014

1016-
__set_bit(NFS_CS_DS, &cl_init.init_flags);
10171015
__set_bit(NFS_CS_PNFS, &cl_init.init_flags);
10181016
cl_init.max_connect = NFS_MAX_TRANSPORTS;
10191017
/*

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8959,7 +8959,7 @@ nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred,
89598959
#ifdef CONFIG_NFS_V4_1_MIGRATION
89608960
calldata->args.flags |= EXCHGID4_FLAG_SUPP_MOVED_MIGR;
89618961
#endif
8962-
if (test_bit(NFS_CS_DS, &clp->cl_flags))
8962+
if (test_bit(NFS_CS_PNFS, &clp->cl_flags))
89638963
calldata->args.flags |= EXCHGID4_FLAG_USE_PNFS_DS;
89648964
msg.rpc_argp = &calldata->args;
89658965
msg.rpc_resp = &calldata->res;

0 commit comments

Comments
 (0)