aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-06-23 13:35:28 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-07-26 16:25:24 -0400
commit00bcbe119f915dec256f211f9dbfc93cb64773bc (patch)
treefe62cb22048f7c616504b10b32c7c964f4f2f15e
parente0b7d420f72a66b5299da025be8e8a17e019a557 (diff)
pNFS: Don't update the stateid when replying NFS4ERR_DELAY to a layout recall
RFC5661 doesn't state directly that the client should update the layout stateid if it returns NFS4ERR_NOMATCHING_LAYOUT in response to a recall, however it does state that this error will "cleanly indicate completion" on par with returning the layout. For this reason, we assume that the client should update the layout stateid. The Linux pNFS server definitely does expect this behaviour. However, if the client replies NFS4ERR_DELAY, then it is stating that the recall was not processed, so it would be very wrong to update the layout stateid. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r--fs/nfs/callback_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index af2322256aa4..efca3d6c89f2 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -273,7 +273,6 @@ static u32 initiate_file_draining(struct nfs_client *clp,
273 rv = pnfs_check_callback_stateid(lo, &args->cbl_stateid); 273 rv = pnfs_check_callback_stateid(lo, &args->cbl_stateid);
274 if (rv != NFS_OK) 274 if (rv != NFS_OK)
275 goto unlock; 275 goto unlock;
276 pnfs_set_layout_stateid(lo, &args->cbl_stateid, true);
277 276
278 /* 277 /*
279 * Enforce RFC5661 Section 12.5.5.2.1.5 (Bulk Recall and Return) 278 * Enforce RFC5661 Section 12.5.5.2.1.5 (Bulk Recall and Return)
@@ -283,6 +282,7 @@ static u32 initiate_file_draining(struct nfs_client *clp,
283 goto unlock; 282 goto unlock;
284 } 283 }
285 284
285 pnfs_set_layout_stateid(lo, &args->cbl_stateid, true);
286 switch (pnfs_mark_matching_lsegs_return(lo, &free_me_list, 286 switch (pnfs_mark_matching_lsegs_return(lo, &free_me_list,
287 &args->cbl_range, 287 &args->cbl_range,
288 be32_to_cpu(args->cbl_stateid.seqid))) { 288 be32_to_cpu(args->cbl_stateid.seqid))) {