From 38f6da4324cdd1ddaa2a4f6eb30f2d6b986b8171 Mon Sep 17 00:00:00 2001 From: Vladimir Saveliev Date: Wed, 5 Sep 2012 15:43:24 +0400 Subject: [PATCH] LU-1878 llite: do not shrink busy pages llap_shrink_cache_internail() used to avoid shrinking of dirty pages and pages being written. This patch makes it to also avoid shrinking pages which are in use. Signed-off-by: Vladimir Saveliev Change-Id: I4dadfd115df28735a0d0057b755a848aaf2dad39 --- lustre/llite/rw.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 1709c08..22f4659 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -619,7 +619,9 @@ static inline int llap_shrink_cache_internal(struct ll_sb_info *sbi, (__u64)page->index << CFS_PAGE_SHIFT, ((__u64)page->index << CFS_PAGE_SHIFT)| ~CFS_PAGE_MASK); - if (!PageDirty(page) && !page_mapped(page)) { + if (!PageDirty(page) && !page_mapped(page) && + page_count(page) == 3) { /* pagecache + private + + * caller's ref */ ll_ra_accounting(llap, page->mapping); truncate_complete_page(page->mapping, page); ++count; -- 1.6.5.6