More efficient info bucket management

Logged at every state_read() and state_write()
This commit is contained in:
Andrea Mazzoleni 2026-02-08 22:56:22 +01:00
parent 83b1c9bf3b
commit d5b5a9bcbf
13 changed files with 375 additions and 495 deletions

View file

@ -31,7 +31,7 @@ NAME:VALUE:VALUE:VALUE...<EOL>
.TP
.B NAME
This is the primary tag identifier, always a lowercase string
without spaces (e.g., \`summary\`, \`block\`, \`info_time\`).
without spaces (e.g., \`summary\`, \`block\`).
.TP
.B VALUE
Following the \`NAME\`, these can be additional sub\-identifiers,
@ -338,6 +338,27 @@ meaning their parity data is out of date.
The total counter of blocks.
.PD
.RE
.TP
.B content_info:bucket_count:<uint>
Total number of info records about past scrub and sync
operations stored in the content file.
.TP
.B content_info:bucket:<time>:<count_scrubbed>:<count_new>
All the info records.
.RS 4
.PD 0
.HP 4
.I <time>
Unix timestamp of the scrub/sync.
.HP 4
.I <count_scrubbed>
Number of blocks scrubbed at this timestamp.
.HP 4
.I <count_new>
Number of blocks that were synced at this
timestamp and haven\'t been scrubbed yet.
.PD
.RE
.SH DIAGNOSTICS TAGS
.TP
.B version:<version>
@ -954,89 +975,19 @@ These tags list files with zero sub\-second timestamps.
.B zerosubsecond:<disk_name>:<file_path>
Lists files that have a zero sub\-second timestamp.
Up to 50 are logged per disk.
.SS Block Information Tags
Status of all the blocks of the array.
.TP
.B block_count:<uint>
The total number of blocks in the array.
.TP
.B block:<index>:<time>:<used>:<unsynced>:<bad>:<rehash>
Status of a specific block.
Only produced when \`\-\-gui\-verbose\` option is used.
.RS 4
.PD 0
.HP 4
.I <index>
Block index.
.HP 4
.I <time>
Last scrub time (Unix timestamp). A value of 0 means
the block has never been scrubbed.
.HP 4
.I <used>
\`used\` if the block contains data, otherwise empty.
.HP 4
.I <unsynced>
\`unsynced\` if the block needs a sync, otherwise empty.
.HP 4
.I <bad>
\`bad\` if the block has errors, otherwise empty.
.HP 4
.I <rehash>
\`rehash\` if the block needs a rehash, otherwise empty.
.PD
.RE
.TP
.B block_noinfo:<index>:<used>:<unsynced>
Status of an unused block (no info recorded) in the content file.
Only produced when \`\-\-gui\-verbose\` option is used.
.RS 4
.PD 0
.HP 4
.I <index>
Block index.
.HP 4
.I <used>
\`used\` if the block contains data, otherwise empty.
.HP 4
.I <unsynced>
\`unsynced\` if the block needs a sync, otherwise empty.
.PD
.RE
.SS Scrub History Tags
These tags provide details on the scrub/sync time distribution.
.TP
.B info_count:<uint>
Total number of info records about past scrub and sync
operations stored in the content file.
.TP
.B info_time:<time>:<count>:<status>
All the info records.
.RS 4
.PD 0
.HP 4
.I <time>
Unix timestamp of the scrub/sync.
.HP 4
.I <count>
Number of blocks processed at this timestamp.
.HP 4
.I <status>
\`scrubbed\` (for blocks verified to be correct) or
\`new\` (for synced blocks that haven\'t been scrubbed yet).
.PD
.RE
.SS Scrub Graph Tags
These tags provide a simple graph data of the past scrub and sync
operations.
.TP
.B scrub_graph_range:<max_columns>:<max_height>
Dimensions of the scrub history graph obtained from the
\`info_time\` records. This provides the boundary for the
\`content_info:bucket\` records. This provides the boundary for the
precomputed graph data available in the \`scrub_graph_bar\` tags.
.RS 4
.PD 0
.HP 4
.I <max_columns>
The number of columns in the graph (constant
GRAPH_COLUMN).
The number of columns in the graph.
.HP 4
.I <max_height>
The maximum height (peak count) of blocks found