Whamcloud - gitweb
LU-13473 llite: don't check mirror info for page discard 56/38856/2
authorBobi Jam <bobijam@whamcloud.com>
Wed, 22 Apr 2020 05:28:54 +0000 (13:28 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jul 2020 07:28:27 +0000 (07:28 +0000)
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.

Lustre-change: https://review.whamcloud.com/38307
Lustre-commit: d0dd744ed6ae002f34bdade993428b635b23d072

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I723d18260629b8f7c470d350d6d899d3bb88018a
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/38856
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 8900e79..8cc3c9e 100644 (file)
@@ -318,8 +318,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);
        }