Linux 6.1.58
Greg Kroah-Hartman
maintainerI'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" lib/test_meminit: fix off-by-one error in test_pages() Linux 6.1.58
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 57 +SUBLEVEL = 58 EXTRAVERSION = NAME = Curry Ramen
fs/nfs/direct.c +41 -93
253 lines not on this page · raw message
fs/nfs/write.c +11 -12
@@ -58,8 +58,7 @@ static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops;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 nfs_page *destroy_list,* 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 *head, struct nfs_commit_info *cinfo,* 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 *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 *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);
include/linux/nfs_page.h +1 -3
@@ -145,9 +145,7 @@ extern void nfs_unlock_request(struct nfs_page *req);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 );
lib/test_meminit.c +1 -1
@@ -93,7 +93,7 @@ static int __init test_pages(int *total_failures)int failures =0 , num_tests =0 ;int i; -for (i =0 ; i <=MAX_ORDER ; i++) +for (i =0 ; i <MAX_ORDER ; i++) num_tests +=do_alloc_pages_order (i, &failures);REPORT_FAILURES_IN_FN ();
Quoted 22 lines · Greg Kroah-Hartman
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.gitlinux-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=summarythanks,
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(-)
Quoted 6 lines
Greg Kroah-Hartman (7):
Revert "NFS: More fixes fornfs_direct_write_reschedule_io()" Revert "NFS: Use the correct commit info innfs_join_page_group()" Revert "NFS: MoreO_DIRECTaccounting fixes for error paths" Revert "NFS: FixO_DIRECTlocking issues"
Revert "NFS: Fix error handling forO_DIRECTwrite 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
fs/nfs/direct.c +2 -2
@@ -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 ;
Greg Kroah-Hartman
maintainerQuoted 69 lines · NeilBrown
Quoted 22 lines · Greg Kroah-Hartman
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.gitlinux-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=summarythanks,
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(-)Quoted 6 lines
Greg Kroah-Hartman (7):
Revert "NFS: More fixes fornfs_direct_write_reschedule_io()" Revert "NFS: Use the correct commit info innfs_join_page_group()" Revert "NFS: MoreO_DIRECTaccounting fixes for error paths" Revert "NFS: FixO_DIRECTlocking issues"
Revert "NFS: Fix error handling forO_DIRECTwrite 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 forO_DIRECTwrite schedulinghad an error.
The backported patchf16fd0b11f0f4d41846b5102b1656ea1fc9ac7a0moves "pos +=req_len" innfs_direct_write_schedule_iovec()from afterreq->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
954998b60caa8f2a3bf3abe490de6f08d283687adoesn't move the use of pos because
Commit70e9db69f927("NFS: Clean upO_DIRECTrequest allocation")removes the use.
v6.1.56 can be fixed with
fs/nfs/direct.c +2
-0@@ -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);
fs/nfs/direct.c static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq, · line 889
Quoted 7 lines
fs/nfs/direct.c +0
-2@@ -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