Swap file fails to load on 5.19 kernel with btrfs

@ricklinux , I have found a workaround… I have just deleted my swapfile and recreated it.
Now it works with the 5.19 Kernel.
As I want a 16Gb Swapfile, I used count=16384

Below are the steps I took:

sudo rm /swap/swapfile
sudo chattr +C /swap
sudo dd if=/dev/zero of=/swap/swapfile bs=1M count=16384 status=progress
sudo chmod 0600 /swap/swapfile
sudo mkswap /swap/swapfile
sudo swapon /swap/swapfile

Then check with swapon -s

2 Likes