All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, poester <poester@internetbrands.com>,
	"Daniel Díaz" <daniel.diaz@linaro.org>,
	"Trond Myklebust" <trond.myklebust@hammerspace.com>,
	"Anna Schumaker" <Anna.Schumaker@Netapp.com>,
	"Sasha Levin" <sashal@kernel.org>
Subject: [PATCH 6.1 2/6] Revert "NFS: Use the correct commit info in nfs_join_page_group()"
Date: Thu, 12 Oct 2023 20:00:44 +0200	[thread overview]
Message-ID: <20231012180030.188151985@linuxfoundation.org> (raw)
In-Reply-To: <20231012180030.112560642@linuxfoundation.org>

6.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This reverts commit d4729af1c73cfacb64facda3d196e25940f0e7a5 which is
commit b193a78ddb5ee7dba074d3f28dc050069ba083c0 upstream.

There are reported NFS problems in the 6.1.56 release, so revert a set
of NFS patches to hopefully resolve the issue.

Reported-by: poester <poester@internetbrands.com>
Link: https://lore.kernel.org/r/20231012165439.137237-2-kernel@linuxace.com
Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
Link: https://lore.kernel.org/r/2023100755-livestock-barcode-fe41@gregkh
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/nfs/direct.c          |    8 +++-----
 fs/nfs/write.c           |   23 +++++++++++------------
 include/linux/nfs_page.h |    4 +---
 3 files changed, 15 insertions(+), 20 deletions(-)

--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -500,9 +500,7 @@ static void nfs_direct_add_page_head(str
 	kref_get(&head->wb_kref);
 }
 
-static void nfs_direct_join_group(struct list_head *list,
-				  struct nfs_commit_info *cinfo,
-				  struct inode *inode)
+static void nfs_direct_join_group(struct list_head *list, struct inode *inode)
 {
 	struct nfs_page *req, *subreq;
 
@@ -524,7 +522,7 @@ static void nfs_direct_join_group(struct
 				nfs_release_request(subreq);
 			}
 		} while ((subreq = subreq->wb_this_page) != req);
-		nfs_join_page_group(req, cinfo, inode);
+		nfs_join_page_group(req, inode);
 	}
 }
 
