https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....
===
This has been discussed in thread: http://thread.gmane.org/gmane.comp.file-systems.btrfs/32528
and this patch implements this proposal: http://thread.gmane.org/gmane.comp.file-systems.btrfs/32536
Works fine for "clean" raid profiles where the raid factor correction does the right job. Otherwise it's pessimistic and may show low space although there's still some left.
The df nubmers are lightly wrong in case of mixed block groups, but this is not a major usecase and can be addressed later.
The RAID56 numbers are wrong almost the same way as before and will be addressed separately.
===
I'm most interested in the deadlock fix which finally made it in. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....
Yes, it looks like df uses that: