From: Patrick Farrell Date: Sun, 24 Sep 2023 20:59:41 +0000 (-0400) Subject: LU-13814 osc: clarify osc_transfer_pinned usage X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F52139%2F19;p=fs%2Flustre-release.git 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. Test-Parameters: fortestonly Test-Parameters: forjanitoronly Signed-off-by: Patrick Farrell Change-Id: I48f0da5f3cede5af04770c64077bbe7475623881 --- diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 38da575..3440eb1 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -1308,16 +1308,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;