Commit graph

5724 commits

Author SHA1 Message Date
Daeho Jeong
aa259e7ee0 Merge changes from topic "change_period" am: c0de6d8184 am: 3d81e0ba06
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2043104

Change-Id: I473b88c8b3b1e8dd6ee80fe56f513269fd997a4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 23:10:14 +00:00
Daeho Jeong
529d797f58 vold: do not set gc sleep time with zero dirty segments am: 0b5f397e2b am: f605ac329b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2033123

Change-Id: I8c2ba8b86059a78b65094aa013e249c80f901a7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 23:10:12 +00:00
Daeho Jeong
a644d5c642 vold: add gc period in setGCUrgentPace am: 7c788fc3e9 am: 81ba5bcf1c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2032446

Change-Id: I2ec34972e89ecf6872dece12b0ab05bc9a07511c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 23:10:11 +00:00
Daeho Jeong
3d81e0ba06 Merge changes from topic "change_period" am: c0de6d8184
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2043104

Change-Id: I5f33ee1baa66c6278139ca9e17a7ef4c5836e674
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 22:47:20 +00:00
Daeho Jeong
f605ac329b vold: do not set gc sleep time with zero dirty segments am: 0b5f397e2b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2033123

Change-Id: I30d462858c6b3acc8e7aebc9bed55deb4716db14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 22:47:19 +00:00
Daeho Jeong
81ba5bcf1c vold: add gc period in setGCUrgentPace am: 7c788fc3e9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2032446

Change-Id: I691c355f6eb91f83af0b4bbdade10bd67ceb62a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 22:47:17 +00:00
Daeho Jeong
c0de6d8184 Merge changes from topic "change_period"
* changes:
  vold: remove overprovision area from free segments
  vold: do not set gc sleep time with zero dirty segments
  vold: add gc period in setGCUrgentPace
2022-03-25 22:26:12 +00:00
Daeho Jeong
3ccdeb3fbb vold: remove overprovision area from free segments
overprovision space and reserved area should be subtracted when we
calculate free segments count in GC for data blocks.

Test: check Vold setGCUrgentPace log
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I7b749588ff794ff0429e17a787d83bcc19af0ec1
2022-03-25 10:06:13 -07:00
Treehugger Robot
c709bd40e9 Merge "Add vold to hwasan-postsubmit" am: 203ad70aa2 am: 3b35b2fcc5 am: eb22f77c92
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2032447

Change-Id: I1cc403c744d5b6dc6698af90d5fc9af48c799624
2022-03-24 11:13:44 +00:00
Treehugger Robot
eb22f77c92 Merge "Add vold to hwasan-postsubmit" am: 203ad70aa2 am: 3b35b2fcc5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2032447

Change-Id: I8eb7cf3fb00ba28afbe0d075d2104d8f06aeffc2
2022-03-24 10:58:40 +00:00
Treehugger Robot
3b35b2fcc5 Merge "Add vold to hwasan-postsubmit" am: 203ad70aa2
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2032447

Change-Id: I046fd17ddeaeee61cdc107c57e00a70739bd0232
2022-03-24 10:21:04 +00:00
Treehugger Robot
203ad70aa2 Merge "Add vold to hwasan-postsubmit" 2022-03-24 09:56:09 +00:00
TreeHugger Robot
2abc603e3d Merge "FUSE-BPF: use both ro and persist properties" into tm-dev 2022-03-24 07:28:55 +00:00
Treehugger Robot
f4dd7c8877 Merge "Use make_f2fs -g android by default" am: fa9165f07b am: eb51baf132 am: 7f635c0bb1
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2037166

Change-Id: I92481ef22189435b0f5ef70992bbd718d752892e
2022-03-23 21:57:14 +00:00
Treehugger Robot
7f635c0bb1 Merge "Use make_f2fs -g android by default" am: fa9165f07b am: eb51baf132
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2037166

