diff options
author | Andy Adamson <andros@netapp.com> | 2012-05-23 05:02:35 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-24 16:15:48 -0400 |
commit | 82be417aa37c05116e310b0f2171187ea389f89b (patch) | |
tree | 901d8fc702d6aef425c4b17cdf62e4fdd8c81833 /fs/nfs/pnfs.h | |
parent | 88034c3d88c2c48b215f2cc5eb22e564aa817f9c (diff) |
NFSv4.1 cache mdsthreshold values on OPEN
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 7980756b2f57..29fd23c0efdc 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -227,6 +227,7 @@ int pnfs_read_done_resend_to_mds(struct inode *inode, struct list_head *head, | |||
227 | const struct nfs_pgio_completion_ops *compl_ops); | 227 | const struct nfs_pgio_completion_ops *compl_ops); |
228 | int pnfs_write_done_resend_to_mds(struct inode *inode, struct list_head *head, | 228 | int pnfs_write_done_resend_to_mds(struct inode *inode, struct list_head *head, |
229 | const struct nfs_pgio_completion_ops *compl_ops); | 229 | const struct nfs_pgio_completion_ops *compl_ops); |
230 | struct nfs4_threshold *pnfs_mdsthreshold_alloc(void); | ||
230 | 231 | ||
231 | /* nfs4_deviceid_flags */ | 232 | /* nfs4_deviceid_flags */ |
232 | enum { | 233 | enum { |
@@ -360,6 +361,14 @@ static inline int pnfs_return_layout(struct inode *ino) | |||
360 | return 0; | 361 | return 0; |
361 | } | 362 | } |
362 | 363 | ||
364 | static inline bool | ||
365 | pnfs_use_threshold(struct nfs4_threshold **dst, struct nfs4_threshold *src, | ||
366 | struct nfs_server *nfss) | ||
367 | { | ||
368 | return (dst && src && src->bm != 0 && | ||
369 | nfss->pnfs_curr_ld->id == src->l_type); | ||
370 | } | ||
371 | |||
363 | #ifdef NFS_DEBUG | 372 | #ifdef NFS_DEBUG |
364 | void nfs4_print_deviceid(const struct nfs4_deviceid *dev_id); | 373 | void nfs4_print_deviceid(const struct nfs4_deviceid *dev_id); |
365 | #else | 374 | #else |
@@ -485,6 +494,18 @@ static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync) | |||
485 | return 0; | 494 | return 0; |
486 | } | 495 | } |
487 | 496 | ||
497 | static inline bool | ||
498 | pnfs_use_threshold(struct nfs4_threshold **dst, struct nfs4_threshold *src, | ||
499 | struct nfs_server *nfss) | ||
500 | { | ||
501 | return false; | ||
502 | } | ||
503 | |||
504 | static inline struct nfs4_threshold *pnfs_mdsthreshold_alloc(void) | ||
505 | { | ||
506 | return NULL; | ||
507 | } | ||
508 | |||
488 | #endif /* CONFIG_NFS_V4_1 */ | 509 | #endif /* CONFIG_NFS_V4_1 */ |
489 | 510 | ||
490 | #endif /* FS_NFS_PNFS_H */ | 511 | #endif /* FS_NFS_PNFS_H */ |