'\" t .\" Title: get_bbt_block .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Internal Functions Provided .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "GET_BBT_BLOCK" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "Internal Functions Provided" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" get_bbt_block \- Get the first valid eraseblock suitable to store a BBT .SH "SYNOPSIS" .HP \w'int\ get_bbt_block('u .BI "int get_bbt_block(struct\ nand_chip\ *\ " "this" ", struct\ nand_bbt_descr\ *\ " "td" ", struct\ nand_bbt_descr\ *\ " "md" ", int\ " "chip" ");" .SH "ARGUMENTS" .PP \fIstruct nand_chip * this\fR .RS 4 the NAND device .RE .PP \fIstruct nand_bbt_descr * td\fR .RS 4 the BBT description .RE .PP \fIstruct nand_bbt_descr * md\fR .RS 4 the mirror BBT descriptor .RE .PP \fIint chip\fR .RS 4 the CHIP selector .RE .SH "DESCRIPTION" .PP This functions returns a positive block number pointing a valid eraseblock suitable to store a BBT (i\&.e\&. in the range reserved for BBT), or \-ENOSPC if all blocks are already used of marked bad\&. If td\->pages[chip] was already pointing to a valid block we re\-use it, otherwise we search for the next valid one\&. .SH "AUTHOR" .PP \fBThomas Gleixner\fR <\&tglx@linutronix.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br