SQUASHME: nfsd41: add nfsd4_session pointer to nfsd4_compound_state
Subsystems (2)
PATCH 1/22 SQUASHME: nfsd41: add nfsd4_session pointer to nfsd4_compound_state
From: Andy Adamson <[email protected]>
March 31 review by Bruce
--- include/linux/nfsd/xdr4.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/linux/nfsd/xdr4.h +1 -0
@@ -49,6 +49,7 @@ struct nfsd4_compound_state {struct svc_fh save_fh;struct nfs4_stateowner *replay_owner;/* For sessions DRC */ +struct nfsd4_session *session;struct nfsd4_slot *slot;__be32 *statp;size_t iovlen;
Signature · 1 line
1.5.4.3
PATCH 2/22 SQUASHME: nfsd41: use cstate session in nfsd4_replay_cache_entry
From: Andy Adamson <[email protected]>
March 31 review by Bruce
squash into nfsd41: DRC save, restore, and clear functions
--- fs/nfsd/nfs4state.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs4state.c +1 -1
@@ -1154,7 +1154,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,* is sent (lease renewal). */ if (seq &&nfsd4_no_page_in_cache (resp)) { - seq->maxslots = resp->cstate.slot->sl_session->se_fnumslots; + seq->maxslots = resp->cstate.session->se_fnumslots;return nfs_ok; }
Signature · 1 line
1.5.4.3
PATCH 3/22 SQUASHME nfsd41: use cstate session in nfsd4_sequence
From: Andy Adamson <[email protected]>
March 31 reveiw by Bruce
squash into nfsd41: sequence operation
--- fs/nfsd/nfs4state.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs4state.c +1 -1
@@ -1537,7 +1537,7 @@ replay_cache:* nfsd4_put_session called only if the cstate slot is set. */ renew_client (session->se_client); -nfsd4_get_session (slot->sl_session); +nfsd4_get_session (session); out:spin_unlock (&sessionid_lock);dprintk ("%s: return %d\n" , __func__,ntohl (status));
Signature · 1 line
1.5.4.3
PATCH 4/22 SQUASHME: nfsd41: use cstate session in nfsd4_check_drc_limit
From: Andy Adamson <[email protected]>
March 31 review by Bruce
squash into nfsd41: check encode size for sessions maxresponse cached
--- fs/nfsd/nfs4xdr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs4xdr.c +1 -1
@@ -3189,7 +3189,7 @@ static int nfsd4_check_drc_limit(struct nfsd4_compoundres *resp)if (!nfsd4_has_session (&resp->cstate))return status; - session = slot->sl_session; + session = resp->cstate.session;if (session ==NULL || slot->sl_cache_entry.ce_cachethis ==0 )return status;
Signature · 1 line
1.5.4.3
PATCH 5/22 SQUASHME: nfsd41: use cstate session in nfs4svc_encode_compoundres
From: Andy Adamson <[email protected]>
March 31 review by Bruce:
squash into nfsd DRC logic
--- fs/nfsd/nfs4xdr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4xdr.c +2 -2
@@ -3348,8 +3348,8 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compodprintk ("%s: SET SLOT STATE TO AVAILABLE\n" , __func__); resp->cstate.slot->sl_inuse = 0; } -if (resp->cstate.slot->sl_session) -nfsd4_put_session (resp->cstate.slot->sl_session); +if (resp->cstate.session) +nfsd4_put_session (resp->cstate.session); }#endif /* CONFIG_NFSD_V4_1 */ return 1 ;
Signature · 1 line
1.5.4.3
PATCH 6/22 SQUASHME: nfsd41 remove sl_session from nfsd4_open
From: Andy Adamson <[email protected]>
March 31 review by Bruce
squash into nfsd41: create_session operation
--- fs/nfsd/nfs4proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs4proc.c +1 -1
@@ -201,7 +201,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,return nfserr_inval;if (nfsd4_has_session (cstate)) -copy_clientid (&open->op_clientid, cstate->slot->sl_session); +copy_clientid (&open->op_clientid, cstate->session);nfs4_lock_state ();
Signature · 1 line
1.5.4.3
PATCH 7/22 SQUASHME: nfsd41 remove sl_session from alloc_init_session
From: Andy Adamson <[email protected]>
March 31 review by Bruce
squash into nfsd41: create_session operation
--- fs/nfsd/nfs4state.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
fs/nfsd/nfs4state.c +0 -3
@@ -511,9 +511,6 @@ alloc_init_session(struct svc_rqst *rqstp, struct nfs4_client *clp,if (!new->se_slots) goto out_free; -for (i =0 ; i < new->se_fnumslots; i++) - new->se_slots[i].sl_session = new; - new->se_client = clp;gen_sessionid (new); idx =hash_sessionid (&new->se_sessionid);
Signature · 1 line
1.5.4.3
PATCH 8/22 SQUASHME: nfsd41 remove sl_session from nfsd4_slot
From: Andy Adamson <[email protected]>
March 31 review from Bruce
--- include/linux/nfsd/state.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
include/linux/nfsd/state.h +0 -1
@@ -124,7 +124,6 @@ struct nfsd4_cache_entry {struct nfsd4_slot {bool sl_inuse; -struct nfsd4_session *sl_session;u32 sl_seqid;struct nfsd4_cache_entry sl_cache_entry; };
Signature · 1 line
1.5.4.3
PATCH 9/22 SQUASHME: nfsd41 set cstate session
From: Andy Adamson <[email protected]>
March 31 review by Bruce:
squash into nfsd41: sequence operation
--- fs/nfsd/nfs4state.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/nfsd/nfs4state.c +2 -0
@@ -1509,6 +1509,7 @@ nfsd4_sequence(struct svc_rqst *rqstp, status =check_slot_seqid (seq->seqid, slot);if (status == nfserr_replay_cache) { cstate->slot = slot; + cstate->session = session;/* Return the cached reply status and set cstate->status * for nfsd4_svc_encode_compoundres processing */ status =nfsd4_replay_cache_entry (resp, seq);
@@ -1527,6 +1528,7 @@ nfsd4_sequence(struct svc_rqst *rqstp, slot->sl_cache_entry.ce_cachethis =1 ; cstate->slot = slot; + cstate->session = session; replay_cache:/* Renew the clientid on success and on replay.
Signature · 1 line
1.5.4.3
PATCH 10/22 SQUASHME: nfsd41 rename nfsd4_move_pages
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: DRC save, restor, and clear functions
--- fs/nfsd/nfs4state.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
fs/nfsd/nfs4state.c +4 -4
@@ -1033,7 +1033,7 @@ nfsd4_release_respages(struct page **respages, short resused) }static void -nfsd4_move_pages (struct page **topages,struct page **frompages,short count) +nfsd4_copy_pages (struct page **topages,struct page **frompages,short count) {int page_no;
@@ -1089,7 +1089,7 @@ nfsd4_set_cache_entry(struct nfsd4_compoundres *resp) entry->ce_resused = rqstp->rq_resused;if (entry->ce_resused >NFSD_PAGES_PER_SLOT +1 ) entry->ce_resused =NFSD_PAGES_PER_SLOT +1 ; -nfsd4_move_pages (entry->ce_respages, rqstp->rq_respages, +nfsd4_copy_pages (entry->ce_respages, rqstp->rq_respages, entry->ce_resused); entry->ce_datav.iov_base = resp->cstate.statp; entry->ce_datav.iov_len = resv->iov_len - ((char *)resp->cstate.statp -
@@ -1161,7 +1161,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,* cached header. Release all the allocated result pages. */ svc_free_res_pages (resp->rqstp); -nfsd4_move_pages (resp->rqstp->rq_respages, entry->ce_respages, +nfsd4_copy_pages (resp->rqstp->rq_respages, entry->ce_respages, entry->ce_resused); }else {/* Release all but the first allocated result page */
@@ -1169,7 +1169,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp, resp->rqstp->rq_resused--;svc_free_res_pages (resp->rqstp); -nfsd4_move_pages (&resp->rqstp->rq_respages[1 ], +nfsd4_copy_pages (&resp->rqstp->rq_respages[1 ], &entry->ce_respages[1 ], entry->ce_resused -1 ); }
Signature · 1 line
1.5.4.3
PATCH 11/22 SQUASHME: nfsd41 rename page_no variable
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: DRC save, restor, and clear functions
--- fs/nfsd/nfs4state.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
fs/nfsd/nfs4state.c +10 -10
@@ -1021,27 +1021,27 @@ nfsd4_set_statp(struct svc_rqst *rqstp, __be32 *statp)static void nfsd4_release_respages (struct page **respages,short resused) { -int page_no; +int i;dprintk ("--> %s\n" , __func__); -for (page_no =0 ; page_no < resused; page_no++) { -if (!respages[page_no]) +for (i =0 ; i < resused; i++) { +if (!respages[i])continue ; -put_page (respages[page_no]); - respages[page_no] =NULL ; +put_page (respages[i]); + respages[i] =NULL ; } }static void nfsd4_copy_pages (struct page **topages,struct page **frompages,short count) { -int page_no; +int i; -for (page_no =0 ; page_no < count; page_no++) { - topages[page_no] = frompages[page_no]; -if (!topages[page_no]) +for (i =0 ; i < count; i++) { + topages[i] = frompages[i]; +if (!topages[i])continue ; -get_page (topages[page_no]); +get_page (topages[i]); } }
Signature · 1 line
1.5.4.3
PATCH 12/22 SQUASHME: nfsd41 rename nfsd4_set_cache_entry
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: DRC save, restor, and clear functions
--- fs/nfsd/nfs4state.c | 2 +- include/linux/nfsd/xdr4.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4state.c +1 -1
@@ -1056,7 +1056,7 @@ nfsd4_copy_pages(struct page **topages, struct page **frompages, short count)* of the NFSv4.1 data, just past the rpc header. */ void -nfsd4_set_cache_entry (struct nfsd4_compoundres *resp) +nfsd4_store_cache_entry (struct nfsd4_compoundres *resp) {struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry;struct svc_rqst *rqstp = resp->rqstp;
include/linux/nfsd/xdr4.h +1 -1
@@ -529,7 +529,7 @@ extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *, struct nfsd4_setclientid_confirm *setclientid_confirm);#if defined(CONFIG_NFSD_V4_1 ) -extern void nfsd4_set_cache_entry (struct nfsd4_compoundres *resp); +extern void nfsd4_store_cache_entry (struct nfsd4_compoundres *resp);extern __be32 nfsd4_replay_cache_entry (struct nfsd4_compoundres *resp,struct nfsd4_sequence *seq); extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
Signature · 1 line
1.5.4.3
PATCH 13/22 SQUASHME nfsd41 replace nfsd4_set_cache_entry
From: Andy Adamson <[email protected]>
March 31 review by Bruce:
squash into nfsd DRC logic
--- fs/nfsd/nfs4xdr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs4xdr.c +1 -1
@@ -3344,7 +3344,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo !nfsd4_no_page_in_cache(resp)) { iov->iov_len = resp->cstate.iovlen; } else { -nfsd4_set_cache_entry (resp); +nfsd4_store_cache_entry (resp);dprintk ("%s: SET SLOT STATE TO AVAILABLE\n" , __func__); resp->cstate.slot->sl_inuse =0 ; }
Signature · 1 line
1.5.4.3
PATCH 14/22 SQUASHME: nfsd41 fix nfsd41_copy_replay_data comment
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: DRC save, restor, and clear functions
--- fs/nfsd/nfs4state.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
fs/nfsd/nfs4state.c +1 -3
@@ -1100,9 +1100,7 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) }/* -* Copy the cached NFSv4.1 reply skipping the cached rpc header into the -* replay result res.head[0] past the rpc header to end up with replay -* rpc header and cached NFSv4.1 reply. +* We keep the rpc header, but take the nfs reply from the replycache. */ static int nfsd41_copy_replay_data(struct nfsd4_compoundres *resp,
Signature · 1 line
1.5.4.3
PATCH 15/22 SQUASHME nfsd41: revert portion of nfsd4_set_cache_entry
From: Andy Adamson <[email protected]>
March 31 review comments.
Squash into nfsd41: Add a create session replay cache
--- fs/nfsd/nfs4state.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
fs/nfsd/nfs4state.c +2 -4
@@ -1060,14 +1060,12 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) {struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry;struct svc_rqst *rqstp = resp->rqstp; -struct nfsd4_compoundargs *args = rqstp->rq_argp; -struct nfsd4_op *op = &args->ops[resp->opcnt];struct kvec *resv = &rqstp->rq_res.head[0 ];dprintk ("--> %s entry %p\n" , __func__, entry); -/* Don't cache a failed OP_SEQUENCE. */ -if (resp->opcnt ==1 && op->opnum ==OP_SEQUENCE && resp->cstate.status) +/* Don't cache a failed OP_SEQUENCE */ +if (resp->opcnt ==1 && resp->cstate.status)return ;nfsd4_release_respages (entry->ce_respages, entry->ce_resused);
Signature · 1 line
1.5.4.3
PATCH 16/22 SQUASHME nfsd41: add to nfsd4_set_cache_entry
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: DRC save, restore, and clear functions
--- fs/nfsd/nfs4state.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
fs/nfsd/nfs4state.c +4 -2
@@ -1060,12 +1060,14 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) {struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry;struct svc_rqst *rqstp = resp->rqstp; +struct nfsd4_compoundargs *args = rqstp->rq_argp; +struct nfsd4_op *op = &args->ops[resp->opcnt];struct kvec *resv = &rqstp->rq_res.head[0 ];dprintk ("--> %s entry %p\n" , __func__, entry); -/* Don't cache a failed OP_SEQUENCE */ -if (resp->opcnt ==1 && resp->cstate.status) +/* Don't cache a failed OP_SEQUENCE. */ +if (resp->opcnt ==1 && op->opnum ==OP_SEQUENCE && resp->cstate.status)return ;nfsd4_release_respages (entry->ce_respages, entry->ce_resused);
Signature · 1 line
1.5.4.3
PATCH 17/22 SQUASHME nfsd41 remove CONFIG_NFS_V4_1 around nfsd4_release_respages
From: Andy Adamson <[email protected]>
March 31 review comments.
Squash into nfsd41: Add a create session replay cache
--- fs/nfsd/nfs4state.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4state.c +2 -2
@@ -659,12 +659,10 @@ static inline void free_client(struct nfs4_client *clp) {shutdown_callback_client (clp); -#if defined(CONFIG_NFSD_V4_1 )if (clp->cl_cb_xprt)svc_xprt_put (clp->cl_cb_xprt);nfsd4_release_respages (clp->cl_slot.sl_cache_entry.ce_respages, clp->cl_slot.sl_cache_entry.ce_resused); -#endif /* CONFIG_NFSD_V4_1 */ if (clp->cl_cred.cr_group_info)put_group_info (clp->cl_cred.cr_group_info);kfree (clp->cl_principal);
@@ -1540,6 +1538,8 @@ out:dprintk ("%s: return %d\n" , __func__,ntohl (status)); return status; } +#else /* CONFIG_NFSD_V4_1 */ +static void nfsd4_release_respages (struct page **respages,short resused) {}#endif /* CONFIG_NFSD_V4_1 */ __be32
Signature · 1 line
1.5.4.3
PATCH 18/22 SQUASHME: rename nfsd4_no_page_in_cache
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responses
--- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfs4state.c | 4 ++-- fs/nfsd/nfs4xdr.c | 2 +- include/linux/nfsd/xdr4.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
fs/nfsd/nfs4proc.c +1 -1
@@ -1002,7 +1002,7 @@ encode_op:/* Only from SEQUENCE or CREATE_SESSION */ if (resp->cstate.status == nfserr_replay_cache) {dprintk ("%s NFS4.1 replay from cache\n" , __func__); -if (nfsd4_no_page_in_cache (resp)) +if (nfsd4_not_cached (resp)) status =nfsd4_enc_no_page_replay (args, resp);else status = op->status;
fs/nfsd/nfs4state.c +2 -2
@@ -1077,7 +1077,7 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)* does this for us! */ -if (nfsd4_no_page_in_cache (resp)) { +if (nfsd4_not_cached (resp)) { entry->ce_resused =0 ; entry->ce_rpchdrlen =0 ; dprintk("%s Just cache SEQUENCE. ce_cachethis %d\n", __func__,
@@ -1146,7 +1146,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,* session inactivity timer fires and a solo sequence operation * is sent (lease renewal). */ -if (seq &&nfsd4_no_page_in_cache (resp)) { +if (seq &&nfsd4_not_cached (resp)) { seq->maxslots = resp->cstate.session->se_fnumslots;return nfs_ok; }
fs/nfsd/nfs4xdr.c +1 -1
@@ -3341,7 +3341,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo#ifdef CONFIG_NFSD_V4_1 if (nfsd4_has_session (&resp->cstate)) {if (resp->cstate.status == nfserr_replay_cache && - !nfsd4_no_page_in_cache (resp)) { + !nfsd4_not_cached (resp)) { iov->iov_len = resp->cstate.iovlen; }else {nfsd4_store_cache_entry (resp);
include/linux/nfsd/xdr4.h +1 -1
@@ -493,7 +493,7 @@ static inline u32 nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)return args->opcnt ==1 ?1 :0 ; } -static inline u32 nfsd4_no_page_in_cache (struct nfsd4_compoundres *resp) +static inline u32 nfsd4_not_cached (struct nfsd4_compoundres *resp) {return (resp->cstate.slot->sl_cache_entry.ce_cachethis ==0 ||nfsd4_is_solo_sequence (resp));
Signature · 1 line
1.5.4.3
PATCH 19/22 SQUASHME: nfsd41 rename nfsd4_enc_no_page_replay
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responses
--- fs/nfsd/nfs4proc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4proc.c +2 -2
@@ -873,7 +873,7 @@ static const char *nfsd4_op_name(unsigned opnum);* encode the uncache rep error on the next operation. */ static __be32 -nfsd4_enc_no_page_replay (struct nfsd4_compoundargs *args, +nfsd4_enc_uncached_replay (struct nfsd4_compoundargs *args,struct nfsd4_compoundres *resp) {struct nfsd4_op *op;
@@ -1003,7 +1003,7 @@ encode_op:if (resp->cstate.status == nfserr_replay_cache) {dprintk ("%s NFS4.1 replay from cache\n" , __func__);if (nfsd4_not_cached (resp)) - status =nfsd4_enc_no_page_replay (args, resp); + status =nfsd4_enc_uncached_replay (args, resp);else status = op->status; goto out;
Signature · 1 line
1.5.4.3
PATCH 20/22 SQUASHME nfsd41 nfsd4_is_solo_sequence
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responses
--- include/linux/nfsd/xdr4.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/nfsd/xdr4.h +2 -2
@@ -487,10 +487,10 @@ struct nfsd4_compoundres {struct nfsd4_compound_state cstate; }; -static inline u32 nfsd4_is_solo_sequence (struct nfsd4_compoundres *resp) +static inline int nfsd4_is_solo_sequence (struct nfsd4_compoundres *resp) {struct nfsd4_compoundargs *args = resp->rqstp->rq_argp; -return args->opcnt ==1 ?1 :0 ; +return args->opcnt ==1 ; }static inline u32 nfsd4_not_cached (struct nfsd4_compoundres *resp)
Signature · 1 line
1.5.4.3
PATCH 21/22 SQUASHME: nfsd41 change nfsd4_not_cached return
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responses
--- include/linux/nfsd/xdr4.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/nfsd/xdr4.h +1 -1
@@ -493,7 +493,7 @@ static inline int nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)return args->opcnt ==1 ; } -static inline u32 nfsd4_not_cached (struct nfsd4_compoundres *resp) +static inline int nfsd4_not_cached (struct nfsd4_compoundres *resp) {return (resp->cstate.slot->sl_cache_entry.ce_cachethis ==0 ||nfsd4_is_solo_sequence (resp));
Signature · 1 line
1.5.4.3
PATCH 22/22 SQUASHME: nfsd41 drop parens in nfsd4_is_solo_sequence call
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responses
--- include/linux/nfsd/xdr4.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/nfsd/xdr4.h +2 -2
@@ -495,8 +495,8 @@ static inline int nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)static inline int nfsd4_not_cached (struct nfsd4_compoundres *resp) { -return (resp->cstate.slot->sl_cache_entry.ce_cachethis ==0 || -nfsd4_is_solo_sequence (resp)); +return resp->cstate.slot->sl_cache_entry.ce_cachethis ==0 || +nfsd4_is_solo_sequence (resp); }#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
Signature · 1 line
1.5.4.3
Re: [pnfs] [PATCH 22/22] SQUASHME: nfsd41 drop parens in nfsd4_is_solo_sequence call
Quoted 15 lines · On Apr. 03, 2009, 3:20 +0300, [email protected] wrote:
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responsesSigned-off-by Andy Adamson <[email protected]>--- include/linux/nfsd/xdr4.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)include/linux/nfsd/xdr4.h +0
-0
include/linux/nfsd/xdr4.h static inline int nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp) · line 498
Quoted 6 lines
include/linux/nfsd/xdr4.h +1
-2@@ -495,8 +495,8 @@ static inline int nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)static inline int nfsd4_not_cached (struct nfsd4_compoundres *resp) { -return (resp->cstate.slot->sl_cache_entry.ce_cachethis ==0 || -nfsd4_is_solo_sequence (resp)); + return resp->cstate.slot->sl_cache_entry.ce_cachethis == 0 ||
since ce_cachethis is boolean rather than numeric, how about using "!" rather than "== 0"?
Benny
Quoted 4 lines
include/linux/nfsd/xdr4.h +1
-0+nfsd4_is_solo_sequence (resp); }#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
Re: [pnfs] [PATCH 21/22] SQUASHME: nfsd41 change nfsd4_not_cached return
In reply to [email protected]Quoted 15 lines · On Apr. 03, 2009, 3:20 +0300, [email protected] wrote:
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responsesSigned-off-by Andy Adamson <[email protected]>--- include/linux/nfsd/xdr4.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/linux/nfsd/xdr4.h +0
-0
include/linux/nfsd/xdr4.h static inline int nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp) · line 496
Quoted 5 lines
include/linux/nfsd/xdr4.h +1
-1@@ -493,7 +493,7 @@ static inline int nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)return args->opcnt ==1 ; } -static inline u32 nfsd4_not_cached (struct nfsd4_compoundres *resp) +static inline int nfsd4_not_cached (struct nfsd4_compoundres *resp)
Here too, returning bool is more appropriate.
Benny
Quoted 3 lines
include/linux/nfsd/xdr4.h +0
-0{return (resp->cstate.slot->sl_cache_entry.ce_cachethis ==0 ||nfsd4_is_solo_sequence (resp));
Re: [pnfs] [PATCH 20/22] SQUASHME nfsd41 nfsd4_is_solo_sequence
In reply to [email protected]Quoted 15 lines · On Apr. 03, 2009, 3:20 +0300, [email protected] wrote:
From: Andy Adamson <[email protected]>
March 31 review comments.
squash into nfsd41: non-page DRC for solo sequence responsesSigned-off-by Andy Adamson <[email protected]>--- include/linux/nfsd/xdr4.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)include/linux/nfsd/xdr4.h +0
-0
include/linux/nfsd/xdr4.h struct nfsd4_compoundres { · line 490
Quoted 5 lines
include/linux/nfsd/xdr4.h +1
-1@@ -487,10 +487,10 @@ struct nfsd4_compoundres {struct nfsd4_compound_state cstate; }; -static inline u32 nfsd4_is_solo_sequence (struct nfsd4_compoundres *resp) +static inline int nfsd4_is_solo_sequence (struct nfsd4_compoundres *resp)
returning bool would be best.
Benny
Quoted 7 lines
include/linux/nfsd/xdr4.h +1
-1{struct nfsd4_compoundargs *args = resp->rqstp->rq_argp; -return args->opcnt ==1 ?1 :0 ; +return args->opcnt ==1 ; }static inline u32 nfsd4_not_cached (struct nfsd4_compoundres *resp)
Re: [pnfs] [PATCH 06/22] SQUASHME: nfsd41 remove sl_session from nfsd4_open
In reply to [email protected]Quoted 4 lines · On Apr. 03, 2009, 3:19 +0300, [email protected] wrote:
From: Andy Adamson <[email protected]>
March 31 review by Bruce
squash into nfsd41:create_sessionoperation
Hmm, Isn't it nfsd41: clientid handling?
Benny
Quoted 19 lines
Signed-off-by Andy Adamson <[email protected]>--- fs/nfsd/nfs4proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nfsd/nfs4proc.c +1
-1@@ -201,7 +201,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,return nfserr_inval;if (nfsd4_has_session (cstate)) -copy_clientid (&open->op_clientid, cstate->slot->sl_session); +copy_clientid (&open->op_clientid, cstate->session);nfs4_lock_state ();
Re: [pnfs] [PATCH 02/22] SQUASHME: nfsd41: use cstate session in nfsd4_replay_cache_entry
In reply to [email protected]Quoted 4 lines · On Apr. 03, 2009, 3:19 +0300, [email protected] wrote:
From: Andy Adamson <[email protected]>
March 31 review by Bruce
squash into nfsd41: DRC save, restore, and clear functions
my records show "nfsd41: non-page DRC for solo sequence responses"... I we're in sync
Benny
Quoted 19 lines
Signed-off-by Andy Adamson <[email protected]>--- fs/nfsd/nfs4state.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nfsd/nfs4state.c +1
-1@@ -1154,7 +1154,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,* is sent (lease renewal). */ if (seq &&nfsd4_no_page_in_cache (resp)) { - seq->maxslots = resp->cstate.slot->sl_session->se_fnumslots; + seq->maxslots = resp->cstate.session->se_fnumslots;return nfs_ok; }