Bug 207585

Summary: Swap file has holes since 5.7
Product: File System Reporter: yshuiv7
Component: VFSAssignee: Jens Axboe (axboe)
Status: RESOLVED CODE_FIX    
Severity: normal CC: adilahbisar, aghamajid429, anon.amish, dominik.schrempf, fademind, Michaelnussbaum08, mirh, slandden
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.7-rc4 Tree: Mainline
Regression: Yes

Description yshuiv7 2020-05-05 14:47:40 UTC
swapon fails to activate the swapfile since 5.7, complaining:

   swapon: swapfile has holes

in dmesg.

Same swapfile can be activated on 5.6

Filesystem is ext4, on LUKS dm-crypt
Comment 1 yshuiv7 2020-05-05 17:53:12 UTC
I have narrowed down this problem.
Comment 3 mirh 2020-05-28 21:59:27 UTC
I can confirm this solves the problem. 
What is it waiting for?
Comment 4 Dominik Schrempf 2020-06-11 19:02:52 UTC
This has hit Arch Linux main line, see https://bugs.archlinux.org/task/66921.
Comment 6 AMM 2020-06-27 12:34:46 UTC
I use Arch linux too. And I had created /swapfile using fallocate (for many of servers I maintain)

It was working fine. But now I get same error that "swapfile has holes"

I am wondering if this is kernel bug and will be fixed in next kernel? (I see there is patch for it)

OR

I should go and re-create /swapfile on all servers using dd? (which will need a downtime which I am trying to avoid)

Thank you.
Comment 8 Shawn Landden 2020-09-27 12:55:00 UTC
fixed  https://lkml.org/lkml/2020/9/24/810