aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2011-05-19 22:14:47 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2011-05-29 05:09:48 -0400
commita1eaecbc4c8307e27772d6584ef85a2e93250661 (patch)
tree940549d45db98a5bcfe22501de0bbe9c96de4c8e /fs/nfs/pnfs.h
parent45df3c8b0f3a58facb125d7631890426706c0bfa (diff)
NFSv4.1: make deviceid cache global
Move deviceid cache from the pnfs files layout driver to the generic layer in preparation for the objects layout driver. Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 720bb9da3f9b..3831ad04a231 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -157,6 +157,23 @@ bool pnfs_roc_drain(struct inode *ino, u32 *barrier);
157void pnfs_set_layoutcommit(struct nfs_write_data *wdata); 157void pnfs_set_layoutcommit(struct nfs_write_data *wdata);
158int pnfs_layoutcommit_inode(struct inode *inode, bool sync); 158int pnfs_layoutcommit_inode(struct inode *inode, bool sync);
159 159
160/* pnfs_dev.c */
161struct nfs4_deviceid_node {
162 struct hlist_node node;
163 const struct nfs_client *nfs_client;
164 struct nfs4_deviceid deviceid;
165 atomic_t ref;
166};
167
168void 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 *);
170struct nfs4_deviceid_node *nfs4_unhash_put_deviceid(const struct nfs_client *, const struct nfs4_deviceid *);
171void nfs4_init_deviceid_node(struct nfs4_deviceid_node *,
172 const struct nfs_client *,
173 const struct nfs4_deviceid *);
174struct nfs4_deviceid_node *nfs4_insert_deviceid_node(struct nfs4_deviceid_node *);
175bool nfs4_put_deviceid_node(struct nfs4_deviceid_node *);
176
160static inline int lo_fail_bit(u32 iomode) 177static inline int lo_fail_bit(u32 iomode)
161{ 178{
162 return iomode == IOMODE_RW ? 179 return iomode == IOMODE_RW ?