[Skiboot] [PATCH] libflash/blocklevel: Allow double ecc protecting a region
Cyril Bur
cyril.bur at au1.ibm.com
Thu Jul 14 09:33:10 AEST 2016
On Tue, 12 Jul 2016 17:47:29 +1000
Stewart Smith <stewart at linux.vnet.ibm.com> wrote:
> Stewart Smith <stewart at linux.vnet.ibm.com> writes:
> > 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.
> >>
> >> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
> >> ---
> >> Fixes issue exposed by Alistairs patch: 74ba834 ("flash: Use
> >> blocklevel to do ECC reads")
> >
> > Thanks, 74ba834 reapplied and this patch also applied to master as of
> > 0a602c35e5f42aa18ee769cbd6b356ea480eb0df
>
> Actually, no.
>
> Just noticed make check failing just before I pushed:
>
> make -j20 libflash/test/test-blocklevel-check
> [ HOSTCC ] libflash/test/test-blocklevel.c
> [ RUN-TEST ] libflash/test/test-blocklevel
> Shouldn't have succeeded blocklevel_ecc_protect(0x100, 0x1000)
> /home/stewart/skiboot/libflash/test/Makefile.check:17: recipe for target
> 'libflash/test/test-blocklevel-check' failed
>
Oh wow sorry about that Stewart! I suspect I know whats happened here...
Cyril
>
> So I haven't pushed that merge and reapply, and instead will go and make
> 'make check' output a bit saner.
>
>
More information about the Skiboot
mailing list