Closed PeterCxy closed 3 years ago
Ok I added an automatic fallback if fallocate
failed. Still, please test to confirm it works before merging this.
Closing this because I'm preparing to PR the minui branch here instead. Merging this patch itself doesn't really make a lot of sense since the minui branch is a much larger refactor.
This allows the use of
fallocate
instead ofdd
on sdcard partitions formatted with ext4, which is way more efficient. In addition, this PR also fixes FBE on my devices due to incorrect SELinux labels.However, before merging this, please test if this works on sdcard partitions formatted with FAT32 / exFAT, as I am not sure what C library your
busybox
binary is compiled against. The C library dictates whetherposix_fallocate
falls back to thedd
behavior or not depending on the underlying filesystem. If it does not fall back, then we will need to implement our own fallback usingdd
.