mutex_lock(<d->ltd_mutex);
tgt = LTD_TGT(ltd, idx);
/* check that the index is allocated in the bitmap */
- if (!cfs_bitmap_check(ltd->ltd_tgt_bitmap, idx) || !tgt) {
+ if (!test_bit(idx, ltd->ltd_tgt_bitmap) || !tgt) {
CERROR("%s: device %d is not set up\n", obd->obd_name, idx);
GOTO(out, rc = -EINVAL);
}
static int validate_lod_and_idx(struct lod_device *md, __u32 idx)
{
if (unlikely(idx >= md->lod_ost_descs.ltd_tgts_size ||
- !cfs_bitmap_check(md->lod_ost_bitmap, idx))) {
+ !test_bit(idx, md->lod_ost_bitmap))) {
CERROR("%s: bad idx: %d of %d\n", lod2obd(md)->obd_name, idx,
md->lod_ost_descs.ltd_tgts_size);
return -EINVAL;
}
/* if lmm_stripe_offset is *not* in bitmap */
- if (!cfs_bitmap_check(d->lod_ost_bitmap, stripe_offset)) {
+ if (!test_bit(stripe_offset, d->lod_ost_bitmap)) {
CDEBUG(D_LAYOUT, "stripe offset %u not in bitmap\n",
stripe_offset);
GOTO(out, rc = -EINVAL);