STRUCT PSTORE_RECORD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct pstore_record(9) ✨

okay so bestie, this is the struct pstore_record(9) page from the Kernel API Manual, and it's literally the blueprint for one single pstore record entry β€” like, the whole anatomy of a record, laid out. we're gonna go through it field by field, no skipping, no cap πŸ’…


🌸 NAME 🌸

struct pstore_record β€” the details of a pstore record entry πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct pstore_record {
    struct pstore_info      *psi;
    enum pstore_type_id     type;
    u64 id;
    struct timespec64       time;
    char *buf;
    ssize_t size;
    ssize_t ecc_notice_size;
    void *priv;
    int count;
    enum kmsg_dump_reason   reason;
    unsigned int            part;
    bool compressed;
 };

like, that's the whole struct, copy it exactly, don't be weird about it ✨


πŸ’– Members πŸ’–

  • psi β€” the pstore backend driver information. your hookup to whoever's actually doing the storing 🫢
  • type β€” the pstore record type. what kind of record is this πŸ‘€
  • id β€” a per-type unique identifier for the record. so it's unique within its type, iykyk πŸ’…
  • time β€” the timestamp of the record. when it happened ⏰
  • buf β€” a pointer to the record contents. the actual payload, the main character πŸŽ€
  • size β€” the size of buf. yes bestie, we track our own sizes here πŸ¦‹
  • ecc_notice_size β€” ECC information for buf. the error-correction tea β˜•
  • priv β€” a pointer for backend specific use, and it will be kfreed by the pstore core if non-NULL when the record is freed. so don't go freeing it yourself, that's a whole mess 😭
  • count β€” the Oops count since boot. every oops gets counted, iconic behavior honestly πŸ’€
  • reason β€” the kdump reason for notification. why are we even talking about this record πŸ“£
  • part β€” the position in a multipart record. like, which slice of the record are we 🌈
  • compressed β€” whether the buffer is compressed. true/false energy, no in-between ⭐

πŸ”₯ Description πŸ”₯

Valid for PSTORE_TYPE_DMESG type: β€” and that's literally it, that's the whole description. tiny but mighty, periodt πŸ‘‘


🧚 SEE ALSO 🧚

  • Kernel file ./include/linux/pstore.h
  • struct pstore_info(9)

πŸ’œ quick vibe check: if priv is non-NULL, the pstore core handles the kfree when the record is freed. do not double-free it, bestie, i'm begging πŸ™ˆ

mwah πŸ’‹ that's the whole page, and it comes courtesy of ./include/linux, dated October 2026, filed under struct pstore_record(9) β€” slay, go read the kernel headers now 🫢✨

πŸ“¦ where this page comes from