Merge "Stop using trigger_reset_main." into qt-dev
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index e784c91..19c1f3c 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -17,6 +17,7 @@
#define LOG_TAG "Checkpoint"
#include "Checkpoint.h"
#include "VoldUtil.h"
+#include "VolumeManager.h"
#include <fstream>
#include <list>
@@ -337,10 +338,14 @@
struct fstrim_range range = {};
range.len = ULLONG_MAX;
+ nsecs_t start = systemTime(SYSTEM_TIME_BOOTTIME);
if (ioctl(fd, FITRIM, &range)) {
PLOG(ERROR) << "Failed to trim " << mount_rec.mount_point;
continue;
}
+ nsecs_t time = systemTime(SYSTEM_TIME_BOOTTIME) - start;
+ LOG(INFO) << "Trimmed " << range.len << " bytes on " << mount_rec.mount_point << " in "
+ << nanoseconds_to_milliseconds(time) << "ms for checkpoint";
setBowState(mount_rec.blk_device, "1");
}
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index fad59f1..a6ead9d 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -119,7 +119,8 @@
VolumeManager::~VolumeManager() {}
static bool hasIsolatedStorage() {
- return GetBoolProperty(kIsolatedStorageSnapshot, GetBoolProperty(kIsolatedStorage, true));
+ return false &&
+ GetBoolProperty(kIsolatedStorageSnapshot, GetBoolProperty(kIsolatedStorage, true));
}
int VolumeManager::updateVirtualDisk() {
@@ -1098,8 +1099,13 @@
mode = "read";
break;
case VoldNativeService::REMOUNT_MODE_WRITE:
+ case VoldNativeService::REMOUNT_MODE_LEGACY:
+ case VoldNativeService::REMOUNT_MODE_INSTALLER:
mode = "write";
break;
+ case VoldNativeService::REMOUNT_MODE_FULL:
+ mode = "full";
+ break;
default:
PLOG(ERROR) << "Unknown mode " << std::to_string(mountMode);
return -1;
diff --git a/vold_prepare_subdirs.cpp b/vold_prepare_subdirs.cpp
index 1dd5e85..a620edd 100644
--- a/vold_prepare_subdirs.cpp
+++ b/vold_prepare_subdirs.cpp
@@ -153,6 +153,11 @@
system_ce_path + "/backup_stage")) {
return false;
}
+ auto vendor_ce_path = android::vold::BuildDataVendorCePath(user_id);
+ auto facedata_path = vendor_ce_path + "/facedata";
+ if (!prepare_dir(sehandle, 0700, AID_SYSTEM, AID_SYSTEM, facedata_path)) {
+ return false;
+ }
}
}
return true;