Whamcloud - gitweb
LU-14042 llite: don't check layout info for page discard 67/40267/3
authorBobi Jam <bobijam@whamcloud.com>
Fri, 16 Oct 2020 11:44:25 +0000 (19:44 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 9 Dec 2020 17:39:54 +0000 (17:39 +0000)
The CIT_MISC+ignore_layout is indicating locks/pages manipulation
from the OSC layer, it does not care/access lov layout related info.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ibdf22f0d47712d370385af4c6c984052b91fc7c6
Reviewed-on: https://review.whamcloud.com/40267
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
lustre/lov/lov_io.c

index 152984e..d8aed58 100644 (file)
@@ -478,8 +478,6 @@ static int lov_io_slice_init(struct lov_io *lio,
        io->ci_result = 0;
        lio->lis_object = obj;
 
-       LASSERT(obj->lo_lsm != NULL);
-
        switch (io->ci_type) {
        case CIT_READ:
        case CIT_WRITE:
@@ -565,6 +563,15 @@ static int lov_io_slice_init(struct lov_io *lio,
                LBUG();
        }
 
+       /*
+        * CIT_MISC + ci_ignore_layout can identify the I/O from the OSC layer,
+        * it won't care/access lov layout related info.
+        */
+       if (io->ci_ignore_layout && io->ci_type == CIT_MISC)
+               GOTO(out, result = 0);
+
+       LASSERT(obj->lo_lsm != NULL);
+
        result = lov_io_mirror_init(lio, obj, io);
        if (result)
                GOTO(out, result);