[Skiboot] [PATCH 0/4] libflash/blocklevel erase features

Stewart Smith stewart at linux.vnet.ibm.com
Fri Apr 7 15:56:16 AEST 2017

Cyril Bur <cyril.bur at au1.ibm.com> writes:
> Currently libflash/blocklevel erase functionality checks to see if the
> erase region is aligned to the erase mask of the backend. If the
> condition isn't met blocklevel will refuse to allow the erase, this is
> by design as backends provide no sanity guarantee here - although most
> will likely just fail aswell.
> Until recently this hasn't been a problem as backends have always
> supplied 4K erase blocks and the FFS structures which are most
> commonly modified are 4k aligned.
> Recently BMC kernel MTD backends have been exposing 64K erase blocks
> which had not gone well with the 4K aligned FFS partitions. This has
> resulted in pflash being unable to flash specific partitions or the
> gard tool being unable to clear records. Various bugs have been filed
> on the matter - some which I can't link and most which I don't even
> have access to myself.
> Introducing blocklevel_smart_erase(), essentially just deals with with
> the rmw problem of having to erase more than what will be written. The
> great news is that this series comes with tests!

Thanks, series merged to master as of

We probably have to poke all the distros to upgrade gard to be current
as of skiboot 5.5.0 now though. I tihnk that's doable by filing bugs in
the right place inside IBM.

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list