btrfs-progs
btrfs-progs copied to clipboard
Make `btrfs filesystem mkswapfile` check if underlying filesystem has single DATA profile
ATM command might succeed but then subsequent swapon would fail. Might be worth doing a check and issuing at least a warning ?
Yes that makes sense, the information is accessible from sysfs and not restricted. Alternatively the SEARCH_TREE ioctl can be used for that and read more information or do validation of the extents of the swapfile (e.g. the NODATASUM flag).
Just sent a patch addressing this issue: https://lore.kernel.org/linux-btrfs/[email protected]/T/#u