From: Bobi Jam Date: Wed, 22 Apr 2020 05:28:54 +0000 (+0800) Subject: LU-13473 llite: don't check mirror info for page discard X-Git-Tag: 2.13.55~163 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d0dd744ed6ae002f34bdade993428b635b23d072;p=fs%2Flustre-release.git LU-13473 llite: don't check mirror info for page discard The CIT_MISC is used for locks/pages manipulation, it will not go with full io procedure, i.e. cl_io_loop() will not be called for it. So don't check it for plain file since the mirror info is not initialized/set in this case. Signed-off-by: Bobi Jam Change-Id: I723d18260629b8f7c470d350d6d899d3bb88018a Reviewed-on: https://review.whamcloud.com/38307 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 747c72f..ef9e5bb 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -308,8 +308,13 @@ static int lov_io_mirror_init(struct lov_io *lio, struct lov_object *obj, ENTRY; if (!lov_is_flr(obj)) { - LASSERT(comp->lo_preferred_mirror == 0); - lio->lis_mirror_index = comp->lo_preferred_mirror; + /* only locks/pages are manipulated for CIT_MISC op, no + * cl_io_loop() will be called, don't check/set mirror info. + */ + if (io->ci_type != CIT_MISC) { + LASSERT(comp->lo_preferred_mirror == 0); + lio->lis_mirror_index = comp->lo_preferred_mirror; + } io->ci_ndelay = 0; RETURN(0); }