STRUCT PSTORE_RECORD(9)
β¨ 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 ofbuf. yes bestie, we track our own sizes here π¦ecc_notice_sizeβ ECC information forbuf. the error-correction tea βprivβ a pointer for backend specific use, and it will bekfreedby 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/falseenergy, 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: ifprivis non-NULL, the pstore core handles thekfreewhen 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
- 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