Skip to content

nfsd41-for-2.6.30 review cleanup

Benny Halevy linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21SQUASHME: nfsd41: conditionally decode_sequence in nfs4_xdr_dec_cb_recallfs/nfsd/nfs4callback.c+5 -30 replies
2/21nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versionsfs/nfsd/nfs4proc.c fs/nfsd/nfsctl.c fs/nfsd/nfssvc.c +1 more+50 -40 replies
3/21SQUASHME: nfsd41: disable support for minorversion by defaultfs/nfsd/nfssvc.c+1 -10 replies
4/21SQUASHME: nfs41: reverse EXCHGID4_INVAL_FLAG_MASK_{A,R}include/linux/nfs4.h+2 -20 replies
5/21SQUASHME: nfsd41: reverse use of EXCHGID4_INVAL_FLAG_MASK_Afs/nfsd/nfs4state.c+1 -10 replies
6/21SQUASHME: nfsd41: simplify match_clientid_establishment logicfs/nfsd/nfs4state.c+6 -10 replies
7/21SQUASHME: simplify nfsd4_encode_sequence error handlingfs/nfsd/nfs4xdr.c+2 -30 replies
8/21SQUASHME: simplify nfsd4_encode_create_session error handlingfs/nfsd/nfs4xdr.c+2 -30 replies
9/21SQUASHME: simplify nfsd4_encode_exchange_id error handlingfs/nfsd/nfs4xdr.c+2 -30 replies
10/21SQUASHME: nfsd41: document unenforced nfs41 compound ordering rules.Documentation/filesystems/nfs41-server.txt fs/nfsd/nfs4proc.c+14 -00 replies
11/21SQUASHME: nfsd41: embed an xdr_netobj in nfsd4_exchange_idfs/nfsd/nfs4state.c fs/nfsd/nfs4xdr.c include/linux/nfsd/xdr4.h+8 -130 replies
12/21SQUASHME: nfsd41: return nfserr_serverfault for spa_how == SP4_MACH_CREDfs/nfsd/nfs4state.c+9 -10 replies
13/21SQUASHME: nfsd41: fix comment style in init_forechannel_attrsfs/nfsd/nfs4state.c+1 -10 replies
14/21SQUASHME: nfsd41: allocate struct nfsd4_session and slot table in one piecefs/nfsd/nfs4state.c include/linux/nfsd/state.h+11 -140 replies
15/21SQUASHME: nfsd41: no need to INIT_LIST_HEAD in alloc_init_session just prior to list_addfs/nfsd/nfs4state.c+0 -20 replies
16/21SQUASHME: nfsd41: pass nfsd4_compoundres * to nfsd4_process_open1fs/nfsd/nfs4proc.c fs/nfsd/nfs4state.c include/linux/nfsd/xdr4.h+8 -50 replies
17/21nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_opfs/nfsd/nfs4proc.c fs/nfsd/nfs4state.c include/linux/nfsd/state.h+21 -150 replies
18/21SQUASHME: nfsd41: calculate HAS_SESSION in nfs4_preprocess_stateid_opfs/nfsd/nfs4proc.c fs/nfsd/nfs4state.c+6 -120 replies
19/21SQUASHME: nfsd41: calculate HAS_SESSION in nfs4_preprocess_seqid_opfs/nfsd/nfs4state.c+11 -230 replies
20/21SQUASHME: Revert "nfsd41: Add Kconfig symbols for NFSv4.1"fs/nfsd/Kconfig+0 -90 replies
21/21SQUASHME: get rid of CONFIG_NFSD_V4_1Documentation/filesystems/nfs41-server.txt fs/nfsd/nfs4callback.c fs/nfsd/nfs4proc.c +8 more+21 -1020 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/21] nfsd41-for-2.6.30 review cleanup

Bruce,

The following patches fix non-DRC review comments. They are untested yet, but I wanted to send them out ASAP so that people will have some time to comment on them before I squash them in.

