Add persist.sys.fuse.bpf.override
Allows for easy override of fuse-bpf for testing without a rebuild
Test: Set this property with ro.fuse.bpf.enabled both true and false
Make sure ro.fuse.bpf.is_running is expected result
Bug: 219958836
Change-Id: I589511ea5cda76db1d55bdc2124fb546907d8acd
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index f99a369..270dcd4 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -50,7 +50,6 @@
mRawPath = rawPath;
mLabel = "emulated";
mFuseMounted = false;
- mFuseBpfEnabled = IsFuseBpfEnabled();
mUseSdcardFs = IsSdcardfsUsed();
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
}
@@ -62,7 +61,6 @@
mRawPath = rawPath;
mLabel = fsUuid;
mFuseMounted = false;
- mFuseBpfEnabled = IsFuseBpfEnabled();
mUseSdcardFs = IsSdcardfsUsed();
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
}
@@ -446,7 +444,7 @@
}
}
- if (!mFuseBpfEnabled) {
+ if (!IsFuseBpfEnabled()) {
// Only do the bind-mounts when we know for sure the FUSE daemon can resolve the path.
res = mountFuseBindMounts();
if (res != OK) {
@@ -505,7 +503,7 @@
if (mFuseMounted) {
std::string label = getLabel();
- if (!mFuseBpfEnabled) {
+ if (!IsFuseBpfEnabled()) {
// Ignoring unmount return status because we do want to try to
// unmount the rest cleanly.
unmountFuseBindMounts();