Change-Id: Ie4b8fa23a8804261ef7c182296fe96262cc16c4a
2022-03-23 21:16:34 +00:00
Treehugger Robot
eb51baf132 Merge "Use make_f2fs -g android by default" am: fa9165f07b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2037166

Change-Id: I0760bc2019fa5f5ce88b549092f984fd60c59ed7
2022-03-23 20:56:37 +00:00
Treehugger Robot
fa9165f07b Merge "Use make_f2fs -g android by default" 2022-03-23 20:33:51 +00:00
Alessio Balsini
583ae3e55d FUSE-BPF: use both ro and persist properties
persist.sys.fuse.bpf.enable and ro.fuse.bpf.enabled are both used to
decide if FUSE-BPF must be enabled or not.
- ro.fuse.bpf.enabled is a read-only property that is set in the device
  makefile and would allow dogfooding devices to turn the feature
  on/off.
- persist.sys.fuse.bpf.enable is a system property that overrides
  ro.fuse.bpf.enabled and can only be set manually during the
  development to simplify the testing of FUSE-BPF, mostly to compare if
  those tests that are failing with FUSE-BPF were failing also without
  the feature.

Bug: 202785178
Test: adb logcat | grep "FuseDaemon" | grep BPF
Ignore-AOSP-First: FUSE-BPF is not available in AOSP
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I23f9d27172907f6c72c73bea22e4a7e0ac643888
2022-03-23 19:57:28 +00:00
Jaegeuk Kim
2b8957dce6 Use make_f2fs -g android by default
It enables encrypt, proejct_quota, verity by default.

Bug: 225401790
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I6c6dc81b8e62b20b0107d40a9ed5b645cdafbda1
2022-03-22 17:54:40 -07:00
Eric Biggers
16b7a74bcf Merge "Increase early boot logging to kernel log" am: d420cae64e am: 576df715e8 am: 4d18a98dfd
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2035283

Change-Id: I33a17e93189bd156cdbe98aecb67929f7c8f65ee
2022-03-22 18:05:41 +00:00
Eric Biggers
117e3648da Merge "Remove FDE methods from binder interface" am: 66d13bd28c am: 3d380e1f12 am: 3fd082a2a5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030592

Change-Id: Id7449b7ee055e93b02fb95cda813f78410415464
2022-03-22 18:04:27 +00:00
Eric Biggers
4d18a98dfd Merge "Increase early boot logging to kernel log" am: d420cae64e am: 576df715e8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2035283

Change-Id: Ia16889f8d52f809fe8bcac33a1bd4b8fc0066b5a
2022-03-22 18:03:31 +00:00
Eric Biggers
576df715e8 Merge "Increase early boot logging to kernel log" am: d420cae64e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2035283

Change-Id: Ie27bab8ce4e8dda149e7581906bec925d54df139
2022-03-22 17:56:19 +00:00
Eric Biggers
3fd082a2a5 Merge "Remove FDE methods from binder interface" am: 66d13bd28c am: 3d380e1f12
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030592

Change-Id: I13009af00a3893bacf9b994b32673cb9d3139cb1
2022-03-22 17:47:03 +00:00
Eric Biggers
3d380e1f12 Merge "Remove FDE methods from binder interface" am: 66d13bd28c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030592

Change-Id: Ie9f4cdf360d666aa2125318f83ace70fc2f1b382
2022-03-22 17:46:14 +00:00
Eric Biggers
d420cae64e Merge "Increase early boot logging to kernel log" 2022-03-22 17:44:07 +00:00
Eric Biggers
66d13bd28c Merge "Remove FDE methods from binder interface" 2022-03-22 17:37:32 +00:00
Shikha Malhotra
b53bfcabd9 Merge "Enable ProjectID for the file systems by default." am: 8acf8298f9 am: 2727ad7d1a am: e2d020d12f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1967545

Change-Id: I6ec564f62fd1fbc777aa59f7af4a5b71adf76a0c
2022-03-22 17:05:45 +00:00
Shikha Malhotra
e2d020d12f Merge "Enable ProjectID for the file systems by default." am: 8acf8298f9 am: 2727ad7d1a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1967545

