STRUCT PSZ_CONTEXT(9)
β¨ 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 ofkpszskmsg_read_cntβ counter of total read kmsg dumpskmsg_write_cntβ counter of total kmsg dump writespmsg_read_cntβ counter of total read pmsg zoneconsole_read_cntβ counter of total read console zoneftrace_max_cntβ max count offpszsftrace_read_cntβ counter of max read ftrace zoneoops_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 topstore_zone_infoπpstore_zone_infoβ information from backendpstoreβ structure forpstore
π«Ά 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:
struct psz_buffer(9)struct psz_kmsg_header(9)struct pstore_zone(9)enum psz_flush_mode(9)psz_recovery(9)register_pstore_zone(9)unregister_pstore_zone(9)
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
- 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