← Back to team overview

curtin-dev team mailing list archive

[Merge] ~raharper/curtin:fix/swap-files-on-btrfs into curtin:master

 

The proposal to merge ~raharper/curtin:fix/swap-files-on-btrfs into curtin:master has been updated.

Commit message changed to:

swaps: handle swapfiles on btrfs

Special care and handling are needed for creating swap files on top
of btrfs filesystems.  Curtin will attempt to disable btrfs CoW
on the target file before attempting to fallocate/dd the file.

- Btrfs swapfile requires target kernel 5.0+, older kernels cannot use.
  https://btrfs.wiki.kernel.org/index.php/FAQ
- Query target fstype to check if we can proceed with swap file
  btrfs requires newer kernel, xfs cannot use fallocate
- Update distro.parse_dpkg_version to handle additional formatting
  including linux-image-generic, and versions with Epoch present.
- Adjust TestBasic,TestScsiBasic to add a swapfile to the /btrfs target
- Add the swap partition/file to TestBasic's fstab unittest
- Fix test_swaps_used to use fstab data instead of storage config
  since file-based swaps are created via curtin 'swap' config not
  storage-config.
- Add swap config key 'force', default is false
- Add curtin feature flag, BTRFS_SWAPFILE

LP: #1884161

For more details, see:
https://code.launchpad.net/~raharper/curtin/+git/curtin/+merge/386117
-- 
Your team curtin developers is subscribed to branch curtin:master.


References