Change-Id: I3c6c22f3b074131caf0e174230727f18548a2778
2022-03-22 17:04:53 +00:00
Shikha Malhotra
2727ad7d1a Merge "Enable ProjectID for the file systems by default." am: 8acf8298f9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1967545

Change-Id: I6c451355f6aad20f549ee6fdb98b1c33b4df1a54
2022-03-22 16:49:23 +00:00
Shikha Malhotra
8acf8298f9 Merge "Enable ProjectID for the file systems by default." 2022-03-22 16:32:40 +00:00
Eric Biggers
fb486660ca Increase early boot logging to kernel log
Make vold log warnings and errors to the kernel log until both
init_user0 has run and /data is mounted.  Previously it only logged
errors, and not warnings, to the kernel log until /data is mounted.

This is helpful to diagnose failures of init_user0, since adb still
isn't started by that point.

Also, error messages can be misleading without seeing related warning
messages, e.g. the following which is expected on many devices:

    E vold    : keystore2 Keystore generateKey returned service specific error: -67
    W vold    : Failed to generate rollback-resistant key.  This is
                expected if keystore doesn't support rollback
                resistance.  Falling back to non-rollback-resistant key.

Therefore, increase the log level to WARNING and above.

Test: Intentionally broke fscrypt_init_user0(), then verified that the
      error and warning messages appear in the kernel log on Cuttlefish.
Bug: 205314634
Bug: 222540970
Change-Id: Ia751f7c88cbf28caf81e891a518953cc0cee911e
2022-03-22 00:33:52 +00:00
Samiul Islam
656d836566 [automerger skipped] Merge "Create misc_ce and misc_de directories on /mnt/expand" am: fda93c9f31 am: a9c554bd05 am: 15a316dbd2 -s ours
am skip reason: Merged-In I0e73d9ce105abec4b77c378cde58aa7365258f01 with SHA-1 b459591fd1 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030127

Change-Id: I48219587f15278e4a48dc778a4397aeb06542d15
2022-03-21 13:47:03 +00:00
Samiul Islam
15a316dbd2 Merge "Create misc_ce and misc_de directories on /mnt/expand" am: fda93c9f31 am: a9c554bd05
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030127

Change-Id: I60368dea371d31cf5a7354807822ef566a7da793
2022-03-21 13:11:41 +00:00
Samiul Islam
a9c554bd05 Merge "Create misc_ce and misc_de directories on /mnt/expand" am: fda93c9f31
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030127

Change-Id: I844d48df7e587693791a17a23cc14d87a358fa5e
2022-03-21 12:37:19 +00:00
Samiul Islam
fda93c9f31 Merge "Create misc_ce and misc_de directories on /mnt/expand" 2022-03-21 12:01:54 +00:00
Eric Biggers
b3ea454002 Remove FDE methods from binder interface
Now that none of these methods are used anymore, we can remove them.
Also remove the related constants.

Bug: 208476087
Change-Id: I1f56c8e05fb3fba09aab4bf5f8609b0f552b8999
2022-03-21 05:11:21 +00:00
Treehugger Robot
d908d2edd4 Merge changes from topic "metadata_encryption_options" am: 10ca7def20 am: 09c6fcafa0 am: 5a91b7151e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030589

Change-Id: I094284b2d4b5667a845460b2fd05e07e0ec149fe
2022-03-19 04:42:12 +00:00
Treehugger Robot
06505f7abb Merge "Replace an outdated TODO in Keystore::exportKey" am: aadef5cd8a am: 7ff572e24e am: 6101244f82
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2031283

Change-Id: I20bcf6257702d4f9ccbdb735084bdbf91d1dc928
2022-03-19 04:41:58 +00:00
Daeho Jeong
0b5f397e2b vold: do not set gc sleep time with zero dirty segments
When there is not enough dirty segments to reclaim, we don't have to set
gc sleep time.

