Handle eraseblocks containing the bad-block table in UBI

Richard Weinberger richard at sigma-star.at
Sat Jan 13 06:17:34 PST 2018


Am Samstag, 13. Januar 2018, 13:44:54 CET schrieb Bogdan Harjoc:
> On Fri, Jan 12, 2018 at 10:52 PM, Richard Weinberger
> 
> <richard.weinberger at gmail.com> wrote:
> > Usually blocks containing the BBT are also marked as bad to avoid the
> > problem you're facing.
> > So, yes UBI should not see these PEBs because they should look like bad
> > blocks.
> > 
> > Is this a kernel with vendor hackery?
> 
> It is, at least the nand probing code adds its own nand_bbt_descr
> structs. Since the issue goes away by adding an
> 
> if (ec_hdr->magic == 'Bbt0' or '1bbT')
>    treat_it_as_bad_block()
> 
> in ubi_io_read_ec_hdr(), I will see where the bad-block status for the
> bbt PEBs gets lost.

UBI is the wrong layer to address this.
Please make sure that these blocks are handled in the NAND core.
BBT_BLOCK_RESERVED is the flag you need for them.

Thanks,
//richard

-- 
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y



More information about the linux-mtd mailing list