From: Bobi Jam Date: Wed, 8 Apr 2020 07:36:42 +0000 (+0800) Subject: LU-13429 lov: lov_io_sub_init()) ASSERTION X-Git-Tag: 2.13.54~137 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=53274fbd4bcf4f5b99f88a1651b661bd6333228b;p=fs%2Flustre-release.git LU-13429 lov: lov_io_sub_init()) ASSERTION The assertion is_index_within_mirror() in lov_io_sub_init() should only be applied for a FLR file, since a plain file does not initialize the relevant FLR fields of the layout structure. Signed-off-by: Bobi Jam Change-Id: I0d6ff505d789c76e7912aa08491146706b5316bc Reviewed-on: https://review.whamcloud.com/38169 Reviewed-by: Andreas Dilger Reviewed-by: Wang Shilong Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index 9f81d9b..76ed900 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -115,7 +115,9 @@ static int lov_io_sub_init(const struct lu_env *env, struct lov_io *lio, !lov_r0(lov, index)->lo_sub[stripe])) RETURN(-EIO); - LASSERTF(is_index_within_mirror(lov, index, lio->lis_mirror_index), + LASSERTF(ergo(lov_is_flr(lov), + is_index_within_mirror(lov, index, + lio->lis_mirror_index)), DFID "iot = %d, index = %d, mirror = %d\n", PFID(lu_object_fid(lov2lu(lov))), io->ci_type, index, lio->lis_mirror_index);