Merge "init: add info logs in first stage mount if we have to poll" am: 6a9d56775f
am: 11d5611ba5
Change-Id: Ib08ea62f6fb13cfaed6bc894bcbc548ccd8c3d55
This commit is contained in:
commit
7b600f8012
1 changed files with 14 additions and 3 deletions
|
|
@ -171,10 +171,13 @@ bool FirstStageMount::InitRequiredDevices() {
|
||||||
};
|
};
|
||||||
uevent_listener_.RegenerateUeventsForPath("/sys" + dm_path, dm_callback);
|
uevent_listener_.RegenerateUeventsForPath("/sys" + dm_path, dm_callback);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
LOG(INFO) << "device-mapper device not found in /sys, waiting for its uevent";
|
||||||
|
Timer t;
|
||||||
uevent_listener_.Poll(dm_callback, 10s);
|
uevent_listener_.Poll(dm_callback, 10s);
|
||||||
|
LOG(INFO) << "Wait for device-mapper returned after " << t;
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
LOG(ERROR) << "device-mapper device not found";
|
LOG(ERROR) << "device-mapper device not found after polling timeout";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -185,11 +188,16 @@ bool FirstStageMount::InitRequiredDevices() {
|
||||||
// UeventCallback() will remove found partitions from required_devices_partition_names_.
|
// UeventCallback() will remove found partitions from required_devices_partition_names_.
|
||||||
// So if it isn't empty here, it means some partitions are not found.
|
// So if it isn't empty here, it means some partitions are not found.
|
||||||
if (!required_devices_partition_names_.empty()) {
|
if (!required_devices_partition_names_.empty()) {
|
||||||
|
LOG(INFO) << __PRETTY_FUNCTION__
|
||||||
|
<< ": partition(s) not found in /sys, waiting for their uevent(s): "
|
||||||
|
<< android::base::Join(required_devices_partition_names_, ", ");
|
||||||
|
Timer t;
|
||||||
uevent_listener_.Poll(uevent_callback, 10s);
|
uevent_listener_.Poll(uevent_callback, 10s);
|
||||||
|
LOG(INFO) << "Wait for partitions returned after " << t;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!required_devices_partition_names_.empty()) {
|
if (!required_devices_partition_names_.empty()) {
|
||||||
LOG(ERROR) << __PRETTY_FUNCTION__ << ": partition(s) not found: "
|
LOG(ERROR) << __PRETTY_FUNCTION__ << ": partition(s) not found after polling timeout: "
|
||||||
<< android::base::Join(required_devices_partition_names_, ", ");
|
<< android::base::Join(required_devices_partition_names_, ", ");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -241,10 +249,13 @@ bool FirstStageMount::InitVerityDevice(const std::string& verity_device) {
|
||||||
|
|
||||||
uevent_listener_.RegenerateUeventsForPath(syspath, verity_callback);
|
uevent_listener_.RegenerateUeventsForPath(syspath, verity_callback);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
LOG(INFO) << "dm-verity device not found in /sys, waiting for its uevent";
|
||||||
|
Timer t;
|
||||||
uevent_listener_.Poll(verity_callback, 10s);
|
uevent_listener_.Poll(verity_callback, 10s);
|
||||||
|
LOG(INFO) << "wait for dm-verity device returned after " << t;
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
LOG(ERROR) << "dm-verity device not found";
|
LOG(ERROR) << "dm-verity device not found after polling timeout";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue