From: Vitaly Fertman Date: Mon, 19 Oct 2020 20:46:15 +0000 (+0300) Subject: LU-14192 mdt: check for overstriping correctly X-Git-Tag: 2.14.0-RC1~45 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a4d77005308e78868c06ca2bec81e5d36bb93c5f LU-14192 mdt: check for overstriping correctly check for overstriping in the first component as well HPE-bug-id: LUS-9430 Signed-off-by: Vitaly Fertman Change-Id: Ice125b885681b0cf71dc55c5238c4c4d7d7bb970 Reviewed-on: https://es-gerrit.dev.cray.com/157999 Reviewed-by: Andriy Skulysh Tested-by: Elena Gryaznova Reviewed-by: Alexander Zarochentsev Reviewed-on: https://review.whamcloud.com/40896 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Alexander Zarochentsev Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index a106e45..15ad740 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -747,7 +747,7 @@ static inline bool mdt_lmm_comp_overstriping(struct lov_mds_md *lmm) comp_v1 = (struct lov_comp_md_v1 *)lmm; - for (i = 1; i < le16_to_cpu(comp_v1->lcm_entry_count); i++) { + for (i = 0; i < le16_to_cpu(comp_v1->lcm_entry_count); i++) { off = le32_to_cpu(comp_v1->lcm_entries[i].lcme_offset); v1 = (struct lov_mds_md *)((char *)comp_v1 + off);