Test: Run smart idle maint with zero dirty segments
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: If6a9965ecb9b1a91bf5d0dd763d5fa0af63348e0
2022-03-18 21:30:47 -07:00
Treehugger Robot
5a91b7151e Merge changes from topic "metadata_encryption_options" am: 10ca7def20 am: 09c6fcafa0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030589

Change-Id: I53066586620a318a332936310ddba142fd56386d
2022-03-19 04:30:20 +00:00
Treehugger Robot
6101244f82 Merge "Replace an outdated TODO in Keystore::exportKey" am: aadef5cd8a am: 7ff572e24e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2031283

Change-Id: I7e5da8ef426ea97e733afa7967ba341689ec1424
2022-03-19 04:30:09 +00:00
Treehugger Robot
09c6fcafa0 Merge changes from topic "metadata_encryption_options" am: 10ca7def20
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2030589

Change-Id: I1e42a04fb2b92d2b798d3b4991f4a026f6594c30
2022-03-19 04:15:24 +00:00
Treehugger Robot
10ca7def20 Merge changes from topic "metadata_encryption_options"
* changes:
  Rename FstabEntry::metadata_encryption to metadata_encryption_options
  Fix check for whether metadata encryption is enabled
2022-03-19 04:12:05 +00:00
Treehugger Robot
7ff572e24e Merge "Replace an outdated TODO in Keystore::exportKey" am: aadef5cd8a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2031283

Change-Id: I426731cf85fb49110ba7eac2ea472008495b756f
2022-03-19 04:08:41 +00:00
Treehugger Robot
aadef5cd8a Merge "Replace an outdated TODO in Keystore::exportKey" 2022-03-19 03:53:45 +00:00
Florian Mayer
11d45326d9 Add vold to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I03e7506f932cb42a91261bd1c28f3d7f60dd5f1e
2022-03-18 14:25:02 -07:00
Daeho Jeong
7c788fc3e9 vold: add gc period in setGCUrgentPace
To make gc period changable, added a new gcPeriod parameter to
setGCUrgentPace.

Test: adb shell device_config put storage_native_boot smart_idle_maint_period 10
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I4e44a80ea5b51d9a7cde69d25e129dd0673b271f
2022-03-18 12:56:17 -07:00
Mohammad Samiul Islam
e833630eb7 Create misc_ce and misc_de directories on /mnt/expand
We want to store sdk data on the same volume as app data. Since sdk data
is stored in misc_ce and misc_de directory, we need to ensure they exist
on adopted storage mounted at /mnt/expand/<volume-uuid>.

This CL creates `/mnt/expand/<volume-uuid>/misc_{ce,de}` directories
when disk is mouted and then when user storage is prepared, the sdk root
directory is created.

By having these directories, we can now move the sdk data to other
volume when app data is moved.

Bug: b/222034645
Test: atest SdkSandboxStorageHostTest (see ag/17120883)
Ignore-AOSP-First: End to end test added which exists in internal branch
    only. Will cherry-pick this CL to aosp standalone once it is safely
    merged to internal branch.
Change-Id: I0e73d9ce105abec4b77c378cde58aa7365258f01
Merged-In: I0e73d9ce105abec4b77c378cde58aa7365258f01
(cherry picked from commit b459591fd1)
2022-03-18 11:11:22 +00:00
Eric Biggers
41d7843513 Rename FstabEntry::metadata_encryption to metadata_encryption_options
There have been two bugs where people use !metadata_encryption.empty()
to check whether metadata encryption is enabled.  It should actually be
!metadata_key_dir.empty(), since 'metadata_encryption' is the encryption
options, which can be empty if the defaults are sufficient.

Rename the field in FstabEntry appropriately.

To avoid breaking fstab files, don't rename the flag in the fstab file
itself.  So, now the fstab flags map to FstabEntry fields as follows:

    keydirectory => metadata_key_dir
    metadata_encryption => metadata_encryption_options

Change-Id: I3b5e28c273950bcf13bfd433aaaa49d1e92e177c
2022-03-17 23:21:16 +00:00