Re: Linux 6.1.58

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux