diff options
author | Andy Adamson <andros@netapp.com> | 2009-08-27 12:07:40 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-08-28 12:20:15 -0400 |
commit | 468de9e54a900559b55aa939a4daeaea1915e572 (patch) | |
tree | fa9f57f48f7f136fc5e4d821454ffb47ec0c22f6 /fs/nfsd | |
parent | d8d0b85b11476ce59684ad2998e91a522df518a0 (diff) |
nfsd41: expand solo sequence check
Compounds consisting of only a sequence operation don't need any
additional caching beyond the sequence information we store in the slot
entry. Fix nfsd4_is_solo_sequence to identify this case correctly.
The additional check for a failed sequence in nfsd4_store_cache_entry()
is redundant, since the nfsd4_is_solo_sequence call lower down catches
this case.
The final ce_cachethis set in nfsd4_sequence is also redundant.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 5f634d24861c..b44a2cfde6f1 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -991,16 +991,10 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) | |||
991 | { | 991 | { |
992 | struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry; | 992 | struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry; |
993 | struct svc_rqst *rqstp = resp->rqstp; | 993 | struct svc_rqst *rqstp = resp->rqstp; |
994 | struct nfsd4_compoundargs *args = rqstp->rq_argp; | ||
995 | struct nfsd4_op *op = &args->ops[resp->opcnt]; | ||
996 | struct kvec *resv = &rqstp->rq_res.head[0]; | 994 | struct kvec *resv = &rqstp->rq_res.head[0]; |
997 | 995 | ||
998 | dprintk("--> %s entry %p\n", __func__, entry); | 996 | dprintk("--> %s entry %p\n", __func__, entry); |
999 | 997 | ||
1000 | /* Don't cache a failed OP_SEQUENCE. */ | ||
1001 | if (resp->opcnt == 1 && op->opnum == OP_SEQUENCE && resp->cstate.status) | ||
1002 | return; | ||
1003 | |||
1004 | nfsd4_release_respages(entry->ce_respages, entry->ce_resused); | 998 | nfsd4_release_respages(entry->ce_respages, entry->ce_resused); |
1005 | entry->ce_opcnt = resp->opcnt; | 999 | entry->ce_opcnt = resp->opcnt; |
1006 | entry->ce_status = resp->cstate.status; | 1000 | entry->ce_status = resp->cstate.status; |
@@ -1490,9 +1484,6 @@ nfsd4_sequence(struct svc_rqst *rqstp, | |||
1490 | slot->sl_inuse = true; | 1484 | slot->sl_inuse = true; |
1491 | slot->sl_seqid = seq->seqid; | 1485 | slot->sl_seqid = seq->seqid; |
1492 | slot->sl_cache_entry.ce_cachethis = seq->cachethis; | 1486 | slot->sl_cache_entry.ce_cachethis = seq->cachethis; |
1493 | /* Always set the cache entry cachethis for solo sequence */ | ||
1494 | if (nfsd4_is_solo_sequence(resp)) | ||
1495 | slot->sl_cache_entry.ce_cachethis = 1; | ||
1496 | 1487 | ||
1497 | cstate->slot = slot; | 1488 | cstate->slot = slot; |
1498 | cstate->session = session; | 1489 | cstate->session = session; |