From b6e5c40382a52206f48cb26cc20ed85294e1b0a9 Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Mon, 24 Jul 2017 11:22:10 -0700 Subject: [PATCH] Use correct macro for hz in mmp.c Commit 379ca9c Multi-modifier protection (MMP) used HZ to convert nanoseconds to ticks for use with cv_timedwait() and ddi_get_lbolt(). The correct macro is hz, which is defined within the SPL for kernel space, and within zfs_context.h for user space. Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Giuseppe Di Natale Reviewed-by: George Melikov Signed-off-by: Olaf Faaland Closes #6357 Closes #6360 --- module/zfs/mmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c index 6541eca16..ae5478a33 100644 --- a/module/zfs/mmp.c +++ b/module/zfs/mmp.c @@ -446,7 +446,7 @@ mmp_thread(spa_t *spa) CALLB_CPR_SAFE_BEGIN(&cpr); (void) cv_timedwait_sig(&mmp->mmp_thread_cv, &mmp->mmp_thread_lock, ddi_get_lbolt() + - ((next_time - gethrtime()) / (NANOSEC / HZ))); + ((next_time - gethrtime()) / (NANOSEC / hz))); CALLB_CPR_SAFE_END(&cpr, &mmp->mmp_thread_lock); } -- 2.39.5