Replace "sys.fuse_snapshot" with "persist.sys.fuse"

With the newly added flag for Settings developer options, which is now
used to change the state of FUSE, PROP_FUSE now acts as the snapshot
feature flag for the current boot.

Bug: 145391093
Test: atest AdoptableHostTest
Change-Id: I22363b088e88c764294cbd61c6d94160c907fae3
gugelfrei
Abhijeet Kaur 5 years ago
parent b4569d73ee
commit 01fa0e0d8d

@ -34,7 +34,7 @@ struct DIR;
namespace android {
namespace vold {
static const char* kPropFuseSnapshot = "sys.fuse_snapshot";
static const char* kPropFuse = "persist.sys.fuse";
/* SELinux contexts used depending on the block device type */
extern security_context_t sBlkidContext;

@ -374,7 +374,7 @@ int VolumeManager::forgetPartition(const std::string& partGuid, const std::strin
}
int VolumeManager::linkPrimary(userid_t userId) {
if (!GetBoolProperty(android::vold::kPropFuseSnapshot, false)) {
if (!GetBoolProperty(android::vold::kPropFuse, false)) {
std::string source(mPrimary->getPath());
if (mPrimary->isEmulated()) {
source = StringPrintf("%s/%d", source.c_str(), userId);
@ -468,7 +468,7 @@ int VolumeManager::onUserStarted(userid_t userId) {
createEmulatedVolumesForUser(userId);
}
if (!GetBoolProperty(android::vold::kPropFuseSnapshot, false)) {
if (!GetBoolProperty(android::vold::kPropFuse, false)) {
// Note that sometimes the system will spin up processes from Zygote
// before actually starting the user, so we're okay if Zygote
// already created this directory.
@ -563,7 +563,7 @@ static bool childProcess(const char* storageSource, const char* userSource, int
}
int VolumeManager::remountUid(uid_t uid, int32_t mountMode) {
if (GetBoolProperty(android::vold::kPropFuseSnapshot, false)) {
if (GetBoolProperty(android::vold::kPropFuse, false)) {
// TODO(135341433): Implement fuse specific logic.
return 0;
}

@ -132,7 +132,7 @@ status_t EmulatedVolume::doMount() {
dev_t before = GetDevice(mSdcardFsFull);
bool isFuse = base::GetBoolProperty(kPropFuseSnapshot, false);
bool isFuse = base::GetBoolProperty(kPropFuse, false);
// Mount sdcardfs regardless of FUSE, since we need it to bind-mount on top of the
// FUSE volume for various reasons.

@ -223,7 +223,7 @@ status_t PublicVolume::doMount() {
/* sdcardfs will have exited already. The filesystem will still be running */
TEMP_FAILURE_RETRY(waitpid(sdcardFsPid, nullptr, 0));
bool isFuse = base::GetBoolProperty(kPropFuseSnapshot, false);
bool isFuse = base::GetBoolProperty(kPropFuse, false);
if (isFuse) {
// We need to mount FUSE *after* sdcardfs, since the FUSE daemon may depend
// on sdcardfs being up.

Loading…
Cancel
Save