[PATCH 01/21] SQUASHME: nfsd41: conditionally decode_sequence in nfs4_xdr_dec_cb_recall [PATCH 02/21] nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versions
[PATCH 03/21] SQUASHME: nfsd41: disable support for minorversion by default
[PATCH 04/21] SQUASHME: nfs41: reverse EXCHGID4_INVAL_FLAG_MASK_{A,R}
[PATCH 05/21] SQUASHME: nfsd41: reverse use of EXCHGID4_INVAL_FLAG_MASK_A
[PATCH 06/21] SQUASHME: nfsd41: simplify match_clientid_establishment logic
[PATCH 07/21] SQUASHME: simplify nfsd4_encode_sequence error handling
[PATCH 08/21] SQUASHME: simplify nfsd4_encode_create_session error handling
[PATCH 09/21] SQUASHME: simplify nfsd4_encode_exchange_id error handling
[PATCH 10/21] SQUASHME: nfsd41: document unenforced nfs41 compound ordering rules. [PATCH 11/21] SQUASHME: nfsd41: embed an xdr_netobj in nfsd4_exchange_id
[PATCH 12/21] SQUASHME: nfsd41: return nfserr_serverfault for spa_how == SP4_MACH_CRED [PATCH 13/21] SQUASHME: nfsd41: fix comment style in init_forechannel_attrs
[PATCH 14/21] SQUASHME: nfsd41: allocate struct nfsd4_session and slot table in one piece [PATCH 15/21] SQUASHME: nfsd41: no need to INIT_LIST_HEAD in alloc_init_session just prior to list_add [PATCH 16/21] SQUASHME: nfsd41: pass nfsd4_compoundres * to nfsd4_process_open1 [PATCH 17/21] nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_op [PATCH 18/21] SQUASHME: nfsd41: calculate HAS_SESSION in nfs4_preprocess_stateid_op [PATCH 19/21] SQUASHME: nfsd41: calculate HAS_SESSION in nfs4_preprocess_seqid_op [PATCH 20/21] SQUASHME: Revert "nfsd41: Add Kconfig symbols for NFSv4.1"
[PATCH 21/21] SQUASHME: get rid of CONFIG_NFSD_V4_1

The review comments that were fixed are listed below.

Benny

================================================================================
Re: [pnfs] [PATCH 0/47] NFSv4.1 Sessions server code for 2.6.30

	fix nfs4_xdr_dec_cb_recall rpc_res==NULL case

[PATCH 01/21] SQUASHME: nfsd41: conditionally decode_sequence in nfs4_xdr_dec_cb_recall

================================================================================
Re: [PATCH v2 04/47] nfs41: common protocol definitions

Quoted 2 lines

Would it be less confusing just to use !EXCHGID_FLAG_MASK_A and !EXCHGID_FLAG_MASK_R everywhere?

[PATCH 04/21] SQUASHME: nfs41: reverse EXCHGID4_INVAL_FLAG_MASK_{A,R} [PATCH 05/21] SQUASHME: nfsd41: reverse use of EXCHGID4_INVAL_FLAG_MASK_A

================================================================================
Re: [PATCH v2 06/47] nfsd41: Add Kconfig symbols for NFSv4.1

Quoted 5 lines

Stupid question: do we need CONFIG_NFSD_V4_1 at all? How many people

Quoted 1 line

will want to build a kernel with v4.0 but not v4.1?

