Comment by marcan_42

4 years ago

I just tested that. Holding down the power button invokes a (somewhat special) btn_rst kernel panic before it has a chance to invoke a true hardware reset, and kernel panics involve an NVMe driver hook which I'm pretty sure issues a flush. Should be safe.

At least re: this issue; it's still a bad idea because it's only safe if all software is written following data integrity and flush rules to the letter, and most software isn't. You're eventually going to run into issues on any OS by doing that, because most software doesn't get this right unless it's a database. And you're still going to lose data that's in buffer cache, I'm pretty sure that won't get flushed.