I have SSD with btrfs, I tried creating a swapfile like:
dd if=/dev/zero of=swapfile01 bs=1M count=10240
mkswap swapfile01
chmod 600 swapfile01
swapon swapfile01
In dmesg I see
[238434.731654] swapon: swapfile has holes
I understand that there are probably some holes caused by disk fragmentation, but this is SSD disk so it probably shouldn't matter? Is there a way to ignore the holes? Or how can I fix this?
Off topic - why I want this (to avoid irrelevant questions in comments): I have encrypted disk which is pain in the **** to resize, so I just decided to create a swapfile instead of resizing the swap partition (I added 14GB of ram, from 4gb to 16gb and can't hibernate now).