(And: do we have an interface that allows turning off 4.1 at run-time?

Quoted 1 line
Quoted 1 line

That's more important than the config option.)

[PATCH 02/21] nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versions [PATCH 20/21] SQUASHME: Revert "nfsd41: Add Kconfig symbols for NFSv4.1" [PATCH 21/21] SQUASHME: get rid of CONFIG_NFSD_V4_1

================================================================================
Re: [PATCH v2 07/47] nfsd41: define nfs41 error codes fix NFSERR_REPLAY_ME on rebase

Fixed in rebase

================================================================================
RE: [pnfs] [PATCH v2 15/47] nfsd41: exchange_id operation

Quoted 2 lines

Would it simplify things just to embed an xdr_netobj in nfsd4_exchange_id?

[PATCH 11/21] SQUASHME: nfsd41: embed an xdr_netobj in nfsd4_exchange_id

================================================================================
RE: [pnfs] [PATCH v2 15/47] nfsd41: exchange_id operation (cont.)

Quoted 7 lines
Quoted 7 lines
(quoted diff) +1 -0
+	/* Currently only support SP4_NONE */
Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+	if (exid->spa_how != SP4_NONE)
+		return nfserr_encr_alg_unsupp;

Isn't support for the others mandatory? Let's just make this serverfault, in that case--this is a bug in the server. It'll be a reminder that we need to fix this....

True. nfserr_encr_alg_unsupp is valid only for ssp_encr_algs. Andy, I believe you're the author of this. OK with you to return nfserr_serverfault instead?

[PATCH 12/21] SQUASHME: nfsd41: return nfserr_serverfault for spa_how == SP4_MACH_CRED

================================================================================
Re: [pnfs] [PATCH v2 16/47] nfsd41: match clientid establishment method simplify match_clientid_establishment, bool use_exchange_id

[PATCH 06/21] SQUASHME: nfsd41: simplify match_clientid_establishment logic

================================================================================
Re: [PATCH v2 17/47] nfsd41: sequence operation
nfsd4_encode_sequence

Quoted 2 lines
(quoted diff) +1 -0
+	if (nfserr)

Review

Quoted 1 line
(quoted diff) +1 -0
+		goto out;

Just 'return nfserr'. I don't see the point of the goto if it's literally just replacing a return.

[PATCH 07/21] SQUASHME: simplify nfsd4_encode_sequence error handling [PATCH 08/21] SQUASHME: simplify nfsd4_encode_create_session error handling [PATCH 09/21] SQUASHME: simplify nfsd4_encode_exchange_id error handling

================================================================================
Re: [pnfs] [PATCH v2 18/47] nfsd41: enforce NFS4ERR_SEQUENCE_POS operation order rules update Doc and wiki TODO about need to enforce rules for EXCHANGE_ID as last op and NFS4ERR_NOT_ONLY_OP.

[PATCH 10/21] SQUASHME: nfsd41: document unenforced nfs41 compound ordering rules.

================================================================================
Re: [PATCH v2 23/47] nfsd41: create_session operation fixup style comments.

[PATCH 13/21] SQUASHME: nfsd41: fix comment style in init_forechannel_attrs

fix alloc_init_session

[PATCH 14/21] SQUASHME: nfsd41: allocate struct nfsd4_session and slot table in one piece [PATCH 15/21] SQUASHME: nfsd41: no need to INIT_LIST_HEAD in alloc_init_session just prior to list_add

================================================================================
Re: [PATCH v2 27/47] nfsd41: stateid handling

Review

Quoted 1 line
(quoted diff) +1 -0
+	status = nfsd4_process_open1(rqstp, open);

Seems all your using is the cstate--maybe pass that instead?

[PATCH 16/21] SQUASHME: nfsd41: pass nfsd4_compoundres * to nfsd4_process_open1

================================================================================
Re: [PATCH v2 27/47] nfsd41: stateid handling (cont.)

Quoted 5 lines
(quoted diff) +1 -0
+	if (nfsd4_has_session(cstate))

Review

Quoted 4 lines
(quoted diff) +1 -0
+		flags |= HAS_SESSION;
 	nfs4_lock_state();
 	/* check stateid */
 	if ((status = nfs4_preprocess_stateid_op(&cstate->current_fh,

You could pass the cstate to preprocess_stateid_op instead of current_fh, and let it do the nfsd4_has_session check instead of making all the callers do it.

[PATCH 17/21] nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_op [PATCH 18/21] SQUASHME: nfsd41: calculate HAS_SESSION in nfs4_preprocess_stateid_op [PATCH 19/21] SQUASHME: nfsd41: calculate HAS_SESSION in nfs4_preprocess_seqid_op