Use snapshot value sys.fuse_snapshot instead of persist.sys.fuse
This will allow us to receive values from server flags and store them in persist.sys.fuse without risking flag consistency during a boot. Test: manual - flip persist.sys.fuse both ways and make sure FuseDaemon works as expected. Bug: 140803239 Change-Id: I839a1973c98b4eda982226d20be48d1c08e7464a
This commit is contained in:
parent
e94ef6b04d
commit
5cf32b52a6
4 changed files with 7 additions and 7 deletions
2
Utils.h
2
Utils.h
|
@ -34,7 +34,7 @@ struct DIR;
|
|||
namespace android {
|
||||
namespace vold {
|
||||
|
||||
static const char* kPropFuse = "persist.sys.fuse";
|
||||
static const char* kPropFuseSnapshot = "sys.fuse_snapshot";
|
||||
|
||||
/* SELinux contexts used depending on the block device type */
|
||||
extern security_context_t sBlkidContext;
|
||||
|
|
|
@ -382,7 +382,7 @@ int VolumeManager::forgetPartition(const std::string& partGuid, const std::strin
|
|||
}
|
||||
|
||||
int VolumeManager::linkPrimary(userid_t userId) {
|
||||
bool isFuse = GetBoolProperty(android::vold::kPropFuse, false);
|
||||
bool isFuse = GetBoolProperty(android::vold::kPropFuseSnapshot, false);
|
||||
|
||||
if (isFuse) {
|
||||
// Here we have to touch /mnt/user/userid>/<volumeid> which was already mounted as part of
|
||||
|
@ -464,7 +464,7 @@ int VolumeManager::setPrimary(const std::shared_ptr<android::vold::VolumeBase>&
|
|||
}
|
||||
|
||||
int VolumeManager::remountUid(uid_t uid, int32_t mountMode) {
|
||||
if (GetBoolProperty(android::vold::kPropFuse, false)) {
|
||||
if (GetBoolProperty(android::vold::kPropFuseSnapshot, false)) {
|
||||
// TODO(135341433): Implement fuse specific logic.
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ status_t EmulatedVolume::doMount() {
|
|||
|
||||
dev_t before = GetDevice(mFuseFull);
|
||||
|
||||
bool isFuse = base::GetBoolProperty(kPropFuse, false);
|
||||
bool isFuse = base::GetBoolProperty(kPropFuseSnapshot, false);
|
||||
|
||||
if (isFuse) {
|
||||
LOG(INFO) << "Mounting emulated fuse volume";
|
||||
|
@ -150,7 +150,7 @@ status_t EmulatedVolume::doUnmount() {
|
|||
// error code and might cause broken behaviour in applications.
|
||||
KillProcessesUsingPath(getPath());
|
||||
|
||||
bool isFuse = base::GetBoolProperty(kPropFuse, false);
|
||||
bool isFuse = base::GetBoolProperty(kPropFuseSnapshot, false);
|
||||
if (isFuse) {
|
||||
// We could have migrated storage to an adopted private volume, so always
|
||||
// call primary storage "emulated" to avoid media rescans.
|
||||
|
|
|
@ -169,7 +169,7 @@ status_t PublicVolume::doMount() {
|
|||
|
||||
dev_t before = GetDevice(mFuseFull);
|
||||
|
||||
bool isFuse = base::GetBoolProperty(kPropFuse, false);
|
||||
bool isFuse = base::GetBoolProperty(kPropFuseSnapshot, false);
|
||||
|
||||
if (isFuse) {
|
||||
LOG(INFO) << "Mounting public fuse volume";
|
||||
|
@ -245,7 +245,7 @@ status_t PublicVolume::doUnmount() {
|
|||
// error code and might cause broken behaviour in applications.
|
||||
KillProcessesUsingPath(getPath());
|
||||
|
||||
bool isFuse = base::GetBoolProperty(kPropFuse, false);
|
||||
bool isFuse = base::GetBoolProperty(kPropFuseSnapshot, false);
|
||||
if (isFuse) {
|
||||
// Use UUID as stable name, if available
|
||||
std::string stableName = getId();
|
||||
|
|
Loading…
Reference in a new issue