prb_read_valid_info(9)
π prb_read_valid_info(9) β from the Kernel API Manual, bestie β¨
okay so picture this: you're reading through the Kernel API Manual and this lil icon shows up β prb_read_valid_info. she's a non-blocking reader, she's meta-data only, and she is not about to sit around waiting for you. let's get into it π«Ά
β¨ NAME β¨
prb_read_valid_info β a non-blocking read of meta data for a requested record, or (if that one's gone) the next available record. no cap. non-blocking is the whole vibe π
πΈ SYNOPSIS πΈ
bool prb_read_valid_info (struct printk_ringbuffer *rb , u64 seq ,
struct printk_info *info , unsigned int *line_count );
π ARGUMENTS π
rbβ the ringbuffer you're reading from. your main character π«Άseqβ the sequence number of the record you wanna read.infoβ a buffer where the read record's meta data gets stored.line_countβ a buffer where the number of lines in the record text gets stored.
π¦ DESCRIPTION π¦
so this is the public function readers get to use when they only want the meta data of a record β not the whole text, just the little info girlies. very lowkey, very efficient β¨
here's the deal: the reader hands over the info and line_count buffers and they get filled in. and listen β either of those buffer pointers can be set to NULL if you're simply not interested in that data. not your vibe? don't ask for it. we love options π
β οΈ okay important one: on success, the reader must check info->seq to see which record's meta data was actually read. that's how you detect dropped records. don't skip this, bestie, it's the whole point π
and failure? failure means seq refers to a record that isn't available to the reader yet. not gone β just not yet. patience, queen π
β CONTEXT β
any context. literally any. she's flexible like that π§
π₯ RETURN π₯
true if a record's meta data was read, otherwise false. that's it, that's the tea β
π SEE ALSO π
- Kernel file
./kernel/printk/printk_ringbuffer.cprintk_ringbuffer overview(9) prb_reserve_in_last(9)prb_reserve(9)prb_commit(9)prb_final_commit(9)prb_next_reserve_seq(9)prb_read_valid(9)prb_first_valid_seq(9)prb_next_seq(9)prb_init(9)prb_record_text_space(9)
anyway that's the page π it lives in ./kernel/printk and it's dated October 2026 β so like, future girl summer. go read some meta data, you absolute legend πβ¨
π¦ 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