aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/exofs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/exofs.h')
-rw-r--r--fs/exofs/exofs.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index f4e442ec7445..51f4b4c40f09 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -53,6 +53,10 @@
53/* u64 has problems with printk this will cast it to unsigned long long */ 53/* u64 has problems with printk this will cast it to unsigned long long */
54#define _LLU(x) (unsigned long long)(x) 54#define _LLU(x) (unsigned long long)(x)
55 55
56struct exofs_dev {
57 struct ore_dev ored;
58 unsigned did;
59};
56/* 60/*
57 * our extension to the in-memory superblock 61 * our extension to the in-memory superblock
58 */ 62 */
@@ -66,13 +70,9 @@ struct exofs_sb_info {
66 u32 s_next_generation; /* next gen # to use */ 70 u32 s_next_generation; /* next gen # to use */
67 atomic_t s_curr_pending; /* number of pending commands */ 71 atomic_t s_curr_pending; /* number of pending commands */
68 72
69 struct pnfs_osd_data_map data_map; /* Default raid to use
70 * FIXME: Needed ?
71 */
72 struct ore_layout layout; /* Default files layout */ 73 struct ore_layout layout; /* Default files layout */
73 struct ore_comp one_comp; /* id & cred of partition id=0*/ 74 struct ore_comp one_comp; /* id & cred of partition id=0*/
74 struct ore_components comps; /* comps for the partition */ 75 struct ore_components oc; /* comps for the partition */
75 struct osd_dev *_min_one_dev[1]; /* Place holder for one dev */
76}; 76};
77 77
78/* 78/*
@@ -86,7 +86,7 @@ struct exofs_i_info {
86 uint32_t i_dir_start_lookup; /* which page to start lookup */ 86 uint32_t i_dir_start_lookup; /* which page to start lookup */
87 uint64_t i_commit_size; /* the object's written length */ 87 uint64_t i_commit_size; /* the object's written length */
88 struct ore_comp one_comp; /* same component for all devices */ 88 struct ore_comp one_comp; /* same component for all devices */
89 struct ore_components comps; /* inode view of the device table */ 89 struct ore_components oc; /* inode view of the device table */
90}; 90};
91 91
92static inline osd_id exofs_oi_objno(struct exofs_i_info *oi) 92static inline osd_id exofs_oi_objno(struct exofs_i_info *oi)
@@ -207,7 +207,7 @@ extern const struct inode_operations exofs_fast_symlink_inode_operations;
207 * bigger and that the device table repeats twice. 207 * bigger and that the device table repeats twice.
208 * See: exofs_read_lookup_dev_table() 208 * See: exofs_read_lookup_dev_table()
209 */ 209 */
210static inline void exofs_init_comps(struct ore_components *comps, 210static inline void exofs_init_comps(struct ore_components *oc,
211 struct ore_comp *one_comp, 211 struct ore_comp *one_comp,
212 struct exofs_sb_info *sbi, osd_id oid) 212 struct exofs_sb_info *sbi, osd_id oid)
213{ 213{
@@ -217,13 +217,15 @@ static inline void exofs_init_comps(struct ore_components *comps,
217 one_comp->obj.id = oid; 217 one_comp->obj.id = oid;
218 exofs_make_credential(one_comp->cred, &one_comp->obj); 218 exofs_make_credential(one_comp->cred, &one_comp->obj);
219 219
220 comps->numdevs = sbi->comps.numdevs; 220 oc->first_dev = 0;
221 comps->single_comp = EC_SINGLE_COMP; 221 oc->numdevs = sbi->layout.group_width * sbi->layout.mirrors_p1 *
222 comps->comps = one_comp; 222 sbi->layout.group_count;
223 oc->single_comp = EC_SINGLE_COMP;
224 oc->comps = one_comp;
223 225
224 /* Round robin device view of the table */ 226 /* Round robin device view of the table */
225 first_dev = (dev_mod * sbi->layout.mirrors_p1) % sbi->comps.numdevs; 227 first_dev = (dev_mod * sbi->layout.mirrors_p1) % sbi->oc.numdevs;
226 comps->ods = sbi->comps.ods + first_dev; 228 oc->ods = &sbi->oc.ods[first_dev];
227} 229}
228 230
229#endif 231#endif