summaryrefslogtreecommitdiffstats
path: root/fs_mgr
Commit message (Collapse)AuthorAgeFilesLines
* Use fsck.f2fs -a instead of -f for faster bootYusuke Sato2016-05-051-2/+2
| | | | | | | | | | | | | | | | | | and run fsck with -f on clean shutdown instead. With -f, fsck.f2fs always performs a full scan of the /data partition regardless of whether the partition is clean or not. The full scan takes more than 2 seconds on volantis-userdebug and delays the OS boot. With -a, the command does almost nothing when the partition is clean and finishes within 20-30ms on volantis-userdebug. When the partition has an error or its check point has CP_FSCK_FLAG (aka "need_fsck"), the command does exactly the same full scan as -f to fix it. Bug: 21853106 Change-Id: I126263caf34c0f5bb8f5e6794454d4e72526ce38
* Revert "Revert "fs_mgr: let fsck.f2fs actually attempt a fix""Steve Kondik2016-05-051-6/+6
| | | | | | This reverts commit 33ecd3756347ef2663e500949ab4b33392086fbc. Change-Id: Ifa430fca72eee3e6f49d5a259c1058f5c3829960
* fs_mgr: Add an optional libfs_mgr shared libraryDiogo Ferreira2016-04-081-0/+24
| | | | Change-Id: I79aec4549af3f71c8c08f8901f5edf9b5a6b8f62
* fs_mgr: BLKGETSIZE causes memory corruptionKeith Mok2016-02-201-3/+3
| | | | | | | | | BLKGETSIZE return unsigned long sector size, but unsigned long is of 8 bytes in 64 bits system. Passing an integar value will causes stack corruption. Use BLKGETSIZE64 instead. Change-Id: If2bf44673f5ab3436f79f0af3252990d56748f5c
* Revert "fs_mgr: let fsck.f2fs actually attempt a fix"Jaegeuk Kim2015-12-051-6/+6
| | | | | | | | | | | | | fsck.f2fs will correctly fix when it's required, without the -f flag. This reverts commit eb6036ac6be82dcc6e110de22574972631c8f83e. Change-Id: Iec9ca5e593b61f24b02db30bff7089fafee7635e Reviewed-on: http://gerrit.mot.com/721774 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Christopher Fries <cfries@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
* fs_mgr: Change f2fs pathKeith Mok2015-12-041-2/+2
| | | | | | | Fix if data partition is wiped, it won't format itself during bootup. Since f2fs path has been changed to /system/bin in M instead of /sbin Change-Id: Ic111487d2c5d91da385f2292205abd011128d17d
* Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-12/+58
|\ | | | | | | | | | | Android 6.0.0 release 26 Change-Id: I93d1e3767cbacab2b18cff360065c91b9eaf1d96
| * fs_mgr: trigger dm-verity error handling for invalid signaturesSami Tolvanen2015-09-221-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | Currently, the device doesn't mount verified partitions if the verity table signature is invalid, which usually means it fails to boot. This change instead sets up dm-verity with an invalid root hash and triggers device-specific error handling to recover from the corruption. Bug: 24256506 Change-Id: I6d693306fa0e7459c5500b028e433df61ecea6fb (cherry picked from commit 47caa5c386b436ba13de9f2ef356380f39afaf3f)
| * Update partition.*.verified even with ro.boot.veritymode setSami Tolvanen2015-07-151-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to have partition.*.verified properties even when bootloader is managing dm-verity mode, because we may have failed to set up the verified partition and need a property to indicate this. This means we still need to run fs_mgr_update_verity_state and walk through all the partitions to verify the device mapper status, just without updating verity mode. Bug: 22489805 Bug: 22507568 Change-Id: Iaf28185adb8b80e5452447e54e1f4e4417a34168 (cherry picked from commit 2f42554f18e2ba3d40b736ff9ff21e79953e86a5)
* | Rename libext2_uuid -> libext2_uuid_static libquanganh26272015-10-161-2/+2
| | | | | | | | Change-Id: I2dd416558321c424bca97efa973ee5a68b742a64
* | fs_mgr: When formating f2fs volumes, respect the length parameterKeith Mok2015-10-161-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | When formatting a volume because it is marked as formattable, the length parameter is discarded which makes fs_mgr write a filesystem to the full length of the block device. This patch adds length semantics to f2fs formatting, if the length is greater than zero, use that, if it isn't subtract that size from the block size. Change-Id: I526f80aa299e7b34e9802141e7fa7050d5cb5558 Ticket: SAMBAR-729
* | fs_mgr: When formating ext4 volumes, respect the length parameterDiogo Ferreira2015-10-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | When formatting a volume because it is marked as formattable, the length parameter is discarded which makes fs_mgr write a filesystem to the full length of the block device. This patch adds length semantics to ext4 formatting, if the length is greater than zero, use that, if it isn't subtract that size from the block size. Change-Id: I4d18d5161360f8de0e571352e705678682e61332 Ticket: CYNGNOS-931
* | fs_mgr: zram: allow specifying stream countSultan Qasim Khan2015-10-164-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | This parameter allows specifying the number of parallel streams to be used in compression and decompression. This option was added in Linux 3.15, so it is not very common among devices currently on the market, but it has been backported to some kernels. This option must be set before zRAM is activated, as the kernel does not allow switching from single stream to multistream compression once zRAM is active. Change-Id: I3f5ad96a65b3b4a6915d2700c398a236ea8931b0
* | fs_mgr: Skip filesystem check unless fs_type matchesDan Pasanen2015-10-162-5/+16
| | | | | | | | | | | | | | | | * Prevent accidentally destroying a partition of the wrong type. * Don't skip iterations of the internal mount_all loop, otherwise encryptability may not be properly handled. Change-Id: I8f3ddc396a5fb85f4ae0a0a11dd61fb4d6462d6d
* | fs_mgr: Add fs_mgr_get_entry_for_mount_point_after to headerDan Pasanen2015-10-161-0/+1
| | | | | | | | | | | | * Add this function for recovery to use Change-Id: I314c5452a337245ecac5c9628ad0568018e1cf7b
* | Modified the mounting sequence in case that MDTP is activated.Amit Blay2015-10-062-72/+134
|/ | | | | | | If MDTP is activated, any mount point that requires encryption would not be mounted to check if it is encrypted. Change-Id: I1866273239fda95120ee0e82ff019646ff4a0bd2
* fs_config: replace getenv('OUT') by new fs_config parameterThierry Strudel2015-07-091-1/+1
| | | | | | | | | | | | | | Using a getenv('OUT') in such a deep down function is a wrong design choice. Replacing with explicit parameter that may be NULL in case device specific files can be accessed from /. Since TARGET_COPY_OUT_SYSTEM may be defined to something different than system we also ensure that we use a path relative to TARGET_OUT to compute path to fs_config_* files. Bug: 21989305 Bug: 22048934 Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b Signed-off-by: Thierry Strudel <tstrudel@google.com>
* fs_mgr: Use ro.boot.veritymodeSami Tolvanen2015-07-081-1/+24
| | | | | | | | | | | | | | If verity state is managed by bootloader, it will pass the verity mode to the kernel in the androidboot.veritymode command line parameter. Init copies the value to the ro.boot.veritymode property. Check for ro.boot.veritymode in fs_mgr and use the value to set dm-verity mode. If this property is not set, store verity state in metadata as before, if a storage location is specified in fstab. Bug: 21605676 Change-Id: Ife3c978c133248432c302583d3b70e179605fe42 (cherry picked from commit ac5c1224cfc959b96f7a34068a807db9aaab9358)
* DO NOT MERGE Securely encrypt the master keyPaul Lawrence2015-05-291-11/+1
| | | | | | | | | | | | | | | | | | | | | | (chery-picked from commit 806d10be2336f32cdca16c2540cbf3d548f2fec7) Move all key management into vold Reuse vold's existing key management through the crypto footer to manage the device wide keys. Use ro.crypto.type flag to determine crypto type, which prevents any issues when running in block encrypted mode, as well as speeding up boot in block or no encryption. This is one of four changes to enable this functionality: https://android-review.googlesource.com/#/c/148586/ https://android-review.googlesource.com/#/c/148604/ https://android-review.googlesource.com/#/c/148606/ https://android-review.googlesource.com/#/c/148607/ Bug: 18151196 Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
* Don't use TEMP_FAILURE_RETRY on close in system/core.Elliott Hughes2015-05-272-10/+10
| | | | | | Bug: http://b/20501816 Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50 (cherry picked from commit 47b0134ec2b5e8c8b5b5671cd4a3e41261275532)
* am 2557cd21: am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to ↵Iliyan Malchev2015-05-131-1/+21
|\ | | | | | | | | | | | | be specified as percentage of total memory" into lmp-mr1-dev * commit '2557cd21f0af31d6dafee24d649f83314d2896d4': fs_mgr: allow for zramsize to be specified as percentage of total memory
| * am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified ↵Iliyan Malchev2015-05-121-1/+21
| |\ | | | | | | | | | | | | | | | | | | as percentage of total memory" into lmp-mr1-dev * commit '8b4486294053ea96ac50d8c07d4fc23729ef7c52': fs_mgr: allow for zramsize to be specified as percentage of total memory
| | * Merge "fs_mgr: allow for zramsize to be specified as percentage of total ↵Iliyan Malchev2015-05-121-1/+21
| | |\ | | | | | | | | | | | | memory" into lmp-mr1-dev
| | | * fs_mgr: allow for zramsize to be specified as percentage of total memoryIliyan Malchev2015-05-011-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the zramsize entry has a % size at the end, as in the following example: /dev/block/zram0 none swap defaults zramsize=25% then we will set the value as that percentage of total RAM, as read by scanning /proc/meminfo. b/20760266 Seed common build allocated too much for zRAM-backed swap Change-Id: I17c91d311ba99ae7adae112bfe1b38542ea69b80 Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | | am 92f075aa: am 48ba7587: am 34dd04db: Merge "Improve bad error reporting ↵Elliott Hughes2015-04-241-1/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | seen in shamu SELinux boot failures." * commit '92f075aa08a2665ad03c80a0408667f8864f1ecd': Improve bad error reporting seen in shamu SELinux boot failures.
| * | | am 48ba7587: am 34dd04db: Merge "Improve bad error reporting seen in shamu ↵Elliott Hughes2015-04-241-1/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SELinux boot failures." * commit '48ba758782bed8c50f450fd77c4b3284c3fa7316': Improve bad error reporting seen in shamu SELinux boot failures.
| | * | | Improve bad error reporting seen in shamu SELinux boot failures.Elliott Hughes2015-04-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explain why mount failed, and explicitly say that the umount fixed it. Change-Id: I13b0927a36517f2fc9f9580945ba6ebefc4882df
* | | | | resolved conflicts for merge of d0b6de41 to masterEd Tam2015-04-136-5/+171
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I1d1f6b1cdbd7ee441682c4258a11fb3198ca7d94
| * | | | resolved conflicts for merge of 79f33846 to lmp-mr1-dev-plus-aospEd Tam2015-04-136-5/+171
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / Change-Id: I24c60a2747931917a3ea09b953905ce0f4145280
| | * | fs_mgr: introduce fs_mgr_format to format wiped partitionsChris Fries2015-04-106-3/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move fastboot's format logic into fs_mgr, to consolidate the knowledge about how to do this (and when to wipe metadata). Try to format these formattable paritions if they are wiped. If formatting fails, we will fall out to let recovery mode handle it. Bug: 20082763 Change-Id: I397cc197550e78d932e8a154fd234695c46dbe7b
* | | | am d087e6f3: am 7a91e93e: am be940153: Merge "Revert "Revert "fs_mgr_verity: ↵Mohamad Ayyash2015-04-092-27/+54
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Add support for squashfs""" * commit 'd087e6f3ff0f928fb1ad7e47e488a3345ab8a555': Revert "Revert "fs_mgr_verity: Add support for squashfs""
| * | | Revert "Revert "fs_mgr_verity: Add support for squashfs""Mohamad Ayyash2015-04-082-27/+54
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7b97c7a3fa0f1bdae5b45a70f625ff48f9dab0c1. Change-Id: Id47e70479fe9247b7936f2e54d4dbfbb4f63f635
* | | | am 0009bacf: am d71eca9e: am e322ae19: Merge "Revert "fs_mgr_verity: Add ↵Mohamad Ayyash2015-04-082-39/+26
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | support for squashfs"" * commit '0009bacfda1f6b6a7421c3d1d7a07cc8c88c2090': Revert "fs_mgr_verity: Add support for squashfs"
| * | | Merge "Revert "fs_mgr_verity: Add support for squashfs""Mohamad Ayyash2015-04-082-39/+26
| |\ \ \
| | * | | Revert "fs_mgr_verity: Add support for squashfs"Mohamad Ayyash2015-04-082-39/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 807f47004f03653997edbe3c83d46350cb056cd4. Change-Id: I2d7972c0828c842b44747dd08fbe44668f2a55db
* | | | | am d411d14a: am 48bfdb85: am 70f81cee: Merge "fs_mgr_verity: Add support for ↵Mohamad Ayyash2015-04-082-26/+39
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | squashfs" * commit 'd411d14a07842563500cb8991f0f8a84fcb1cd8f': fs_mgr_verity: Add support for squashfs
| * | | | Merge "fs_mgr_verity: Add support for squashfs"Mohamad Ayyash2015-04-082-26/+39
| |\ \ \ \ | | |/ / /
| | * | | fs_mgr_verity: Add support for squashfsMohamad Ayyash2015-04-062-26/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Cleanup the code to get filesystem size in a block device - Add support to reading size of squashfs in a block device Change-Id: I3848a705ed4dc2fc9afad20331f0fdecfee545c5 Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
* | | | | am 13e8af05: am b6b66f8f: am 02f1d80a: Merge "Restore verity state when ↵Sami Tolvanen2015-04-071-20/+117
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | verified partition is reflashed" * commit '13e8af053b425b66199dc12b89c02236b517fac9': Restore verity state when verified partition is reflashed
| * | | | Merge "Restore verity state when verified partition is reflashed"Sami Tolvanen2015-04-071-20/+117
| |\ \ \ \
| | * | | | Restore verity state when verified partition is reflashedSami Tolvanen2015-03-311-20/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store verity state separately for each verified partition, and store a hash of the last verity table signature for each partition. If the signature changes, assume the partition has been reflashed and reset verity state. Bug: 20006638 Change-Id: I1c85fb816bfec1a54b1033c938bf1fdaf572f849
* | | | | | am 93c4b6c8: am ddaebb24: am 284c5cb2: Merge "Set verity mode as the ↵Sami Tolvanen2015-04-072-31/+37
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | verified property value" * commit '93c4b6c85ac4350029e1a78c16663f61c777ac14': Set verity mode as the verified property value
| * | | | | Merge "Set verity mode as the verified property value"Sami Tolvanen2015-04-072-31/+37
| |\ \ \ \ \ | | |/ / / / | | | / / / | | |/ / / | |/| | |
| | * | | Set verity mode as the verified property valueSami Tolvanen2015-03-312-31/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the verity mode as the value for partition.%s.verified to make it easier for userspace to determine in which mode dm-verity was started. Change-Id: Icc635515f8a8ede941277aed196867351d8387cb
* | | | | Merge "Revert "Revert "Adding e4crypt support"""Paul Lawrence2015-04-024-27/+102
|\ \ \ \ \
| * | | | | Revert "Revert "Adding e4crypt support""Paul Lawrence2015-04-014-27/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build break caused by original change This reverts commit 84b0bab58fcc7f225e9a17a15c531b0c2fc509c5. (cherry picked from commit bbb4c85bdcc9a1bce315ed9d61a228bb1b992a1c) Change-Id: If0ead0f2656b69f33f72c64b03a05784455a4143
* | | | | | am 1c4cdf72: am 4f6c526e: am 3891cfef: Merge "Link libc++_static into fs_mgr."Dan Albert2015-04-021-0/+1
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / / | | | | | * commit '1c4cdf72a685fe2b913244991b79a81a0d1c2620': Link libc++_static into fs_mgr.
| * | | | Link libc++_static into fs_mgr.Dan Albert2015-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic2461d3a30dbd8a22f9800a33fac27c658340b21
| * | | | Revert "Revert "Adding e4crypt support""Paul Lawrence2015-03-314-27/+102
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build break caused by original change This reverts commit 84b0bab58fcc7f225e9a17a15c531b0c2fc509c5. Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
* | | | am 825c2655: am 6ca1dbd4: am 6baab44e: Merge "Fix build"Sami Tolvanen2015-03-261-15/+14
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '825c2655b7bbd5f88d316a5a9b3a746c50282c24': Fix build