Skip to content

Commit

Permalink
pNFS: Don't send COMMITs to the DSes if the server invalidated our la…
Browse files Browse the repository at this point in the history
…yout

If the layout was invalidated, then assume we should requeue all the
pending writes for the DS in question.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Apr 29, 2017
1 parent 37f8aa1 commit 722f0b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/nfs/pnfs_nfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ pnfs_generic_alloc_ds_commits(struct nfs_commit_info *cinfo,
for (i = 0; i < fl_cinfo->nbuckets; i++, bucket++) {
if (list_empty(&bucket->committing))
continue;
/*
* If the layout segment is invalid, then let
* pnfs_generic_retry_commit() clean up the bucket.
*/
if (!pnfs_is_valid_lseg(bucket->clseg) &&
!test_bit(NFS_LSEG_LAYOUTRETURN, &bucket->clseg->pls_flags))
continue;
data = nfs_commitdata_alloc(false);
if (!data)
break;
Expand Down

0 comments on commit 722f0b8

Please sign in to comment.