From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>, <stable@vger.kernel.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 5.4/5.10/5.15] nfs: Leave pages in the pagecache if readpage failed
Date: Wed, 26 Jun 2024 11:46:14 -0700 [thread overview]
Message-ID: <20240626184614.80363-1-kuniyu@amazon.com> (raw)
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
commit 0b768a9610c6de9811c6d33900bebfb665192ee1 upstream
The pagecache handles readpage failing by itself; it doesn't want
filesystems to remove pages from under it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
When NFS server returns NFS4ERR_SERVERFAULT, the client returned
Remote I/O error immediately on 4.14 and 6.1, but on 5.4/5.10/5.15,
the client retries forever and get stuck until userspace aborts it.
The patch fixed the issue but did not have Fixes: tag.
Please backport this to 5.4/5.10/5.15.
---
fs/nfs/read.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 08d6cc57cbc3..b02372ec07a5 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -120,12 +120,8 @@ static void nfs_readpage_release(struct nfs_page *req, int error)
if (nfs_error_is_fatal_on_server(error) && error != -ETIMEDOUT)
SetPageError(page);
if (nfs_page_group_sync_on_bit(req, PG_UNLOCKPAGE)) {
- struct address_space *mapping = page_file_mapping(page);
-
if (PageUptodate(page))
nfs_readpage_to_fscache(inode, page, 0);
- else if (!PageError(page) && !PagePrivate(page))
- generic_error_remove_page(mapping, page);
unlock_page(page);
}
nfs_release_request(req);
--
2.30.2
next reply other threads:[~2024-06-26 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 18:46 Kuniyuki Iwashima [this message]
2024-07-02 9:10 ` [PATCH 5.4/5.10/5.15] nfs: Leave pages in the pagecache if readpage failed Greg Kroah-Hartman
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=20240626184614.80363-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=gregkh@linuxfoundation.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox