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 <lai.siyao@whamcloud.com>
Change-Id: I7ed8c7c561e34625e2cb29bfd14bc0ecf3fce46c
Reviewed-on: https://review.whamcloud.com/38560

Tested-by: default avatarjenkins <devops@whamcloud.com>
Tested-by: default avatarMaloo <maloo@whamcloud.com>
Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Reviewed-by: default avatarHongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
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