Comment 39 for bug 1387214

Revision history for this message
Ricardo Salveti (rsalveti) wrote : Re: [Bug 1387214] Re: [TOPBLOCKER] file corruption on touch images in rw portions of the filesystem

On Fri, Nov 28, 2014 at 3:29 PM, Oliver Grawert <email address hidden> wrote:
> it would be nice to have some upstart job that at least does an emergecy
> readonly mount on shutdown/reboot like we plan for adbd "adb reboot" by
> echoing "u" into /proc/sysrq-trigger ... that way we would at least be
> sure we do not unmount dirty and calling this command takes close to no
> time.

We could cover most of the possible causes for not unmounting it
properly, just wonder if we should still take the risk of moving back
to data=ordered.

Some use cases:
* Hard reboot (power + volume up): the userspace can probably be
notified by that, forcing the ro remount
* Adb: doing the emergency readonly mount as suggested by oliver
* $ sudo reboot: just making sure the halt process indeed umount the
partition successfully
* Low battery: forcing shutdown if batter lower than 3% (?)
* Kernel panic: can we force kernel to flush things into the disk when
we get a crash? This is important as well as it seems we can easily
make the kernel to crash still (specially when using bluetooth).