zpool/zfs: Add '-a|--all' option to scrub, trim, initialize

Add support for the '-a | --all' option to perform trim,
scrub, and initialize operations on all pools.
Previously, specifying a pool name was mandatory for
these operations. With this enhancement, users can now
execute these operations across all pools at once,
without needing to manually iterate over each pool
from the command line.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Akash B <akash-b@hpe.com>
Closes #17524
This commit is contained in:
Akash B
2025-07-30 03:20:44 +05:30
committed by GitHub
parent fc885f308f
commit b6e8db509d
15 changed files with 637 additions and 104 deletions
+5 -5
View File
@@ -1475,6 +1475,11 @@
<parameter type-id='80f4b756' name='name'/>
<return type-id='a27af98c'/>
</function-decl>
<function-decl name='zfs_tunable_iter' mangled-name='zfs_tunable_iter' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_iter'>
<parameter type-id='d8d5f4ab' name='cb'/>
<parameter type-id='eaa32e2f' name='arg'/>
<return type-id='48b5725f'/>
</function-decl>
<function-decl name='zfs_tunable_set' mangled-name='zfs_tunable_set' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_set'>
<parameter type-id='a27af98c' name='zt'/>
<parameter type-id='80f4b756' name='val'/>
@@ -1486,11 +1491,6 @@
<parameter type-id='b59d7dce' name='valsz'/>
<return type-id='95e97e5e'/>
</function-decl>
<function-decl name='zfs_tunable_iter' mangled-name='zfs_tunable_iter' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_iter'>
<parameter type-id='d8d5f4ab' name='cb'/>
<parameter type-id='eaa32e2f' name='arg'/>
<return type-id='48b5725f'/>
</function-decl>
<function-type size-in-bits='64' id='92f86508'>
<parameter type-id='a27af98c'/>
<parameter type-id='eaa32e2f'/>