Erase error does not mark smth in BBT
Richard Weinberger
richard.weinberger at gmail.com
Mon Dec 9 15:26:43 EST 2013
On Mon, Dec 9, 2013 at 7:44 PM, Brian Norris
<computersforpeace at gmail.com> wrote:
> On Mon, Dec 09, 2013 at 05:02:29PM +0200, Leon Pollak wrote:
>> On Sunday 08 December 2013 15:43:33 Richard Weinberger wrote:
>> > On Sun, Dec 8, 2013 at 10:51 AM, Leon Pollak <leonp at plris.com> wrote:
>> > > I am studying the code in nand_base.c
>> > > I thought that when erase command ends with an error, the
>> > > corresponding block will be marked as bad or in OOB or in BBT or in
>> > > both.
>> > > I think I walked through the code carefully, but did not find this
>> > > BBT/OOB treatment.
>> > >
>> > > Please, help me - where is my error?
>> >
>> > You're looking at the wrong layer. :-)
>> > Look at the users of mtd_block_markbad().
>>
>> Yes, I understood my problem - I expected to see the BBT update on
>> erasure failure in the kernel driver.
>> But, as I understood after your hint and code study, the BBT update is
>> totally on the "user's" responsibility.
>>
>> ---
>> So, I went to the mtd-utils package.
>
> The mtd_block_markbad() API is actually still a kernel-internal API, so
> Richard was probably pointing you to the few in-kernel users, like UBI
> (drivers/mtd/ubi/io.c) and other filesystems (e.g., JFFS2) or
> translation layers (NFTL?).
Correct. :)
--
Thanks,
//richard
More information about the linux-mtd
mailing list