STRUCT PSZ_CONTEXT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct psz_context(9) ✨

okay so this is the page for struct psz_context β€” literally the whole running-state situation for pstore/zone, from the Kernel API Manual bestie. everything you need to know about what's going on inside pstore/zone at runtime lives right here, no cap πŸ’…


🌸 NAME 🌸

struct psz_context β€” all about the running state of pstore/zone. that's it, that's the vibe check πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

struct psz_context {
    struct pstore_zone **kpszs;
    struct pstore_zone *ppsz;
    struct pstore_zone *cpsz;
    struct pstore_zone **fpszs;
    unsigned int kmsg_max_cnt;
    unsigned int kmsg_read_cnt;
    unsigned int kmsg_write_cnt;
    unsigned int pmsg_read_cnt;
    unsigned int console_read_cnt;
    unsigned int ftrace_max_cnt;
    unsigned int ftrace_read_cnt;
    unsigned int oops_counter;
    unsigned int panic_counter;
    atomic_t recovered;
    atomic_t on_panic;
    struct mutex pstore_zone_info_lock;
    struct pstore_zone_info *pstore_zone_info;
    struct pstore_info pstore;
 };

like, copy it exactly pls, don't be out here retyping fields from memory πŸ™ˆ


πŸ’– Members πŸ’–

here's the whole cast, main character by main character πŸ‘‘

  • kpszs β€” the kmsg dump storage zones. all of them. plural. iconic.
  • ppsz β€” the pmsg storage zone 🌸
  • cpsz β€” the console storage zone πŸŽ€
  • fpszs β€” the ftrace storage zones πŸ¦‹
  • kmsg_max_cnt β€” max count of kpszs
  • kmsg_read_cnt β€” counter of total read kmsg dumps
  • kmsg_write_cnt β€” counter of total kmsg dump writes
  • pmsg_read_cnt β€” counter of total read pmsg zone
  • console_read_cnt β€” counter of total read console zone
  • ftrace_max_cnt β€” max count of fpszs
  • ftrace_read_cnt β€” counter of max read ftrace zone
  • oops_counter β€” counter of oops dumps 😭
  • panic_counter β€” counter of panic dumps πŸ’€
  • recovered β€” whether finished recovering data from storage. literally the "are we done yet" flag ✨
  • on_panic β€” whether panic is happening. and yes, that's a whole mood πŸ”₯
  • pstore_zone_info_lock β€” lock to pstore_zone_info πŸ”’
  • pstore_zone_info β€” information from backend
  • pstore β€” structure for pstore

🫢 SEE ALSO 🫢

go read the Kernel file ./fs/pstore/zone.c β€” that's the source of truth bestie, iykyk. and while you're there, say hi to:


and that's the whole page, periodt πŸ’… shoutout to ./fs/pstore and the October 2026 release β€” this one's dated and it ATE, go read the rest of the kernel API manual when you're done slaying here β­πŸ’œ

πŸ“¦ where this page comes from