spa: expose max_missing_tvds_cachefile and _scan on Linux
Register the two siblings of zfs_max_missing_tvds via ZFS_MODULE_PARAM in spa.c Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Christos Longros <chris.longros@gmail.com> Closes #18589
This commit is contained in:
@@ -918,6 +918,19 @@ but that was not proven to be useful.
|
||||
Number of missing top-level vdevs which will be allowed during
|
||||
pool import (only in read-only mode).
|
||||
.
|
||||
.It Sy zfs_max_missing_tvds_cachefile Ns = Ns Sy 2 Pq u64
|
||||
Number of missing top-level vdevs tolerated when importing a pool
|
||||
from a cachefile, before the trusted config is read from the MOS.
|
||||
A cachefile can fall out of sync with the on-disk config after a
|
||||
device removal that did not rewrite the cachefile, so the default
|
||||
of 2 still lets the import reach a copy of the MOS.
|
||||
.
|
||||
.It Sy zfs_max_missing_tvds_scan Ns = Ns Sy 0 Pq u64
|
||||
Number of missing top-level vdevs tolerated when importing a pool
|
||||
by scanning device paths, before the trusted config is read from
|
||||
the MOS.
|
||||
Defaults to 0 because a scan should detect every present device.
|
||||
.
|
||||
.It Sy zfs_max_nvlist_src_size Ns = Sy 0 Pq u64
|
||||
Maximum size in bytes allowed to be passed as
|
||||
.Sy zc_nvlist_src_size
|
||||
|
||||
@@ -381,18 +381,6 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, ccw_retry_interval,
|
||||
"Configuration cache file write, retry after failure, interval"
|
||||
" (seconds)");
|
||||
|
||||
extern uint64_t zfs_max_missing_tvds_cachefile;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_cachefile,
|
||||
CTLFLAG_RWTUN, &zfs_max_missing_tvds_cachefile, 0,
|
||||
"Allow importing pools with missing top-level vdevs in cache file");
|
||||
|
||||
extern uint64_t zfs_max_missing_tvds_scan;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_scan,
|
||||
CTLFLAG_RWTUN, &zfs_max_missing_tvds_scan, 0,
|
||||
"Allow importing pools with missing top-level vdevs during scan");
|
||||
|
||||
/* spa_misc.c */
|
||||
|
||||
extern int zfs_flags;
|
||||
|
||||
@@ -11811,6 +11811,12 @@ ZFS_MODULE_PARAM(zfs, zfs_, max_missing_tvds, U64, ZMOD_RW,
|
||||
"Allow importing pool with up to this number of missing top-level "
|
||||
"vdevs (in read-only mode)");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, max_missing_tvds_cachefile, U64, ZMOD_RW,
|
||||
"Allow importing pools with missing top-level vdevs in cache file");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, max_missing_tvds_scan, U64, ZMOD_RW,
|
||||
"Allow importing pools with missing top-level vdevs during scan");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_livelist_condense, zfs_livelist_condense_, zthr_pause, INT,
|
||||
ZMOD_RW, "Set the livelist condense zthr to pause");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user