New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 594826 link

Starred by 5 users

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

make sure sync is called on sleep

Project Member Reported by abodenha@chromium.org, Mar 14 2016

Issue description

Use case:
1: Have the system in a state where data has not been flushed to disk (see  bug 455749 )
2: Put the device to sleep
3: Cause the device to hard power off

Data SHOULD be safe. We need to make sure that is the case.
 

Comment 1 by xiy...@chromium.org, Mar 14 2016

Cc: bleung@chromium.org
+bleung

Benson, I vaguely remember that you told me power manager would flush disk before going to sleep. Could you confirm it?

Thanks.

Comment 2 by olofj@chromium.org, Mar 14 2016

Cc: olofj@chromium.org tbroch@chromium.org snanda@chromium.org
As mentioned in  bug 455749 , the system is syncing filesystem contents on suspend. Has this been proven to not be the case?

No. Just a suspicion based on comments from users. If we're sure the sync is happening, we're good.

I'd really like to see a test for this though, manual or otherwise.

Comment 4 by tbroch@chromium.org, Mar 15 2016

powerd_suspend has explicit sync.

https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/powerd/powerd_suspend

See,

log_msg "Explicit sync"
sync

Comment 5 by xiy...@chromium.org, Mar 15 2016

Status: WontFix (was: Assigned)
A quick test on lumpy confirmed #2 and #4 that powerd would sync fs on suspecd:

2016-03-15T08:57:24.035126-07:00 NOTICE powerd_suspend[2760]: Going to suspend-to-RAM state: args=--suspend_duration=-1 --nosuspend_to_idle --wakeup_count=34676
2016-03-15T08:57:24.043065-07:00 INFO session_manager[857]: [INFO:policy_service.cc(188)] Persisted policy to disk.
2016-03-15T08:57:24.097416-07:00 INFO session_manager[857]: [INFO:child_exit_handler.cc(73)] 2776 is not a managed job.
2016-03-15T08:57:24.182345-07:00 NOTICE powerd_suspend[2896]: Lumpy with gobi modem
2016-03-15T08:57:24.185930-07:00 NOTICE powerd_suspend[2899]: Explicit sync
2016-03-15T08:57:27.084946-07:00 NOTICE powerd_suspend[2901]: Finalizing suspend
2016-03-15T08:58:36.129975-07:00 INFO kernel: [928646.706412] PM: Syncing filesystems ... done.
2016-03-15T08:58:36.129996-07:00 DEBUG kernel: [928646.758059] PM: Preparing system for mem sleep

I think we are good on suspend.

Sign in to add a comment