---
name: "nand_block_markbad_lowlevel"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/nand_block_markbad_lowlevel"
---

# nand\_block\_markbad\_lowlevel(9)

mark a block bad

## NAME

nand\_block\_markbad\_lowlevel - mark a block bad

## SYNOPSIS

**int nand\_block\_markbad\_lowlevel(struct mtd\_info \*** *mtd***, loff\_t** *ofs***);**

## ARGUMENTS

*mtd*

MTD device structure

*ofs*

offset from device start

## DESCRIPTION

This function performs the generic NAND bad block marking steps (i.e., bad block table(s) and/or marker(s)). We only allow the hardware driver to specify how to write bad block markers to OOB (chip-\>block\_markbad).

We try operations in the following order: (1) erase the affected block, to allow OOB marker to be written cleanly (2) write bad block marker to OOB area of affected block (unless flag NAND\_BBT\_NO\_OOB\_BBM is present) (3) update the BBT Note that we retain the first error encountered in (2) or (3), finish the procedures, and dump the error in the end.

## AUTHOR

**Thomas Gleixner** \<tglx@linutronix.de\>

Author.

## COPYRIGHT
