summaryrefslogtreecommitdiffstats
path: root/EmulatedVolume.h
Commit message (Collapse)AuthorAgeFilesLines
* Progress towards dynamic storage support.Jeff Sharkey2015-03-301-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Checkpoint of better dynamic device support.Jeff Sharkey2015-03-131-0/+72
This is the first in a series of changes that are designed to introduce better support for dynamic block devices. It starts by defining a new Volume object which represents a storage endpoint that knows how to mount, unmount, and format itself. This could be a filesystem directly on a partition, or it could be an emulated FUSE filesystem, an ASEC, or an OBB. These new volumes can be "stacked" so that unmounting a volume will also unmount any volumes stacked above it. Volumes that provide shared storage can also be asked to present themselves (through bind mounts) into user-specific mount areas. This change also adds a Disk class which is created based on block kernel netlink events. Instead of waiting for partition events from the kernel, it uses gptfdisk to read partition details and creates the relevant Volume objects. Change-Id: I0e8bc1f8f9dcb24405f5e795c0658998e22ae2f7