ore: Make ore_calc_stripe_info EXPORT_SYMBOL
authorBoaz Harrosh <bharrosh@panasas.com>
Tue, 4 Oct 2011 12:20:17 +0000 (14:20 +0200)
committerBoaz Harrosh <bharrosh@panasas.com>
Mon, 24 Oct 2011 23:30:08 +0000 (16:30 -0700)
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>
fs/exofs/ore.c
include/scsi/osd_ore.h

index 3b1cc3a132d7edb0ead6b47d0261e65fcd65f4d8..d92998d5c2d6291bf09fd5c3bfa42fb9bea6e5de 100644 (file)
@@ -57,9 +57,6 @@ MODULE_LICENSE("GPL");
  * 3. Cache some havily used calculations that will be needed by users.
  */
 
-static void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
-                                struct ore_striping_info *si);
-
 enum { BIO_MAX_PAGES_KMALLOC =
                (PAGE_SIZE - sizeof(struct bio)) / sizeof(struct bio_vec),};
 
@@ -409,8 +406,8 @@ EXPORT_SYMBOL(ore_check_io);
  *
  *     O = L % stripe_unit + N * stripe_unit + M * group_depth * stripe_unit
  */
-static void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
-                                struct ore_striping_info *si)
+void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
+                         struct ore_striping_info *si)
 {
        u32     stripe_unit = layout->stripe_unit;
        u32     group_width = layout->group_width;
@@ -443,6 +440,7 @@ static void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
        si->group_length = T - H;
        si->M = M;
 }
+EXPORT_SYMBOL(ore_calc_stripe_info);
 
 static int _add_stripe_unit(struct ore_io_state *ios,  unsigned *cur_pg,
                unsigned pgbase, struct ore_per_dev_state *per_dev,
index af2231a0fd098de95f0faa06b5692025780972f1..a8e39d14f82b52b62df0ff63f94df2da1aab6c1b 100644 (file)
@@ -146,6 +146,9 @@ static inline unsigned ore_io_state_size(unsigned numdevs)
 
 /* ore.c */
 int ore_verify_layout(unsigned total_comps, struct ore_layout *layout);
+void ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset,
+                         struct ore_striping_info *si);
+
 int ore_get_rw_state(struct ore_layout *layout, struct ore_components *comps,
                     bool is_reading, u64 offset, u64 length,
                     struct ore_io_state **ios);