On Fri, 14 Jun 2024 12:03:25 +0200 Christoph Hellwig <hch@xxxxxx> wrote: > As of Linux 6.10-rc the MM can swap out larger than page size chunks. > NFS has all code ready to handle this, but has a VM_BUG_ON that > triggers when this happens. Simply remove the VM_BUG_ON to fix this > use case. > > ... > > --- a/fs/nfs/direct.c > +++ b/fs/nfs/direct.c > @@ -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 I'm thinking this should precede "mm: swap: entirely map large folios found in swapcache", or be a part of it. Barry/Chuanhua, any opinions?