All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@gmail.com>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH RESEND 5/6] nfsd: Schedule the laundrette regularly irrespective of file errors
Date: Mon,  6 Jan 2020 13:18:07 -0500	[thread overview]
Message-ID: <20200106181808.562969-6-trond.myklebust@hammerspace.com> (raw)
In-Reply-To: <20200106181808.562969-5-trond.myklebust@hammerspace.com>

Emsure we schedule the laundrette even if the struct file is carrying
file errors.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfsd/filecache.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 6b0ab43b0618..4cef03a7726c 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -237,13 +237,6 @@ nfsd_file_check_write_error(struct nfsd_file *nf)
 	return filemap_check_wb_err(file->f_mapping, READ_ONCE(file->f_wb_err));
 }
 
-static bool
-nfsd_file_in_use(struct nfsd_file *nf)
-{
-	return nfsd_file_check_writeback(nf) ||
-			nfsd_file_check_write_error(nf);
-}
-
 static void
 nfsd_file_do_unhash(struct nfsd_file *nf)
 {
@@ -307,10 +300,9 @@ void
 nfsd_file_put(struct nfsd_file *nf)
 {
 	bool is_hashed = test_bit(NFSD_FILE_HASHED, &nf->nf_flags) != 0;
-	bool unused = !nfsd_file_in_use(nf);
 
 	set_bit(NFSD_FILE_REFERENCED, &nf->nf_flags);
-	if (nfsd_file_put_noref(nf) == 1 && is_hashed && unused)
+	if (nfsd_file_put_noref(nf) == 1 && is_hashed)
 		nfsd_file_schedule_laundrette();
 	if (atomic_long_read(&nfsd_filecache_count) >= NFSD_FILE_LRU_LIMIT)
 		nfsd_file_gc();
-- 
2.24.1


  reply	other threads:[~2020-01-06 18:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 18:18 [PATCH RESEND 0/6] Improve performance of containerised knfsd Trond Myklebust
2020-01-06 18:18 ` [PATCH RESEND 1/6] nfsd: fix filecache lookup Trond Myklebust
2020-01-06 18:18   ` [PATCH RESEND 2/6] nfsd: cleanup nfsd_file_lru_dispose() Trond Myklebust
2020-01-06 18:18     ` [PATCH RESEND 3/6] nfsd: Containerise filecache laundrette Trond Myklebust
2020-01-06 18:18       ` [PATCH RESEND 4/6] nfsd: Remove unused constant NFSD_FILE_LRU_RESCAN Trond Myklebust
2020-01-06 18:18         ` Trond Myklebust [this message]
2020-01-06 18:18           ` [PATCH RESEND 6/6] nfsd: Reduce the number of calls to nfsd_file_gc() Trond Myklebust
2020-01-21 21:28   ` [PATCH RESEND 1/6] nfsd: fix filecache lookup J. Bruce Fields
2020-01-21 23:07     ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106181808.562969-6-trond.myklebust@hammerspace.com \
    --to=trondmy@gmail.com \
    --cc=bfields@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.