summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-12-05 11:20:43 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-28 22:32:38 +0300
commitd6c843b96e1cb5199147e3281a724e3c0b69a9ab (patch)
tree73d556f77eb68743a0752e150c493bd4062cad59 /include
parent0bcbf039f6b2bcefe4f5dada76079080edf9ecd0 (diff)
downloadlinux-d6c843b96e1cb5199147e3281a724e3c0b69a9ab.tar.xz
nfs: only remove page from mapping if launder_page fails
Instead of dropping pages when write fails, only do it when we get fatal failure in launder_page write back. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index c0e961474a52..b88fc46cfbb8 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -517,13 +517,25 @@ extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned
*/
extern int nfs_sync_inode(struct inode *inode);
extern int nfs_wb_all(struct inode *inode);
-extern int nfs_wb_page(struct inode *inode, struct page* page);
+extern int nfs_wb_single_page(struct inode *inode, struct page *page, bool launder);
extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
extern int nfs_commit_inode(struct inode *, int);
extern struct nfs_commit_data *nfs_commitdata_alloc(void);
extern void nfs_commit_free(struct nfs_commit_data *data);
static inline int
+nfs_wb_launder_page(struct inode *inode, struct page *page)
+{
+ return nfs_wb_single_page(inode, page, true);
+}
+
+static inline int
+nfs_wb_page(struct inode *inode, struct page *page)
+{
+ return nfs_wb_single_page(inode, page, false);
+}
+
+static inline int
nfs_have_writebacks(struct inode *inode)
{
return NFS_I(inode)->nrequests != 0;