btrfs-progs icon indicating copy to clipboard operation
btrfs-progs copied to clipboard

Make `btrfs filesystem mkswapfile` check if underlying filesystem has single DATA profile

Open yarikoptic opened this issue 1 year ago • 2 comments

ATM command might succeed but then subsequent swapon would fail. Might be worth doing a check and issuing at least a warning ?

yarikoptic avatar Jul 10 '24 21:07 yarikoptic

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).

kdave avatar Jul 12 '24 21:07 kdave

Just sent a patch addressing this issue: https://lore.kernel.org/linux-btrfs/[email protected]/T/#u

marcosps avatar Jun 06 '25 18:06 marcosps