mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-14 17:22:05 +03:00
spa_activity_check: narrow scope of MMP vars
They aren't used outside these very small blocks, and their initial values are never used at all. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17551
This commit is contained in:
parent
9292071565
commit
2755e2aa60
@ -3777,20 +3777,17 @@ out:
|
||||
* ZPOOL_CONFIG_MMP_HOSTID - hostid from the active pool
|
||||
*/
|
||||
if (error == EREMOTEIO) {
|
||||
const char *hostname = "<unknown>";
|
||||
uint64_t hostid = 0;
|
||||
|
||||
if (mmp_label) {
|
||||
if (nvlist_exists(mmp_label, ZPOOL_CONFIG_HOSTNAME)) {
|
||||
hostname = fnvlist_lookup_string(mmp_label,
|
||||
ZPOOL_CONFIG_HOSTNAME);
|
||||
const char *hostname = fnvlist_lookup_string(
|
||||
mmp_label, ZPOOL_CONFIG_HOSTNAME);
|
||||
fnvlist_add_string(spa->spa_load_info,
|
||||
ZPOOL_CONFIG_MMP_HOSTNAME, hostname);
|
||||
}
|
||||
|
||||
if (nvlist_exists(mmp_label, ZPOOL_CONFIG_HOSTID)) {
|
||||
hostid = fnvlist_lookup_uint64(mmp_label,
|
||||
ZPOOL_CONFIG_HOSTID);
|
||||
uint64_t hostid = fnvlist_lookup_uint64(
|
||||
mmp_label, ZPOOL_CONFIG_HOSTID);
|
||||
fnvlist_add_uint64(spa->spa_load_info,
|
||||
ZPOOL_CONFIG_MMP_HOSTID, hostid);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user