diff options
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r-- | fs/nfs/callback_proc.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 3d7edd65577b..4062f7690a33 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -143,9 +143,8 @@ int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const n | |||
143 | * Return success if the sequenceID is one more than what we last saw on | 143 | * Return success if the sequenceID is one more than what we last saw on |
144 | * this slot, accounting for wraparound. Increments the slot's sequence. | 144 | * this slot, accounting for wraparound. Increments the slot's sequence. |
145 | * | 145 | * |
146 | * We don't yet implement a duplicate request cache, so at this time | 146 | * We don't yet implement a duplicate request cache, instead we set the |
147 | * we will log replays, and process them as if we had not seen them before, | 147 | * back channel ca_maxresponsesize_cached to zero. This is OK for now |
148 | * but we don't bump the sequence in the slot. Not too worried about it, | ||
149 | * since we only currently implement idempotent callbacks anyway. | 148 | * since we only currently implement idempotent callbacks anyway. |
150 | * | 149 | * |
151 | * We have a single slot backchannel at this time, so we don't bother | 150 | * We have a single slot backchannel at this time, so we don't bother |
@@ -174,9 +173,15 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args) | |||
174 | 173 | ||
175 | /* Replay */ | 174 | /* Replay */ |
176 | if (args->csa_sequenceid == slot->seq_nr) { | 175 | if (args->csa_sequenceid == slot->seq_nr) { |
177 | dprintk("%s seqid %d is a replay - no DRC available\n", | 176 | dprintk("%s seqid %d is a replay\n", |
178 | __func__, args->csa_sequenceid); | 177 | __func__, args->csa_sequenceid); |
179 | return htonl(NFS4_OK); | 178 | /* Signal process_op to set this error on next op */ |
179 | if (args->csa_cachethis == 0) | ||
180 | return htonl(NFS4ERR_RETRY_UNCACHED_REP); | ||
181 | |||
182 | /* The ca_maxresponsesize_cached is 0 with no DRC */ | ||
183 | else if (args->csa_cachethis == 1) | ||
184 | return htonl(NFS4ERR_REP_TOO_BIG_TO_CACHE); | ||
180 | } | 185 | } |
181 | 186 | ||
182 | /* Wraparound */ | 187 | /* Wraparound */ |
@@ -319,9 +324,13 @@ out: | |||
319 | kfree(args->csa_rclists[i].rcl_refcalls); | 324 | kfree(args->csa_rclists[i].rcl_refcalls); |
320 | kfree(args->csa_rclists); | 325 | kfree(args->csa_rclists); |
321 | 326 | ||
322 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); | 327 | if (status == htonl(NFS4ERR_RETRY_UNCACHED_REP)) |
323 | res->csr_status = status; | 328 | res->csr_status = 0; |
324 | return res->csr_status; | 329 | else |
330 | res->csr_status = status; | ||
331 | dprintk("%s: exit with status = %d res->csr_status %d\n", __func__, | ||
332 | ntohl(status), ntohl(res->csr_status)); | ||
333 | return status; | ||
325 | } | 334 | } |
326 | 335 | ||
327 | unsigned nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy) | 336 | unsigned nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy) |