STRUCT UBI_DEBUG_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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