Commit 698a496a authored by Lai Siyao's avatar Lai Siyao Committed by Oleg Drokin
Browse files

LU-13437 lmv: check stripe FID sanity

Striped directory layout may be broken, if some stripe FID is insane,
return -ENODEV.
Signed-off-by: default avatarLai Siyao <>
Change-Id: I7ed8c7c561e34625e2cb29bfd14bc0ecf3fce46c

Tested-by: default avatarjenkins <>
Tested-by: default avatarMaloo <>
Reviewed-by: default avatarAndreas Dilger <>
Reviewed-by: default avatarHongchao Zhang <>
Reviewed-by: default avatarOleg Drokin <>
parent b2e73f26
......@@ -1569,6 +1569,10 @@ lmv_locate_tgt_by_name(struct lmv_obd *lmv, struct lmv_stripe_md *lsm,
return ERR_CAST(oinfo);
/* check stripe FID is sane */
if (!fid_is_sane(&oinfo->lmo_fid))
return ERR_PTR(-ENODEV);
*fid = oinfo->lmo_fid;
*mds = oinfo->lmo_mds;
tgt = lmv_tgt(lmv, oinfo->lmo_mds);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment