aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2014-07-17 20:42:17 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-08-03 17:05:25 -0400
commit02d1426c7053da7c5a828ae9cd7b636ea4e46bf7 (patch)
treec241cc5c33ce52da89ecf04486988b21c85d0203 /fs/nfs/pnfs.h
parentb412ddf0661e11485876a202c48868143e3a01cf (diff)
pnfs: find swapped pages on pnfs commit lists too
nfs_page_find_head_request_locked looks through the regular nfs commit lists when the page is swapped out, but doesn't look through the pnfs commit lists. I'm not sure if anyone has hit any issues caused by this. Suggested-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 27ddecd3847f..203b6c9498b0 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -104,6 +104,8 @@ struct pnfs_layoutdriver_type {
104 int max); 104 int max);
105 void (*recover_commit_reqs) (struct list_head *list, 105 void (*recover_commit_reqs) (struct list_head *list,
106 struct nfs_commit_info *cinfo); 106 struct nfs_commit_info *cinfo);
107 struct nfs_page * (*search_commit_reqs)(struct nfs_commit_info *cinfo,
108 struct page *page);
107 int (*commit_pagelist)(struct inode *inode, 109 int (*commit_pagelist)(struct inode *inode,
108 struct list_head *mds_pages, 110 struct list_head *mds_pages,
109 int how, 111 int how,
@@ -341,6 +343,17 @@ pnfs_recover_commit_reqs(struct inode *inode, struct list_head *list,
341 NFS_SERVER(inode)->pnfs_curr_ld->recover_commit_reqs(list, cinfo); 343 NFS_SERVER(inode)->pnfs_curr_ld->recover_commit_reqs(list, cinfo);
342} 344}
343 345
346static inline struct nfs_page *
347pnfs_search_commit_reqs(struct inode *inode, struct nfs_commit_info *cinfo,
348 struct page *page)
349{
350 struct pnfs_layoutdriver_type *ld = NFS_SERVER(inode)->pnfs_curr_ld;
351
352 if (ld == NULL || ld->search_commit_reqs == NULL)
353 return NULL;
354 return ld->search_commit_reqs(cinfo, page);
355}
356
344/* Should the pNFS client commit and return the layout upon a setattr */ 357/* Should the pNFS client commit and return the layout upon a setattr */
345static inline bool 358static inline bool
346pnfs_ld_layoutret_on_setattr(struct inode *inode) 359pnfs_ld_layoutret_on_setattr(struct inode *inode)
@@ -492,6 +505,13 @@ pnfs_recover_commit_reqs(struct inode *inode, struct list_head *list,
492{ 505{
493} 506}
494 507
508static inline struct nfs_page *
509pnfs_search_commit_reqs(struct inode *inode, struct nfs_commit_info *cinfo,
510 struct page *page)
511{
512 return NULL;
513}
514
495static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync) 515static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync)
496{ 516{
497 return 0; 517 return 0;