diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-02-28 20:34:21 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-11 15:38:43 -0500 |
commit | ea8eecdd11ee6becd09c095c8efa88aa7df95961 (patch) | |
tree | 4db9c584989d006790637e255657a010c8243cb9 /fs/nfs/nfs4filelayout.h | |
parent | cbdabc7f8bf14ca1d40ab1cb86f64b3bc09716e8 (diff) |
NFSv4.1 move deviceid cache to filelayout driver
No need for generic cache with only one user.
Keep a simple hash of deviceids in the filelayout driver.
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Acked-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.h')
-rw-r--r-- | fs/nfs/nfs4filelayout.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h index 9fef76e04936..23f1e1e2a0f5 100644 --- a/fs/nfs/nfs4filelayout.h +++ b/fs/nfs/nfs4filelayout.h | |||
@@ -56,7 +56,9 @@ struct nfs4_pnfs_ds { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct nfs4_file_layout_dsaddr { | 58 | struct nfs4_file_layout_dsaddr { |
59 | struct pnfs_deviceid_node deviceid; | 59 | struct hlist_node node; |
60 | struct nfs4_deviceid deviceid; | ||
61 | atomic_t ref; | ||
60 | u32 stripe_count; | 62 | u32 stripe_count; |
61 | u8 *stripe_indices; | 63 | u8 *stripe_indices; |
62 | u32 ds_num; | 64 | u32 ds_num; |
@@ -86,7 +88,6 @@ FILELAYOUT_LSEG(struct pnfs_layout_segment *lseg) | |||
86 | extern struct nfs_fh * | 88 | extern struct nfs_fh * |
87 | nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j); | 89 | nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j); |
88 | 90 | ||
89 | extern void nfs4_fl_free_deviceid_callback(struct pnfs_deviceid_node *); | ||
90 | extern void print_ds(struct nfs4_pnfs_ds *ds); | 91 | extern void print_ds(struct nfs4_pnfs_ds *ds); |
91 | extern void print_deviceid(struct nfs4_deviceid *dev_id); | 92 | extern void print_deviceid(struct nfs4_deviceid *dev_id); |
92 | u32 nfs4_fl_calc_j_index(struct pnfs_layout_segment *lseg, loff_t offset); | 93 | u32 nfs4_fl_calc_j_index(struct pnfs_layout_segment *lseg, loff_t offset); |
@@ -94,7 +95,8 @@ u32 nfs4_fl_calc_ds_index(struct pnfs_layout_segment *lseg, u32 j); | |||
94 | struct nfs4_pnfs_ds *nfs4_fl_prepare_ds(struct pnfs_layout_segment *lseg, | 95 | struct nfs4_pnfs_ds *nfs4_fl_prepare_ds(struct pnfs_layout_segment *lseg, |
95 | u32 ds_idx); | 96 | u32 ds_idx); |
96 | extern struct nfs4_file_layout_dsaddr * | 97 | extern struct nfs4_file_layout_dsaddr * |
97 | nfs4_fl_find_get_deviceid(struct nfs_client *, struct nfs4_deviceid *dev_id); | 98 | nfs4_fl_find_get_deviceid(struct nfs4_deviceid *dev_id); |
99 | extern void nfs4_fl_put_deviceid(struct nfs4_file_layout_dsaddr *dsaddr); | ||
98 | struct nfs4_file_layout_dsaddr * | 100 | struct nfs4_file_layout_dsaddr * |
99 | get_device_info(struct inode *inode, struct nfs4_deviceid *dev_id); | 101 | get_device_info(struct inode *inode, struct nfs4_deviceid *dev_id); |
100 | 102 | ||