orangefs: adjust counting code to recover from 665575cf
PATCH 1/1 orangefs: adjust counting code to recover from 665575cf
From: Mike Marshall <[email protected]>
A late commit to 6.14-rc7 (665575cf) broke orangefs. I made a patch that fixes orangefs in 6.15, but some pagecache/folio code got pulled into 6.15 that causes my 6.15 patch not to apply to 6.14. Here is a tested 6.14 flavored patch that was never upstream that I hope can get applied to 6.14-stable...
--- fs/orangefs/inode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
fs/orangefs/inode.c +5 -4
@@ -32,12 +32,13 @@ static int orangefs_writepage_locked(struct page *page, len =i_size_read (inode);if (PagePrivate (page)) { wr = (struct orangefs_write_range *)page_private (page); -WARN_ON (wr->pos >= len); off = wr->pos; -if (off + wr->len > len) +if ((off + wr->len > len) && (off <= len)) wlen = len - off;else wlen = wr->len; +if (wlen ==0 ) + wlen = wr->len; }else {WARN_ON (1 ); off =page_offset (page);
@@ -46,8 +47,6 @@ static int orangefs_writepage_locked(struct page *page,else wlen =PAGE_SIZE ; } -/* Should've been handled in orangefs_invalidate_folio. */ -WARN_ON (off == len || off + wlen > len);WARN_ON (wlen ==0 );bvec_set_page (&bv, page, wlen, off %PAGE_SIZE );
@@ -341,6 +340,8 @@ static int orangefs_write_begin(struct file *file, wr->len += len; goto okay; }else { + wr->pos = pos; + wr->len = len; ret =orangefs_launder_folio (folio);if (ret)return ret;
Signature · 1 line
2.49.0
Greg KH
maintainerQuoted 7 lines · On Wed, Jun 04, 2025 at 10:34:02AM -0400, [email protected] wrote:
From: Mike Marshall <[email protected]>
A late commit to 6.14-rc7 (
665575cf) broke orangefs. I made a patch that fixes orangefs in 6.15, but some pagecache/folio code got pulled into 6.15 that causes my 6.15 patch not to apply to 6.14. Here is a tested 6.14 flavored patch that was never upstream that I hope can get applied to 6.14-stable...
Can you make a real changelog saying what this is, AND provide a signed-off-by line like a normal patch? As is, I can't take this (nor would you want me to...)
thanks,
greg k-h