aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-10-04 08:20:17 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2011-10-24 19:30:08 -0400
commit611d7a5dc6f2a1a0cfd8cc07b9d15f794cbe5f98 (patch)
tree14227c7f62331a977e1979d1011b1bc85b6e102e
parent4b46c9f5cf69505f0bc708995b88b0cc60317ffd (diff)
ore: Make ore_calc_stripe_info EXPORT_SYMBOL
ore_calc_stripe_info is needed by exofs::export.c for the layout calculations. Make it exportable Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
-rw-r--r--fs/exofs/ore.c8
-rw-r--r--include/scsi/osd_ore.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c
index 3b1cc3a132d7..d92998d5c2d6 100644
--- a/fs/exofs/ore.c
+++ b/fs/exofs/ore.c
@@ -57,9 +57,6 @@ MODULE_LICENSE("GPL");
57 * 3. Cache some havily used calculations that will be needed by users. 57 * 3. Cache some havily used calculations that will be needed by users.
58 */ 58 */
59 59
60static void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
61 struct ore_striping_info *si);
62
63enum { BIO_MAX_PAGES_KMALLOC = 60enum { BIO_MAX_PAGES_KMALLOC =
64 (PAGE_SIZE - sizeof(struct bio)) / sizeof(struct bio_vec),}; 61 (PAGE_SIZE - sizeof(struct bio)) / sizeof(struct bio_vec),};
65 62
@@ -409,8 +406,8 @@ EXPORT_SYMBOL(ore_check_io);
409 * 406 *
410 * O = L % stripe_unit + N * stripe_unit + M * group_depth * stripe_unit 407 * O = L % stripe_unit + N * stripe_unit + M * group_depth * stripe_unit
411 */ 408 */
412static void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset, 409void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
413 struct ore_striping_info *si) 410 struct ore_striping_info *si)
414{ 411{
415 u32 stripe_unit = layout->stripe_unit; 412 u32 stripe_unit = layout->stripe_unit;
416 u32 group_width = layout->group_width; 413 u32 group_width = layout->group_width;
@@ -443,6 +440,7 @@ static void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
443 si->group_length = T - H; 440 si->group_length = T - H;
444 si->M = M; 441 si->M = M;
445} 442}
443EXPORT_SYMBOL(ore_calc_stripe_info);
446 444
447static int _add_stripe_unit(struct ore_io_state *ios, unsigned *cur_pg, 445static int _add_stripe_unit(struct ore_io_state *ios, unsigned *cur_pg,
448 unsigned pgbase, struct ore_per_dev_state *per_dev, 446 unsigned pgbase, struct ore_per_dev_state *per_dev,
diff --git a/include/scsi/osd_ore.h b/include/scsi/osd_ore.h
index af2231a0fd09..a8e39d14f82b 100644
--- a/include/scsi/osd_ore.h
+++ b/include/scsi/osd_ore.h
@@ -146,6 +146,9 @@ static inline unsigned ore_io_state_size(unsigned numdevs)
146 146
147/* ore.c */ 147/* ore.c */
148int ore_verify_layout(unsigned total_comps, struct ore_layout *layout); 148int ore_verify_layout(unsigned total_comps, struct ore_layout *layout);
149void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
150 struct ore_striping_info *si);
151
149int ore_get_rw_state(struct ore_layout *layout, struct ore_components *comps, 152int ore_get_rw_state(struct ore_layout *layout, struct ore_components *comps,
150 bool is_reading, u64 offset, u64 length, 153 bool is_reading, u64 offset, u64 length,
151 struct ore_io_state **ios); 154 struct ore_io_state **ios);