3 ms·
>Depending on the exact mechanism and implementation, making fsync a no-op is not necessarily bad. As long as it can (with highest priority) fsync all of its bu
by joombaga 10y ago
>Depending on the exact mechanism and implementation, making fsync a no-op is not necessarily bad. As long as it can (with highest priority) fsync all of its buffers upon notification of loss of power and be done before all capacitance is lost then there should be no trouble at all.
I'd guess the most popular apps DO use a database on Android, right? So we could make some testable predictions. If the Moto Z's fsync is a no-op, then we should expect more database corruption. So if we don't see database corruption, we can presume a highly prioritized, efficient fsync on power loss notification. Battery pull vs. low battery poweroff event? I'm still thinking about controls and test methodology. Also, either Android app databases don't corrupt often, or they're good at recovery, because I haven't seen app errors (aside from incompatibility) in a long while. Then again, I have a Pixel, not a Moto Z.
I am going to reflash with these filesystem changes though; just not sure how to benchmark.
- londons_explore 10y agobenchmark some database while randomly kernel panicing the phone every few minutes? (http://unix.stackexchange.com/questions/66197/how-to-cause-kernel-panic-with-a-single-command http://unix.stackexchange.com/questions/66197/how-to-cause-k...) The database should never get corrupted. If it does, you have a bad fsync implementation.