Merge "Add persist.sys.fuse.bpf.override"
This commit is contained in:
commit
c4bc218452
3 changed files with 11 additions and 8 deletions
10
Utils.cpp
10
Utils.cpp
|
@ -1774,7 +1774,15 @@ std::pair<android::base::unique_fd, std::string> OpenDirInProcfs(std::string_vie
|
|||
bool IsFuseBpfEnabled() {
|
||||
// TODO Once kernel supports flag, trigger off kernel flag unless
|
||||
// ro.fuse.bpf.enabled is explicitly set to false
|
||||
if (base::GetBoolProperty("ro.fuse.bpf.enabled", false)) {
|
||||
bool enabled;
|
||||
if (base::GetProperty("ro.fuse.bpf.is_running", "") != "")
|
||||
enabled = base::GetBoolProperty("ro.fuse.bpf.is_running", false);
|
||||
else if (base::GetProperty("persist.sys.fuse.bpf.override", "") != "")
|
||||
enabled = base::GetBoolProperty("persist.sys.fuse.bpf.override", false);
|
||||
else
|
||||
enabled = base::GetBoolProperty("ro.fuse.bpf.enabled", false);
|
||||
|
||||
if (enabled) {
|
||||
base::SetProperty("ro.fuse.bpf.is_running", "true");
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -50,7 +50,6 @@ EmulatedVolume::EmulatedVolume(const std::string& rawPath, int userId)
|
|||
mRawPath = rawPath;
|
||||
mLabel = "emulated";
|
||||
mFuseMounted = false;
|
||||
mFuseBpfEnabled = IsFuseBpfEnabled();
|
||||
mUseSdcardFs = IsSdcardfsUsed();
|
||||
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
|
||||
}
|
||||
|
@ -62,7 +61,6 @@ EmulatedVolume::EmulatedVolume(const std::string& rawPath, dev_t device, const s
|
|||
mRawPath = rawPath;
|
||||
mLabel = fsUuid;
|
||||
mFuseMounted = false;
|
||||
mFuseBpfEnabled = IsFuseBpfEnabled();
|
||||
mUseSdcardFs = IsSdcardfsUsed();
|
||||
mAppDataIsolationEnabled = base::GetBoolProperty(kVoldAppDataIsolationEnabled, false);
|
||||
}
|
||||
|
@ -446,7 +444,7 @@ status_t EmulatedVolume::doMount() {
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ status_t EmulatedVolume::doUnmount() {
|
|||
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();
|
||||
|
|
|
@ -66,9 +66,6 @@ class EmulatedVolume : public VolumeBase {
|
|||
/* Whether we mounted FUSE for this volume */
|
||||
bool mFuseMounted;
|
||||
|
||||
/* Whether the FUSE BPF feature is enabled */
|
||||
bool mFuseBpfEnabled;
|
||||
|
||||
/* Whether to use sdcardfs for this volume */
|
||||
bool mUseSdcardFs;
|
||||
|
||||
|
|
Loading…
Reference in a new issue