STRUCT UBI_DEBUG_INFO(9)
π struct ubi_debug_info(9) πΈ
okay bestie, welcome to the Kernel API Manual β this one's a whole vibe, trust. It's all about struct ubi_debug_info, which is literally the debugging information holder for an UBI device. Yes, the name is doing the heavy lifting and honestly? Slay. π
β¨ SYNOPSIS β¨
here's the whole squad, laid out exactly as they appear, no cap:
struct ubi_debug_info {
unsigned int chk_gen:1;
unsigned int chk_io:1;
unsigned int chk_fastmap:1;
unsigned int disable_bgt:1;
unsigned int emulate_bitflips:1;
unsigned int emulate_io_failures:1;
unsigned int emulate_power_cut:2;
unsigned int power_cut_counter;
unsigned int power_cut_min;
unsigned int power_cut_max;
unsigned int emulate_failures;
char dfs_dir_name[UBI_DFS_DIR_LEN];
struct dentry *dfs_dir;
struct dentry *dfs_chk_gen;
struct dentry *dfs_chk_io;
struct dentry *dfs_chk_fastmap;
struct dentry *dfs_disable_bgt;
struct dentry *dfs_emulate_bitflips;
struct dentry *dfs_emulate_io_failures;
struct dentry *dfs_emulate_power_cut;
struct dentry *dfs_power_cut_min;
struct dentry *dfs_power_cut_max;
struct dentry *dfs_emulate_failures;
};
π Members π
okay so this is the part where we meet everybody individually. main character energy for each field, honestly π
chk_genβ if UBI general extra checks are enabled πchk_ioβ if UBI I/O extra checks are enabled β¨chk_fastmapβ if UBI fastmap extra checks are enabled π¦disable_bgtβ disables the background task, purely for testing purposes πemulate_bitflipsβ emulates bit-flips, for testing purposes πemulate_io_failuresβ emulates write/erase failures, for testing purposes πemulate_power_cutβ emulates power cuts, for testing purposes π₯power_cut_counterβ the countdown for writes left until the emulated power cut hits β³power_cut_minβ the minimum number of writes before emulating a power cut πΈpower_cut_maxβ the maximum number of writes until emulating a power cut πemulate_failuresβ emulates failures, for testing purposes π«Άdfs_dir_nameβ the name of the debugfs directory that contains the files of this UBI device πdfs_dirβ the direntry object of the UBI device debugfs directory ποΈdfs_chk_genβ debugfs knob to enable UBI general extra checks βdfs_chk_ioβ debugfs knob to enable UBI I/O extra checks βdfs_chk_fastmapβ debugfs knob to enable UBI fastmap extra checks βdfs_disable_bgtβ debugfs knob to disable the background task πdfs_emulate_bitflipsβ debugfs knob to emulate bit-flips πdfs_emulate_io_failuresβ debugfs knob to emulate write/erase failures πdfs_emulate_power_cutβ debugfs knob to emulate power cuts πdfs_power_cut_minβ debugfs knob for minimum writes before power cut πdfs_power_cut_maxβ debugfs knob for maximum writes until power cut πdfs_emulate_failuresβ debugfs entry to control the fault injection type π§
ngl bestie, a lot of these say "for testing purposes" β that's not me being cute, that's literally the deal. These knobs are for testing, so don't go treating them like normal everyday settings, mwah π
π SEE ALSO π
the whole extended fam β go say hi:
the kernel file ./drivers/mtd/ubi/ubi.h, plus struct ubi_vid_io_buf(9), struct ubi_wl_entry(9), struct ubi_ltree_entry(9), struct ubi_rename_entry(9), struct ubi_fastmap_layout(9), struct ubi_fm_pool(9), struct ubi_eba_leb_desc(9), struct ubi_volume(9), struct ubi_volume_desc(9), struct ubi_device(9), struct ubi_ainf_peb(9), struct ubi_ainf_volume(9), struct ubi_attach_info(9), struct ubi_work(9), ubi_init_vid_buf(9), ubi_free_vid_buf(9), ubi_get_vid_hdr(9), ubi_ro_mode(9), vol_id2idx(9), idx2vol_id(9), ubi_is_fm_vol(9), ubi_find_fm_block(9)
and that's the page, bestie!! π«Ά this lil masterpiece lives at ./drivers/mtd/ubi, stamped October 2026, and it's filed under struct ubi_debug_info(9) β go forth and debug iconic-ly πβ¨π·
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms