aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorTom Haynes <loghyr@primarydata.com>2014-12-11 15:34:59 -0500
committerTom Haynes <loghyr@primarydata.com>2015-02-03 14:06:31 -0500
commitf54bcf2ecee982da47c2baf8bd87fd9ad9984651 (patch)
treec813d2cc90424e847452cec824cbcdbf74470b39 /fs/nfs/pnfs.h
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff)
pnfs: Prepare for flexfiles by pulling out common code
The flexfilelayout driver will share some common code with the filelayout driver. This set of changes refactors that common code out to avoid any module depenencies. Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 9ae5b765b073..f17663446acc 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -275,6 +275,23 @@ void nfs4_mark_deviceid_unavailable(struct nfs4_deviceid_node *node);
275bool nfs4_test_deviceid_unavailable(struct nfs4_deviceid_node *node); 275bool nfs4_test_deviceid_unavailable(struct nfs4_deviceid_node *node);
276void nfs4_deviceid_purge_client(const struct nfs_client *); 276void nfs4_deviceid_purge_client(const struct nfs_client *);
277 277
278/* pnfs_nfs.c */
279void pnfs_generic_clear_request_commit(struct nfs_page *req,
280 struct nfs_commit_info *cinfo);
281void pnfs_generic_commit_release(void *calldata);
282void pnfs_generic_prepare_to_resend_writes(struct nfs_commit_data *data);
283void pnfs_generic_rw_release(void *data);
284void pnfs_generic_recover_commit_reqs(struct list_head *dst,
285 struct nfs_commit_info *cinfo);
286int pnfs_generic_commit_pagelist(struct inode *inode,
287 struct list_head *mds_pages,
288 int how,
289 struct nfs_commit_info *cinfo,
290 int (*initiate_commit)(struct nfs_commit_data *data,
291 int how));
292int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
293void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
294
278static inline struct nfs4_deviceid_node * 295static inline struct nfs4_deviceid_node *
279nfs4_get_deviceid(struct nfs4_deviceid_node *d) 296nfs4_get_deviceid(struct nfs4_deviceid_node *d)
280{ 297{
@@ -317,6 +334,12 @@ pnfs_get_ds_info(struct inode *inode)
317 return ld->get_ds_info(inode); 334 return ld->get_ds_info(inode);
318} 335}
319 336
337static inline void
338pnfs_generic_mark_devid_invalid(struct nfs4_deviceid_node *node)
339{
340 set_bit(NFS_DEVICEID_INVALID, &node->flags);
341}
342
320static inline bool 343static inline bool
321pnfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg, 344pnfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg,
322 struct nfs_commit_info *cinfo) 345 struct nfs_commit_info *cinfo)