From d4423d064ca146ae56e549a650bf183f378f605a Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 23 Aug 2023 14:53:53 -0400 Subject: [PATCH] LU-13814 osc: skip lru_add for transient pages Transient pages do not go in the LRU, so don't bother trying to add them. Signed-off-by: Patrick Farrell Change-Id: I90e3cca2229e1ae7d769c0534b5b6e0be2357ad9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52070 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger --- lustre/osc/osc_cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index a40e0b4..4d8df52 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -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); -- 1.8.3.1