18 #define ORE_ERR(fmt, a...) printk(KERN_ERR "ore: " fmt, ##a)
20 #ifdef CONFIG_EXOFS_DEBUG
21 #define ORE_DBGMSG(fmt, a...) \
22 printk(KERN_NOTICE "ore @%s:%d: " fmt, __func__, __LINE__, ##a)
24 #define ORE_DBGMSG(fmt, a...) \
25 do { if (0) printk(fmt, ##a); } while (0)
29 #define _LLU(x) (unsigned long long)(x)
31 #define ORE_DBGMSG2(M...) do {} while (0)
37 static inline unsigned _dev_order(
unsigned devs_in_group,
unsigned mirrors_p1,
38 unsigned par_dev,
unsigned dev)
40 unsigned first_dev = dev - dev % devs_in_group;
45 if (devs_in_group == par_dev)
46 return dev / mirrors_p1;
48 return ((devs_in_group + dev - par_dev - mirrors_p1) % devs_in_group) /
56 void _ore_add_sg_seg(
struct ore_per_dev_state *per_dev,
unsigned cur_len,
59 struct ore_per_dev_state *per_dev,
unsigned cur_len);
73 unsigned sgs_per_dev,
unsigned num_par_pages,
76 unsigned pgbase,
struct page **
pages,
77 struct ore_per_dev_state *per_dev,
int cur_len);