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>
This commit is contained in:

committed by
Trond Myklebust

parent
0bcbf039f6
commit
d6c843b96e
@@ -517,12 +517,24 @@ 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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user