diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-12-31 09:28:06 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-12-31 15:55:35 -0500 |
commit | b20135d0b2431900a3a5395970ffb7e4f3767c8b (patch) | |
tree | 480ca93f19626e451cb79b35f29ad86d28da0fbb /fs/nfs/pnfs.c | |
parent | af7cf057933f01dc7f33ddfb5e436ad598ed17ad (diff) | |
download | linux-stable-b20135d0b2431900a3a5395970ffb7e4f3767c8b.tar.gz linux-stable-b20135d0b2431900a3a5395970ffb7e4f3767c8b.tar.bz2 linux-stable-b20135d0b2431900a3a5395970ffb7e4f3767c8b.zip |
NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid
If the layout segment is invalid, then we should not be adding more
write requests to the commit list. Instead, those writes should be
replayed after requesting a new layout.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 360fe95c97b5..6593be7c0129 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -703,6 +703,8 @@ pnfs_layout_free_bulk_destroy_list(struct list_head *layout_list, ret = -EAGAIN; spin_unlock(&inode->i_lock); pnfs_free_lseg_list(&lseg_list); + /* Free all lsegs that are attached to commit buckets */ + nfs_commit_inode(inode, 0); pnfs_put_layout_hdr(lo); iput(inode); } @@ -1811,6 +1813,7 @@ void pnfs_error_mark_layout_for_return(struct inode *inode, pnfs_mark_matching_lsegs_return(lo, &free_me, &range); spin_unlock(&inode->i_lock); pnfs_free_lseg_list(&free_me); + nfs_commit_inode(inode, 0); } EXPORT_SYMBOL_GPL(pnfs_error_mark_layout_for_return); |