tl;dr Creating a swapfile with fallocate should work on XFS now.
Found this thread from about 3 years ago
https://www.spinics.net/lists/linux-mm/msg147100.html
There were a few things that needed work to fix it, and I'm not sure
which one finally did it, but this 2019 patch was part of that series:
https://lore.kernel.org/linux-xfs/20191008071527.29304-16-hch@lst.de/
That is in 5.7, which is what Fedora 33 shipped with.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/...
Anyway...even though I can't nail down exactly when it got fixed,
today I asked the XFS maintainer about all of this and he said
fallocate'd swapfiles should work. And I also tested it with kernel
5.11.16 and 5.12 and it does work.
--
Chris Murphy