Whamcloud - gitweb
LU-13429 lov: lov_io_sub_init()) ASSERTION 69/38169/4
authorBobi Jam <bobijam@whamcloud.com>
Wed, 8 Apr 2020 07:36:42 +0000 (15:36 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:42:39 +0000 (05:42 +0000)
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 <bobijam@whamcloud.com>
Change-Id: I0d6ff505d789c76e7912aa08491146706b5316bc
Reviewed-on: https://review.whamcloud.com/38169
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_io.c

index 9f81d9b..76ed900 100644 (file)
@@ -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);