Skip to content

Commit e1bcd93

Browse files
author
Tom Cherry
committed
init: do not create dev.mnt. properties for emulated mounts
dev.mnt. properties are primarily intended for tuning parameters for mounts such as /system and /data but don't have much use for emulated mounts. There are additional emulated mounts created for each user on a device, so if too many users are created, init would otherwise create too many dev.mnt. properties, filling the property file that backs these properties, and preventing more properties from being generated. Therefore, this change stops init from creating dev.mnt. properties for emulated mounts. Bug: 156721033 Test: user creation stress test doesn't create large numbers of properties Change-Id: I6475956719b7c938b8289189abfef661140d526d
1 parent 29e7b2a commit e1bcd93

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

init/mount_handler.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ void MountHandler::MountHandlerFunction() {
130130
char* buf = nullptr;
131131
size_t len = 0;
132132
while (getline(&buf, &len, fp_.get()) != -1) {
133-
auto entry = ParseMount(std::string(buf));
133+
auto buf_string = std::string(buf);
134+
if (buf_string.find("/emulated") != std::string::npos) {
135+
continue;
136+
}
137+
auto entry = ParseMount(buf_string);
134138
auto match = untouched.find(entry);
135139
if (match == untouched.end()) {
136140
touched.emplace_back(std::move(entry));

0 commit comments

Comments
 (0)