libnvme(2)
π libnvme(2) β API Manual, bestie edition π
okay so this is a page from the libnvme API manual, and today's main character is a lil struct called nvme_self_test_log. it's literally the Device Self-test log (Log Identifier 06h) β the receipts your drive keeps about the self-tests it's been running. no cap.
β¨ NAME β¨
struct nvme_self_test_log β Device Self-test (Log Identifier 06h)
like⦠that's it. that's the name. iconic.
πΈ SYNOPSIS πΈ
struct nvme_self_test_log {
__u8 current_operation;
__u8 completion;
__u8 rsvd[2];
struct nvme_st_result result[NVME_LOG_ST_MAX_RESULTS];
};
look at her. four fields and a whole lot of lore. π
π Members π
current_operationβ Current Device Self-Test Operation: tells you the status of the self-test that's happening right now. and bestie, there's a rule here: if a device self-test operation is in process (meaning this field is set to#NVME_ST_CURR_OP_SHORTor#NVME_ST_CURR_OP_EXTENDED), then the controller shall not set this field to#NVME_ST_CURR_OP_NOT_RUNNINGuntil a new Self-test Result Data Structure is created. fr fr β that means if a device self-test operation completes or gets aborted, the controller has to create a Self-test Result Data Structure before it sets this field to#NVME_ST_CURR_OP_NOT_RUNNING. seeenum nvme_st_curr_op. πcompletionβ Current Device Self-Test Completion: the percentage of the device self-test operation that's done. like, a value of25means 25% of the device self-test operation is complete and a whole 75% is still waiting to be tested. π and lowkey important: if thecurrent_operationfield is cleared to#NVME_ST_CURR_OP_NOT_RUNNING(which means there is no device self-test operation in progress), then this field is straight up ignored. she said don't perceive me.rsvdβ Reserved. it's giving "do not touch, not for you". πresultβ Self-test Result Data Structures, seestruct nvme_st_result. the actual tea. π
vibe check: theresultarray is sizedNVME_LOG_ST_MAX_RESULTS, and the struct it holds isstruct nvme_st_resultβ don't go renaming those, they're load-bearing. π
and that's the whole page, babes. this was libnvme(2), the struct nvme_self_test_log page, dated July 2026. mwah. go forth and read your drive's self-test receipts. π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms