In any case, UFS storage suffers from long discard latency.
Change-Id: Iaa8ef6eb862934af43254bd10873a12c3d34e926
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
* Print an error if -c is provided with -f and -L since it is ambiguous
* Move the clear operation when -f is provided to a stand alone
location, since there is no need to loop
* Prevent -g/-G, -S, and -p/-P with -f, since that combination doesn't
make sense
Test: logpersist works
Change-Id: I6d8709bd61c898c47835470e99b0acff8c2692e4
Such services will be re-parsed and added back to the service list
during post-fs-data stage.
Test: adb reboot userspace
Test: atest CtsInitTestCases
Bug: 145669993
Bug: 135984674
Change-Id: Ibb393dfe0f101c4ebe37bc763733fd5d981d3691
Run this process as early as possible in the boot -- right
after its config has been parsed from the apex. This ensures
the sdk prop is set as early as it can be, should some other
early process need to look at it.
Note: this is unlikely to be the permanent way this gets run,
as it's only needed when apexes update.
Bug: 137191822
Test: boot && adb shell getprop | grep sdk_info
Change-Id: Ia48ef89435ca165333b52d653e3131f71a522747
In some scenarios (e.g. apexd or userspace reboot), dm-devices are
getting deleted and re-created. Since this operation can be racy (newly
created device can get the same path as the previously deleted one,
resulting in the unexpected ENOENT errors on a system call to the path),
it will be nice to have an API that blocks until ueventd processes
corresponding udev events.
Test: libdm_test
Bug: 143970043
Bug: 122059364
Change-Id: I31a19afd9e245bf5e3554011bdde1c3cc4878f1c
Init is no longer a special case and talks to property service just
like every other client, therefore move it away from property_set()
and to android::base::SetProperty().
In doing so, this change moves the initial property set up from the
kernel command line and property files directly into PropertyInit().
This makes the responsibilities between init and property services
more clear.
Test: boot, unit test cases
Change-Id: I36b8c83e845d887f1b203355c2391ec123c3d05f
We don't need to be so strict about this comparison. It's possible
that logd will extend the message that it passes to readers in the
future, and since we have a hdr_size parameter it can do so in a
backwards compatible way, as long as we loosen this restriction.
This keeps a sane upper bound that the hdr_size cannot be larger than
the log message itself.
Test: logcat, liblog-unit-tests
Change-Id: I8a6bea2a2d6e3315d998c51c1029e466ff06b45f
... by writing to a temporary file then rename()'ing it
back.
Test: libsnapshot_test
Bug: 144549076
Change-Id: Ide400aff8d67d56d422d0adea3a4f1673ebc9994
We used to flock() on /metadata/ota/state to ensure
atomic access. However, writing the file itself is
not necessary atomic and may lead to inconsistent
states.
This change redirects flock() to the outer directory, /metadata/ota,
which is very likely to exist (see exception below).
flock() is called on this directory instead of /state. This allows
a follow-up change to turn all writes to the /metadata partition
atomic.
Note: /metadata/ota may not exist during first boot after a flash
with wipe. However, first_stage_init always checks existence of
boot indicator before even trying to flock() (via
IsSnapshotManagerNeeded() and NeedSnapshotsInFirstStageMount()). If
the boot indicator exists, /metadata/ota must exist as well.
Also add tests to ensure LockExclusive() and LockShared() works as
expected.
Test: libsnapshot_test
Test: apply OTA from older build to this, then reboot
Bug: 144549076
Change-Id: Ib4dd9e9be1a43013c328e181b9398ac0b514dbce
The function StepIfSignalHandler assumed that the rel_pc passed
to it was actually an elf offset. A new version of clang created a libc.so
that has a load bias, so tests unwinding through a signal handler
would fail on arm. On other ABIs, there is unwind information that could
be used instead, so the unwind still worked.
The fix is to subtract the load bias from the rel_pc to get an elf
offset to pass to the Register StepIfSignalHandler functions. Change all
of the Register funtions to make it clear what the first parameter means.
Add a unit test for this new code. Also, add an offline test for
this case.
Bug: 145683525
Test: Ran unit tests using the new clang and the old clang.
Change-Id: I3e249653b79bcad6d3a56411a7911fde4888e9d6
Makes slight improvements to the --help text:
- Fix whitespace formatting and punctuation.
- Divide options into categories
- Clarify how the logd control functions work.
- Clarify --print.
Add additional text to the EOF error message that is returned when
logd disconnects the logcat instance, to clarify that this is intended
behavior if the logcat instance is reading too slowly.
Bug: 144311420
Test: view these messages
Change-Id: Icc12d278a8e8cb483918c0637b6fb529949cc33f
During userspace reboot FscryptInstallKeyring will be called again, this
CL will make it second call a no-op, which IMHO is better than having a
special logic in init to conditionally call FscryptInstallKeyring
depending on whenever it's normal boot, or userspace reboot.
Test: adb reboot userspace
Test: checked in kernel logs that new keyring is not created
Bug: 135984674
Change-Id: I4ad5aee6887b7318fb1cd02bf1c7be8da6ece599
The following directories are being moved into separate projects under
system/memory:
platform/system/memory/libion
platform/system/memory/libmeminfo
platform/system/memory/libmemtrack
platform/system/memory/libmemunreachable
platform/system/memory/lmkd
Remove them from system/core.
Bug: 141634854
Test: build and boot
Change-Id: I0ecc0668a281ec360133c8472bbf12ece92116d2
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: Ica64900cd8af273fdffd321591acf3a566f04355
Merged-In: I98793edd10954058448727635f101219f71d3ccf
We're never going to fix this warning and it's not causing any active
issues that vendors are using this header. It is however causing
active issues that we have extraneous warning messages in the log.
Bug: 123758136
Test: no build warnings from <cutils/log.h>
Change-Id: Iccf702bf2536ba106a00ac04467d54401cbe2a50
The code was not properly getting the variable addresses and using
the offset and address fields of the .data section.
Fix all of that, and update the tests.
Bug: 145162678
Test: Unit tests pass.
Test: ./art/test/run-test --dex2oat-jobs 4 --host --prebuild --compact-dex-level fast --jit --no-relocate --runtime-option -Xcheck:jni 137-cfi
Test: ./art/test/testrunner/testrunner.py -t 137 --host
Change-Id: Ic61c4487334fd2273cda9c56eb1a3b525a03edb7
Helper function to compare the source and destination extents of a
SOURCE_COPY InstallOperation.
The function returns true iff source and destination are identical with
the use of std::equal().
Bug: 141207436
Test: build
Change-Id: I146aeba1c8ede35f21cfef8e21d4af62274bda84
Signed-off-by: Alessio Balsini <balsini@google.com>
dm-verity and error correction use part of the partitions using these
features to store their data. Their data may be modified during an
update, so the COW device for the dm-snapshot must reserve some extra
space for them.
This patch extends the PartitionCowCreator data structure with the
extra_extents field that will store the (optional) additional extents,
e.g., the hash table extent for dm-verity or the error correction
extent.
Test: incremental OTA apply
Test: libsnapshot_test
Bug: 145180464
Change-Id: I387a6cc8438507ad41a85cc3400241ecaf627b8f
Signed-off-by: Alessio Balsini <balsini@google.com>
Logcat dup-es STDOUT and used the dup-ed file descriptor to write logging
information. Because of this writes happen on that fd and not on stdout.
This in turn causes no output in the LogcatService in the emulator.
The qemu-pipe forwarder now dup-es the same fd as logcat is using so
that we receive data again.
Bug: b/145214141
Test: Logcat works again in emulator 29.2.10
Change-Id: Ia6e2430f1d7a0476a5b438d315a9ea337c13806d