summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2015-07-31 09:43:07 +0000
committersmh <smh@FreeBSD.org>2015-07-31 09:43:07 +0000
commit3b7e178dff4e27a7af3082544973147cba8d2f5c (patch)
tree917b15c71c9b38646050462390fac1323334e314
parentaeb145cca6832a63e2eebe401c3f51516a6d533f (diff)
downloadFreeBSD-src-3b7e178dff4e27a7af3082544973147cba8d2f5c.zip
FreeBSD-src-3b7e178dff4e27a7af3082544973147cba8d2f5c.tar.gz
MFC: r285946 and r285947
Add warning about low KSTACK_PAGES for ZFS use. Sponsored by: Multiplay
-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 036d064..c6af61e 100644
--- a/UPDATING
+++ b/UPDATING
@@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
+20150731:
+ As ZFS requires 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.
+
20150703:
The default Unbound configuration now enables remote control
using a local socket. Users who have already enabled the
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 c38b509..cf42cae 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
@@ -6493,10 +6493,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);
OpenPOWER on IntegriCloud