Merge "Don't abort fuse connections for virtiofs." am: 09997fe28a
am: a6e700b054
am: b99a9e4f21
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1437953 Change-Id: Ia2b11923b952b107c720dbeaca7aabd7facc6bde
This commit is contained in:
commit
62a0bbbc08
1 changed files with 11 additions and 0 deletions
11
Utils.cpp
11
Utils.cpp
|
@ -1442,6 +1442,17 @@ status_t AbortFuseConnections() {
|
|||
namespace fs = std::filesystem;
|
||||
|
||||
for (const auto& itEntry : fs::directory_iterator("/sys/fs/fuse/connections")) {
|
||||
std::string fsPath = itEntry.path().string() + "/filesystem";
|
||||
std::string fs;
|
||||
|
||||
// Virtiofs is on top of fuse and there isn't any user space daemon.
|
||||
// Android user space doesn't manage it.
|
||||
if (android::base::ReadFileToString(fsPath, &fs, false) &&
|
||||
android::base::Trim(fs) == "virtiofs") {
|
||||
LOG(INFO) << "Ignore virtiofs connection entry " << itEntry.path().string();
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string abortPath = itEntry.path().string() + "/abort";
|
||||
LOG(DEBUG) << "Aborting fuse connection entry " << abortPath;
|
||||
bool ret = writeStringToFile("1", abortPath);
|
||||
|
|
Loading…
Reference in a new issue