Add --skip-all-ffs option to mtd-utils nandwrite

Kees Trommel ctrommel at aimvalley.nl
Tue Dec 6 00:29:24 PST 2016


David,

Attached a rebased patch file.

Kees.

On 12/05/16 20:13, David Oberhollenzer wrote:
> Hi,
>
>
> On 12/05/2016 05:14 PM, Kees Trommel wrote:
>> Would it be possible to add an option --skip-all-ffs option to mtd-utils nandwrite?
>>
>> With this option pages that contain only 0xFF bytes will be skipped and not written to flash.
>>
>> This option is useful when you want to write using nandwrite an UBI image to NAND devices with a HW ECC. Without this option the OOB of a page that is written with all 0xFFs is no longer erased because the HW adds an non 0xFFs ECC to the OOB. If the data of the page contains only 0xFFs then UBI/UBIFS assumes that the page is erased and writes to it without erasing the page first. This causes that a read of this page fails with unrecoverable ECC errors and a subsequent corruption of the UBIFS.
> Yes, that sounds reasonable.
>   
>> Attached is a patch file that adds the --skip-all-ffs option. A nandwrite of UBI image with this option will be successful while it fails without this option.
> Your patch looks good to me, however even after fixing the paths to nandwrite.c (the
> source tree got restructured over a year ago, see commit 7d81790ced) it doesn't apply
> to the current mtd-utils master branch. Could you please rebase your patch onto the
> current mtd-utils master branch (git://git.infradead.org/mtd-utils.git) and resubmit it?
>
>
> Thanks,
>
> David
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-skip-all-ff-pages-option.patch
Type: text/x-patch
Size: 3282 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20161206/f751c5be/attachment.bin>


More information about the linux-mtd mailing list