Whamcloud - gitweb
LU-13814 osc: do not call osc_lru_use for transient 87/52087/10
authorPatrick Farrell <pfarrell@whamcloud.com>
Sun, 17 Sep 2023 19:02:00 +0000 (15:02 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Sun, 17 Sep 2023 19:02:00 +0000 (15:02 -0400)
Transient pages are never added to the LRU, because they
can't be cached.  osc_lru_use already skips them because
they don't have the flag set, but make it explicit that
this is not called for transient pages.

Test-Parameters: forjanitoronly
Test-Parameters: fortestonly
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I2c92ccb52380faefbcba3bfa35508dac2b601bd4

lustre/osc/osc_page.c

index 550cb22..d5f6482 100644 (file)
@@ -309,9 +309,10 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
        if (oio->oi_cap_sys_resource)
                oap->oap_brw_flags |= OBD_BRW_SYS_RESOURCE;
 
-       if (page->cp_type != CPT_TRANSIENT)
+       if (page->cp_type != CPT_TRANSIENT) {
                osc_page_transfer_get(opg, "transfer\0imm");
-       osc_lru_use(osc_cli(obj), opg);
+               osc_lru_use(osc_cli(obj), opg);
+       }
 }
 
 /* --------------- LRU page management ------------------ */