Comment 2 for bug 1781781

Revision history for this message
Ryan Harper (raharper) wrote :

Yes, from my reading, this is an xfs (btrfs) specific issue w.r.t how they don't handle converting a fallocated file into swap space.

I think we'll likely do the following:

1) add a integration test which does swapfile enablment via fallocate for each fs and confirms that the target system can use it as swap; we expect this to fail when rootfs is either btrfs or xfs.

2) update curtin swap creation code to check the target filesystem format and for btrfs or xfs filesystems, skip fallocate and use dd instead.

Alternatively, one can use a swap partition instead of a file on the filesystem which avoids this path; that may be preferred to avoid dd'ing gigabytes of data.