summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Hartland <smh@FreeBSD.org>2015-07-28 11:19:38 +0000
committerSteven Hartland <smh@FreeBSD.org>2015-07-28 11:19:38 +0000
commit1635369e99fa2062b7832eb7df2419261aa85e0e (patch)
tree7584e2d721c0eddf85ebcc9f55a1b181413f1e21
parentb1b98a2db7bbeb69e3299e953e63bea759db0ef0 (diff)
downloadsrc-test-1635369e99fa2062b7832eb7df2419261aa85e0e.tar.gz
src-test-1635369e99fa2062b7832eb7df2419261aa85e0e.zip
Add warning about low KSTACK_PAGES for ZFS use
As ZFS requires a more kernel stack pages than is the default on some architectures e.g. i386, warn if KSTACK_PAGES is less than ZFS_MIN_KSTACK_PAGES (which is 4 at the time of writing). MFC after: 3 days Sponsored by: Multiplay
Notes
Notes: svn path=/head/; revision=285946
-rw-r--r--UPDATING8
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/UPDATING b/UPDATING
index 5756d78ef8f5d..c4eeb1584de97 100644
--- a/UPDATING
+++ b/UPDATING
@@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20150728:
+ As ZFS requires a more kernel stack pages than is the default on some
+ architectures e.g. i386, it now warns if KSTACK_PAGES is less than
+ ZFS_MIN_KSTACK_PAGES (which is 4 at the time of writing).
+
+ Please consider using 'options KSTACK_PAGES=X' where X is greater
+ than or equal to ZFS_MIN_KSTACK_PAGES i.e. 4 in such configurations.
+
20150706:
sendmail has been updated to 8.15.2. Starting with FreeBSD 11.0
and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
index e3b6581c862d7..432c2fb2e5f5c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
@@ -6491,10 +6491,18 @@ static void zfs_shutdown(void *, int);
static eventhandler_tag zfs_shutdown_event_tag;
+#define ZFS_MIN_KSTACK_PAGES 4
+
int
zfs__init(void)
{
+#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
zfs_root_token = root_mount_hold("ZFS");
mutex_init(&zfs_share_lock, NULL, MUTEX_DEFAULT, NULL);