static int lsm_lmm_verify_common(struct lov_mds_md *lmm, int lmm_bytes,
__u16 stripe_count)
{
-
if (stripe_count == 0 || stripe_count > LOV_V1_INSANE_STRIPE_COUNT) {
CERROR("bad stripe count %d\n", stripe_count);
- lov_dump_lmm(D_WARNING, lmm);
+ lov_dump_lmm_common(D_WARNING, lmm);
return -EINVAL;
}
if (lmm_oi_id(&lmm->lmm_oi) == 0) {
CERROR("zero object id\n");
- lov_dump_lmm(D_WARNING, lmm);
+ lov_dump_lmm_common(D_WARNING, lmm);
return -EINVAL;
}
if (lmm->lmm_pattern != cpu_to_le32(LOV_PATTERN_RAID0)) {
CERROR("bad striping pattern\n");
- lov_dump_lmm(D_WARNING, lmm);
+ lov_dump_lmm_common(D_WARNING, lmm);
return -EINVAL;
}
if (lmm->lmm_stripe_size == 0 ||
- (le32_to_cpu(lmm->lmm_stripe_size)&(LOV_MIN_STRIPE_SIZE-1)) != 0) {
+ (le32_to_cpu(lmm->lmm_stripe_size)&(LOV_MIN_STRIPE_SIZE-1)) != 0) {
CERROR("bad stripe size %u\n",
le32_to_cpu(lmm->lmm_stripe_size));
- lov_dump_lmm(D_WARNING, lmm);
+ lov_dump_lmm_common(D_WARNING, lmm);
return -EINVAL;
}
return 0;
if (lmm_bytes < lov_mds_md_size(*stripe_count, LOV_MAGIC_V1)) {
CERROR("LOV EA V1 too small: %d, need %d\n",
lmm_bytes, lov_mds_md_size(*stripe_count, LOV_MAGIC_V1));
- lov_dump_lmm_v1(D_WARNING, lmm);
+ lov_dump_lmm_common(D_WARNING, lmm);
return -EINVAL;
}
if (lmm_bytes < lov_mds_md_size(*stripe_count, LOV_MAGIC_V3)) {
CERROR("LOV EA V3 too small: %d, need %d\n",
lmm_bytes, lov_mds_md_size(*stripe_count, LOV_MAGIC_V3));
- lov_dump_lmm_v3(D_WARNING, lmm);
+ lov_dump_lmm_common(D_WARNING, lmm);
return -EINVAL;
}
#include "lov_internal.h"
-static void lov_dump_lmm_common(int level, void *lmmp)
+void lov_dump_lmm_common(int level, void *lmmp)
{
struct lov_mds_md *lmm = lmmp;
struct ost_id oi;
if (stripe_count > LOV_V1_INSANE_STRIPE_COUNT) {
CDEBUG(level, "bad stripe_count %u > max_stripe_count %u\n",
stripe_count, LOV_V1_INSANE_STRIPE_COUNT);
+ return;
}
for (i = 0; i < stripe_count; ++i, ++lod) {