Skip to content

Add csv output option to crucible-verify-raw#1911

Open
leftwo wants to merge 6 commits into
mainfrom
alan/raw-to-csv
Open

Add csv output option to crucible-verify-raw#1911
leftwo wants to merge 6 commits into
mainfrom
alan/raw-to-csv

Conversation

@leftwo
Copy link
Copy Markdown
Contributor

@leftwo leftwo commented Mar 18, 2026

Added an option to crucible-verify-raw that will produce csv output instead of a formatted print.
This will allow easier post processing of the output and ease comparing output from different extent files.

Example output:

BRM42220006 # /tmp/crucible-verify-raw --verbose-csv AEF | head
# file:AEF bs:512 bytes  bc:131072  dirty:true gen:4 flush_number:37009787 ext_ver:2 bonus_sync:21543 defrag:939
file,block,dirty,status,slot_a_result,slot_a_flush_id,slot_a_hash,slot_b_result,slot_b_flush_id,slot_b_hash,selected_slot,data_hash,all_zeros
AEF,0,true,ok,HashMatch,47428,18362918644890996774,SlotHashMismatch,45302,16039251774303925735,true,18362918644890996774,false
AEF,1,true,ok,HashMatch,47428,13247521920287360720,SlotHashMismatch,45302,13200850826928211362,true,13247521920287360720,false
AEF,2,true,ok,HashMatch,47428,10545746106689772998,SlotHashMismatch,45302,12954128592411415433,true,10545746106689772998,false
AEF,3,true,ok,HashMatch,47428,6884446101332089095,SlotHashMismatch,45302,11361899870660325085,true,6884446101332089095,false
AEF,4,true,ok,HashMatch,47428,16980956734254118825,SlotHashMismatch,45302,2419870224295018126,true,16980956734254118825,false
AEF,5,true,ok,HashMatch,47428,16285263515216636595,SlotHashMismatch,45302,17408677481660435227,true,16285263515216636595,false
AEF,6,true,ok,HashMatch,47428,11101626895967727594,SlotHashMismatch,45302,9823985220066489586,true,11101626895967727594,false
AEF,7,true,ok,HashMatch,47428,38394401569940404,SlotHashMismatch,45302,1861286921230100119,true,38394401569940404,false

I'm building some other tools to compare output from crucible-verify-raw, but moving to csv first will make that whole process easier.

leftwo and others added 6 commits March 18, 2026 14:11
Added an option to crucible-verify-raw that will produce csv output
instead of a formatted print.  This will allow easier post processing
of the output and ease comparing output from different extent files.
Add a dirty column (reflecting the extent's dirty bit) to each row of
the CSV output. Replace the redundant slot_a_selected/slot_b_selected
columns with a single selected_slot column: true means slot A is
selected, false means slot B, unknown when the extent is dirty.
Read the slot selection bitmap unconditionally, even when the dirty bit
is set. The selected_slot column now always shows true/false instead of
"unknown". Post-processing tools can use the dirty column to decide
whether to trust the slot selection value.
@leftwo leftwo marked this pull request as ready for review April 20, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant