Thanks Richard, On 6/25/19, Richard Weinberger <richard.weinberger@xxxxxxxxx> wrote: > On Mon, Jun 24, 2019 at 10:00 PM JH <jupiter.hce@xxxxxxxxx> wrote: >> >> Hi, >> >> I learned from the list that the kernel is capable of handling NAND >> bad blocks to use the mtd-utils "nandwrite" which I believe has >> already included in kernel, is there any test problem to test the NAND >> bad blocks management? What will be the symptoms when hitting the bad >> blocks, segmentation, kernel error ...? > > If you try to operate on a known bad block, MTD will return -EIO. > Linux maintains a bad block table, it contains factory marked bad block > and block which got marked as bad during runtime. > If UBI finds a block which does not behave good, e.g. shows bitflips after > erasure, it will mark it as bad. > > What exactly do you want to test? Well, it is an IoT device installed in remote sites, I've never used NAND before, have no idea what will be the consequence when hitting the bad blocks. Reliability is the major requirement for the device, how can I know if kernel bad blocks management is functional or not? > You can set a bad block marker by hand, or enable UBI's bitflip emulation > via debugfs. Thank you. - j ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/