[PATCH v4 1/2] mtd: nand: move SCANLASTPAGE handling to the correct code block

Brian Norris computersforpeace at gmail.com
Sat Jan 28 15:09:00 EST 2012


On Fri, Jan 27, 2012 at 6:56 AM, Bityutskiy, Artem
<artem.bityutskiy at intel.com> wrote:
> On Fri, 2012-01-20 at 20:38 -0800, Brian Norris wrote:
>> As nand_default_block_markbad() is becoming more complex, it helps to
>> have code appear only in its relevant codepath(s). Here, the calculation
>> of `ofs' based on NAND_BBT_SCANLASTPAGE is only useful on paths where we
>> write bad block markers to OOB. We move the condition/calculation closer
>> to the `write' operation and update the comment to more correctly
>> describe the operation.
>
> Pushed this patch to l2-mtd.git because it seem to be good regardless of
> whether your second patch gets merged or not, thanks.

Sure, thanks.

> Not sure about the second patch yet, though.

OK, what are the remaining concerns?

Last I saw, Shmulik was recommending we follow up on your suggestion
to check the OOB marker before erasing/writing new bad block marker. I
can try implementing this with "chip->block_bad" if this seems
necessary.

Also, there was mention of "lazy checking" of some sort. I feel like
that's not central to this patch and might add unnecessary complexity
and overhead.

So, please comment which of the above are necessary additions to the
second patch. I'm fine as is, but I can easily implement the first.
The second would require more discussion and/or somebody else to do
it.

Brian



More information about the linux-mtd mailing list