@@ -549,7 +547,7 @@ static void nfs_direct_write_reschedule(
 	nfs_init_cinfo_from_dreq(&cinfo, dreq);
 	nfs_direct_write_scan_commit_list(dreq->inode, &reqs, &cinfo);
 
-	nfs_direct_join_group(&reqs, &cinfo, dreq->inode);
+	nfs_direct_join_group(&reqs, dreq->inode);
 
 	nfs_clear_pnfs_ds_commit_verifiers(&dreq->ds_cinfo);
 	get_dreq(dreq);
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -58,8 +58,7 @@ static const struct nfs_pgio_completion_
 static const struct nfs_commit_completion_ops nfs_commit_completion_ops;
 static const struct nfs_rw_ops nfs_rw_write_ops;
 static void nfs_inode_remove_request(struct nfs_page *req);
-static void nfs_clear_request_commit(struct nfs_commit_info *cinfo,
-				     struct nfs_page *req);
+static void nfs_clear_request_commit(struct nfs_page *req);
 static void nfs_init_cinfo_from_inode(struct nfs_commit_info *cinfo,
 				      struct inode *inode);
 static struct nfs_page *
@@ -503,8 +502,8 @@ nfs_destroy_unlinked_subrequests(struct
  * the (former) group.  All subrequests are removed from any write or commit
  * lists, unlinked from the group and destroyed.
  */
-void nfs_join_page_group(struct nfs_page *head, struct nfs_commit_info *cinfo,
-			 struct inode *inode)
+void
+nfs_join_page_group(struct nfs_page *head, struct inode *inode)
 {
 	struct nfs_page *subreq;
 	struct nfs_page *destroy_list = NULL;
@@ -534,7 +533,7 @@ void nfs_join_page_group(struct nfs_page
 	 * Commit list removal accounting is done after locks are dropped */
 	subreq = head;
 	do {
-		nfs_clear_request_commit(cinfo, subreq);
+		nfs_clear_request_commit(subreq);
 		subreq = subreq->wb_this_page;
 	} while (subreq != head);
 
@@ -568,10 +567,8 @@ nfs_lock_and_join_requests(struct page *
 {
 	struct inode *inode = page_file_mapping(page)->host;
 	struct nfs_page *head;
-	struct nfs_commit_info cinfo;
 	int ret;
 
-	nfs_init_cinfo_from_inode(&cinfo, inode);
 	/*
 	 * A reference is taken only on the head request which acts as a
 	 * reference to the whole page group - the group will not be destroyed
@@ -588,7 +585,7 @@ nfs_lock_and_join_requests(struct page *
 		return ERR_PTR(ret);
 	}
 
-	nfs_join_page_group(head, &cinfo, inode);
+	nfs_join_page_group(head, inode);
 
 	return head;
 }
@@ -959,16 +956,18 @@ nfs_clear_page_commit(struct page *page)
 }
 
 /* Called holding the request lock on @req */
-static void nfs_clear_request_commit(struct nfs_commit_info *cinfo,
-				     struct nfs_page *req)
+static void
+nfs_clear_request_commit(struct nfs_page *req)
 {
 	if (test_bit(PG_CLEAN, &req->wb_flags)) {
 		struct nfs_open_context *ctx = nfs_req_openctx(req);
 		struct inode *inode = d_inode(ctx->dentry);
+		struct nfs_commit_info cinfo;
 
+		nfs_init_cinfo_from_inode(&cinfo, inode);
 		mutex_lock(&NFS_I(inode)->commit_mutex);
-		if (!pnfs_clear_request_commit(req, cinfo)) {
-			nfs_request_remove_commit_list(req, cinfo);
+		if (!pnfs_clear_request_commit(req, &cinfo)) {
+			nfs_request_remove_commit_list(req, &cinfo);
 		}
 		mutex_unlock(&NFS_I(inode)->commit_mutex);
 		nfs_clear_page_commit(req->wb_page);
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -145,9 +145,7 @@ extern	void nfs_unlock_request(struct nf
 extern	void nfs_unlock_and_release_request(struct nfs_page *);
 extern	struct nfs_page *nfs_page_group_lock_head(struct nfs_page *req);
 extern	int nfs_page_group_lock_subrequests(struct nfs_page *head);
-extern void nfs_join_page_group(struct nfs_page *head,
-				struct nfs_commit_info *cinfo,
-				struct inode *inode);
+extern	void nfs_join_page_group(struct nfs_page *head, struct inode *inode);
 extern int nfs_page_group_lock(struct nfs_page *);
 extern void nfs_page_group_unlock(struct nfs_page *);
 extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int);



  parent reply	other threads:[~2023-10-12 18:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 18:00 [PATCH 6.1 0/6] 6.1.58-rc1 review Greg Kroah-Hartman
2023-10-12 18:00 ` [PATCH 6.1 1/6] Revert "NFS: More fixes for nfs_direct_write_reschedule_io()" Greg Kroah-Hartman
2023-10-12 18:00 ` Greg Kroah-Hartman [this message]
2023-10-12 18:00 ` [PATCH 6.1 3/6] Revert "NFS: More O_DIRECT accounting fixes for error paths" Greg Kroah-Hartman
2023-10-12 18:00 ` [PATCH 6.1 4/6] Revert "NFS: Fix O_DIRECT locking issues" Greg Kroah-Hartman
2023-10-12 18:00 ` [PATCH 6.1 5/6] Revert "NFS: Fix error handling for O_DIRECT write scheduling" Greg Kroah-Hartman
2023-10-12 18:00 ` [PATCH 6.1 6/6] lib/test_meminit: fix off-by-one error in test_pages() Greg Kroah-Hartman
2023-10-12 18:43 ` [PATCH 6.1 0/6] 6.1.58-rc1 review Florian Fainelli
2023-10-12 20:12 ` Pavel Machek
2023-10-13  2:33 ` Guenter Roeck
2023-10-13  5:31 ` Bagas Sanjaya
2023-10-13 12:15 ` Takeshi Ogasawara
2023-10-13 13:10 ` Ron Economos
2023-10-13 13:15 ` Ricardo B. Marliere
2023-10-13 16:53 ` Naresh Kamboju
2023-10-13 16:53   ` [LTP] " Naresh Kamboju

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=20231012180030.188151985@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=Anna.Schumaker@Netapp.com \
    --cc=daniel.diaz@linaro.org \
    --cc=patches@lists.linux.dev \
    --cc=poester@internetbrands.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /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.