Whamcloud - gitweb
LU-13814 osc: skip lru_add for transient pages 70/52070/8
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 23 Aug 2023 18:53:53 +0000 (14:53 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Sun, 17 Sep 2023 18:10:48 +0000 (14:10 -0400)
Transient pages do not go in the LRU, so don't bother
trying to add them.

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

lustre/osc/osc_cache.c

index 202ce7b..bf58657 100644 (file)
@@ -845,7 +845,10 @@ int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext,
        ext->oe_rc = rc ?: ext->oe_nr_pages;
        EASSERT(ergo(rc == 0, ext->oe_state == OES_RPC), ext);
 
-       osc_lru_add_batch(cli, &ext->oe_pages);
+       /* dio pages do not go in the LRU */
+       if (!ext->oe_dio)
+               osc_lru_add_batch(cli, &ext->oe_pages);
+
        list_for_each_entry_safe(oap, tmp, &ext->oe_pages,
                                     oap_pending_item) {
                list_del_init(&oap->oap_rpc_item);