From 5d1ffc65d5a97c7b3a5597267c5682498c87a5da Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Fri, 16 Oct 2020 19:44:25 +0800 Subject: [PATCH] LU-14042 llite: don't check layout info for page discard 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 Change-Id: Ibdf22f0d47712d370385af4c6c984052b91fc7c6 Reviewed-on: https://review.whamcloud.com/40267 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Yingjin Qian --- lustre/lov/lov_io.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index 152984e..d8aed58 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -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); -- 1.8.3.1