10 Feb
2017
10 Feb
'17
8:46 a.m.
Some packages end up creating subvolumes through systemd-tmpfiles, (e.g. systemd-nspawn,) so we need to delete those as well, but there's no way to reliably list subvolumes under a certain subvolume relative to the filesystem, so we need a hard-coded list.
Actually there is, it just turns out to be really tricky. Now, it is impossible to correctly deal with spaces in the paths (thanks to the not-quite machine readable output from `btrfs subvolume list`); so Dave's comments about safe xargs use are moot. In my solution I used a `while read -r` loop, to make exiting on error easier; xargs only terminates early if the process fails with 255. -- Happy hacking, ~ Luke Shumaker