Make remount into checkpointing for ext4 userdata a no-op
We are going to teamfood userspace reboot soon, and in order to gather
as much data as possible we are fine with ignoring checkpointing for the
devices with ext4 (teamfood will be a very limited set of people that
are aware what they've signed for).
As result of this, we don't need to reset vold and kill zram backing
device. Added a TODO to restore that functionality if needed.
Since I was there, fixed yet another typo in userspace-reboot-resume -_-
Bug: 135984674
Test: adb reboot userspace
Change-Id: I2b7a93aaf738fe9bec9d606d7e11aefb325550b1
diff --git a/init/reboot.cpp b/init/reboot.cpp
index fc18ecb..a76a9ba 100644
--- a/init/reboot.cpp
+++ b/init/reboot.cpp
@@ -746,23 +746,8 @@
// TODO(b/135984674): store information about offending services for debugging.
return Error() << r << " post-data services are still running";
}
- // We only really need to restart vold if userdata is ext4 filesystem.
- // TODO(b/135984674): get userdata fs type here, and do nothing in case of f2fs.
- // First shutdown volumes managed by vold. They will be recreated by
- // system_server.
- Service* vold_service = ServiceList::GetInstance().FindService("vold");
- if (vold_service != nullptr && vold_service->IsRunning()) {
- if (auto result = ShutdownVold(); !result) {
- return result;
- }
- LOG(INFO) << "Restarting vold";
- vold_service->Restart();
- }
- // Again, we only need to kill zram backing device in case of ext4 userdata.
- // TODO(b/135984674): get userdata fs type here, and do nothing in case of f2fs.
- if (auto result = KillZramBackingDevice(); !result) {
- return result;
- }
+ // TODO(b/143970043): in case of ext4 we probably we will need to restart vold and kill zram
+ // backing device.
if (int r = StopServicesAndLogViolations(GetDebuggingServices(true /* only_post_data */), 5s,
false /* SIGKILL */);
r > 0) {