nfs: drop the incorrect assertion in nfs_swap_rw()
Subsystems (6)
PATCH v2 1/1 nfs: drop the incorrect assertion in nfs_swap_rw()
From: Christoph Hellwig <[email protected]>
Since commit 2282679fb20b ("mm: submit multipage write for SWP_FS_OPS swap-space"), we can plug multiple pages then unplug them all together. That means iov_iter_count(iter) could be way bigger than PAGE_SIZE, it actually equals the size of iov_iter_npages(iter, INT_MAX).
Note this issue has nothing to do with large folios as we don't support THP_SWPOUT to non-block devices.
--- fs/nfs/direct.c | 2 -- 1 file changed, 2 deletions(-)
fs/nfs/direct.c +0 -2
@@ -141,8 +141,6 @@ int nfs_swap_rw(struct kiocb *iocb, struct iov_iter *iter) {ssize_t ret; -VM_BUG_ON (iov_iter_count (iter) !=PAGE_SIZE ); -if (iov_iter_rw (iter) ==READ ) ret =nfs_file_direct_read (iocb, iter, true);else
Signature · 1 line
2.34.1
fs/nfs/direct.c
Quoted 37 lines · Barry Song
From: Christoph Hellwig <[email protected]>
Since commit
2282679fb20b("mm: submit multipage write forSWP_FS_OPSswap-space"), we can plug multiple pages then unplug them all together. That meansiov_iter_count(iter)could be way bigger thanPAGE_SIZE, it actually equals the size ofiov_iter_npages(iter, INT_MAX).Note this issue has nothing to do with large folios as we don't support
THP_SWPOUTto non-block devices.Fixes 2282679fb20b ("mm: submit multipage write for SWP_FS_OPS swap-space")Reported-by Christoph Hellwig <[email protected]>Cc NeilBrown <[email protected]>Cc Anna Schumaker <[email protected]>Cc Steve French <[email protected]>Cc Trond Myklebust <[email protected]>Cc Chuanhua Han <[email protected]>Cc Ryan Roberts <[email protected]>Cc Chris Li <[email protected]>Cc "Huang, Ying" <[email protected]>Cc Jeff Layton <[email protected]>Cc <[email protected]>Cc Matthew Wilcox <[email protected]>Cc Martin Wege <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>[Barry: figure out the cause and correct the commit message]Signed-off-by Barry Song <[email protected]>--- fs/nfs/direct.c | 2 -- 1 file changed, 2 deletions(-)fs/nfs/direct.c +0
-0
Please add a
Thanks,
Martin
Quoted 4 lines · Barry Song
Fixes 2282679fb20b ("mm: submit multipage write for SWP_FS_OPS swap-space")Reported-by Christoph Hellwig <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
A reported-by for the credited patch author doesn't make sense.
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Barry Song
Fixes 2282679fb20b ("mm: submit multipage write for SWP_FS_OPS swap-space")Reported-by Christoph Hellwig <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>A reported-by for the credited patch author doesn't make sense.
Andrew, could you help remove the "reported-by" in the commit log? Alternatively, would you prefer that I send a v3 to drop the "reported-by"?
Quoted 1 line
Andrew Morton
maintainerQuoted 6 lines · On Wed, 19 Jun 2024 17:34:27 +1200 Barry Song <[email protected]> wrote:
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Barry Song
Fixes 2282679fb20b ("mm: submit multipage write for SWP_FS_OPS swap-space")Reported-by Christoph Hellwig <[email protected]>
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>A reported-by for the credited patch author doesn't make sense.
Andrew, could you help remove the "reported-by" in the commit log? Alternatively, would you prefer that I send a v3 to drop the "reported-by"?
I made that edit.