#define LMV_MAX_TGT_COUNT 128
-#define lmv_init_lock(lmv) mutex_lock(&lmv->init_mutex);
-#define lmv_init_unlock(lmv) mutex_unlock(&lmv->init_mutex);
-
#define LL_IT2STR(it) \
((it) ? ldlm_it2str((it)->it_op) : "0")
return sizeof(*lsm) + stripe_count * sizeof(lsm->lsm_md_oinfo[0]);
}
-int lmv_name_to_stripe_index(enum lmv_hash_type hashtype,
- unsigned int max_mdt_index,
- const char *name, int namelen);
-
static inline const struct lmv_oinfo *
lsm_name_to_stripe_info(const struct lmv_stripe_md *lsm, const char *name,
int namelen)
return &lsm->lsm_md_oinfo[stripe_index];
}
-static inline bool lmv_is_known_hash_type(const struct lmv_stripe_md *lsm)
-{
- return lsm->lsm_md_hash_type == LMV_HASH_TYPE_FNV_1A_64 ||
- lsm->lsm_md_hash_type == LMV_HASH_TYPE_ALL_CHARS;
-}
-
static inline bool lmv_need_try_all_stripes(const struct lmv_stripe_md *lsm)
{
- return !lmv_is_known_hash_type(lsm) ||
+ return !lmv_is_known_hash_type(lsm->lsm_md_hash_type) ||
lsm->lsm_md_hash_type & LMV_HASH_FLAG_MIGRATION;
}