FUSE-BPF: use both ro and persist properties
persist.sys.fuse.bpf.enable and ro.fuse.bpf.enabled are both used to
decide if FUSE-BPF must be enabled or not.
- ro.fuse.bpf.enabled is a read-only property that is set in the device
makefile and would allow dogfooding devices to turn the feature
on/off.
- persist.sys.fuse.bpf.enable is a system property that overrides
ro.fuse.bpf.enabled and can only be set manually during the
development to simplify the testing of FUSE-BPF, mostly to compare if
those tests that are failing with FUSE-BPF were failing also without
the feature.
Bug: 202785178
Test: adb logcat | grep "FuseDaemon" | grep BPF
Ignore-AOSP-First: FUSE-BPF is not available in AOSP
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I23f9d27172907f6c72c73bea22e4a7e0ac643888
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index 7c8a4e0..270d097 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -49,7 +49,7 @@
mRawPath = rawPath;
mLabel = "emulated";
mFuseMounted = false;
- mFuseBpfEnabled = base::GetBoolProperty(kFuseBpfEnabled, false);
+ mFuseBpfEnabled = IsFuseBpfEnabled();
mUseSdcardFs = IsSdcardfsUsed();
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
}
@@ -61,7 +61,7 @@
mRawPath = rawPath;
mLabel = fsUuid;
mFuseMounted = false;
- mFuseBpfEnabled = base::GetBoolProperty(kFuseBpfEnabled, false);
+ mFuseBpfEnabled = IsFuseBpfEnabled();
mUseSdcardFs = IsSdcardfsUsed();
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
}