btrfs balance can't be cancelled
It seems like there are either something wrong with the btrfs tools or the jolla kernel has a quite broken implementation of btrfs.
When you do a: btrfs balance start -dusage=xx /
the higher xx is it seems the more likely the process will hang, I did a balance with 90 (this is less than the 96 which the jolla balance uses), the process been running for 12 hours, still on the last block according to btrfs status. Running a "btrfs balance cancel /" do not stop the balance process and the cancel process hangs too. The only way to recover is to reboot the phone and start balance again first with metadata and then disk.
Suggestion, upgrade kernel to 3.18 or later, as there will be a balance functionality built in and you shouldn't need to run the balance manually. Also upgrade to btrfs-progs 3.19.1 could be of benefit. Sure this will not fix the issue that the disk is too small for btrfs, but should make it less likely that you will run out of "disk".
Update: Noticed also that battery consumption may be connected to how "full" the btrfs is, when down around 9.9GB then battery holds a whole weekend with 30+% left, when up on 11.9GB then battery do not last more than max 16 hours.
Currently: Kernel 3.4.98.20150206.1.1, Btrfs-progs v3.16 (Sailfish 1.1.4.29)
You provide hw drivers for 3.18 and Jolla upgrades... does the progress zombie? I had it once that cancel took >10minutes, are you patient?
chemist ( 2015-05-02 11:12:10 +0200 )edit@chemist: I think over 2h should be more than enough for a cancel to finish. No, it's not going to a zombie status, neither is the original balance.
Trizt ( 2015-05-02 11:28:10 +0200 )editI had the same behaviour :(
coderus ( 2015-05-02 20:14:46 +0200 )editon 'some' devices balance can take more than 24 hours, so if your trying to cancel after 12 hours, then its just impatience :). (well yes usually it only takes hour when attached to power source).
Unfortunately kernel cannot be upgraded, but there has been some improvements on backported tools in latest upcoming releases.
rainisto ( 2015-05-04 09:42:04 +0200 )edit@rainisto: yes, I sometimes get impatient when it takes more than 48h and the kernel btrfs-balance stops running (D) and it's the last chunk for days or till battery runs out, as the battery drain is quite high. And it seems to get worse for each time btrfs-balance is run.
Trizt ( 2015-05-06 08:40:35 +0200 )edit