| commit | abe862aae4527b4df569f9c664898202a073dabc | [log] [tgz] |
|---|---|---|
| author | Adriana Kobylak <anoo@us.ibm.com> | Wed Jul 17 16:09:00 2019 -0500 |
| committer | Adriana Kobylak <anoo@us.ibm.com> | Tue Jul 23 11:47:47 2019 -0500 |
| tree | a5b4f6b4f130ab4093010f378c9ad00a7b9da95b | |
| parent | adf91f58dac9f177a061d9b206d853a9db3db70a [diff] |
ubi: Rewrite freePriority
freePriority is called by RedundancyPriority::priority() to ensure that
there are no duplicate priority values. Originally, freePriority would
call priority() whenever it updated a priority value, but this would call
freePriority again. This can cause the priorities stored on flash to not
match the D-Bus values. The priorities on flash are used to determine
which version to boot from so that leads to unexpected behavior.
Example is if A has priority 1 and B has priority 2, and the priority of
B is changed to 1, this triggers the new value of 1 to be stored on
flash, then A is bumped to 2, but then B that originally had 2 is bumped
to 3, so that at the end of the operation, B has priority 3 on flash but
the correct 1 in D-Bus.
The solution is to prevent freePriority from calling itself, by sorting
all versions by priority in ascending order, so that if a version is
bumped, then only the remaining versions need to be checked. Then
locally update the priority values on flash and on D-Bus for each
changed one.
Tested: Changed priorities multipled times and verified the mismatch is not
seen anymore.
Change-Id: I704ee98f356a1a77f431b83e4b9d787b2671aeb2
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
OpenPower PNOR (Processor NOR) Code Management provides a set of host software management applications for OpenPower systems. The host firmware is stored on the PNOR chip. More information can be found at Software Architecture or Host Code Update
To build this package, do the following steps:
1. ./bootstrap.sh
2. ./configure ${CONFIGURE_FLAGS}
3. make
To clean the repository run `./bootstrap.sh clean`.