Whamcloud - gitweb
LU-13814 osc: clarify osc_transfer_pinned usage 39/52139/19
authorPatrick Farrell <pfarrell@whamcloud.com>
Sun, 24 Sep 2023 20:59:41 +0000 (16:59 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Tue, 26 Sep 2023 18:58:30 +0000 (14:58 -0400)
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 <pfarrell@whamcloud.com>
Change-Id: I48f0da5f3cede5af04770c64077bbe7475623881

lustre/osc/osc_cache.c

index 38da575..3440eb1 100644 (file)
@@ -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;