diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-14 17:57:35 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-18 11:51:38 -0400 |
commit | b7299f44394336f51b526247a870d47d28f4f97c (patch) | |
tree | bb8e365349e9e048f0f927843acca26ddd6a8e2b /fs/nfsd | |
parent | 15ddb4aec54422ead137b03ea4e9b3f5db3f7cc2 (diff) |
nfs4: minor callback code simplification, comment
Note the position in the version array doesn't have to match the actual
rpc version number--to me it seems clearer to maintain the distinction.
Also document choice of rpc callback version number, as discussed in
e.g. http://www.ietf.org/mail-archive/web/nfsv4/current/msg07985.html
and followups.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 77bc9d3c80fd..eb78e7e22077 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -424,13 +424,19 @@ static struct rpc_procinfo nfs4_cb_procedures[] = { | |||
424 | }; | 424 | }; |
425 | 425 | ||
426 | static struct rpc_version nfs_cb_version4 = { | 426 | static struct rpc_version nfs_cb_version4 = { |
427 | /* | ||
428 | * Note on the callback rpc program version number: despite language in rfc | ||
429 | * 5661 section 18.36.3 requiring servers to use 4 in this field, the | ||
430 | * official xdr descriptions for both 4.0 and 4.1 specify version 1, and | ||
431 | * in practice that appears to be what implementations use. The section | ||
432 | * 18.36.3 language is expected to be fixed in an erratum. | ||
433 | */ | ||
427 | .number = 1, | 434 | .number = 1, |
428 | .nrprocs = ARRAY_SIZE(nfs4_cb_procedures), | 435 | .nrprocs = ARRAY_SIZE(nfs4_cb_procedures), |
429 | .procs = nfs4_cb_procedures | 436 | .procs = nfs4_cb_procedures |
430 | }; | 437 | }; |
431 | 438 | ||
432 | static struct rpc_version * nfs_cb_version[] = { | 439 | static struct rpc_version * nfs_cb_version[] = { |
433 | NULL, | ||
434 | &nfs_cb_version4, | 440 | &nfs_cb_version4, |
435 | }; | 441 | }; |
436 | 442 | ||
@@ -471,7 +477,7 @@ int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *cb) | |||
471 | .timeout = &timeparms, | 477 | .timeout = &timeparms, |
472 | .program = &cb_program, | 478 | .program = &cb_program, |
473 | .prognumber = cb->cb_prog, | 479 | .prognumber = cb->cb_prog, |
474 | .version = nfs_cb_version[1]->number, | 480 | .version = 0, |
475 | .authflavor = clp->cl_flavor, | 481 | .authflavor = clp->cl_flavor, |
476 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), | 482 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), |
477 | .client_name = clp->cl_principal, | 483 | .client_name = clp->cl_principal, |