Whamcloud - gitweb
LU-14192 mdt: check for overstriping correctly 96/40896/3
authorVitaly Fertman <c17818@cray.com>
Mon, 19 Oct 2020 20:46:15 +0000 (23:46 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Dec 2020 05:28:26 +0000 (05:28 +0000)
check for overstriping in the first component as well

HPE-bug-id: LUS-9430
Signed-off-by: Vitaly Fertman <c17818@cray.com>
Change-Id: Ice125b885681b0cf71dc55c5238c4c4d7d7bb970
Reviewed-on: https://es-gerrit.dev.cray.com/157999
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-on: https://review.whamcloud.com/40896
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_internal.h

index a106e45..15ad740 100644 (file)
@@ -747,7 +747,7 @@ static inline bool mdt_lmm_comp_overstriping(struct lov_mds_md *lmm)
 
        comp_v1 = (struct lov_comp_md_v1 *)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);
 
                off = le32_to_cpu(comp_v1->lcm_entries[i].lcme_offset);
                v1 = (struct lov_mds_md *)((char *)comp_v1 + off);