aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 3831ad04a23..80a5d0e2cc4 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -65,6 +65,8 @@ enum {
65 NFS_LAYOUT_DESTROYED, /* no new use of layout allowed */ 65 NFS_LAYOUT_DESTROYED, /* no new use of layout allowed */
66}; 66};
67 67
68struct nfs4_deviceid_node;
69
68/* Per-layout driver specific registration structure */ 70/* Per-layout driver specific registration structure */
69struct pnfs_layoutdriver_type { 71struct pnfs_layoutdriver_type {
70 struct list_head pnfs_tblid; 72 struct list_head pnfs_tblid;
@@ -90,6 +92,8 @@ struct pnfs_layoutdriver_type {
90 */ 92 */
91 enum pnfs_try_status (*read_pagelist) (struct nfs_read_data *nfs_data); 93 enum pnfs_try_status (*read_pagelist) (struct nfs_read_data *nfs_data);
92 enum pnfs_try_status (*write_pagelist) (struct nfs_write_data *nfs_data, int how); 94 enum pnfs_try_status (*write_pagelist) (struct nfs_write_data *nfs_data, int how);
95
96 void (*free_deviceid_node) (struct nfs4_deviceid_node *);
93}; 97};
94 98
95struct pnfs_layout_hdr { 99struct pnfs_layout_hdr {
@@ -160,6 +164,7 @@ int pnfs_layoutcommit_inode(struct inode *inode, bool sync);
160/* pnfs_dev.c */ 164/* pnfs_dev.c */
161struct nfs4_deviceid_node { 165struct nfs4_deviceid_node {
162 struct hlist_node node; 166 struct hlist_node node;
167 const struct pnfs_layoutdriver_type *ld;
163 const struct nfs_client *nfs_client; 168 const struct nfs_client *nfs_client;
164 struct nfs4_deviceid deviceid; 169 struct nfs4_deviceid deviceid;
165 atomic_t ref; 170 atomic_t ref;
@@ -169,10 +174,12 @@ void nfs4_print_deviceid(const struct nfs4_deviceid *dev_id);
169struct nfs4_deviceid_node *nfs4_find_get_deviceid(const struct nfs_client *, const struct nfs4_deviceid *); 174struct nfs4_deviceid_node *nfs4_find_get_deviceid(const struct nfs_client *, const struct nfs4_deviceid *);
170struct nfs4_deviceid_node *nfs4_unhash_put_deviceid(const struct nfs_client *, const struct nfs4_deviceid *); 175struct nfs4_deviceid_node *nfs4_unhash_put_deviceid(const struct nfs_client *, const struct nfs4_deviceid *);
171void nfs4_init_deviceid_node(struct nfs4_deviceid_node *, 176void nfs4_init_deviceid_node(struct nfs4_deviceid_node *,
177 const struct pnfs_layoutdriver_type *,
172 const struct nfs_client *, 178 const struct nfs_client *,
173 const struct nfs4_deviceid *); 179 const struct nfs4_deviceid *);
174struct nfs4_deviceid_node *nfs4_insert_deviceid_node(struct nfs4_deviceid_node *); 180struct nfs4_deviceid_node *nfs4_insert_deviceid_node(struct nfs4_deviceid_node *);
175bool nfs4_put_deviceid_node(struct nfs4_deviceid_node *); 181bool nfs4_put_deviceid_node(struct nfs4_deviceid_node *);
182void nfs4_deviceid_purge_client(const struct nfs_client *);
176 183
177static inline int lo_fail_bit(u32 iomode) 184static inline int lo_fail_bit(u32 iomode)
178{ 185{
@@ -349,6 +356,10 @@ static inline int pnfs_layoutcommit_inode(struct inode *inode, bool sync)
349{ 356{
350 return 0; 357 return 0;
351} 358}
359
360static inline void nfs4_deviceid_purge_client(struct nfs_client *ncl)
361{
362}
352#endif /* CONFIG_NFS_V4_1 */ 363#endif /* CONFIG_NFS_V4_1 */
353 364
354#endif /* FS_NFS_PNFS_H */ 365#endif /* FS_NFS_PNFS_H */