Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c @@ -132,9 +132,6 @@ * distinguish between the operation failing, and * deserialization failing. */ -#ifdef __FreeBSD__ -#include "opt_kstack_pages.h" -#endif #include #include @@ -6503,12 +6500,12 @@ { #ifdef __FreeBSD__ -#if KSTACK_PAGES < ZFS_MIN_KSTACK_PAGES - printf("ZFS NOTICE: KSTACK_PAGES is %d which could result in stack " - "overflow panic!\nPlease consider adding " - "'options KSTACK_PAGES=%d' to your kernel config\n", KSTACK_PAGES, - ZFS_MIN_KSTACK_PAGES); -#endif + if (thread0.td_kstack_pages < ZFS_MIN_KSTACK_PAGES) { + printf("ZFS NOTICE: thread0 kstack_pages is %d which could " + "result in stack overflow panic!\nPlease consider adding " + "'options KSTACK_PAGES=%d' to your kernel config\n", + thread0.td_kstack_pages, ZFS_MIN_KSTACK_PAGES); + } #endif zfs_root_token = root_mount_hold("ZFS");