diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2014-07-17 20:42:17 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-08-03 17:05:25 -0400 |
commit | 02d1426c7053da7c5a828ae9cd7b636ea4e46bf7 (patch) | |
tree | c241cc5c33ce52da89ecf04486988b21c85d0203 /fs/nfs/pnfs.h | |
parent | b412ddf0661e11485876a202c48868143e3a01cf (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.h | 20 |
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 | ||
346 | static inline struct nfs_page * | ||
347 | pnfs_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 */ |
345 | static inline bool | 358 | static inline bool |
346 | pnfs_ld_layoutret_on_setattr(struct inode *inode) | 359 | pnfs_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 | ||
508 | static inline struct nfs_page * | ||
509 | pnfs_search_commit_reqs(struct inode *inode, struct nfs_commit_info *cinfo, | ||
510 | struct page *page) | ||
511 | { | ||
512 | return NULL; | ||
513 | } | ||
514 | |||
495 | static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync) | 515 | static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync) |
496 | { | 516 | { |
497 | return 0; | 517 | return 0; |