#include <linux/slab.h>
#include <linux/crc32.h>
#include <linux/freezer.h>
#include <linux/kthread.h>
#include "ubi.h"
Go to the source code of this file.
#define UBI_WL_THRESHOLD CONFIG_MTD_UBI_WL_THRESHOLD |
Definition at line 117 of file wl.c.
Definition at line 130 of file wl.c.
#define WL_MAX_FAILURES 32 |
Definition at line 136 of file wl.c.
#define WL_RESERVED_PEBS 1 |
Definition at line 109 of file wl.c.
ubi_thread - UBI background thread. : the UBI device description object pointer
Definition at line 1790 of file wl.c.
ubi_wl_close - close the wear-leveling sub-system. : UBI device description object
Definition at line 2025 of file wl.c.
ubi_wl_flush - flush all pending works. : UBI device description object : the volume id to flush for : the logical eraseblock number to flush for
This function executes all pending works for a particular volume id / logical eraseblock number pair. If either value is set to UBI_ALL, then it acts as a wildcard for all of the corresponding volume numbers or logical eraseblock numbers. It returns zero in case of success and a negative error code in case of failure.
Definition at line 1704 of file wl.c.
Definition at line 684 of file wl.c.
ubi_wl_init - initialize the WL sub-system using attaching information. : UBI device description object : attaching information
This function returns zero in case of success, and a negative error code in case of failure.
Definition at line 1868 of file wl.c.
ubi_wl_put_peb - return a PEB to the wear-leveling sub-system. : UBI device description object : the volume ID that last used this PEB : the last used logical eraseblock number for the PEB : physical eraseblock to return : if this physical eraseblock has to be tortured
This function is called to return physical eraseblock to the pool of free physical eraseblocks. The flag has to be set if an I/O error occurred to this and it has to be tested. This function returns zero in case of success, and a negative error code in case of failure.
Definition at line 1552 of file wl.c.
ubi_wl_scrub_peb - schedule a physical eraseblock for scrubbing. : UBI device description object : the physical eraseblock to schedule
If a bit-flip in a physical eraseblock is detected, this physical eraseblock needs scrubbing. This function schedules a physical eraseblock for scrubbing which is done in background. This function returns zero in case of success and a negative error code in case of failure.
Definition at line 1639 of file wl.c.