int lov_pool_del(struct obd_device *obd, char *poolname);
int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname);
int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname);
-void lov_dump_pool(int level, struct pool_desc *pool);
static inline struct lov_stripe_md *lsm_addref(struct lov_stripe_md *lsm)
{
osc_obd->obd_force = obd->obd_force;
osc_obd->obd_fail = obd->obd_fail;
osc_obd->obd_no_recov = obd->obd_no_recov;
-
- if (lov->targets_proc_entry != NULL)
- lprocfs_remove_proc_entry(osc_obd->obd_name,
- lov->targets_proc_entry);
}
obd_register_observer(osc_obd, NULL);
};
#endif /* CONFIG_PROC_FS */
-void lov_dump_pool(int level, struct pool_desc *pool)
-{
- int i;
-
- lov_pool_getref(pool);
-
- CDEBUG(level, "pool "LOV_POOLNAMEF" has %d members\n",
- pool->pool_name, pool->pool_obds.op_count);
- down_read(&pool_tgt_rw_sem(pool));
-
- for (i = 0; i < pool_tgt_count(pool) ; i++) {
- if (!pool_tgt(pool, i) || !(pool_tgt(pool, i))->ltd_exp)
- continue;
- CDEBUG(level, "pool "LOV_POOLNAMEF"[%d] = %s\n",
- pool->pool_name, i,
- obd_uuid2str(&((pool_tgt(pool, i))->ltd_uuid)));
- }
-
- up_read(&pool_tgt_rw_sem(pool));
- lov_pool_putref(pool);
-}
-
static void pools_hash_exit(void *vpool, void *data)
{
struct pool_desc *pool = vpool;
return extent_equal(&n1->in_extent, &n2->in_extent);
}
-static inline __u64 max_u64(__u64 x, __u64 y)
-{
- return x > y ? x : y;
-}
-
-static inline __u64 min_u64(__u64 x, __u64 y)
-{
- return x < y ? x : y;
-}
-
#define interval_for_each(node, root) \
for (node = interval_first(root); node != NULL; \
node = interval_next(node))
rotate->in_max_high = node->in_max_high;
left_max = node->in_left ? node->in_left->in_max_high : 0;
right_max = node->in_right ? node->in_right->in_max_high : 0;
- node->in_max_high = max_u64(interval_high(node),
- max_u64(left_max, right_max));
+ node->in_max_high = max3(interval_high(node),
+ left_max, right_max);
}
/* The left rotation "pivots" around the link from node to node->right, and
while (node) {
left_max = node->in_left ? node->in_left->in_max_high : 0;
right_max = node->in_right ? node->in_right->in_max_high : 0;
- node->in_max_high = max_u64(interval_high(node),
- max_u64(left_max, right_max));
+ node->in_max_high = max3(interval_high(node),
+ left_max, right_max);
if (node->in_max_high >= old_maxhigh)
break;
* if (root == NULL)
* return res;
* if (root->in_max_high < low) {
- * res = max_u64(root->in_max_high + 1, res);
+ * res = max(root->in_max_high + 1, res);
* return res;
* } else if (low < interval_low(root)) {
* interval_expand_low(root->in_left, low);
* }
*
* if (interval_high(root) < low)
- * res = max_u64(interval_high(root) + 1, res);
+ * res = max(interval_high(root) + 1, res);
* interval_expand_low(root->in_left, low);
* interval_expand_low(root->in_right, low);
*