mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
FreeBSD: Fix up after spa_stats.c move
Moving spa_stats added the additional burden of supporting KSTAT_TYPE_IO. spa_state_addr will always return a valid value regardless of the value of 'n'. On FreeBSD this will cause an infinite loop as it relies on the raw ops addr routine to indicate that there is no more data. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10860
This commit is contained in:
@@ -835,7 +835,9 @@ spa_mmp_history_add(spa_t *spa, uint64_t txg, uint64_t timestamp,
|
||||
static void *
|
||||
spa_state_addr(kstat_t *ksp, loff_t n)
|
||||
{
|
||||
return (ksp->ks_private); /* return the spa_t */
|
||||
if (n == 0)
|
||||
return (ksp->ks_private); /* return the spa_t */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user