Bug 207585 - Swap file has holes since 5.7
Summary: Swap file has holes since 5.7
Alias: None
Product: File System
Classification: Unclassified
Component: VFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jens Axboe
Depends on:
Reported: 2020-05-05 14:47 UTC by yshuiv7
Modified: 2021-01-26 00:39 UTC (History)
8 users (show)

See Also:
Kernel Version: 5.7-rc4
Regression: Yes
Bisected commit-id:


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)


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

Note You need to log in before you can comment on or make changes to this bug.