Thread (10 messages) 10 messages, 6 authors, 2021-09-30

Re: [RFC][PATCH v3 0/9] mm: Use DIO for swap and fix NFS swapfiles

From: David Howells <dhowells@redhat.com>
Date: 2021-09-29 15:45:27
Also in: ceph-devel, linux-block, linux-btrfs, linux-ext4, linux-fsdevel, linux-mm, linux-nfs, linux-xfs, lkml

David Sterba [off-list ref] wrote:
quoted
There are additional patches to get rid of noop_direct_IO and replace it
with a feature bitmask, to make btrfs, ext4, xfs and raw blockdevs use the
new ->swap_rw method and thence remove the direct BIO submission paths from
swap.

I kept the IOCB_SWAP flag, using it to enable REQ_SWAP.  I'm not sure if
that's necessary, but it seems accounting related.
There was probably some step missing. The file must not have holes, so
either do 'dd' to the right size or use fallocate (which is recommended
in manual page btrfs(5) SWAPFILE SUPPORT). There are some fstests
exercising swapfile (grep -l _format_swapfile tests/generic/*) so you
could try that without having to set up the swapfile manually.
Yeah.  As advised elsewhere, I removed the file and recreated it, doing the
chattr before extending the file.  At that point swapon worked.  It didn't
work though, and various userspace programs started dying.  I'm guessing my
btrfs_swap_rw() is wrong somehow.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help