diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-03-13 16:09:20 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-03-30 19:46:31 -0700 |
commit | 36801cccf27152c9eca5aab6ba3527221525110f (patch) | |
tree | 3020e87ca409ad34255d77cc0b6403b9bc5a0b80 /EmulatedVolume.h | |
parent | 2a8c10965a8a9e17fb290ac5acba2daf936ff1bb (diff) | |
download | android_system_vold-36801cccf27152c9eca5aab6ba3527221525110f.tar.gz android_system_vold-36801cccf27152c9eca5aab6ba3527221525110f.tar.bz2 android_system_vold-36801cccf27152c9eca5aab6ba3527221525110f.zip |
Progress towards dynamic storage support.
Wire up new Disk and VolumeBase objects and events to start replacing
older DirectVolume code. Use filesystem UUID as visible PublicVolume
name to be more deterministic.
When starting, create DiskSource instances based on fstab, and watch
for kernel devices to appear. Turn matching devices into Disk
objects, scan for partitions, and create any relevant VolumeBase
objects. Broadcast all of these events towards userspace so the
framework can decide what to mount.
Keep track of the primary VolumeBase, and update the new per-user
/storage/self/primary symlink for all started users.
Provide a reset command that framework uses to start from a known
state when runtime is restarted. When vold is unexpectedly killed,
try recovering by unmounting everything under /mnt and /storage
before moving forward.
Remove UMS sharing support for now, since no current devices support
it; MTP is the recommended solution going forward because it offers
better multi-user support.
Switch killProcessesWithOpenFiles() to directly take signal. Fix
one SOCK_CLOEXEC bug, but SELinux says there are more lurking.
Bug: 19993667
Change-Id: I2dad1303aa4667ec14c52f774e2a28b3c1c1ff6d
Diffstat (limited to 'EmulatedVolume.h')
-rw-r--r-- | EmulatedVolume.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/EmulatedVolume.h b/EmulatedVolume.h index 972351c..3e28bcb 100644 --- a/EmulatedVolume.h +++ b/EmulatedVolume.h @@ -37,31 +37,20 @@ namespace vold { */ class EmulatedVolume : public VolumeBase { public: - EmulatedVolume(const std::string& rawPath, const std::string& nickname); + EmulatedVolume(const std::string& rawPath, const std::string& fsUuid); virtual ~EmulatedVolume(); - void setPrimary(bool primary); - bool getPrimary() { return mPrimary; } - - status_t bindUser(userid_t user); - status_t unbindUser(userid_t user); +protected: + status_t doMount() override; + status_t doUnmount() override; private: /* Mount point of raw storage */ std::string mRawPath; - /* Mount point of FUSE wrapper */ + /* Mount point of visible storage */ std::string mFusePath; /* PID of FUSE wrapper */ pid_t mFusePid; - /* Flag indicating this is primary storage */ - bool mPrimary; - -protected: - status_t doMount(); - status_t doUnmount(); - status_t doFormat(); - - status_t bindUserInternal(userid_t user, bool bind); DISALLOW_COPY_AND_ASSIGN(EmulatedVolume); }; |