zdb: add --class=(normal|special|...) to filter blocks by alloc class

When counting blocks to generate block size histograms (`-bb`), accept a
`--class=` argument (as a comma-separated list of either "normal",
"special", "dedup" or "other") to only consider blocks that belong to
these metaslab classes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Closes #16999
This commit is contained in:
Ivan Shapovalov
2024-12-10 17:12:53 +04:00
committed by Tony Hutter
parent 627b530059
commit 968cfc3df2
2 changed files with 104 additions and 0 deletions
+4
View File
@@ -154,6 +154,10 @@ For instance, with
.Fl -bin Ns = Ns Li lsize ,
a block with lsize of 16K and psize of 4K will be added to the 16K bin
in all three columns.
.It Fl -class Ns = Ns ( Li normal Ns | Ns Li special Ns | Ns Li dedup Ns | Ns Li other ) Ns Op , Ns …
When used with
.Fl bb ,
only consider blocks from these allocation classes.
.It Fl B , -backup
Generate a backup stream, similar to
.Nm zfs Cm send ,