Whamcloud - gitweb
LU-13814 osc: clarify osc_transfer_pinned usage 39/52139/33
authorPatrick Farrell <pfarrell@whamcloud.com>
Sun, 25 Feb 2024 18:06:15 +0000 (13:06 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 May 2025 05:16:27 +0000 (05:16 +0000)
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 <pfarrell@whamcloud.com>
Change-Id: I48f0da5f3cede5af04770c64077bbe7475623881
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52139
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osc/osc_cache.c

index 8078d57..5397c0a 100644 (file)
@@ -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;