RETURN(0);
}
-void lod_qos_rr_init(struct lu_qos_rr *lqr)
-{
- spin_lock_init(&lqr->lqr_alloc);
- lqr->lqr_dirty = 1;
-}
-
#define LOV_QOS_EMPTY ((__u32)-1)
/**
cur_weight = 0;
rc = -ENOSPC;
- if (total_weight) {
-#if BITS_PER_LONG == 32
- rand = prandom_u32_max((u32)total_weight);
- /* If total_weight > 32-bit, first generate the high
- * 32 bits of the random number, then add in the low
- * 32 bits (truncated to the upper limit, if needed)
- */
- if (total_weight > 0xffffffffULL)
- rand = prandom_u32_max((u32)(total_weight >> 32)) << 32;
- else
- rand = 0;
-
- if (rand == (total_weight & 0xffffffff00000000ULL))
- rand |= prandom_u32_max((u32)total_weight);
- else
- rand |= prandom_u32();
-
-#else
- rand = prandom_u32() | prandom_u32_max((u32)total_weight);
-#endif
- } else {
- rand = 0;
- }
+ rand = lu_prandom_u64_max(total_weight);
/* On average, this will hit larger-weighted OSTs more often.
* 0-weight OSTs will always get used last (only when rand=0) */
lod_comp->llc_extent = *ext;
lod_comp->llc_flags =
comp_v1->lcm_entries[i].lcme_flags &
- LCME_USER_FLAGS;
+ LCME_CL_COMP_FLAGS;
}
pool_name = NULL;
LASSERT(lo);
LASSERT(lo->ldo_comp_cnt > comp_idx && lo->ldo_comp_entries != NULL);
lod_comp = &lo->ldo_comp_entries[comp_idx];
+ LASSERT(!(lod_comp->llc_flags & LCME_FL_EXTENSION));
/* A released component is being created */
if (lod_comp->llc_pattern & LOV_PATTERN_F_RELEASED)