From fc9adb3e8f01cd3e880e2d0e18f50e44fa445a4f Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Sun, 25 Feb 2024 13:06:15 -0500 Subject: [PATCH] LU-13814 osc: clarify osc_transfer_pinned usage osc_transfer_pinned is not used for transient pages, so don't clear it for them either. This is part of a process of cleaning up DIO page submission by truly specializing it for DIO pages. Signed-off-by: Patrick Farrell Change-Id: I48f0da5f3cede5af04770c64077bbe7475623881 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52139 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Marc Vef Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- lustre/osc/osc_cache.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 8078d57..5397c0a 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -1299,16 +1299,18 @@ static int osc_completion(const struct lu_env *env, struct osc_object *osc, cmd &= ~OBD_BRW_NOQUOTA; if (cptype != CPT_TRANSIENT) { - LASSERTF(equi(page->cp_state == CPS_PAGEIN, cmd == OBD_BRW_READ), + LASSERTF(equi(page->cp_state == CPS_PAGEIN, + cmd == OBD_BRW_READ), "cp_state:%u, cmd:%d\n", page->cp_state, cmd); - LASSERTF(equi(page->cp_state == CPS_PAGEOUT, cmd == OBD_BRW_WRITE), + LASSERTF(equi(page->cp_state == CPS_PAGEOUT, + cmd == OBD_BRW_WRITE), "cp_state:%u, cmd:%d\n", page->cp_state, cmd); LASSERT(opg->ops_transfer_pinned); + /* Clear opg->ops_transfer_pinned before VM lock is released.*/ + opg->ops_transfer_pinned = 0; } crt = cmd == OBD_BRW_READ ? CRT_READ : CRT_WRITE; - /* Clear opg->ops_transfer_pinned before VM lock is released. */ - opg->ops_transfer_pinned = 0; srvlock = oap->oap_brw_flags & OBD_BRW_SRVLOCK; -- 1.8.3.1