From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: NeilBrown <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
torvalds@linux-foundation.org, stable@vger.kernel.org,
lwn@lwn.net, jslaby@suse.cz
Subject: Re: Linux 6.1.58
Date: Fri, 20 Oct 2023 16:22:53 +0200 [thread overview]
Message-ID: <2023102016-wanted-trash-a8c8@gregkh> (raw)
In-Reply-To: <169778656748.20306.1670865069010793541@noble.neil.brown.name>
On Fri, Oct 20, 2023 at 06:22:47PM +1100, NeilBrown wrote:
> On Mon, 16 Oct 2023, Greg Kroah-Hartman wrote:
> > I'm announcing the release of the 6.1.58 kernel.
> >
> > All users of the 6.1 kernel series must upgrade.
> >
> > The updated 6.1.y git tree can be found at:
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
> > and can be browsed at the normal kernel.org git web browser:
> > https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
> >
> > thanks,
> >
> > greg k-h
> >
> > ------------
> >
> > Makefile | 2
> > fs/nfs/direct.c | 134 ++++++++++++++---------------------------------
> > fs/nfs/write.c | 23 +++-----
> > include/linux/nfs_page.h | 4 -
> > lib/test_meminit.c | 2
> > 5 files changed, 55 insertions(+), 110 deletions(-)
> >
> > Greg Kroah-Hartman (7):
> > Revert "NFS: More fixes for nfs_direct_write_reschedule_io()"
> > Revert "NFS: Use the correct commit info in nfs_join_page_group()"
> > Revert "NFS: More O_DIRECT accounting fixes for error paths"
> > Revert "NFS: Fix O_DIRECT locking issues"
> > Revert "NFS: Fix error handling for O_DIRECT write scheduling"
>
> FYI the problem with these NFS patch is now described in comment #4 of
> https://bugzilla.kernel.org/show_bug.cgi?id=217999
> which I include below. They can be reapplied if the "Fix error
> handling..." patch is fixed up as described.
>
> NeilBrown
>
> FYI the cause of this corruption is that the backport of
> NFS: Fix error handling for O_DIRECT write scheduling
>
> had an error.
> The backported patch f16fd0b11f0f4d41846b5102b1656ea1fc9ac7a0
> moves "pos += req_len" in nfs_direct_write_schedule_iovec() from after
> req->wb_index = pos >> PAGE_SHIFT;
> to before that statement. This ->wb_index is wrong.
> Possibly a better way to look at this is the use of "pos" is moved to *after* it is updated.
>
> The upstream patch 954998b60caa8f2a3bf3abe490de6f08d283687a
> doesn't move the use of pos because
> Commit 70e9db69f927 ("NFS: Clean up O_DIRECT request allocation")
>
> removes the use.
>
> v6.1.56 can be fixed with
>
> diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
> index 5a976fa343df..69134e11e7d0 100644
> --- a/fs/nfs/direct.c
> +++ b/fs/nfs/direct.c
> @@ -864,6 +864,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
> result = PTR_ERR(req);
> break;
> }
> + req->wb_index = pos >> PAGE_SHIFT;
> + req->wb_offset = pos & ~PAGE_MASK;
>
> if (desc.pg_error < 0) {
> nfs_free_request(req);
> @@ -883,8 +885,6 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
> }
>
> nfs_lock_request(req);
> - req->wb_index = pos >> PAGE_SHIFT;
> - req->wb_offset = pos & ~PAGE_MASK;
> if (nfs_pageio_add_request(&desc, req))
> continue;
Nice, thanks for digging into this. I think I'll leave this be for now,
until someone submits a fully backported, and tested, series that they
are willing to say actually works :)
thanks,
greg k-h
prev parent reply other threads:[~2023-10-20 14:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-15 16:43 Linux 6.1.58 Greg Kroah-Hartman
2023-10-15 16:43 ` Greg Kroah-Hartman
2023-10-20 7:22 ` NeilBrown
2023-10-20 14:22 ` Greg Kroah-Hartman [this message]
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=2023102016-wanted-trash-a8c8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=lwn@lwn.net \
--cc=neilb@suse.de \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.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