/*
* XXX: this is for create lsm object id, which should identify the lsm object
* unique in the whole mds, as I see. But it seems, we still not need it
- * now. Right? So just borrow the ll_fid_build_ino().
+ * now. Right? So just borrow the cl_fid_build_ino().
*/
static obd_id mdd_lov_create_id(const struct lu_fid *fid)
{
if (spec->no_create != 0) {
*lmm = (struct lov_mds_md *)spec->u.sp_ea.eadata;
*lmm_size = spec->u.sp_ea.eadatalen;
- RETURN(0);
+ if (*lmm_size == lov_mds_md_size((*lmm)->lmm_stripe_count,
+ (*lmm)->lmm_magic)) {
+ RETURN(0);
+ } else {
+ CERROR("incorrect lsm received during recovery\n");
+ RETURN(-EPROTO);
+ }
}
if (OBD_FAIL_CHECK(OBD_FAIL_MDS_ALLOC_OBDO))
if (rc < 0)
RETURN(rc);
- rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
- if (rc)
- GOTO(out, rc);
-
OBD_ALLOC(lsr, sizeof(*lsr));
if (!lsr)
GOTO(out, rc = -ENOMEM);
GOTO(out, rc);
}
- rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, oinfo.oi_md);
- if (rc) {
- CERROR("Error revalidate lsm %p \n", oinfo.oi_md);
- GOTO(out, rc);
- }
-
/* then fill oa */
oinfo.oi_oa->o_uid = uid;
oinfo.oi_oa->o_gid = gid;