[Skiboot] [PATCH 4/6] libflash/blocklevel: Allow double ecc protecting a region

Stewart Smith stewart at linux.vnet.ibm.com
Tue Oct 11 15:51:53 AEDT 2016


Cyril Bur <cyril.bur at au1.ibm.com> writes:
> Currently the policy for calling ECC protecting a range at the
> blocklevel layer is that the requested region be completely
> unprotected otherwise the call will return an error. It turns out that
> duplicate calls to ffs_init() with true as the last parameter (for the
> same blocklevel structure) will cause duplicate attempts to
> ecc_protect() ranges.
>
> Change the policy within blocklevel to allow duplicate protecting.
> In fact the new policy almost guarantees no failure (baring something
> odd like malloc() failing). It will detect that the range is currently
> already fully protected and do nothing, detect that part of the range
> is or is not and extend the existing range or detect that a range fits
> perfectly between two ranges in which case it will merge the ranges.
>
> Also adjust tests to match the new policy.
>
> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>

Merged to master as of a452b83cd9eac584073fa19eb76e133de913ef52

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list