libnvme(9)
๐ libnvme(9) โ struct nvme_self_test_log
okay so listen, bestie. this is straight out of the API Manual for libnvme, and it's the manual page for the Device Self-test log โ that's Log Identifier 06h โ and it is, lowkey, one of the most main-character log pages a controller can hand you. no cap. let's get into it โจ
๐ธ NAME ๐ธ
struct nvme_self_test_log โ the Device Self-test log, a.k.a. Log Identifier 06h. it's giving "your drive is checking itself before it wrecks itself" energy ๐ซถ
๐ 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, one iconic little struct, and a whole array of results living its best life at the end ๐
โจ Members โจ
๐ซ current_operation
Current Device Self-Test Operation โ this is the vibe check of the whole log, fr fr. it tells you the status of the current device self-test operation.
okay so here's the rule and it's a real one, not a suggestion: if a device self-test operation is in process โ meaning this field is set to #NVME_ST_CURR_OP_SHORT or #NVME_ST_CURR_OP_EXTENDED โ then the controller shall not set this field to #NVME_ST_CURR_OP_NOT_RUNNING until a new Self-test Result Data Structure is created.
and yes bestie, that applies even when the test finishes or gets aborted ๐ญ โ the controller has to create a Self-test Result Data Structure prior to setting this field to #NVME_ST_CURR_OP_NOT_RUNNING. no skipping steps. the controller does not get to ghost the result struct. periodt.
go peek at enum nvme_st_curr_op for the actual values ๐
๐ completion
Current Device Self-Test Completion โ the progress bar of the situation, literally. it indicates the percentage of the device self-test operation that's complete.
the example they give is kind of perfect: a value of 25 indicates that 25% of the device self-test operation is complete and 75% remains to be tested. math ate, honestly ๐งฎโจ
๐จ but wait โ if thecurrent_operationfield is cleared to#NVME_ST_CURR_OP_NOT_RUNNING(which means there's no device self-test operation in progress), then this field is just ignored. it's giving "nobody's home, don't knock." ๐
๐ซง rsvd
Reserved. that's it. that's the whole member. nothing to see here, she's reserved, she's mysterious, we respect her privacy ๐
๐ฆ result
Self-test Result Data Structures โ the receipts, bestie. the actual results live here. for the full tea, go see struct nvme_st_result. ๐
โญ quick recap because i love you ๐
- the struct is
struct nvme_self_test_logand it's Log Identifier 06h ๐ current_operation= status of the current self-test, and it can't go to#NVME_ST_CURR_OP_NOT_RUNNINGwithout a fresh Self-test Result Data Structure first โ not on my watch ๐completion= the percentage done (value25=25% done,75% to go), and it's ignored whencurrent_operationis#NVME_ST_CURR_OP_NOT_RUNNINGrsvd= reserved ๐ซถresult= the Self-test Result Data Structures, seestruct nvme_st_result๐ธ- related enum:
enum nvme_st_curr_op
๐ important reminder: these are the fields and the rules as the page lays them out โ don't invent extra behaviour, don't assume a new field, don't guess. iykyk.
and that's the whole page, bestie ๐ฅน this was the API Manual page for struct nvme_self_test_log, dated October 2026, and if you ever need to cite it, it's libnvme(9) โ struct nvme_self_test_log. now go read struct nvme_st_result, slay, and hydrate ๐๐ฆโจ
๐ฆ where this page comes from
- arch rolling: nvme-cli 3.2-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms