summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 09:28:06 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 15:55:35 -0500
commitb20135d0b2431900a3a5395970ffb7e4f3767c8b (patch)
tree480ca93f19626e451cb79b35f29ad86d28da0fbb /fs/nfs/write.c
parentaf7cf057933f01dc7f33ddfb5e436ad598ed17ad (diff)
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/write.c')
-rw-r--r--fs/nfs/write.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index ae29f082c9c2..0aa8d6f23b4c 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1676,6 +1676,13 @@ void nfs_retry_commit(struct list_head *page_list,
1676} 1676}
1677EXPORT_SYMBOL_GPL(nfs_retry_commit); 1677EXPORT_SYMBOL_GPL(nfs_retry_commit);
1678 1678
1679static void
1680nfs_commit_resched_write(struct nfs_commit_info *cinfo,
1681 struct nfs_page *req)
1682{
1683 __set_page_dirty_nobuffers(req->wb_page);
1684}
1685
1679/* 1686/*
1680 * Commit dirty pages 1687 * Commit dirty pages
1681 */ 1688 */
@@ -1777,6 +1784,7 @@ static const struct rpc_call_ops nfs_commit_ops = {
1777 1784
1778static const struct nfs_commit_completion_ops nfs_commit_completion_ops = { 1785static const struct nfs_commit_completion_ops nfs_commit_completion_ops = {
1779 .completion = nfs_commit_release_pages, 1786 .completion = nfs_commit_release_pages,
1787 .resched_write = nfs_commit_resched_write,
1780}; 1788};
1781 1789
1782int nfs_generic_commit_list(struct inode *inode, struct list_head *head, 1790int nfs_generic_commit_list(struct inode *inode, struct list_head *head,
@@ -1823,6 +1831,7 @@ out_mark_dirty:
1823 __mark_inode_dirty(inode, I_DIRTY_DATASYNC); 1831 __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
1824 return res; 1832 return res;
1825} 1833}
1834EXPORT_SYMBOL_GPL(nfs_commit_inode);
1826 1835
1827int nfs_write_inode(struct inode *inode, struct writeback_control *wbc) 1836int nfs_write_inode(struct inode *inode, struct writeback_control *wbc)
1828{ 1837{