Whamcloud - gitweb
LU-13814 osc: skip lru_add for transient pages 70/52070/12
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 23 Aug 2023 18:53:53 +0000 (14:53 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Feb 2024 07:00:33 +0000 (07:00 +0000)
Transient pages do not go in the LRU, so don't bother
trying to add them.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I90e3cca2229e1ae7d769c0534b5b6e0be2357ad9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52070
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osc/osc_cache.c

index a40e0b4..4d8df52 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);