summaryrefslogtreecommitdiff
path: root/Loop.h
Commit message (Collapse)AuthorAgeFilesLines
* clang-format many files.Paul Crowley2018-09-181-7/+8
| | | | | Test: Format-only changes; treehugger suffices. Change-Id: I23cde3f0bbcac13bef555d13514e922c79d5ad48
* Move to modern utility methods from android::base.Jeff Sharkey2017-10-171-2/+0
| | | | | | | | | | | | | | | | | | Moves away from crufty char* operations to std::string utility methods, including android::base methods for splitting/parsing. Rewrite of how Process handles scanning procfs for filesystem references; now uses fts(3) for more sane traversal. Replace sscanf() with new FindValue() method, also has unit tests. Remove some unused methods. Switch almost everyone over to using modern logging library. Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest Bug: 67041047 Change-Id: I70dc512f21459d1e25b187f24289002b2c7bc7af
* Destroy vold socket interface completely.Jeff Sharkey2017-09-181-5/+0
| | | | | | | | Long live Binder. Test: yes Bug: 13758960 Change-Id: If6be379b5a873f1b0c66dd1522b87413ad10fc46
* Move even more vold commands over to Binder.Jeff Sharkey2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | This moves fstrim, obb and appfuse commands over to the new Binder interface. This change also separates creating/destroying and mounting/unmounting of OBB volumes, which means they finally flow nicely into the modern VolumeInfo/VolumeBase design. We now generate unique identifiers for all OBB volumes, instead of using a shady MD5 hash. Change all "loop" and "dm" devices to tag the kernel resources with a vold-specific prefix so that we can clean them up if vold crashes; there are new destroyAll() methods that handle this cleanup. Move appfuse mounting/unmounting into VolumeManager so it can be shared. Move various model objects into a separate directory to tidy things up. Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest Bug: 13758960 Change-Id: I7294e32b3fb6efe07cb3b77bd20166e70b66958f
* Add a new "virtual disk" feature.Jeff Sharkey2017-03-251-0/+2
| | | | | | | | | | | | | | | It's extremely difficult to test storage related logic on devices that don't have physical SD card slots. So to support better debugging and testing, add a new "virtual disk" feature which mounts a 512MB file through loop device. It relies on the kernel having the "loop.max_part" value set to something other than 0 via the boot command line, since that allows all the existing partition logic to fall into place. Bug: 34903607 Test: builds, boots, virtual disk works Change-Id: I04c5b33e37319d867542985a56b7999a9b7cf35d
* vold: fix 64 bit ioctl errorMateusz Nowak2015-10-211-2/+2
| | | | | | | | | | | Changing the num_sectors used in ioctl with BLKGETSIZE because the kernel expects an unsigned long type and then changes 64 bits with a 64 bits userspace. This overwrites what's located close to the parameter location if any. Change-Id: I78fd61a1084de2741f39b926aa436462518709a0 Signed-off-by: Mateusz Nowak <mateusz.nowak@intel.com> Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
* Fixed type mismatch for ioctl(BLKGETSIZE)Hiroaki Miyazawa2015-03-301-1/+1
| | | | | | | | | | | | | | | | ioctl(BLKGETSIZE) expects unsigned long (8 bytes on 64 bit environment). This is fixing fails in android.os.storage.StorageManagerIntegrationTest (in FrameworkCoreTests). To verify, install FrameworksCoreTests.apk and do: adb shell am instrument -r -w -e class android.os.storage.\ StorageManagerIntegrationTest#testMountSingleEncryptedObb \ com.android.frameworks.coretests/android.test.InstrumentationTestRunner Change-Id: Ib6d5c7490c02521c93f107c35ad0aac49f6a3f1a
* Added support for ext4 ASEC resizing.Daniel Rosenberg2014-06-101-0/+1
| | | | | | | | | ASECs formatted as ext4 can now be resized using vdc asec resize. Refactored some common code. Requires resize2fs. Change-Id: Ie78bb6015114a7bc4af42b16d1f299322ffc1e2a Signed-off-by: Daniel Rosenberg <drosen@google.com>
* Add in ext4 support for ASEC containersKenny Root2012-04-251-0/+1
| | | | | | | | | Now forward locked applications will be in ASEC containers both internal to the system and externally. This change adds support for putting applications in ext4-based ASECs. Change-Id: I8d6765b72dd2606e429c067b47a2dbcaa8bef37d
* vold: Bugfixes & cleanupsSan Mehat2010-03-131-2/+6
| | | | | | | | | | | | | - Fix issue where container-names > 64 bytes were getting truncated in the kernel. lo_name is only 64 bytes in length, so we now hash the container id via md5 - Add 'dump' command to dump loop and devicemapper status - Add 'debug' command to enable more detailed logging at runtime - Log vold IPC arguments (minus encryption keys) - Fix premature return from Loop::lookupActive() and friends Change-Id: I0e833261a445ce9dc1a8187e5501d27daba1ca76 Signed-off-by: San Mehat <san@google.com>
* vold: Internally use sector counts for asec lengthsSan Mehat2010-01-111-1/+1
| | | | Signed-off-by: San Mehat <san@google.com>
* vold: Add encrypted ASEC support via devmapperSan Mehat2010-01-111-1/+1
| | | | | | | | - Supports up to 4096 containers - Keys are now implemented - specifying a key of 'none' means no encryption. Otherwise, the key must be a string of 32 characters Signed-off-by: San Mehat <san@google.com>
* vold: Increase max supported loop devices to 255San Mehat2010-01-091-4/+2
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Initial support for Android Secure External CachesSan Mehat2010-01-061-0/+36
Signed-off-by: San Mehat <san@google.com>