aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2023-10-12 19:41:37 +0200
committerGreg Kroah-Hartman2023-10-15 18:32:41 +0200
commite8db8b55815d84447662d7a1bd3ce515b02179ef (patch)
tree4cc34e002fd20929c146e9ec1c605a8503e89573 /fs/nfs/direct.c
parent082280fe94a09462c727fb6e7b0c982efb36dede (diff)
Revert "NFS: More fixes for nfs_direct_write_reschedule_io()"
This reverts commit edd1f06145101dab83497806bb6162641255ef50 which is commit b11243f720ee5f9376861099019c8542969b6318 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>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r--fs/nfs/direct.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 5a976fa343df..04ebe9633630 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -782,23 +782,18 @@ static void nfs_write_sync_pgio_error(struct list_head *head, int error)
static void nfs_direct_write_reschedule_io(struct nfs_pgio_header *hdr)
{
struct nfs_direct_req *dreq = hdr->dreq;
- struct nfs_page *req;
- struct nfs_commit_info cinfo;
trace_nfs_direct_write_reschedule_io(dreq);
- nfs_init_cinfo_from_dreq(&cinfo, dreq);
spin_lock(&dreq->lock);
- if (dreq->error == 0)
+ if (dreq->error == 0) {
dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
- set_bit(NFS_IOHDR_REDO, &hdr->flags);
- spin_unlock(&dreq->lock);
- while (!list_empty(&hdr->pages)) {
- req = nfs_list_entry(hdr->pages.next);
- nfs_list_remove_request(req);
- nfs_unlock_request(req);
- nfs_mark_request_commit(req, NULL, &cinfo, 0);
+ /* fake unstable write to let common nfs resend pages */
+ hdr->verf.committed = NFS_UNSTABLE;
+ hdr->good_bytes = hdr->args.offset + hdr->args.count -
+ hdr->io_start;
}
+ spin_unlock(&dreq->lock);
}
static const struct nfs_pgio_completion_ops nfs_direct_write_completion_ops = {