Lines Matching +full:wear +full:- +full:leveling

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
20 __func__, __LINE__, current->pid); \
29 pr_debug("UBI DBG " type " (pid %d): " fmt "\n", current->pid, \
34 /* Messages from the eraseblock association sub-system */
36 /* Messages from the wear-leveling sub-system */
38 /* Messages from the input/output sub-system */
56 * The following function is a legacy implementation of UBI fault-injection
64 if (ubi->dbg.emulate_bitflips) in ubi_dbg_bitflip()
71 if (ubi->dbg.emulate_io_failures) in ubi_dbg_write_failure()
78 if (ubi->dbg.emulate_io_failures) in ubi_dbg_erase_failure()
92 /* Emulate bit-flips */
96 /* Emulates -EIO during data read */
100 /* Emulates -EIO during data write */
102 /* Emulates -EIO during erase a PEB*/
132 if (ubi->dbg.emulate_failures & MASK_BITFLIPS) in ubi_dbg_fail_bitflip()
139 if (ubi->dbg.emulate_failures & MASK_WRITE_FAILURE) in ubi_dbg_fail_write()
146 if (ubi->dbg.emulate_failures & MASK_ERASE_FAILURE) in ubi_dbg_fail_erase()
154 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_power_cut()
162 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_read()
169 if (ubi->dbg.emulate_failures & MASK_ECCERR) in ubi_dbg_fail_eccerr()
177 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_ff()
185 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_ff_bitflips()
193 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_bad_hdr()
201 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_bad_hdr_ebadmsg()
221 * ubi_dbg_is_power_cut - if it is time to emulate power cut.
235 * ubi_dbg_is_bitflip - if it is time to emulate a bit-flip.
238 * Returns true if a bit-flip should be emulated, otherwise returns false.
248 * ubi_dbg_is_write_failure - if it is time to emulate a write failure.
262 * ubi_dbg_is_erase_failure - if its time to emulate an erase failure.
276 * ubi_dbg_is_eccerr - if it is time to emulate ECC error.
287 * ubi_dbg_is_read_failure - if it is time to emulate a read failure.
300 * ubi_dbg_is_ff - if it is time to emulate that read region is only 0xFF.
313 * ubi_dbg_is_ff_bitflips - if it is time to emulate that read region is only 0xFF
328 * ubi_dbg_is_bad_hdr - if it is time to emulate a bad header
341 * ubi_dbg_is_bad_hdr_ebadmsg - if it is time to emulate a bad header with
356 * ubi_dbg_is_bgt_disabled - if the background thread is disabled.
359 * Returns non-zero if the UBI background thread is disabled for testing
364 return ubi->dbg.disable_bgt; in ubi_dbg_is_bgt_disabled()
369 return ubi->dbg.chk_io; in ubi_dbg_chk_io()
374 return ubi->dbg.chk_gen; in ubi_dbg_chk_gen()
379 return ubi->dbg.chk_fastmap; in ubi_dbg_chk_fastmap()
384 ubi->dbg.chk_fastmap = 1; in ubi_enable_dbg_chk_fastmap()