From owner-svn-src-user@freebsd.org  Sun Apr  1 04:11:41 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C8E7F796FD
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Sun,  1 Apr 2018 04:11:41 +0000 (UTC)
 (envelope-from jeff@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 101C487BAE;
 Sun,  1 Apr 2018 04:11:41 +0000 (UTC)
 (envelope-from jeff@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A33421BAC;
 Sun,  1 Apr 2018 04:11:41 +0000 (UTC)
 (envelope-from jeff@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w314BfTW043576;
 Sun, 1 Apr 2018 04:11:41 GMT (envelope-from jeff@FreeBSD.org)
Received: (from jeff@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w314Bc5p043555;
 Sun, 1 Apr 2018 04:11:38 GMT (envelope-from jeff@FreeBSD.org)
Message-Id: <201804010411.w314Bc5p043555@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jeff set sender to
 jeff@FreeBSD.org using -f
From: Jeff Roberson <jeff@FreeBSD.org>
Date: Sun, 1 Apr 2018 04:11:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331861 - in user/jeff/numa: lib/libc/sys
 sys/compat/freebsd32 sys/kern sys/sys sys/vm
X-SVN-Group: user
X-SVN-Commit-Author: jeff
X-SVN-Commit-Paths: in user/jeff/numa: lib/libc/sys sys/compat/freebsd32
 sys/kern sys/sys sys/vm
X-SVN-Commit-Revision: 331861
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Apr 2018 04:11:41 -0000

Author: jeff
Date: Sun Apr  1 04:11:38 2018
New Revision: 331861
URL: https://svnweb.freebsd.org/changeset/base/331861

Log:
  Experimental support for msetdomain() a syscall similar to linux's mbind()
  that allows you to set NUMA policy on memory ranges.

Modified:
  user/jeff/numa/lib/libc/sys/Symbol.map
  user/jeff/numa/sys/compat/freebsd32/freebsd32_syscall.h
  user/jeff/numa/sys/compat/freebsd32/freebsd32_syscalls.c
  user/jeff/numa/sys/compat/freebsd32/freebsd32_sysent.c
  user/jeff/numa/sys/compat/freebsd32/freebsd32_systrace_args.c
  user/jeff/numa/sys/compat/freebsd32/syscalls.master
  user/jeff/numa/sys/kern/init_sysent.c
  user/jeff/numa/sys/kern/kern_cpuset.c
  user/jeff/numa/sys/kern/syscalls.c
  user/jeff/numa/sys/kern/syscalls.master
  user/jeff/numa/sys/kern/systrace_args.c
  user/jeff/numa/sys/sys/domainset.h
  user/jeff/numa/sys/sys/syscall.h
  user/jeff/numa/sys/sys/syscall.mk
  user/jeff/numa/sys/sys/syscallsubr.h
  user/jeff/numa/sys/sys/sysproto.h
  user/jeff/numa/sys/vm/vm_fault.c
  user/jeff/numa/sys/vm/vm_map.c
  user/jeff/numa/sys/vm/vm_map.h
  user/jeff/numa/sys/vm/vm_object.c

Modified: user/jeff/numa/lib/libc/sys/Symbol.map
==============================================================================
--- user/jeff/numa/lib/libc/sys/Symbol.map	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/lib/libc/sys/Symbol.map	Sun Apr  1 04:11:38 2018	(r331861)
@@ -401,6 +401,7 @@ FBSD_1.5 {
 	statfs;
 	cpuset_getdomain;
 	cpuset_setdomain;
+	msetdomain;
 };
 
 FBSDprivate_1.0 {
@@ -1029,4 +1030,6 @@ FBSDprivate_1.0 {
 	__sys_cpuset_getdomain;
 	_cpuset_setdomain;
 	__sys_cpuset_setdomain;
+	_msetdomain;
+	__msetdomain;
 };

Modified: user/jeff/numa/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- user/jeff/numa/sys/compat/freebsd32/freebsd32_syscall.h	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/compat/freebsd32/freebsd32_syscall.h	Sun Apr  1 04:11:38 2018	(r331861)
@@ -469,4 +469,5 @@
 #define	FREEBSD32_SYS_freebsd32_cpuset_getdomain	561
 #define	FREEBSD32_SYS_freebsd32_cpuset_setdomain	562
 #define	FREEBSD32_SYS_getrandom	563
-#define	FREEBSD32_SYS_MAXSYSCALL	564
+#define	FREEBSD32_SYS_msetdomain	564
+#define	FREEBSD32_SYS_MAXSYSCALL	565

Modified: user/jeff/numa/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- user/jeff/numa/sys/compat/freebsd32/freebsd32_syscalls.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/compat/freebsd32/freebsd32_syscalls.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -596,4 +596,5 @@ const char *freebsd32_syscallnames[] = {
 	"freebsd32_cpuset_getdomain",			/* 561 = freebsd32_cpuset_getdomain */
 	"freebsd32_cpuset_setdomain",			/* 562 = freebsd32_cpuset_setdomain */
 	"getrandom",			/* 563 = getrandom */
+	"msetdomain",			/* 564 = msetdomain */
 };

Modified: user/jeff/numa/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- user/jeff/numa/sys/compat/freebsd32/freebsd32_sysent.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/compat/freebsd32/freebsd32_sysent.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -645,4 +645,5 @@ struct sysent freebsd32_sysent[] = {
 	{ AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 561 = freebsd32_cpuset_getdomain */
 	{ AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 562 = freebsd32_cpuset_setdomain */
 	{ AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 563 = getrandom */
+	{ AS(msetdomain_args), (sy_call_t *)sys_msetdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 564 = msetdomain */
 };

Modified: user/jeff/numa/sys/compat/freebsd32/freebsd32_systrace_args.c
==============================================================================
--- user/jeff/numa/sys/compat/freebsd32/freebsd32_systrace_args.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/compat/freebsd32/freebsd32_systrace_args.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -3283,6 +3283,18 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		*n_args = 3;
 		break;
 	}
+	/* msetdomain */
+	case 564: {
+		struct msetdomain_args *p = params;
+		uarg[0] = (intptr_t) p->addr; /* void * */
+		uarg[1] = p->size; /* size_t */
+		uarg[2] = p->domainsetsize; /* size_t */
+		uarg[3] = (intptr_t) p->mask; /* domainset_t * */
+		iarg[4] = p->policy; /* int */
+		iarg[5] = p->flags; /* int */
+		*n_args = 6;
+		break;
+	}
 	default:
 		*n_args = 0;
 		break;
@@ -8825,6 +8837,31 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 			break;
 		};
 		break;
+	/* msetdomain */
+	case 564:
+		switch(ndx) {
+		case 0:
+			p = "userland void *";
+			break;
+		case 1:
+			p = "size_t";
+			break;
+		case 2:
+			p = "size_t";
+			break;
+		case 3:
+			p = "userland domainset_t *";
+			break;
+		case 4:
+			p = "int";
+			break;
+		case 5:
+			p = "int";
+			break;
+		default:
+			break;
+		};
+		break;
 	default:
 		break;
 	};
@@ -10678,6 +10715,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 		break;
 	/* getrandom */
 	case 563:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
+	/* msetdomain */
+	case 564:
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;

Modified: user/jeff/numa/sys/compat/freebsd32/syscalls.master
==============================================================================
--- user/jeff/numa/sys/compat/freebsd32/syscalls.master	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/compat/freebsd32/syscalls.master	Sun Apr  1 04:11:38 2018	(r331861)
@@ -1118,5 +1118,9 @@
 				    int policy); }
 563	AUE_NULL	NOPROTO	{ int getrandom(void *buf, size_t buflen, \
 				    unsigned int flags); }
+564     AUE_NULL        NOPROTO	{ int msetdomain(void *addr, \
+				    size_t size, size_t domainsetsize, \
+				    domainset_t *mask, int policy, \
+				    int flags); }
 
 ; vim: syntax=off

Modified: user/jeff/numa/sys/kern/init_sysent.c
==============================================================================
--- user/jeff/numa/sys/kern/init_sysent.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/kern/init_sysent.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -615,4 +615,5 @@ struct sysent sysent[] = {
 	{ AS(cpuset_getdomain_args), (sy_call_t *)sys_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 561 = cpuset_getdomain */
 	{ AS(cpuset_setdomain_args), (sy_call_t *)sys_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 562 = cpuset_setdomain */
 	{ AS(getrandom_args), (sy_call_t *)sys_getrandom, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 563 = getrandom */
+	{ AS(msetdomain_args), (sy_call_t *)sys_msetdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 564 = msetdomain */
 };

Modified: user/jeff/numa/sys/kern/kern_cpuset.c
==============================================================================
--- user/jeff/numa/sys/kern/kern_cpuset.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/kern/kern_cpuset.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$");
 
 #include <vm/uma.h>
 #include <vm/vm.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
+#include <vm/vm_map.h>
 #include <vm/vm_object.h>
 #include <vm/vm_extern.h>
 
@@ -2005,6 +2008,57 @@ out:
 	return (error);
 }
 
+static int
+domainset_copyin(struct domainset *domain, size_t domainsetsize,
+    const domainset_t *maskp, int policy)
+{
+	domainset_t *mask;
+	char *end, *cp;
+	int error;
+
+	if (domainsetsize < sizeof(domainset_t) ||
+	    domainsetsize > DOMAINSET_MAXSIZE / NBBY)
+		return (ERANGE);
+
+	if (policy <= DOMAINSET_POLICY_INVALID ||
+	    policy > DOMAINSET_POLICY_MAX)
+		return (EINVAL);
+
+	memset(domain, 0, sizeof(*domain));
+	mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO);
+	error = copyin(maskp, mask, domainsetsize);
+	if (error != 0)
+		goto out;
+	/*
+	 * Verify that no high bits are set.
+	 */
+	if (domainsetsize > sizeof(domainset_t)) {
+		end = cp = (char *)&mask->__bits;
+		end += domainsetsize;
+		cp += sizeof(domainset_t);
+		while (cp != end)
+			if (*cp++ != 0) {
+				error = EINVAL;
+				goto out;
+			}
+
+	}
+	DOMAINSET_COPY(mask, &domain->ds_mask);
+	domain->ds_policy = policy;
+	/* Translate preferred policy into a mask and fallback. */
+	if (policy == DOMAINSET_POLICY_PREFER) {
+		/* Only support a single preferred domain. */
+		if (DOMAINSET_COUNT(&domain->ds_mask) != 1) {
+			error = EINVAL;
+			goto out;
+		}
+		domain->ds_prefer = DOMAINSET_FFS(&domain->ds_mask) - 1;
+	}
+out:
+	free(mask, M_TEMP);
+	return (error);
+}
+
 #ifndef _SYS_SYSPROTO_H_
 struct cpuset_setdomain_args {
 	cpulevel_t	level;
@@ -2015,6 +2069,7 @@ struct cpuset_setdomain_args {
 	int 		policy;
 };
 #endif
+
 int
 sys_cpuset_setdomain(struct thread *td, struct cpuset_setdomain_args *uap)
 {
@@ -2032,12 +2087,8 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le
 	struct thread *ttd;
 	struct proc *p;
 	struct domainset domain;
-	domainset_t *mask;
 	int error;
 
-	if (domainsetsize < sizeof(domainset_t) ||
-	    domainsetsize > DOMAINSET_MAXSIZE / NBBY)
-		return (ERANGE);
 	/* In Capability mode, you can only set your own CPU set. */
 	if (IN_CAPABILITY_MODE(td)) {
 		if (level != CPU_LEVEL_WHICH)
@@ -2047,43 +2098,13 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le
 		if (id != -1)
 			return (ECAPMODE);
 	}
-	memset(&domain, 0, sizeof(domain));
-	mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO);
-	error = copyin(maskp, mask, domainsetsize);
-	if (error)
-		goto out;
-	/*
-	 * Verify that no high bits are set.
-	 */
-	if (domainsetsize > sizeof(domainset_t)) {
-		char *end;
-		char *cp;
 
-		end = cp = (char *)&mask->__bits;
-		end += domainsetsize;
-		cp += sizeof(domainset_t);
-		while (cp != end)
-			if (*cp++ != 0) {
-				error = EINVAL;
-				goto out;
-			}
-
-	}
-	DOMAINSET_COPY(mask, &domain.ds_mask);
-	domain.ds_policy = policy;
-	if (policy <= DOMAINSET_POLICY_INVALID ||
-	    policy > DOMAINSET_POLICY_MAX)
-		return (EINVAL);
-
-	/* Translate preferred policy into a mask and fallback. */
-	if (policy == DOMAINSET_POLICY_PREFER) {
-		/* Only support a single preferred domain. */
-		if (DOMAINSET_COUNT(&domain.ds_mask) != 1)
-			return (EINVAL);
-		domain.ds_prefer = DOMAINSET_FFS(&domain.ds_mask) - 1;
-		/* This will be constrained by domainset_shadow(). */
+	error = domainset_copyin(&domain, domainsetsize, maskp, policy);
+	if (error)
+		return (error);
+	/* This will be constrained by cpuset_shadow(). */
+	if (policy == DOMAINSET_POLICY_PREFER) 
 		DOMAINSET_FILL(&domain.ds_mask);
-	}
 
 	switch (level) {
 	case CPU_LEVEL_ROOT:
@@ -2146,12 +2167,106 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le
 		break;
 	}
 out:
-	free(mask, M_TEMP);
 	return (error);
 }
 
-#ifdef DDB
+#ifndef _SYS_SYSPROTO_H_
+struct msetdomain_args {
+	void 		*addr;
+	size_t		size;
+	size_t		domainsetsize;
+	domainset_t 	*mask;
+	int		policy;
+	int		flags;
+};
+#endif
 
+int
+sys_msetdomain(struct thread *td, struct msetdomain_args *uap)
+{
+	return (kern_msetdomain(td, (uintptr_t)uap->addr, uap->size,
+	    uap->domainsetsize, uap->mask, uap->policy, uap->flags));
+}
+
+int
+kern_msetdomain(struct thread *td, uintptr_t addr0, size_t size,
+    size_t domainsetsize, const domainset_t *mask, int policy, int flags)
+{
+	struct domainset domain, *set, *nset;
+	struct cpuset *cset;
+	struct thread *ttd;
+	struct proc *p;
+        vm_offset_t addr;
+        vm_size_t pageoff;
+	int error;
+
+	/* Normalize the addresses. */
+        addr = trunc_page(addr0);
+        pageoff = (addr & PAGE_MASK);
+        addr -= pageoff;
+        size += pageoff;
+        size = (vm_size_t)round_page(size);
+        if (addr + size < addr)
+                return (EINVAL);
+
+	/* Short-circuit for POLICY_INVALID == reset to default. */
+	if (policy == DOMAINSET_POLICY_INVALID) {
+		nset = NULL;
+		goto apply;
+	}
+
+	/*
+	 * Copy in and initialize the domainset from the user arguments.
+	 */
+	error = domainset_copyin(&domain, domainsetsize, mask, policy);
+	if (error)
+		return (error);
+
+	/*
+	 * Grab the list of allowed domains from the numbered cpuset this
+	 * process is a member of.
+	 */
+	error = cpuset_which(CPU_WHICH_PID, -1, &p, &ttd, &cset);
+	if (error)
+		return (error);
+	thread_lock(ttd);
+	set = cpuset_getbase(ttd->td_cpuset)->cs_domain;
+	thread_unlock(ttd);
+	PROC_UNLOCK(p);
+
+	/*
+	 * Validate the new policy against the allowed set.
+	 */
+	if (policy == DOMAINSET_POLICY_PREFER)
+		DOMAINSET_COPY(&set->ds_mask, &domain.ds_mask);
+	if (!domainset_valid(set, &domain))
+		return (EINVAL);
+
+	/*
+	 * Attempt to create a new set based on this key.
+	 */
+	nset = domainset_create(&domain);
+	if (nset == NULL)
+		return (EINVAL);
+
+	/*
+	 * Attempt to apply the new set to the memory range.
+	 */
+apply:
+	switch (vm_map_setdomain(&td->td_proc->p_vmspace->vm_map, addr,
+	    addr + size, nset, flags)) {
+	case KERN_SUCCESS:
+		break;
+	case KERN_INVALID_ADDRESS:
+		return (EFAULT);
+	default:
+		return (EINVAL);
+	}
+
+	return (0);
+}
+
+#ifdef DDB
 static void
 ddb_display_bitset(const struct bitset *set, int size)
 {

Modified: user/jeff/numa/sys/kern/syscalls.c
==============================================================================
--- user/jeff/numa/sys/kern/syscalls.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/kern/syscalls.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -570,4 +570,5 @@ const char *syscallnames[] = {
 	"cpuset_getdomain",			/* 561 = cpuset_getdomain */
 	"cpuset_setdomain",			/* 562 = cpuset_setdomain */
 	"getrandom",			/* 563 = getrandom */
+	"msetdomain",			/* 564 = msetdomain */
 };

Modified: user/jeff/numa/sys/kern/syscalls.master
==============================================================================
--- user/jeff/numa/sys/kern/syscalls.master	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/kern/syscalls.master	Sun Apr  1 04:11:38 2018	(r331861)
@@ -1023,6 +1023,9 @@
 				    int policy); }
 563	AUE_NULL	STD	{ int getrandom(void *buf, size_t buflen, \
 				    unsigned int flags); }
+564	AUE_NULL	STD	{ int msetdomain(void *addr, size_t size, \
+				    size_t domainsetsize, domainset_t *mask, \
+				    int policy, int flags); }
 
 ; Please copy any additions and changes to the following compatability tables:
 ; sys/compat/freebsd32/syscalls.master

Modified: user/jeff/numa/sys/kern/systrace_args.c
==============================================================================
--- user/jeff/numa/sys/kern/systrace_args.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/kern/systrace_args.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -3291,6 +3291,18 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		*n_args = 3;
 		break;
 	}
+	/* msetdomain */
+	case 564: {
+		struct msetdomain_args *p = params;
+		uarg[0] = (intptr_t) p->addr; /* void * */
+		uarg[1] = p->size; /* size_t */
+		uarg[2] = p->domainsetsize; /* size_t */
+		uarg[3] = (intptr_t) p->mask; /* domainset_t * */
+		iarg[4] = p->policy; /* int */
+		iarg[5] = p->flags; /* int */
+		*n_args = 6;
+		break;
+	}
 	default:
 		*n_args = 0;
 		break;
@@ -8777,6 +8789,31 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 			break;
 		};
 		break;
+	/* msetdomain */
+	case 564:
+		switch(ndx) {
+		case 0:
+			p = "userland void *";
+			break;
+		case 1:
+			p = "size_t";
+			break;
+		case 2:
+			p = "size_t";
+			break;
+		case 3:
+			p = "userland domainset_t *";
+			break;
+		case 4:
+			p = "int";
+			break;
+		case 5:
+			p = "int";
+			break;
+		default:
+			break;
+		};
+		break;
 	default:
 		break;
 	};
@@ -10665,6 +10702,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 		break;
 	/* getrandom */
 	case 563:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
+	/* msetdomain */
+	case 564:
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;

Modified: user/jeff/numa/sys/sys/domainset.h
==============================================================================
--- user/jeff/numa/sys/sys/domainset.h	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/sys/domainset.h	Sun Apr  1 04:11:38 2018	(r331861)
@@ -114,6 +114,7 @@ int	cpuset_getdomain(cpulevel_t, cpuwhich_t, id_t, siz
 	    int *);
 int	cpuset_setdomain(cpulevel_t, cpuwhich_t, id_t, size_t,
 	    const domainset_t *, int);
+int	msetdomain(void *, size_t, size_t, domainset_t *, int, int);
 
 __END_DECLS
 #endif

Modified: user/jeff/numa/sys/sys/syscall.h
==============================================================================
--- user/jeff/numa/sys/sys/syscall.h	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/sys/syscall.h	Sun Apr  1 04:11:38 2018	(r331861)
@@ -479,4 +479,5 @@
 #define	SYS_cpuset_getdomain	561
 #define	SYS_cpuset_setdomain	562
 #define	SYS_getrandom	563
-#define	SYS_MAXSYSCALL	564
+#define	SYS_msetdomain	564
+#define	SYS_MAXSYSCALL	565

Modified: user/jeff/numa/sys/sys/syscall.mk
==============================================================================
--- user/jeff/numa/sys/sys/syscall.mk	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/sys/syscall.mk	Sun Apr  1 04:11:38 2018	(r331861)
@@ -406,4 +406,5 @@ MIASM =  \
 	kevent.o \
 	cpuset_getdomain.o \
 	cpuset_setdomain.o \
-	getrandom.o
+	getrandom.o \
+	msetdomain.o

Modified: user/jeff/numa/sys/sys/syscallsubr.h
==============================================================================
--- user/jeff/numa/sys/sys/syscallsubr.h	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/sys/syscallsubr.h	Sun Apr  1 04:11:38 2018	(r331861)
@@ -175,6 +175,9 @@ int	kern_mlock(struct proc *proc, struct ucred *cred, 
 int	kern_mmap(struct thread *td, uintptr_t addr, size_t size, int prot,
 	    int flags, int fd, off_t pos);
 int	kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot);
+int	kern_msetdomain(struct thread *td, uintptr_t addr,
+	    size_t size, size_t domainsetsize, const domainset_t *maskp,
+	    int policy, int flags);
 int	kern_msgctl(struct thread *, int, int, struct msqid_ds *);
 int	kern_msgrcv(struct thread *, int, void *, size_t, long, int, long *);
 int	kern_msgsnd(struct thread *, int, const void *, size_t, int, long);

Modified: user/jeff/numa/sys/sys/sysproto.h
==============================================================================
--- user/jeff/numa/sys/sys/sysproto.h	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/sys/sysproto.h	Sun Apr  1 04:11:38 2018	(r331861)
@@ -1773,6 +1773,14 @@ struct getrandom_args {
 	char buflen_l_[PADL_(size_t)]; size_t buflen; char buflen_r_[PADR_(size_t)];
 	char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)];
 };
+struct msetdomain_args {
+	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+	char size_l_[PADL_(size_t)]; size_t size; char size_r_[PADR_(size_t)];
+	char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)];
+	char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)];
+	char policy_l_[PADL_(int)]; int policy; char policy_r_[PADR_(int)];
+	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+};
 int	nosys(struct thread *, struct nosys_args *);
 void	sys_sys_exit(struct thread *, struct sys_exit_args *);
 int	sys_fork(struct thread *, struct fork_args *);
@@ -2154,6 +2162,7 @@ int	sys_kevent(struct thread *, struct kevent_args *);
 int	sys_cpuset_getdomain(struct thread *, struct cpuset_getdomain_args *);
 int	sys_cpuset_setdomain(struct thread *, struct cpuset_setdomain_args *);
 int	sys_getrandom(struct thread *, struct getrandom_args *);
+int	sys_msetdomain(struct thread *, struct msetdomain_args *);
 
 #ifdef COMPAT_43
 
@@ -3047,6 +3056,7 @@ int	freebsd11_mknodat(struct thread *, struct freebsd1
 #define	SYS_AUE_cpuset_getdomain	AUE_NULL
 #define	SYS_AUE_cpuset_setdomain	AUE_NULL
 #define	SYS_AUE_getrandom	AUE_NULL
+#define	SYS_AUE_msetdomain	AUE_NULL
 
 #undef PAD_
 #undef PADL_

Modified: user/jeff/numa/sys/vm/vm_fault.c
==============================================================================
--- user/jeff/numa/sys/vm/vm_fault.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/vm/vm_fault.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -1609,7 +1609,6 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map
 	KASSERT(upgrade || dst_entry->object.vm_object == NULL,
 	    ("vm_fault_copy_entry: vm_object not NULL"));
 	if (src_object != dst_object) {
-		dst_object->domain = src_object->domain;
 		dst_entry->object.vm_object = dst_object;
 		dst_entry->offset = 0;
 		dst_object->charge = dst_entry->end - dst_entry->start;

Modified: user/jeff/numa/sys/vm/vm_map.c
==============================================================================
--- user/jeff/numa/sys/vm/vm_map.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/vm/vm_map.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/domainset.h>
 #include <sys/kernel.h>
 #include <sys/ktr.h>
 #include <sys/lock.h>
@@ -848,6 +849,34 @@ vm_map_entry_create(vm_map_t map)
 }
 
 /*
+ *	vm_map_entry_object_allocate:	[ internal use only ]
+ *
+ *	Returns the object associated with a map entry, allocating
+ *	a default object if non presently exists.
+ */
+static vm_object_t
+vm_map_entry_object_allocate(vm_map_t map, vm_map_entry_t entry)
+{
+	vm_object_t object;
+
+	VM_MAP_ASSERT_LOCKED(map);
+	if (entry->object.vm_object != NULL)
+		return (entry->object.vm_object);
+
+	object = vm_object_allocate(OBJT_DEFAULT,
+	    atop(entry->end - entry->start));
+	entry->object.vm_object = object;
+	entry->offset = 0;
+	if (entry->cred != NULL) {
+		object->cred = entry->cred;
+		object->charge = entry->end - entry->start;
+		entry->cred = NULL;
+	}
+
+	return (object);
+}
+
+/*
  *	vm_map_entry_set_behavior:
  *
  *	Set the expected access behavior, either normal, random, or
@@ -1773,16 +1802,7 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry,
 	 */
 	if (entry->object.vm_object == NULL && !map->system_map &&
 	    (entry->eflags & MAP_ENTRY_GUARD) == 0) {
-		vm_object_t object;
-		object = vm_object_allocate(OBJT_DEFAULT,
-				atop(entry->end - entry->start));
-		entry->object.vm_object = object;
-		entry->offset = 0;
-		if (entry->cred != NULL) {
-			object->cred = entry->cred;
-			object->charge = entry->end - entry->start;
-			entry->cred = NULL;
-		}
+		vm_map_entry_object_allocate(map, entry);
 	} else if (entry->object.vm_object != NULL &&
 		   ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) &&
 		   entry->cred != NULL) {
@@ -1853,16 +1873,7 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, v
 	 */
 	if (entry->object.vm_object == NULL && !map->system_map &&
 	    (entry->eflags & MAP_ENTRY_GUARD) == 0) {
-		vm_object_t object;
-		object = vm_object_allocate(OBJT_DEFAULT,
-				atop(entry->end - entry->start));
-		entry->object.vm_object = object;
-		entry->offset = 0;
-		if (entry->cred != NULL) {
-			object->cred = entry->cred;
-			object->charge = entry->end - entry->start;
-			entry->cred = NULL;
-		}
+		vm_map_entry_object_allocate(map, entry);
 	} else if (entry->object.vm_object != NULL &&
 		   ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) &&
 		   entry->cred != NULL) {
@@ -3449,21 +3460,11 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c
 
 		case VM_INHERIT_SHARE:
 			/*
-			 * Clone the entry, creating the shared object if necessary.
+			 * Clone the entry, creating the shared object if
+			 * necessary.
 			 */
-			object = old_entry->object.vm_object;
-			if (object == NULL) {
-				object = vm_object_allocate(OBJT_DEFAULT,
-					atop(old_entry->end - old_entry->start));
-				old_entry->object.vm_object = object;
-				old_entry->offset = 0;
-				if (old_entry->cred != NULL) {
-					object->cred = old_entry->cred;
-					object->charge = old_entry->end -
-					    old_entry->start;
-					old_entry->cred = NULL;
-				}
-			}
+			object = vm_map_entry_object_allocate(old_map,
+			    old_entry);
 
 			/*
 			 * Add the reference before calling vm_object_shadow
@@ -4195,16 +4196,7 @@ RetryLookupLocked:
 	    !map->system_map) {
 		if (vm_map_lock_upgrade(map))
 			goto RetryLookup;
-		entry->object.vm_object = vm_object_allocate(OBJT_DEFAULT,
-		    atop(size));
-		entry->offset = 0;
-		if (entry->cred != NULL) {
-			VM_OBJECT_WLOCK(entry->object.vm_object);
-			entry->object.vm_object->cred = entry->cred;
-			entry->object.vm_object->charge = size;
-			VM_OBJECT_WUNLOCK(entry->object.vm_object);
-			entry->cred = NULL;
-		}
+		vm_map_entry_object_allocate(map, entry);
 		vm_map_lock_downgrade(map);
 	}
 
@@ -4313,6 +4305,107 @@ vm_map_lookup_done(vm_map_t map, vm_map_entry_t entry)
 	 * Unlock the main-level map
 	 */
 	vm_map_unlock_read(map);
+}
+
+/*
+ *	vm_map_setdomain:
+ *
+ *	Assigns the NUMA policy contained in 'domain' to all objects
+ *	overlapping the requested address range.
+ */
+int
+vm_map_setdomain(vm_map_t map, vm_offset_t start, vm_offset_t end,
+    struct domainset *domain, int flags)
+{
+	vm_map_entry_t current, entry;
+	vm_object_t object;
+	int error;
+
+	error = KERN_SUCCESS;
+	vm_map_lock(map);
+	if (start < vm_map_min(map) || end > vm_map_max(map) ||
+	    start >= end || map->system_map) {
+		error = KERN_INVALID_ADDRESS;
+		goto out;
+	}
+
+	/*
+	 * Locate starting entry and clip if necessary.
+	 */
+	if (!vm_map_lookup_entry(map, start, &entry)) {
+		error = KERN_INVALID_ADDRESS;
+		goto out;
+	}
+	if (entry->start > start) {
+		error = KERN_INVALID_ADDRESS;
+		goto out;
+	}
+	vm_map_clip_start(map, entry, start);
+
+	/*
+	 * Walk the range looking for holes before we apply policy.
+	 */
+	for (current = entry;
+	     (current != &map->header) && (current->start < end);
+	     current = current->next
+	) {
+		if (current->end >= end)
+			break;
+		/* We don't support gaps. */
+		if (current->end != current->next->start) {
+			error = KERN_INVALID_ADDRESS;
+			goto out;
+		}
+	}
+
+	/*
+	 * Walk each overlapping map entry and update the backing
+	 * object's memory policy.
+	 */
+	for (current = entry;
+	     (current != &map->header) && (current->start < end);
+	     current = current->next
+	) {
+		/* Skip incompatible entries. */
+		if ((current->eflags &
+		    (MAP_ENTRY_GUARD | MAP_ENTRY_IS_SUB_MAP)) != 0)
+			continue;
+
+		/*
+		 * Clip the end and allocate the object so that we are
+		 * only modifying the requested range.
+		 */
+		vm_map_clip_end(map, current, end);
+		object = vm_map_entry_object_allocate(map, current);
+		if (current->eflags & MAP_ENTRY_NEEDS_COPY) {
+			vm_object_shadow(&current->object.vm_object,
+			    &current->offset, current->end - current->start);
+			current->eflags &= ~MAP_ENTRY_NEEDS_COPY;
+			object = current->object.vm_object;
+		}
+
+		/*
+		 * If the object is anonymous memory we need to split it
+		 * so that we can apply the unique alloction property to
+		 * this range.
+		 */
+		VM_OBJECT_WLOCK(object);
+		if (object->type == OBJT_DEFAULT ||
+		    object->type == OBJT_SWAP) {
+			vm_object_collapse(object);
+			if ((object->flags & OBJ_NOSPLIT) == 0) {
+				vm_object_split(current);
+				object = current->object.vm_object;
+			}
+		}
+		object->domain.dr_policy = domain;
+		VM_OBJECT_WUNLOCK(object);
+		vm_map_simplify_entry(map, current);
+	}
+out:
+	vm_map_unlock(map);
+
+	return (error);
 }
 
 #include "opt_ddb.h"

Modified: user/jeff/numa/sys/vm/vm_map.h
==============================================================================
--- user/jeff/numa/sys/vm/vm_map.h	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/vm/vm_map.h	Sun Apr  1 04:11:38 2018	(r331861)
@@ -403,5 +403,8 @@ int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_
 int vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
     int flags);
 long vmspace_swap_count(struct vmspace *vmspace);
+struct domainset;
+int vm_map_setdomain(vm_map_t, vm_offset_t, vm_offset_t,
+    struct domainset *, int);
 #endif				/* _KERNEL */
 #endif				/* _VM_MAP_ */

Modified: user/jeff/numa/sys/vm/vm_object.c
==============================================================================
--- user/jeff/numa/sys/vm/vm_object.c	Sun Apr  1 01:21:00 2018	(r331860)
+++ user/jeff/numa/sys/vm/vm_object.c	Sun Apr  1 04:11:38 2018	(r331861)
@@ -1328,7 +1328,6 @@ vm_object_shadow(
 	result->backing_object_offset = *offset;
 	if (source != NULL) {
 		VM_OBJECT_WLOCK(source);
-		result->domain = source->domain;
 		LIST_INSERT_HEAD(&source->shadow_head, result, shadow_list);
 		source->shadow_count++;
 #if VM_NRESERVLEVEL > 0

From owner-svn-src-user@freebsd.org  Sun Apr  1 07:49:49 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0395F6BED7
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Sun,  1 Apr 2018 07:49:49 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 62B7E7BA99;
 Sun,  1 Apr 2018 07:49:49 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C51A23EBA;
 Sun,  1 Apr 2018 07:49:49 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w317nnSB056233;
 Sun, 1 Apr 2018 07:49:49 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w317nn1j056232;
 Sun, 1 Apr 2018 07:49:49 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804010749.w317nn1j056232@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Sun, 1 Apr 2018 07:49:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331865 - user/pho/stress2/lib
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/lib
X-SVN-Commit-Revision: 331865
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Apr 2018 07:49:49 -0000

Author: pho
Date: Sun Apr  1 07:49:48 2018
New Revision: 331865
URL: https://svnweb.freebsd.org/changeset/base/331865

Log:
  Fix wrong format in sscanf().
  Truncate long program names for column alignment.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/lib/options.c

Modified: user/pho/stress2/lib/options.c
==============================================================================
--- user/pho/stress2/lib/options.c	Sun Apr  1 07:45:52 2018	(r331864)
+++ user/pho/stress2/lib/options.c	Sun Apr  1 07:49:48 2018	(r331865)
@@ -131,11 +131,11 @@ environment(void)
 			usage("VERBOSE");
 	}
 	if ((cp = gete("KBLOCKS")) != NULL) {
-		if (sscanf(cp, "%d", &op->kblocks) != 1)
+		if (sscanf(cp, "%jd", &op->kblocks) != 1)
 			usage("KBLOCKS");
 	}
 	if ((cp = gete("INODES")) != NULL) {
-		if (sscanf(cp, "%d", &op->inodes) != 1)
+		if (sscanf(cp, "%jd", &op->inodes) != 1)
 			usage("INODES");
 	}
 }
@@ -208,17 +208,20 @@ options(int argc, char **argv)
 void
 show_status(void)
 {
-	char buf[80];
+	char buf[80], pgname[9];
 	int days;
 	time_t t;
 
 	if (op->verbose > 0) {
+		strncpy(pgname, getprogname(), sizeof(pgname));
+		pgname[8] = 0;
 		t = op->run_time;
 		days = t / (60 * 60 * 24);
 		t = t % (60 * 60 * 24);
 		strftime(buf, sizeof(buf), "%T", gmtime(&t));
-		printf("%8s: run time %2d+%s, incarnations %3d, load %3d, verbose %d\n",
-			getprogname(), days, buf, op->incarnations, op->load,
+		printf("%8s: run time %2d+%s, incarnations %3d, load %3d, "
+			"verbose %d\n",
+			pgname, days, buf, op->incarnations, op->load,
 			op->verbose);
 		fflush(stdout);
 	}
@@ -227,7 +230,8 @@ show_status(void)
 void
 rmval(void)
 {
-	if (snprintf(path, sizeof(path), "%s/%s.conf", op->cd, getprogname()) < 0)
+	if (snprintf(path, sizeof(path), "%s/%s.conf", op->cd,
+	    getprogname()) < 0)
 		err(1, "snprintf path");
 	(void) unlink(path);
 }
@@ -257,7 +261,8 @@ getval(void)
 				break;
 		}
 		if (n < 0)
-			err(1, "readlink(%s). %s:%d", path, __FILE__, __LINE__);
+			err(1, "readlink(%s). %s:%d", path, __FILE__,
+			    __LINE__);
 	}
 	buf[n] = '\0';
 	if (sscanf(buf, "%ld", &val) != 1)

From owner-svn-src-user@freebsd.org  Sun Apr  1 07:45:53 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70FECF6B66E
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Sun,  1 Apr 2018 07:45:53 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 25C447B719;
 Sun,  1 Apr 2018 07:45:53 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2061F23EB4;
 Sun,  1 Apr 2018 07:45:53 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w317jrFu055971;
 Sun, 1 Apr 2018 07:45:53 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w317jruW055970;
 Sun, 1 Apr 2018 07:45:53 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804010745.w317jruW055970@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Sun, 1 Apr 2018 07:45:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331864 - user/pho/stress2/tools
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/tools
X-SVN-Commit-Revision: 331864
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Apr 2018 07:45:53 -0000

Author: pho
Date: Sun Apr  1 07:45:52 2018
New Revision: 331864
URL: https://svnweb.freebsd.org/changeset/base/331864

Log:
  Remove old installation.
  Added missing escape to quotes.
  Added one more example.

Modified:
  user/pho/stress2/tools/setup.sh

Modified: user/pho/stress2/tools/setup.sh
==============================================================================
--- user/pho/stress2/tools/setup.sh	Sun Apr  1 04:50:05 2018	(r331863)
+++ user/pho/stress2/tools/setup.sh	Sun Apr  1 07:45:52 2018	(r331864)
@@ -19,10 +19,12 @@ work=${work:-/tmp/work}
 mkdir -p $work
 cd $work
 echo "Extracting stress2 to $work"
+[ -d stress2 ] && rm -rf stress2
 svnlite checkout -q svn://svn.freebsd.org/base/user/pho/stress2
 cd stress2
 echo "testuser=$testuser" > `hostname`
 make > /dev/null
-echo "Tests to run are in $work/stress2/misc
+echo "Tests to run are in $work/stress2/misc.
 To run all tests, type ./all.sh -on
-To run for example all tmpfs tests, type ./all.sh -on `grep -l tmpfs *.sh`"
+To run for example all tmpfs tests, type ./all.sh -on \`grep -l tmpfs *.sh\`
+To run fdatasync.sh for one hour, type ./all.sh -m 60 fdatasync.sh"

From owner-svn-src-user@freebsd.org  Mon Apr  2 18:10:42 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C4F1F7BD46
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Mon,  2 Apr 2018 18:10:42 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id AE8F66A3AF;
 Mon,  2 Apr 2018 18:10:41 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A976D19207;
 Mon,  2 Apr 2018 18:10:41 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w32IAfma005173;
 Mon, 2 Apr 2018 18:10:41 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w32IAflH005169;
 Mon, 2 Apr 2018 18:10:41 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201804021810.w32IAflH005169@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston <markj@FreeBSD.org>
Date: Mon, 2 Apr 2018 18:10:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331883 - in user/markj/netdump: share/man/man4
 sys/dev/mlx4/mlx4_en
X-SVN-Group: user
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: in user/markj/netdump: share/man/man4 sys/dev/mlx4/mlx4_en
X-SVN-Commit-Revision: 331883
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Apr 2018 18:10:42 -0000

Author: markj
Date: Mon Apr  2 18:10:41 2018
New Revision: 331883
URL: https://svnweb.freebsd.org/changeset/base/331883

Log:
  Add netdump support to mlx4en(4).
  
  Tested with a MT27520 (ConnectX-3 Pro) adapter.

Modified:
  user/markj/netdump/share/man/man4/netdump.4
  user/markj/netdump/sys/dev/mlx4/mlx4_en/en.h
  user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
  user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c

Modified: user/markj/netdump/share/man/man4/netdump.4
==============================================================================
--- user/markj/netdump/share/man/man4/netdump.4	Mon Apr  2 16:11:49 2018	(r331882)
+++ user/markj/netdump/share/man/man4/netdump.4	Mon Apr  2 18:10:41 2018	(r331883)
@@ -110,6 +110,7 @@ The following network drivers support netdump:
 .Xr em 4 ,
 .Xr igb 4 ,
 .Xr ix 4 ,
+.Xr mlx4en 4 ,
 .Xr re 4 ,
 .Xr vtnet 4 .
 .Sh SEE ALSO

Modified: user/markj/netdump/sys/dev/mlx4/mlx4_en/en.h
==============================================================================
--- user/markj/netdump/sys/dev/mlx4/mlx4_en/en.h	Mon Apr  2 16:11:49 2018	(r331882)
+++ user/markj/netdump/sys/dev/mlx4/mlx4_en/en.h	Mon Apr  2 18:10:41 2018	(r331883)
@@ -54,6 +54,7 @@
 #include <dev/mlx4/cmd.h>
 
 #include <netinet/tcp_lro.h>
+#include <netinet/netdump/netdump.h>
 
 #include "en_port.h"
 #include <dev/mlx4/stats.h>
@@ -814,6 +815,8 @@ void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *p
 int mlx4_en_process_rx_cq(struct net_device *dev,
 			  struct mlx4_en_cq *cq,
 			  int budget);
+int mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq);
+int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **m);
 void mlx4_en_poll_tx_cq(unsigned long data);
 void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
 		int is_tx, int rss, int qpn, int cqn, int user_prio,

Modified: user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
==============================================================================
--- user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c	Mon Apr  2 16:11:49 2018	(r331882)
+++ user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c	Mon Apr  2 18:10:41 2018	(r331883)
@@ -53,6 +53,8 @@
 #include "en.h"
 #include "en_port.h"
 
+NETDUMP_DEFINE(mlx4_en);
+
 static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv);
 static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv);
 
@@ -2298,6 +2300,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int 
 	ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL);
 	ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO);
 
+	NETDUMP_SET(dev, mlx4_en);
+
 	en_warn(priv, "Using %d TX rings\n", prof->tx_ring_num);
 	en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num);
 
@@ -2879,3 +2883,52 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *p
 		    CTLFLAG_RD, &rx_ring->errors, 0, "RX soft errors");
 	}
 }
+
+#ifdef NETDUMP
+static void
+mlx4_en_netdump_init(struct ifnet *dev, int *nrxr)
+{
+	struct mlx4_en_priv *priv;
+
+	priv = if_getsoftc(dev);
+	*nrxr = priv->rx_ring_num;
+}
+
+static void
+mlx4_en_netdump_event(struct ifnet *dev, enum netdump_ev event)
+{
+}
+
+static int
+mlx4_en_netdump_transmit(struct ifnet *dev, struct mbuf *m)
+{
+	struct mlx4_en_priv *priv;
+	int err;
+
+	priv = if_getsoftc(dev);
+	if ((if_getdrvflags(dev) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
+	    IFF_DRV_RUNNING || !priv->link_state)
+		return (ENOENT);
+
+	err = mlx4_en_xmit(priv, 0, &m);
+	if (err != 0 && m != NULL)
+		m_freem(m);
+	return (err);
+}
+
+static int
+mlx4_en_netdump_poll(struct ifnet *dev, int count)
+{
+	struct mlx4_en_priv *priv;
+	int i;
+
+	priv = if_getsoftc(dev);
+	if ((if_getdrvflags(dev) & IFF_DRV_RUNNING) == 0 || !priv->link_state)
+		return (ENOENT);
+
+	(void)mlx4_en_process_tx_cq(dev, priv->tx_cq[0]);
+	for (i = 0; i < priv->rx_ring_num; i++)
+		(void)mlx4_en_process_rx_cq(dev, priv->rx_cq[i], 0);
+	return (0);
+}
+#endif /* NETDUMP */

Modified: user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
==============================================================================
--- user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c	Mon Apr  2 16:11:49 2018	(r331882)
+++ user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c	Mon Apr  2 18:10:41 2018	(r331883)
@@ -356,8 +356,7 @@ mlx4_en_tx_ring_is_full(struct mlx4_en_tx_ring *ring)
 	return (wqs < (HEADROOM + (2 * MLX4_EN_TX_WQE_MAX_WQEBBS)));
 }
 
-static int mlx4_en_process_tx_cq(struct net_device *dev,
-				 struct mlx4_en_cq *cq)
+int mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
 {
 	struct mlx4_en_priv *priv = netdev_priv(dev);
 	struct mlx4_cq *mcq = &cq->mcq;
@@ -648,7 +647,7 @@ static void mlx4_bf_copy(void __iomem *dst, volatile u
 	__iowrite64_copy(dst, __DEVOLATILE(void *, src), bytecnt / 8);
 }
 
-static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp)
+int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp)
 {
 	enum {
 		DS_FACT = TXBB_SIZE / DS_SIZE_ALIGNMENT,

From owner-svn-src-user@freebsd.org  Tue Apr  3 14:29:59 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C94F84514
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Tue,  3 Apr 2018 14:29:59 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id A4E7A7FFE2;
 Tue,  3 Apr 2018 14:29:58 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F44525A32;
 Tue,  3 Apr 2018 14:29:58 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w33ETwW6091414;
 Tue, 3 Apr 2018 14:29:58 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w33ETwk2091395;
 Tue, 3 Apr 2018 14:29:58 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201804031429.w33ETwk2091395@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston <markj@FreeBSD.org>
Date: Tue, 3 Apr 2018 14:29:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331929 - in user/markj/netdump: .
 cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs
 cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest
 cddl/contrib/o...
X-SVN-Group: user
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: in user/markj/netdump: . cddl/contrib/opensolaris/cmd/zdb
 cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool
 cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/common/ctf cdd...
X-SVN-Commit-Revision: 331929
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Apr 2018 14:29:59 -0000

Author: markj
Date: Tue Apr  3 14:29:56 2018
New Revision: 331929
URL: https://svnweb.freebsd.org/changeset/base/331929

Log:
  MFH at r331928.

Added:
  user/markj/netdump/contrib/tzdata/ziguard.awk
     - copied unchanged from r331928, head/contrib/tzdata/ziguard.awk
  user/markj/netdump/lib/libc/gen/getentropy.3
     - copied unchanged from r331928, head/lib/libc/gen/getentropy.3
  user/markj/netdump/lib/libc/gen/getentropy.c
     - copied unchanged from r331928, head/lib/libc/gen/getentropy.c
  user/markj/netdump/lib/libc/sys/cpuset_getdomain.2
     - copied unchanged from r331928, head/lib/libc/sys/cpuset_getdomain.2
  user/markj/netdump/lib/libc/sys/getrandom.2
     - copied unchanged from r331928, head/lib/libc/sys/getrandom.2
  user/markj/netdump/lib/libc/tests/gen/getentropy_test.c
     - copied unchanged from r331928, head/lib/libc/tests/gen/getentropy_test.c
  user/markj/netdump/lib/libipt/
     - copied from r331928, head/lib/libipt/
  user/markj/netdump/share/man/man4/ocs_fc.4
     - copied unchanged from r331928, head/share/man/man4/ocs_fc.4
  user/markj/netdump/share/man/man4/vmci.4
     - copied unchanged from r331928, head/share/man/man4/vmci.4
  user/markj/netdump/share/man/man9/domainset.9
     - copied unchanged from r331928, head/share/man/man9/domainset.9
  user/markj/netdump/stand/lua/hook.lua
     - copied unchanged from r331928, head/stand/lua/hook.lua
  user/markj/netdump/stand/lua/logo-beastie.lua
     - copied unchanged from r331928, head/stand/lua/logo-beastie.lua
  user/markj/netdump/stand/lua/logo-beastiebw.lua
     - copied unchanged from r331928, head/stand/lua/logo-beastiebw.lua
  user/markj/netdump/stand/lua/logo-fbsdbw.lua
     - copied unchanged from r331928, head/stand/lua/logo-fbsdbw.lua
  user/markj/netdump/stand/lua/logo-orb.lua
     - copied unchanged from r331928, head/stand/lua/logo-orb.lua
  user/markj/netdump/stand/lua/logo-orbbw.lua
     - copied unchanged from r331928, head/stand/lua/logo-orbbw.lua
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_checkpoint.h
     - copied unchanged from r331928, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_checkpoint.h
  user/markj/netdump/sys/compat/linux/linux_errno.inc
     - copied unchanged from r331928, head/sys/compat/linux/linux_errno.inc
  user/markj/netdump/sys/contrib/dev/iwm/iwm-3168-22.fw.uu
     - copied unchanged from r331928, head/sys/contrib/dev/iwm/iwm-3168-22.fw.uu
  user/markj/netdump/sys/contrib/libb2/
     - copied from r331928, head/sys/contrib/libb2/
  user/markj/netdump/sys/contrib/zstd/doc/images/CSpeed2.png
     - copied unchanged from r331928, head/sys/contrib/zstd/doc/images/CSpeed2.png
  user/markj/netdump/sys/contrib/zstd/doc/images/DSpeed3.png
     - copied unchanged from r331928, head/sys/contrib/zstd/doc/images/DSpeed3.png
  user/markj/netdump/sys/contrib/zstd/lib/common/cpu.h
     - copied unchanged from r331928, head/sys/contrib/zstd/lib/common/cpu.h
  user/markj/netdump/sys/contrib/zstd/tests/checkTag.c
     - copied unchanged from r331928, head/sys/contrib/zstd/tests/checkTag.c
  user/markj/netdump/sys/crypto/blake2/
     - copied from r331928, head/sys/crypto/blake2/
  user/markj/netdump/sys/crypto/chacha20/chacha-sw.c
     - copied unchanged from r331928, head/sys/crypto/chacha20/chacha-sw.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_crspace.c
     - copied unchanged from r331928, head/sys/dev/mlx5/mlx5_core/mlx5_crspace.c
  user/markj/netdump/sys/dev/ocs_fc/
     - copied from r331928, head/sys/dev/ocs_fc/
  user/markj/netdump/sys/dev/tcp_log/
     - copied from r331928, head/sys/dev/tcp_log/
  user/markj/netdump/sys/dev/vmware/vmci/
     - copied from r331928, head/sys/dev/vmware/vmci/
  user/markj/netdump/sys/dts/arm/overlays/
     - copied from r331928, head/sys/dts/arm/overlays/
  user/markj/netdump/sys/kern/sys_getrandom.c
     - copied unchanged from r331928, head/sys/kern/sys_getrandom.c
  user/markj/netdump/sys/modules/adlink/
     - copied from r331928, head/sys/modules/adlink/
  user/markj/netdump/sys/modules/blake2/
     - copied from r331928, head/sys/modules/blake2/
  user/markj/netdump/sys/modules/dtb/overlays/
     - copied from r331928, head/sys/modules/dtb/overlays/
  user/markj/netdump/sys/modules/iwmfw/iwm3168fw/
     - copied from r331928, head/sys/modules/iwmfw/iwm3168fw/
  user/markj/netdump/sys/modules/ocs_fc/
     - copied from r331928, head/sys/modules/ocs_fc/
  user/markj/netdump/sys/modules/vmware/vmci/
     - copied from r331928, head/sys/modules/vmware/vmci/
  user/markj/netdump/sys/netinet/tcp_log_buf.c
     - copied unchanged from r331928, head/sys/netinet/tcp_log_buf.c
  user/markj/netdump/sys/netinet/tcp_log_buf.h
     - copied unchanged from r331928, head/sys/netinet/tcp_log_buf.h
  user/markj/netdump/sys/sys/_uio.h
     - copied unchanged from r331928, head/sys/sys/_uio.h
  user/markj/netdump/sys/tools/fdt/make_dtbo.sh
     - copied unchanged from r331928, head/sys/tools/fdt/make_dtbo.sh
  user/markj/netdump/tests/sys/kern/sys_getrandom.c
     - copied unchanged from r331928, head/tests/sys/kern/sys_getrandom.c
  user/markj/netdump/tests/sys/opencrypto/blake2-kat.h
     - copied unchanged from r331928, head/tests/sys/opencrypto/blake2-kat.h
  user/markj/netdump/tests/sys/opencrypto/blake2_test.c
     - copied unchanged from r331928, head/tests/sys/opencrypto/blake2_test.c
  user/markj/netdump/tools/tools/crypto/cryptocheck.c
     - copied unchanged from r331928, head/tools/tools/crypto/cryptocheck.c
Deleted:
  user/markj/netdump/stand/i386/libfirewire/fwohcireg.h
  user/markj/netdump/sys/contrib/zstd/doc/images/Cspeed4.png
  user/markj/netdump/sys/contrib/zstd/doc/images/Dspeed4.png
  user/markj/netdump/sys/net/if_iso88025subr.c
  user/markj/netdump/sys/net/iso88025.h
Modified:
  user/markj/netdump/Makefile.inc1
  user/markj/netdump/ObsoleteFiles.inc
  user/markj/netdump/UPDATING
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.8
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zpool/zpool.8
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
  user/markj/netdump/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  user/markj/netdump/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
  user/markj/netdump/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
  user/markj/netdump/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
  user/markj/netdump/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c
  user/markj/netdump/contrib/llvm/include/llvm/MC/MCAssembler.h
  user/markj/netdump/contrib/llvm/include/llvm/MC/MCELFStreamer.h
  user/markj/netdump/contrib/llvm/include/llvm/MC/MCStreamer.h
  user/markj/netdump/contrib/llvm/lib/MC/ELFObjectWriter.cpp
  user/markj/netdump/contrib/llvm/lib/MC/MCAsmStreamer.cpp
  user/markj/netdump/contrib/llvm/lib/MC/MCELFStreamer.cpp
  user/markj/netdump/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp
  user/markj/netdump/contrib/llvm/lib/MC/MCStreamer.cpp
  user/markj/netdump/contrib/llvm/lib/Object/ModuleSymbolTable.cpp
  user/markj/netdump/contrib/llvm/lib/Object/RecordStreamer.cpp
  user/markj/netdump/contrib/llvm/lib/Object/RecordStreamer.h
  user/markj/netdump/contrib/llvm/projects/libunwind/include/__libunwind_config.h
  user/markj/netdump/contrib/llvm/projects/libunwind/include/libunwind.h
  user/markj/netdump/contrib/llvm/projects/libunwind/src/AddressSpace.hpp
  user/markj/netdump/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp
  user/markj/netdump/contrib/llvm/projects/libunwind/src/Registers.hpp
  user/markj/netdump/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp
  user/markj/netdump/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S
  user/markj/netdump/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S
  user/markj/netdump/contrib/llvm/projects/libunwind/src/config.h
  user/markj/netdump/contrib/llvm/projects/libunwind/src/libunwind.cpp
  user/markj/netdump/contrib/llvm/tools/lld/ELF/InputFiles.cpp
  user/markj/netdump/contrib/llvm/tools/lld/ELF/InputFiles.h
  user/markj/netdump/contrib/llvm/tools/lld/ELF/SymbolTable.cpp
  user/markj/netdump/contrib/tzdata/CONTRIBUTING
  user/markj/netdump/contrib/tzdata/Makefile
  user/markj/netdump/contrib/tzdata/NEWS
  user/markj/netdump/contrib/tzdata/africa
  user/markj/netdump/contrib/tzdata/antarctica
  user/markj/netdump/contrib/tzdata/asia
  user/markj/netdump/contrib/tzdata/australasia
  user/markj/netdump/contrib/tzdata/backzone
  user/markj/netdump/contrib/tzdata/checktab.awk
  user/markj/netdump/contrib/tzdata/europe
  user/markj/netdump/contrib/tzdata/northamerica
  user/markj/netdump/contrib/tzdata/southamerica
  user/markj/netdump/contrib/tzdata/theory.html
  user/markj/netdump/contrib/tzdata/version
  user/markj/netdump/contrib/tzdata/zishrink.awk
  user/markj/netdump/contrib/tzdata/zone.tab
  user/markj/netdump/contrib/tzdata/zone1970.tab
  user/markj/netdump/crypto/openssl/CHANGES
  user/markj/netdump/crypto/openssl/Configure
  user/markj/netdump/crypto/openssl/LICENSE
  user/markj/netdump/crypto/openssl/Makefile
  user/markj/netdump/crypto/openssl/NEWS
  user/markj/netdump/crypto/openssl/README
  user/markj/netdump/crypto/openssl/apps/app_rand.c
  user/markj/netdump/crypto/openssl/apps/apps.c
  user/markj/netdump/crypto/openssl/apps/ca.c
  user/markj/netdump/crypto/openssl/apps/ciphers.c
  user/markj/netdump/crypto/openssl/apps/cms.c
  user/markj/netdump/crypto/openssl/apps/dgst.c
  user/markj/netdump/crypto/openssl/apps/dsaparam.c
  user/markj/netdump/crypto/openssl/apps/ecparam.c
  user/markj/netdump/crypto/openssl/apps/enc.c
  user/markj/netdump/crypto/openssl/apps/errstr.c
  user/markj/netdump/crypto/openssl/apps/ocsp.c
  user/markj/netdump/crypto/openssl/apps/openssl.c
  user/markj/netdump/crypto/openssl/apps/passwd.c
  user/markj/netdump/crypto/openssl/apps/pkcs12.c
  user/markj/netdump/crypto/openssl/apps/pkcs8.c
  user/markj/netdump/crypto/openssl/apps/rand.c
  user/markj/netdump/crypto/openssl/apps/req.c
  user/markj/netdump/crypto/openssl/apps/s_client.c
  user/markj/netdump/crypto/openssl/apps/s_server.c
  user/markj/netdump/crypto/openssl/apps/s_socket.c
  user/markj/netdump/crypto/openssl/apps/s_time.c
  user/markj/netdump/crypto/openssl/apps/speed.c
  user/markj/netdump/crypto/openssl/apps/x509.c
  user/markj/netdump/crypto/openssl/crypto/asn1/a_gentm.c
  user/markj/netdump/crypto/openssl/crypto/asn1/a_mbstr.c
  user/markj/netdump/crypto/openssl/crypto/asn1/a_object.c
  user/markj/netdump/crypto/openssl/crypto/asn1/a_strex.c
  user/markj/netdump/crypto/openssl/crypto/asn1/a_time.c
  user/markj/netdump/crypto/openssl/crypto/asn1/a_utctm.c
  user/markj/netdump/crypto/openssl/crypto/asn1/asn1.h
  user/markj/netdump/crypto/openssl/crypto/asn1/asn1_err.c
  user/markj/netdump/crypto/openssl/crypto/asn1/asn1_lib.c
  user/markj/netdump/crypto/openssl/crypto/asn1/asn1_par.c
  user/markj/netdump/crypto/openssl/crypto/asn1/asn_mime.c
  user/markj/netdump/crypto/openssl/crypto/asn1/t_x509a.c
  user/markj/netdump/crypto/openssl/crypto/asn1/tasn_dec.c
  user/markj/netdump/crypto/openssl/crypto/asn1/tasn_prn.c
  user/markj/netdump/crypto/openssl/crypto/bf/bftest.c
  user/markj/netdump/crypto/openssl/crypto/bio/b_dump.c
  user/markj/netdump/crypto/openssl/crypto/bio/b_print.c
  user/markj/netdump/crypto/openssl/crypto/bio/bio_cb.c
  user/markj/netdump/crypto/openssl/crypto/bio/bss_bio.c
  user/markj/netdump/crypto/openssl/crypto/bio/bss_conn.c
  user/markj/netdump/crypto/openssl/crypto/bio/bss_file.c
  user/markj/netdump/crypto/openssl/crypto/bn/bn_exp.c
  user/markj/netdump/crypto/openssl/crypto/bn/bn_lib.c
  user/markj/netdump/crypto/openssl/crypto/bn/bn_mont.c
  user/markj/netdump/crypto/openssl/crypto/bn/bn_print.c
  user/markj/netdump/crypto/openssl/crypto/bn/bntest.c
  user/markj/netdump/crypto/openssl/crypto/bn/expspeed.c
  user/markj/netdump/crypto/openssl/crypto/bn/exptest.c
  user/markj/netdump/crypto/openssl/crypto/conf/conf_def.c
  user/markj/netdump/crypto/openssl/crypto/conf/conf_mod.c
  user/markj/netdump/crypto/openssl/crypto/des/destest.c
  user/markj/netdump/crypto/openssl/crypto/des/ecb_enc.c
  user/markj/netdump/crypto/openssl/crypto/des/fcrypt.c
  user/markj/netdump/crypto/openssl/crypto/des/read_pwd.c
  user/markj/netdump/crypto/openssl/crypto/des/set_key.c
  user/markj/netdump/crypto/openssl/crypto/dh/dhtest.c
  user/markj/netdump/crypto/openssl/crypto/dsa/dsatest.c
  user/markj/netdump/crypto/openssl/crypto/ec/ec_lib.c
  user/markj/netdump/crypto/openssl/crypto/ec/ec_mult.c
  user/markj/netdump/crypto/openssl/crypto/ec/ecp_nistp224.c
  user/markj/netdump/crypto/openssl/crypto/ec/ecp_nistp256.c
  user/markj/netdump/crypto/openssl/crypto/ec/ecp_nistp521.c
  user/markj/netdump/crypto/openssl/crypto/ec/ecp_nistz256.c
  user/markj/netdump/crypto/openssl/crypto/ec/ecp_smpl.c
  user/markj/netdump/crypto/openssl/crypto/ec/ectest.c
  user/markj/netdump/crypto/openssl/crypto/ecdh/ecdhtest.c
  user/markj/netdump/crypto/openssl/crypto/engine/eng_cryptodev.c
  user/markj/netdump/crypto/openssl/crypto/engine/eng_table.c
  user/markj/netdump/crypto/openssl/crypto/err/err.c
  user/markj/netdump/crypto/openssl/crypto/err/err_prn.c
  user/markj/netdump/crypto/openssl/crypto/evp/bio_b64.c
  user/markj/netdump/crypto/openssl/crypto/evp/digest.c
  user/markj/netdump/crypto/openssl/crypto/evp/e_aes.c
  user/markj/netdump/crypto/openssl/crypto/evp/e_camellia.c
  user/markj/netdump/crypto/openssl/crypto/evp/evp_enc.c
  user/markj/netdump/crypto/openssl/crypto/evp/evp_locl.h
  user/markj/netdump/crypto/openssl/crypto/evp/evp_pbe.c
  user/markj/netdump/crypto/openssl/crypto/evp/evp_test.c
  user/markj/netdump/crypto/openssl/crypto/evp/openbsd_hw.c
  user/markj/netdump/crypto/openssl/crypto/evp/p5_crpt2.c
  user/markj/netdump/crypto/openssl/crypto/hmac/hmac.c
  user/markj/netdump/crypto/openssl/crypto/jpake/jpake.c
  user/markj/netdump/crypto/openssl/crypto/md2/md2_dgst.c
  user/markj/netdump/crypto/openssl/crypto/md4/md4.c
  user/markj/netdump/crypto/openssl/crypto/mem_dbg.c
  user/markj/netdump/crypto/openssl/crypto/o_init.c
  user/markj/netdump/crypto/openssl/crypto/o_time.c
  user/markj/netdump/crypto/openssl/crypto/objects/o_names.c
  user/markj/netdump/crypto/openssl/crypto/objects/obj_dat.c
  user/markj/netdump/crypto/openssl/crypto/opensslv.h
  user/markj/netdump/crypto/openssl/crypto/pem/pem_info.c
  user/markj/netdump/crypto/openssl/crypto/pem/pem_lib.c
  user/markj/netdump/crypto/openssl/crypto/pkcs7/pk7_doit.c
  user/markj/netdump/crypto/openssl/crypto/rand/md_rand.c
  user/markj/netdump/crypto/openssl/crypto/rand/rand_egd.c
  user/markj/netdump/crypto/openssl/crypto/rand/rand_unix.c
  user/markj/netdump/crypto/openssl/crypto/rsa/rsa_crpt.c
  user/markj/netdump/crypto/openssl/crypto/rsa/rsa_gen.c
  user/markj/netdump/crypto/openssl/crypto/rsa/rsa_pss.c
  user/markj/netdump/crypto/openssl/crypto/rsa/rsa_test.c
  user/markj/netdump/crypto/openssl/crypto/srp/srp_grps.h
  user/markj/netdump/crypto/openssl/crypto/threads/mttest.c
  user/markj/netdump/crypto/openssl/crypto/ts/Makefile
  user/markj/netdump/crypto/openssl/crypto/ts/ts_rsp_sign.c
  user/markj/netdump/crypto/openssl/crypto/ui/ui_openssl.c
  user/markj/netdump/crypto/openssl/crypto/x509/x509_txt.c
  user/markj/netdump/crypto/openssl/crypto/x509/x509_v3.c
  user/markj/netdump/crypto/openssl/crypto/x509/x509_vpm.c
  user/markj/netdump/crypto/openssl/crypto/x509v3/v3_alt.c
  user/markj/netdump/crypto/openssl/crypto/x509v3/v3_conf.c
  user/markj/netdump/crypto/openssl/crypto/x509v3/v3_info.c
  user/markj/netdump/crypto/openssl/doc/apps/ca.pod
  user/markj/netdump/crypto/openssl/doc/apps/ecparam.pod
  user/markj/netdump/crypto/openssl/doc/apps/s_client.pod
  user/markj/netdump/crypto/openssl/doc/apps/verify.pod
  user/markj/netdump/crypto/openssl/doc/apps/x509.pod
  user/markj/netdump/crypto/openssl/doc/crypto/ASN1_STRING_length.pod
  user/markj/netdump/crypto/openssl/doc/crypto/BIO_s_mem.pod
  user/markj/netdump/crypto/openssl/doc/crypto/BN_zero.pod
  user/markj/netdump/crypto/openssl/doc/crypto/EVP_EncryptInit.pod
  user/markj/netdump/crypto/openssl/doc/crypto/X509_VERIFY_PARAM_set_flags.pod
  user/markj/netdump/crypto/openssl/doc/crypto/threads.pod
  user/markj/netdump/crypto/openssl/engines/ccgost/README.gost
  user/markj/netdump/crypto/openssl/engines/ccgost/gost_eng.c
  user/markj/netdump/crypto/openssl/engines/e_atalla.c
  user/markj/netdump/crypto/openssl/ssl/Makefile
  user/markj/netdump/crypto/openssl/ssl/bad_dtls_test.c
  user/markj/netdump/crypto/openssl/ssl/d1_lib.c
  user/markj/netdump/crypto/openssl/ssl/d1_pkt.c
  user/markj/netdump/crypto/openssl/ssl/fatalerrtest.c
  user/markj/netdump/crypto/openssl/ssl/kssl.c
  user/markj/netdump/crypto/openssl/ssl/s23_srvr.c
  user/markj/netdump/crypto/openssl/ssl/s2_clnt.c
  user/markj/netdump/crypto/openssl/ssl/s2_enc.c
  user/markj/netdump/crypto/openssl/ssl/s2_lib.c
  user/markj/netdump/crypto/openssl/ssl/s2_srvr.c
  user/markj/netdump/crypto/openssl/ssl/s3_clnt.c
  user/markj/netdump/crypto/openssl/ssl/s3_lib.c
  user/markj/netdump/crypto/openssl/ssl/s3_pkt.c
  user/markj/netdump/crypto/openssl/ssl/s3_srvr.c
  user/markj/netdump/crypto/openssl/ssl/ssl_cert.c
  user/markj/netdump/crypto/openssl/ssl/ssl_lib.c
  user/markj/netdump/crypto/openssl/ssl/ssl_sess.c
  user/markj/netdump/crypto/openssl/ssl/ssltest.c
  user/markj/netdump/crypto/openssl/ssl/t1_enc.c
  user/markj/netdump/crypto/openssl/ssl/t1_lib.c
  user/markj/netdump/crypto/openssl/ssl/t1_trce.c
  user/markj/netdump/etc/mtree/BSD.include.dist
  user/markj/netdump/etc/rc.d/pf
  user/markj/netdump/include/Makefile
  user/markj/netdump/include/unistd.h
  user/markj/netdump/lib/Makefile
  user/markj/netdump/lib/libc/gen/Makefile.inc
  user/markj/netdump/lib/libc/gen/Symbol.map
  user/markj/netdump/lib/libc/gen/arc4random.c
  user/markj/netdump/lib/libc/include/libc_private.h
  user/markj/netdump/lib/libc/sys/Makefile.inc
  user/markj/netdump/lib/libc/sys/Symbol.map
  user/markj/netdump/lib/libc/sys/cpuset.2
  user/markj/netdump/lib/libc/sys/cpuset_getaffinity.2
  user/markj/netdump/lib/libc/sys/mlock.2
  user/markj/netdump/lib/libc/tests/gen/Makefile
  user/markj/netdump/lib/libdl/Makefile
  user/markj/netdump/lib/libjail/jail.c
  user/markj/netdump/lib/libsysdecode/errno.c
  user/markj/netdump/lib/libthr/thread/thr_cancel.c
  user/markj/netdump/lib/libusb/libusb20.c
  user/markj/netdump/lib/libusb/libusb20_int.h
  user/markj/netdump/lib/libusb/libusb20_ugen20.c
  user/markj/netdump/libexec/tftpd/tests/functional.c
  user/markj/netdump/release/Makefile.gce
  user/markj/netdump/release/amd64/mkisoimages.sh
  user/markj/netdump/release/arm/BANANAPI.conf
  user/markj/netdump/release/arm/BEAGLEBONE.conf
  user/markj/netdump/release/arm/CUBIEBOARD.conf
  user/markj/netdump/release/arm/CUBIEBOARD2.conf
  user/markj/netdump/release/arm/CUBOX-HUMMINGBOARD.conf
  user/markj/netdump/release/arm/GUMSTIX.conf
  user/markj/netdump/release/arm/PANDABOARD.conf
  user/markj/netdump/release/arm/RPI-B.conf
  user/markj/netdump/release/arm/RPI2.conf
  user/markj/netdump/release/arm/WANDBOARD.conf
  user/markj/netdump/release/arm64/RPI3.conf
  user/markj/netdump/release/tools/gce.conf
  user/markj/netdump/sbin/ifconfig/af_link.c
  user/markj/netdump/sbin/ifconfig/ifconfig.c
  user/markj/netdump/sbin/ipfw/ipfw2.c
  user/markj/netdump/sbin/ipfw/ipfw2.h
  user/markj/netdump/sbin/ipfw/main.c
  user/markj/netdump/sbin/mount/mount.8
  user/markj/netdump/sbin/route/route.c
  user/markj/netdump/sbin/savecore/savecore.8
  user/markj/netdump/secure/lib/libcrypto/Makefile.inc
  user/markj/netdump/secure/lib/libcrypto/man/ASN1_OBJECT_new.3
  user/markj/netdump/secure/lib/libcrypto/man/ASN1_STRING_length.3
  user/markj/netdump/secure/lib/libcrypto/man/ASN1_STRING_new.3
  user/markj/netdump/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3
  user/markj/netdump/secure/lib/libcrypto/man/ASN1_TIME_set.3
  user/markj/netdump/secure/lib/libcrypto/man/ASN1_generate_nconf.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_ctrl.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_f_base64.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_f_buffer.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_f_cipher.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_f_md.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_f_null.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_f_ssl.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_find_type.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_new.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_new_CMS.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_push.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_read.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_accept.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_bio.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_connect.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_fd.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_file.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_mem.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_null.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_s_socket.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_set_callback.3
  user/markj/netdump/secure/lib/libcrypto/man/BIO_should_retry.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_BLINDING_new.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_CTX_new.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_CTX_start.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_add.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_add_word.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_bn2bin.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_cmp.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_copy.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_generate_prime.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_mod_inverse.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_new.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_num_bytes.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_rand.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_set_bit.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_swap.3
  user/markj/netdump/secure/lib/libcrypto/man/BN_zero.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_add0_cert.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_add1_signer.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_compress.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_decrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_encrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_final.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_get0_type.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_sign.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_sign_receipt.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_uncompress.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_verify.3
  user/markj/netdump/secure/lib/libcrypto/man/CMS_verify_receipt.3
  user/markj/netdump/secure/lib/libcrypto/man/CONF_modules_free.3
  user/markj/netdump/secure/lib/libcrypto/man/CONF_modules_load_file.3
  user/markj/netdump/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3
  user/markj/netdump/secure/lib/libcrypto/man/DH_generate_key.3
  user/markj/netdump/secure/lib/libcrypto/man/DH_generate_parameters.3
  user/markj/netdump/secure/lib/libcrypto/man/DH_get_ex_new_index.3
  user/markj/netdump/secure/lib/libcrypto/man/DH_new.3
  user/markj/netdump/secure/lib/libcrypto/man/DH_set_method.3
  user/markj/netdump/secure/lib/libcrypto/man/DH_size.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_SIG_new.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_do_sign.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_dup_DH.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_generate_key.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_generate_parameters.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_get_ex_new_index.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_new.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_set_method.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_sign.3
  user/markj/netdump/secure/lib/libcrypto/man/DSA_size.3
  user/markj/netdump/secure/lib/libcrypto/man/EC_GFp_simple_method.3
  user/markj/netdump/secure/lib/libcrypto/man/EC_GROUP_copy.3
  user/markj/netdump/secure/lib/libcrypto/man/EC_GROUP_new.3
  user/markj/netdump/secure/lib/libcrypto/man/EC_KEY_new.3
  user/markj/netdump/secure/lib/libcrypto/man/EC_POINT_add.3
  user/markj/netdump/secure/lib/libcrypto/man/EC_POINT_new.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_GET_LIB.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_clear_error.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_error_string.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_get_error.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_load_crypto_strings.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_load_strings.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_print_errors.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_put_error.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_remove_state.3
  user/markj/netdump/secure/lib/libcrypto/man/ERR_set_mark.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_BytesToKey.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_DigestInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_DigestSignInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_EncodeInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_EncryptInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_OpenInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_cmp.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_derive.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_keygen.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_meth_new.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_new.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_print_private.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_sign.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_verify.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_SealInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_SignInit.3
  user/markj/netdump/secure/lib/libcrypto/man/EVP_VerifyInit.3
  user/markj/netdump/secure/lib/libcrypto/man/OBJ_nid2obj.3
  user/markj/netdump/secure/lib/libcrypto/man/OPENSSL_Applink.3
  user/markj/netdump/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
  user/markj/netdump/secure/lib/libcrypto/man/OPENSSL_config.3
  user/markj/netdump/secure/lib/libcrypto/man/OPENSSL_ia32cap.3
  user/markj/netdump/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3
  user/markj/netdump/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3
  user/markj/netdump/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3
  user/markj/netdump/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3
  user/markj/netdump/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS12_create.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS12_parse.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS7_decrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS7_encrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS7_sign.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3
  user/markj/netdump/secure/lib/libcrypto/man/PKCS7_verify.3
  user/markj/netdump/secure/lib/libcrypto/man/RAND_add.3
  user/markj/netdump/secure/lib/libcrypto/man/RAND_bytes.3
  user/markj/netdump/secure/lib/libcrypto/man/RAND_cleanup.3
  user/markj/netdump/secure/lib/libcrypto/man/RAND_egd.3
  user/markj/netdump/secure/lib/libcrypto/man/RAND_load_file.3
  user/markj/netdump/secure/lib/libcrypto/man/RAND_set_rand_method.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_blinding_on.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_check_key.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_generate_key.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_get_ex_new_index.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_new.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_print.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_private_encrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_public_encrypt.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_set_method.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_sign.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3
  user/markj/netdump/secure/lib/libcrypto/man/RSA_size.3
  user/markj/netdump/secure/lib/libcrypto/man/SMIME_read_CMS.3
  user/markj/netdump/secure/lib/libcrypto/man/SMIME_read_PKCS7.3
  user/markj/netdump/secure/lib/libcrypto/man/SMIME_write_CMS.3
  user/markj/netdump/secure/lib/libcrypto/man/SMIME_write_PKCS7.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_NAME_print_ex.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_STORE_CTX_new.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_check_host.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_check_private_key.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_new.3
  user/markj/netdump/secure/lib/libcrypto/man/X509_verify_cert.3
  user/markj/netdump/secure/lib/libcrypto/man/bio.3
  user/markj/netdump/secure/lib/libcrypto/man/blowfish.3
  user/markj/netdump/secure/lib/libcrypto/man/bn.3
  user/markj/netdump/secure/lib/libcrypto/man/bn_internal.3
  user/markj/netdump/secure/lib/libcrypto/man/buffer.3
  user/markj/netdump/secure/lib/libcrypto/man/crypto.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_DHparams.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_DSAPublicKey.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_ECPKParameters.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_ECPrivateKey.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_PrivateKey.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_RSAPublicKey.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_X509.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_X509_ALGOR.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_X509_CRL.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_X509_NAME.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_X509_REQ.3
  user/markj/netdump/secure/lib/libcrypto/man/d2i_X509_SIG.3
  user/markj/netdump/secure/lib/libcrypto/man/des.3
  user/markj/netdump/secure/lib/libcrypto/man/dh.3
  user/markj/netdump/secure/lib/libcrypto/man/dsa.3
  user/markj/netdump/secure/lib/libcrypto/man/ec.3
  user/markj/netdump/secure/lib/libcrypto/man/ecdsa.3
  user/markj/netdump/secure/lib/libcrypto/man/engine.3
  user/markj/netdump/secure/lib/libcrypto/man/err.3
  user/markj/netdump/secure/lib/libcrypto/man/evp.3
  user/markj/netdump/secure/lib/libcrypto/man/hmac.3
  user/markj/netdump/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3
  user/markj/netdump/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3
  user/markj/netdump/secure/lib/libcrypto/man/lh_stats.3
  user/markj/netdump/secure/lib/libcrypto/man/lhash.3
  user/markj/netdump/secure/lib/libcrypto/man/md5.3
  user/markj/netdump/secure/lib/libcrypto/man/mdc2.3
  user/markj/netdump/secure/lib/libcrypto/man/pem.3
  user/markj/netdump/secure/lib/libcrypto/man/rand.3
  user/markj/netdump/secure/lib/libcrypto/man/rc4.3
  user/markj/netdump/secure/lib/libcrypto/man/ripemd.3
  user/markj/netdump/secure/lib/libcrypto/man/rsa.3
  user/markj/netdump/secure/lib/libcrypto/man/sha.3
  user/markj/netdump/secure/lib/libcrypto/man/threads.3
  user/markj/netdump/secure/lib/libcrypto/man/ui.3
  user/markj/netdump/secure/lib/libcrypto/man/ui_compat.3
  user/markj/netdump/secure/lib/libcrypto/man/x509.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CIPHER_get_name.3
  user/markj/netdump/secure/lib/libssl/man/SSL_COMP_add_compression_method.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CONF_CTX_new.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CONF_cmd.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CONF_cmd_argv.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_add_session.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_ctrl.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_flush_sessions.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_free.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_get0_param.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_new.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_sess_number.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_sessions.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set1_curves.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_cert_store.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_info_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_mode.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_options.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_timeout.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_set_verify.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_use_certificate.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3
  user/markj/netdump/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3
  user/markj/netdump/secure/lib/libssl/man/SSL_SESSION_free.3
  user/markj/netdump/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3
  user/markj/netdump/secure/lib/libssl/man/SSL_SESSION_get_time.3
  user/markj/netdump/secure/lib/libssl/man/SSL_accept.3
  user/markj/netdump/secure/lib/libssl/man/SSL_alert_type_string.3
  user/markj/netdump/secure/lib/libssl/man/SSL_check_chain.3
  user/markj/netdump/secure/lib/libssl/man/SSL_clear.3
  user/markj/netdump/secure/lib/libssl/man/SSL_connect.3
  user/markj/netdump/secure/lib/libssl/man/SSL_do_handshake.3
  user/markj/netdump/secure/lib/libssl/man/SSL_export_keying_material.3
  user/markj/netdump/secure/lib/libssl/man/SSL_free.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_SSL_CTX.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_ciphers.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_client_CA_list.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_current_cipher.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_default_timeout.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_error.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_ex_new_index.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_fd.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_peer_cert_chain.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_peer_certificate.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_psk_identity.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_rbio.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_session.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_verify_result.3
  user/markj/netdump/secure/lib/libssl/man/SSL_get_version.3
  user/markj/netdump/secure/lib/libssl/man/SSL_library_init.3
  user/markj/netdump/secure/lib/libssl/man/SSL_load_client_CA_file.3
  user/markj/netdump/secure/lib/libssl/man/SSL_new.3
  user/markj/netdump/secure/lib/libssl/man/SSL_pending.3
  user/markj/netdump/secure/lib/libssl/man/SSL_read.3
  user/markj/netdump/secure/lib/libssl/man/SSL_rstate_string.3
  user/markj/netdump/secure/lib/libssl/man/SSL_session_reused.3
  user/markj/netdump/secure/lib/libssl/man/SSL_set_bio.3
  user/markj/netdump/secure/lib/libssl/man/SSL_set_connect_state.3
  user/markj/netdump/secure/lib/libssl/man/SSL_set_fd.3
  user/markj/netdump/secure/lib/libssl/man/SSL_set_session.3
  user/markj/netdump/secure/lib/libssl/man/SSL_set_shutdown.3
  user/markj/netdump/secure/lib/libssl/man/SSL_set_verify_result.3
  user/markj/netdump/secure/lib/libssl/man/SSL_shutdown.3
  user/markj/netdump/secure/lib/libssl/man/SSL_state_string.3
  user/markj/netdump/secure/lib/libssl/man/SSL_want.3
  user/markj/netdump/secure/lib/libssl/man/SSL_write.3
  user/markj/netdump/secure/lib/libssl/man/d2i_SSL_SESSION.3
  user/markj/netdump/secure/lib/libssl/man/ssl.3
  user/markj/netdump/secure/usr.bin/openssl/man/CA.pl.1
  user/markj/netdump/secure/usr.bin/openssl/man/asn1parse.1
  user/markj/netdump/secure/usr.bin/openssl/man/ca.1
  user/markj/netdump/secure/usr.bin/openssl/man/ciphers.1
  user/markj/netdump/secure/usr.bin/openssl/man/cms.1
  user/markj/netdump/secure/usr.bin/openssl/man/crl.1
  user/markj/netdump/secure/usr.bin/openssl/man/crl2pkcs7.1
  user/markj/netdump/secure/usr.bin/openssl/man/dgst.1
  user/markj/netdump/secure/usr.bin/openssl/man/dhparam.1
  user/markj/netdump/secure/usr.bin/openssl/man/dsa.1
  user/markj/netdump/secure/usr.bin/openssl/man/dsaparam.1
  user/markj/netdump/secure/usr.bin/openssl/man/ec.1
  user/markj/netdump/secure/usr.bin/openssl/man/ecparam.1
  user/markj/netdump/secure/usr.bin/openssl/man/enc.1
  user/markj/netdump/secure/usr.bin/openssl/man/errstr.1
  user/markj/netdump/secure/usr.bin/openssl/man/gendsa.1
  user/markj/netdump/secure/usr.bin/openssl/man/genpkey.1
  user/markj/netdump/secure/usr.bin/openssl/man/genrsa.1
  user/markj/netdump/secure/usr.bin/openssl/man/nseq.1
  user/markj/netdump/secure/usr.bin/openssl/man/ocsp.1
  user/markj/netdump/secure/usr.bin/openssl/man/openssl.1
  user/markj/netdump/secure/usr.bin/openssl/man/passwd.1
  user/markj/netdump/secure/usr.bin/openssl/man/pkcs12.1
  user/markj/netdump/secure/usr.bin/openssl/man/pkcs7.1
  user/markj/netdump/secure/usr.bin/openssl/man/pkcs8.1
  user/markj/netdump/secure/usr.bin/openssl/man/pkey.1
  user/markj/netdump/secure/usr.bin/openssl/man/pkeyparam.1
  user/markj/netdump/secure/usr.bin/openssl/man/pkeyutl.1
  user/markj/netdump/secure/usr.bin/openssl/man/rand.1
  user/markj/netdump/secure/usr.bin/openssl/man/req.1
  user/markj/netdump/secure/usr.bin/openssl/man/rsa.1
  user/markj/netdump/secure/usr.bin/openssl/man/rsautl.1
  user/markj/netdump/secure/usr.bin/openssl/man/s_client.1
  user/markj/netdump/secure/usr.bin/openssl/man/s_server.1
  user/markj/netdump/secure/usr.bin/openssl/man/s_time.1
  user/markj/netdump/secure/usr.bin/openssl/man/sess_id.1
  user/markj/netdump/secure/usr.bin/openssl/man/smime.1
  user/markj/netdump/secure/usr.bin/openssl/man/speed.1
  user/markj/netdump/secure/usr.bin/openssl/man/spkac.1
  user/markj/netdump/secure/usr.bin/openssl/man/ts.1
  user/markj/netdump/secure/usr.bin/openssl/man/tsget.1
  user/markj/netdump/secure/usr.bin/openssl/man/verify.1
  user/markj/netdump/secure/usr.bin/openssl/man/version.1
  user/markj/netdump/secure/usr.bin/openssl/man/x509.1
  user/markj/netdump/secure/usr.bin/openssl/man/x509v3_config.1
  user/markj/netdump/share/man/man4/Makefile
  user/markj/netdump/share/man/man4/altq.4
  user/markj/netdump/share/man/man4/audit.4
  user/markj/netdump/share/man/man4/cm.4
  user/markj/netdump/share/man/man4/fpa.4
  user/markj/netdump/share/man/man4/iwm.4
  user/markj/netdump/share/man/man4/iwmfw.4
  user/markj/netdump/share/man/man4/snd_hda.4
  user/markj/netdump/share/man/man7/development.7
  user/markj/netdump/share/man/man7/hier.7
  user/markj/netdump/share/man/man7/release.7
  user/markj/netdump/share/man/man9/MODULE_PNP_INFO.9
  user/markj/netdump/share/man/man9/Makefile
  user/markj/netdump/share/man/man9/altq.9
  user/markj/netdump/share/man/man9/bhnd.9
  user/markj/netdump/share/man/man9/malloc.9
  user/markj/netdump/share/man/man9/pfil.9
  user/markj/netdump/share/man/man9/style.9
  user/markj/netdump/share/man/man9/zone.9
  user/markj/netdump/share/misc/bsd-family-tree
  user/markj/netdump/share/misc/committers-ports.dot
  user/markj/netdump/share/misc/committers-src.dot
  user/markj/netdump/share/misc/pci_vendors
  user/markj/netdump/share/mk/bsd.dtb.mk
  user/markj/netdump/share/mk/bsd.kmod.mk
  user/markj/netdump/share/mk/bsd.libnames.mk
  user/markj/netdump/share/mk/bsd.own.mk
  user/markj/netdump/share/mk/src.libnames.mk
  user/markj/netdump/share/mk/src.opts.mk
  user/markj/netdump/stand/common/bootstrap.h
  user/markj/netdump/stand/defaults/loader.conf
  user/markj/netdump/stand/defaults/loader.conf.5
  user/markj/netdump/stand/efi/boot1/boot1.c
  user/markj/netdump/stand/efi/libefi/efi_console.c
  user/markj/netdump/stand/efi/libefi/efinet.c
  user/markj/netdump/stand/efi/loader/framebuffer.c
  user/markj/netdump/stand/forth/Makefile
  user/markj/netdump/stand/forth/efi.4th
  user/markj/netdump/stand/forth/loader.rc
  user/markj/netdump/stand/i386/libfirewire/firewire.c
  user/markj/netdump/stand/i386/libfirewire/fwohci.c
  user/markj/netdump/stand/i386/libfirewire/fwohci.h
  user/markj/netdump/stand/i386/libi386/biosdisk.c
  user/markj/netdump/stand/i386/libi386/vidconsole.c
  user/markj/netdump/stand/i386/loader/loader.rc
  user/markj/netdump/stand/i386/zfsboot/zfsboot.8
  user/markj/netdump/stand/lua/Makefile
  user/markj/netdump/stand/lua/color.lua
  user/markj/netdump/stand/lua/config.lua
  user/markj/netdump/stand/lua/core.lua
  user/markj/netdump/stand/lua/core.lua.8
  user/markj/netdump/stand/lua/drawer.lua
  user/markj/netdump/stand/lua/loader.lua
  user/markj/netdump/stand/lua/menu.lua
  user/markj/netdump/stand/lua/screen.lua
  user/markj/netdump/sys/amd64/acpica/acpi_wakecode.S
  user/markj/netdump/sys/amd64/amd64/apic_vector.S
  user/markj/netdump/sys/amd64/amd64/atpic_vector.S
  user/markj/netdump/sys/amd64/amd64/cpu_switch.S
  user/markj/netdump/sys/amd64/amd64/db_interface.c
  user/markj/netdump/sys/amd64/amd64/exception.S
  user/markj/netdump/sys/amd64/amd64/fpu.c
  user/markj/netdump/sys/amd64/amd64/gdb_machdep.c
  user/markj/netdump/sys/amd64/amd64/locore.S
  user/markj/netdump/sys/amd64/amd64/machdep.c
  user/markj/netdump/sys/amd64/amd64/mpboot.S
  user/markj/netdump/sys/amd64/amd64/ptrace_machdep.c
  user/markj/netdump/sys/amd64/amd64/sigtramp.S
  user/markj/netdump/sys/amd64/amd64/support.S
  user/markj/netdump/sys/amd64/amd64/trap.c
  user/markj/netdump/sys/amd64/amd64/vm_machdep.c
  user/markj/netdump/sys/amd64/amd64/xen-locore.S
  user/markj/netdump/sys/amd64/conf/GENERIC
  user/markj/netdump/sys/amd64/ia32/ia32_exception.S
  user/markj/netdump/sys/amd64/ia32/ia32_signal.c
  user/markj/netdump/sys/amd64/ia32/ia32_sigtramp.S
  user/markj/netdump/sys/amd64/ia32/ia32_syscall.c
  user/markj/netdump/sys/amd64/include/intr_machdep.h
  user/markj/netdump/sys/amd64/linux/linux_machdep.c
  user/markj/netdump/sys/amd64/linux/linux_support.s
  user/markj/netdump/sys/amd64/linux/linux_sysvec.c
  user/markj/netdump/sys/amd64/linux32/linux32_machdep.c
  user/markj/netdump/sys/amd64/linux32/linux32_support.s
  user/markj/netdump/sys/amd64/linux32/linux32_sysvec.c
  user/markj/netdump/sys/amd64/sgx/sgx_support.S
  user/markj/netdump/sys/arm/allwinner/aw_sid.c
  user/markj/netdump/sys/arm/arm/bcopy_page.S
  user/markj/netdump/sys/arm/arm/bcopyinout.S
  user/markj/netdump/sys/arm/arm/copystr.S
  user/markj/netdump/sys/arm/arm/cpu_asm-v6.S
  user/markj/netdump/sys/arm/arm/exception.S
  user/markj/netdump/sys/arm/arm/fusu.S
  user/markj/netdump/sys/arm/arm/gic_acpi.c
  user/markj/netdump/sys/arm/arm/hypervisor-stub.S
  user/markj/netdump/sys/arm/arm/in_cksum_arm.S
  user/markj/netdump/sys/arm/arm/locore-v4.S
  user/markj/netdump/sys/arm/arm/locore-v6.S
  user/markj/netdump/sys/arm/arm/support.S
  user/markj/netdump/sys/arm/arm/swtch-v4.S
  user/markj/netdump/sys/arm/arm/swtch-v6.S
  user/markj/netdump/sys/arm/arm/swtch.S
  user/markj/netdump/sys/arm/at91/at91_rst.c
  user/markj/netdump/sys/arm/conf/GENERIC
  user/markj/netdump/sys/arm/freescale/vybrid/vf_ccm.c
  user/markj/netdump/sys/arm/freescale/vybrid/vf_iomuxc.c
  user/markj/netdump/sys/arm/mv/mv_localbus.c
  user/markj/netdump/sys/arm/nvidia/as3722_gpio.c
  user/markj/netdump/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c
  user/markj/netdump/sys/arm/nvidia/tegra_pinmux.c
  user/markj/netdump/sys/arm/xilinx/zy7_gpio.c
  user/markj/netdump/sys/arm64/arm64/bzero.S
  user/markj/netdump/sys/arm64/arm64/copyinout.S
  user/markj/netdump/sys/arm64/arm64/exception.S
  user/markj/netdump/sys/arm64/arm64/locore.S
  user/markj/netdump/sys/arm64/arm64/support.S
  user/markj/netdump/sys/arm64/arm64/swtch.S
  user/markj/netdump/sys/cam/scsi/scsi_all.h
  user/markj/netdump/sys/cam/scsi/scsi_da.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_synctask.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
  user/markj/netdump/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
  user/markj/netdump/sys/cddl/dev/dtrace/aarch64/dtrace_asm.S
  user/markj/netdump/sys/cddl/dev/dtrace/amd64/dtrace_asm.S
  user/markj/netdump/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  user/markj/netdump/sys/cddl/dev/dtrace/arm/dtrace_asm.S
  user/markj/netdump/sys/cddl/dev/dtrace/i386/dtrace_asm.S
  user/markj/netdump/sys/cddl/dev/dtrace/i386/dtrace_subr.c
  user/markj/netdump/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
  user/markj/netdump/sys/cddl/dev/dtrace/riscv/dtrace_asm.S
  user/markj/netdump/sys/cddl/dev/fbt/x86/fbt_isa.c
  user/markj/netdump/sys/compat/freebsd32/freebsd32_ioctl.c
  user/markj/netdump/sys/compat/freebsd32/freebsd32_ioctl.h
  user/markj/netdump/sys/compat/freebsd32/freebsd32_misc.c
  user/markj/netdump/sys/compat/freebsd32/freebsd32_syscall.h
  user/markj/netdump/sys/compat/freebsd32/freebsd32_syscalls.c
  user/markj/netdump/sys/compat/freebsd32/freebsd32_sysent.c
  user/markj/netdump/sys/compat/freebsd32/freebsd32_systrace_args.c
  user/markj/netdump/sys/compat/freebsd32/syscalls.master
  user/markj/netdump/sys/compat/linux/linux_emul.h
  user/markj/netdump/sys/compat/linux/linux_errno.c
  user/markj/netdump/sys/compat/linux/linux_ioctl.h
  user/markj/netdump/sys/compat/linux/linux_ipc.h
  user/markj/netdump/sys/compat/linux/linux_mib.h
  user/markj/netdump/sys/compat/linux/linux_misc.h
  user/markj/netdump/sys/compat/linux/linux_signal.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/asm/byteorder.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/bitops.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/cdev.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/compiler.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/device.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/dma-attrs.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/err.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/errno.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/etherdevice.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/fs.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/idr.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/if_ether.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/if_vlan.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/io.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/jiffies.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/kernel.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/kmod.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/kobject.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/ktime.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/list.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/log2.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/miscdevice.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/module.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/mutex.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/pci.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/rwlock.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/rwsem.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/slab.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/spinlock.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/sysfs.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/usb.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/linux/workqueue.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/net/if_inet6.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/net/ipv6.h
  user/markj/netdump/sys/compat/linuxkpi/common/include/net/netevent.h
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_compat.c
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_idr.c
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_pci.c
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_radix.c
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_rcu.c
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_schedule.c
  user/markj/netdump/sys/compat/linuxkpi/common/src/linux_usb.c
  user/markj/netdump/sys/conf/NOTES
  user/markj/netdump/sys/conf/dtb.mk
  user/markj/netdump/sys/conf/files
  user/markj/netdump/sys/conf/files.amd64
  user/markj/netdump/sys/conf/files.i386
  user/markj/netdump/sys/conf/files.powerpc
  user/markj/netdump/sys/conf/kern.post.mk
  user/markj/netdump/sys/conf/kmod.mk
  user/markj/netdump/sys/conf/options
  user/markj/netdump/sys/contrib/ck/FREEBSD-Xlist
  user/markj/netdump/sys/contrib/ck/include/ck_cc.h
  user/markj/netdump/sys/contrib/ck/include/ck_hs.h
  user/markj/netdump/sys/contrib/ck/include/ck_md.h
  user/markj/netdump/sys/contrib/ck/include/ck_pr.h
  user/markj/netdump/sys/contrib/ck/include/ck_queue.h
  user/markj/netdump/sys/contrib/ck/include/ck_ring.h
  user/markj/netdump/sys/contrib/ck/include/gcc/ck_cc.h
  user/markj/netdump/sys/contrib/ck/include/gcc/ck_pr.h
  user/markj/netdump/sys/contrib/ck/include/gcc/sparcv9/ck_pr.h
  user/markj/netdump/sys/contrib/ck/include/gcc/x86/ck_pr.h
  user/markj/netdump/sys/contrib/ck/include/gcc/x86_64/ck_pr.h
  user/markj/netdump/sys/contrib/ck/include/spinlock/dec.h
  user/markj/netdump/sys/contrib/ck/src/ck_hs.c
  user/markj/netdump/sys/contrib/ck/src/ck_ht.c
  user/markj/netdump/sys/contrib/ck/src/ck_ht_hash.h
  user/markj/netdump/sys/contrib/ck/src/ck_internal.h
  user/markj/netdump/sys/contrib/ck/src/ck_rhs.c
  user/markj/netdump/sys/contrib/rdma/krping/krping.c
  user/markj/netdump/sys/contrib/zstd/Makefile
  user/markj/netdump/sys/contrib/zstd/NEWS
  user/markj/netdump/sys/contrib/zstd/README.md
  user/markj/netdump/sys/contrib/zstd/appveyor.yml
  user/markj/netdump/sys/contrib/zstd/contrib/gen_html/Makefile
  user/markj/netdump/sys/contrib/zstd/contrib/meson/meson.build
  user/markj/netdump/sys/contrib/zstd/contrib/meson/meson_options.txt
  user/markj/netdump/sys/contrib/zstd/contrib/seekable_format/zstdseek_compress.c
  user/markj/netdump/sys/contrib/zstd/contrib/seekable_format/zstdseek_decompress.c
  user/markj/netdump/sys/contrib/zstd/doc/README.md
  user/markj/netdump/sys/contrib/zstd/doc/images/dict-cr.png
  user/markj/netdump/sys/contrib/zstd/doc/images/dict-cs.png
  user/markj/netdump/sys/contrib/zstd/doc/images/dict-ds.png
  user/markj/netdump/sys/contrib/zstd/doc/zstd_compression_format.md
  user/markj/netdump/sys/contrib/zstd/doc/zstd_manual.html
  user/markj/netdump/sys/contrib/zstd/lib/BUCK
  user/markj/netdump/sys/contrib/zstd/lib/README.md
  user/markj/netdump/sys/contrib/zstd/lib/common/bitstream.h
  user/markj/netdump/sys/contrib/zstd/lib/common/compiler.h
  user/markj/netdump/sys/contrib/zstd/lib/common/error_private.c
  user/markj/netdump/sys/contrib/zstd/lib/common/fse.h
  user/markj/netdump/sys/contrib/zstd/lib/common/fse_decompress.c
  user/markj/netdump/sys/contrib/zstd/lib/common/huf.h
  user/markj/netdump/sys/contrib/zstd/lib/common/pool.c
  user/markj/netdump/sys/contrib/zstd/lib/common/pool.h
  user/markj/netdump/sys/contrib/zstd/lib/common/threading.h
  user/markj/netdump/sys/contrib/zstd/lib/common/zstd_errors.h
  user/markj/netdump/sys/contrib/zstd/lib/common/zstd_internal.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/fse_compress.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/huf_compress.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_compress.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_compress_internal.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_double_fast.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_double_fast.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_fast.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_fast.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_lazy.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_lazy.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_ldm.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_ldm.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_opt.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_opt.h
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstdmt_compress.c
  user/markj/netdump/sys/contrib/zstd/lib/compress/zstdmt_compress.h
  user/markj/netdump/sys/contrib/zstd/lib/decompress/huf_decompress.c
  user/markj/netdump/sys/contrib/zstd/lib/decompress/zstd_decompress.c
  user/markj/netdump/sys/contrib/zstd/lib/dictBuilder/cover.c
  user/markj/netdump/sys/contrib/zstd/lib/dictBuilder/zdict.c
  user/markj/netdump/sys/contrib/zstd/lib/dictBuilder/zdict.h
  user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_legacy.h
  user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v04.c
  user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v06.c
  user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v07.c
  user/markj/netdump/sys/contrib/zstd/lib/zstd.h
  user/markj/netdump/sys/contrib/zstd/programs/Makefile
  user/markj/netdump/sys/contrib/zstd/programs/README.md
  user/markj/netdump/sys/contrib/zstd/programs/bench.c
  user/markj/netdump/sys/contrib/zstd/programs/bench.h
  user/markj/netdump/sys/contrib/zstd/programs/fileio.c
  user/markj/netdump/sys/contrib/zstd/programs/fileio.h
  user/markj/netdump/sys/contrib/zstd/programs/platform.h
  user/markj/netdump/sys/contrib/zstd/programs/util.h
  user/markj/netdump/sys/contrib/zstd/programs/zstd.1
  user/markj/netdump/sys/contrib/zstd/programs/zstd.1.md
  user/markj/netdump/sys/contrib/zstd/programs/zstdcli.c
  user/markj/netdump/sys/contrib/zstd/tests/.gitignore
  user/markj/netdump/sys/contrib/zstd/tests/Makefile
  user/markj/netdump/sys/contrib/zstd/tests/fullbench.c
  user/markj/netdump/sys/contrib/zstd/tests/fuzz/zstd_helpers.c
  user/markj/netdump/sys/contrib/zstd/tests/fuzzer.c
  user/markj/netdump/sys/contrib/zstd/tests/legacy.c
  user/markj/netdump/sys/contrib/zstd/tests/paramgrill.c
  user/markj/netdump/sys/contrib/zstd/tests/playTests.sh
  user/markj/netdump/sys/contrib/zstd/tests/roundTripCrash.c
  user/markj/netdump/sys/contrib/zstd/tests/zstreamtest.c
  user/markj/netdump/sys/contrib/zstd/zlibWrapper/examples/zwrapbench.c
  user/markj/netdump/sys/crypto/ccp/ccp.c
  user/markj/netdump/sys/dev/adlink/adlink.c
  user/markj/netdump/sys/dev/an/if_an.c
  user/markj/netdump/sys/dev/ath/if_ath_ioctl.c
  user/markj/netdump/sys/dev/bhnd/bcma/bcma_erom.c
  user/markj/netdump/sys/dev/bhnd/bhnd.h
  user/markj/netdump/sys/dev/bhnd/bhnd_erom.c
  user/markj/netdump/sys/dev/bhnd/bhnd_erom.h
  user/markj/netdump/sys/dev/bhnd/bhnd_eromvar.h
  user/markj/netdump/sys/dev/bhnd/bhnd_subr.c
  user/markj/netdump/sys/dev/bhnd/bhndb/bhndb.c
  user/markj/netdump/sys/dev/bhnd/bhndb/bhndb_pci.c
  user/markj/netdump/sys/dev/bhnd/nvram/bhnd_nvram_private.h
  user/markj/netdump/sys/dev/bhnd/siba/siba_erom.c
  user/markj/netdump/sys/dev/cardbus/cardbus.c
  user/markj/netdump/sys/dev/ciss/ciss.c
  user/markj/netdump/sys/dev/cm/if_cm_isa.c
  user/markj/netdump/sys/dev/cxgbe/adapter.h
  user/markj/netdump/sys/dev/cxgbe/common/common.h
  user/markj/netdump/sys/dev/cxgbe/common/t4_hw.c
  user/markj/netdump/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
  user/markj/netdump/sys/dev/cxgbe/t4_main.c
  user/markj/netdump/sys/dev/cxgbe/tom/t4_cpl_io.c
  user/markj/netdump/sys/dev/cxgbe/tom/t4_ddp.c
  user/markj/netdump/sys/dev/cxgbe/tom/t4_tls.c
  user/markj/netdump/sys/dev/cxgbe/tom/t4_tom.c
  user/markj/netdump/sys/dev/cxgbe/tom/t4_tom.h
  user/markj/netdump/sys/dev/de/if_de.c
  user/markj/netdump/sys/dev/de/if_devar.h
  user/markj/netdump/sys/dev/drm/drm_bufs.c
  user/markj/netdump/sys/dev/drm/drm_irq.c
  user/markj/netdump/sys/dev/e1000/em_txrx.c
  user/markj/netdump/sys/dev/e1000/if_em.c
  user/markj/netdump/sys/dev/e1000/if_em.h
  user/markj/netdump/sys/dev/ed/if_ed_pci.c
  user/markj/netdump/sys/dev/efidev/efidev.c
  user/markj/netdump/sys/dev/efidev/efirt.c   (contents, props changed)
  user/markj/netdump/sys/dev/ex/if_ex.c
  user/markj/netdump/sys/dev/fdt/fdt_common.c
  user/markj/netdump/sys/dev/fdt/fdt_common.h
  user/markj/netdump/sys/dev/fdt/fdt_pinctrl.c
  user/markj/netdump/sys/dev/firewire/fwohci_pci.c
  user/markj/netdump/sys/dev/firewire/fwohcireg.h
  user/markj/netdump/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S
  user/markj/netdump/sys/dev/hyperv/vmbus/hyperv.c
  user/markj/netdump/sys/dev/hyperv/vmbus/i386/vmbus_vector.S
  user/markj/netdump/sys/dev/if_ndis/if_ndis.c
  user/markj/netdump/sys/dev/iwi/if_iwi.c
  user/markj/netdump/sys/dev/iwm/if_iwm.c
  user/markj/netdump/sys/dev/iwm/if_iwm_7000.c
  user/markj/netdump/sys/dev/iwm/if_iwm_config.h
  user/markj/netdump/sys/dev/ixgb/if_ixgb.c
  user/markj/netdump/sys/dev/ixl/ixl_pf_main.c
  user/markj/netdump/sys/dev/jedec_dimm/jedec_dimm.c
  user/markj/netdump/sys/dev/md/md.c
  user/markj/netdump/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
  user/markj/netdump/sys/dev/mlx5/device.h
  user/markj/netdump/sys/dev/mlx5/driver.h
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_core.h
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_eq.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_fw.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_health.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_main.c
  user/markj/netdump/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c
  user/markj/netdump/sys/dev/mlx5/mlx5_en/en.h
  user/markj/netdump/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
  user/markj/netdump/sys/dev/mlx5/mlx5_ifc.h
  user/markj/netdump/sys/dev/mpr/mpr_sas.c
  user/markj/netdump/sys/dev/mps/mps_sas.c
  user/markj/netdump/sys/dev/mwl/if_mwl.c
  user/markj/netdump/sys/dev/nxge/if_nxge.c
  user/markj/netdump/sys/dev/oce/oce_if.c
  user/markj/netdump/sys/dev/pccard/pccard.c
  user/markj/netdump/sys/dev/pccbb/pccbb.c
  user/markj/netdump/sys/dev/pci/pci_user.c
  user/markj/netdump/sys/dev/pdq/if_fpa.c
  user/markj/netdump/sys/dev/qlnx/qlnxe/qlnx_os.c
  user/markj/netdump/sys/dev/qlxgbe/ql_dbg.h
  user/markj/netdump/sys/dev/qlxgbe/ql_hw.c
  user/markj/netdump/sys/dev/qlxgbe/ql_ioctl.c
  user/markj/netdump/sys/dev/qlxgbe/ql_isr.c
  user/markj/netdump/sys/dev/qlxgbe/ql_os.c
  user/markj/netdump/sys/dev/qlxgbe/ql_ver.h
  user/markj/netdump/sys/dev/sbni/if_sbni.c
  user/markj/netdump/sys/dev/sfxge/sfxge.c
  user/markj/netdump/sys/dev/usb/controller/musb_otg.c
  user/markj/netdump/sys/dev/usb/controller/musb_otg.h
  user/markj/netdump/sys/dev/usb/input/ukbd.c
  user/markj/netdump/sys/dev/usb/input/wsp.c
  user/markj/netdump/sys/dev/vxge/vxge.c
  user/markj/netdump/sys/dev/xl/if_xl.c
  user/markj/netdump/sys/dts/Makefile.inc
  user/markj/netdump/sys/geom/journal/g_journal_ufs.c
  user/markj/netdump/sys/geom/label/g_label_ufs.c
  user/markj/netdump/sys/i386/acpica/acpi_wakecode.S
  user/markj/netdump/sys/i386/i386/apic_vector.s
  user/markj/netdump/sys/i386/i386/atpic_vector.s
  user/markj/netdump/sys/i386/i386/bioscall.s
  user/markj/netdump/sys/i386/i386/exception.s
  user/markj/netdump/sys/i386/i386/locore.s
  user/markj/netdump/sys/i386/i386/machdep.c
  user/markj/netdump/sys/i386/i386/mpboot.s
  user/markj/netdump/sys/i386/i386/sigtramp.s
  user/markj/netdump/sys/i386/i386/support.s
  user/markj/netdump/sys/i386/i386/swtch.s
  user/markj/netdump/sys/i386/i386/trap.c
  user/markj/netdump/sys/i386/i386/vm86.c
  user/markj/netdump/sys/i386/i386/vm86bios.s
  user/markj/netdump/sys/i386/i386/vm_machdep.c
  user/markj/netdump/sys/i386/ibcs2/ibcs2_ipc.c
  user/markj/netdump/sys/i386/ibcs2/ibcs2_misc.c
  user/markj/netdump/sys/i386/include/intr_machdep.h
  user/markj/netdump/sys/i386/linux/linux_locore.s
  user/markj/netdump/sys/i386/linux/linux_machdep.c
  user/markj/netdump/sys/i386/linux/linux_support.s
  user/markj/netdump/sys/i386/linux/linux_sysvec.c
  user/markj/netdump/sys/kern/init_main.c
  user/markj/netdump/sys/kern/init_sysent.c
  user/markj/netdump/sys/kern/kern_cpuset.c
  user/markj/netdump/sys/kern/kern_descrip.c
  user/markj/netdump/sys/kern/kern_jail.c
  user/markj/netdump/sys/kern/kern_kthread.c
  user/markj/netdump/sys/kern/kern_lock.c
  user/markj/netdump/sys/kern/kern_mutex.c
  user/markj/netdump/sys/kern/kern_ntptime.c
  user/markj/netdump/sys/kern/kern_shutdown.c
  user/markj/netdump/sys/kern/kern_sig.c
  user/markj/netdump/sys/kern/kern_thread.c
  user/markj/netdump/sys/kern/subr_sleepqueue.c
  user/markj/netdump/sys/kern/subr_trap.c
  user/markj/netdump/sys/kern/subr_witness.c
  user/markj/netdump/sys/kern/syscalls.c
  user/markj/netdump/sys/kern/syscalls.master
  user/markj/netdump/sys/kern/systrace_args.c
  user/markj/netdump/sys/kern/sysv_shm.c
  user/markj/netdump/sys/kern/tty_pts.c
  user/markj/netdump/sys/kern/uipc_syscalls.c
  user/markj/netdump/sys/kern/vfs_bio.c
  user/markj/netdump/sys/kern/vfs_mount.c
  user/markj/netdump/sys/kern/vfs_mountroot.c
  user/markj/netdump/sys/kern/vfs_subr.c
  user/markj/netdump/sys/kern/vfs_vnops.c
  user/markj/netdump/sys/mips/broadcom/bhnd_nexus.c
  user/markj/netdump/sys/mips/cavium/octeon_cop2.S
  user/markj/netdump/sys/mips/include/elf.h
  user/markj/netdump/sys/mips/ingenic/jz4780_mpboot.S
  user/markj/netdump/sys/mips/mips/exception.S
  user/markj/netdump/sys/mips/mips/fp.S
  user/markj/netdump/sys/mips/mips/locore.S
  user/markj/netdump/sys/mips/mips/mpboot.S
  user/markj/netdump/sys/mips/mips/octeon_cop2_swtch.S
  user/markj/netdump/sys/mips/mips/stdatomic.c
  user/markj/netdump/sys/mips/mips/support.S
  user/markj/netdump/sys/mips/mips/swtch.S
  user/markj/netdump/sys/mips/nlm/mpreset.S
  user/markj/netdump/sys/modules/Makefile
  user/markj/netdump/sys/modules/crypto/Makefile
  user/markj/netdump/sys/modules/dtrace/dtrace/Makefile
  user/markj/netdump/sys/modules/hyperv/vmbus/Makefile
  user/markj/netdump/sys/modules/i2c/iicbus/Makefile
  user/markj/netdump/sys/modules/i2c/isl/Makefile
  user/markj/netdump/sys/modules/iwmfw/Makefile
  user/markj/netdump/sys/modules/linux/Makefile
  user/markj/netdump/sys/modules/linux64/Makefile
  user/markj/netdump/sys/modules/linux_common/Makefile
  user/markj/netdump/sys/modules/mlx5/Makefile
  user/markj/netdump/sys/modules/sgx/Makefile
  user/markj/netdump/sys/modules/spi/at45d/Makefile
  user/markj/netdump/sys/modules/spi/mx25l/Makefile
  user/markj/netdump/sys/modules/spi/spibus/Makefile
  user/markj/netdump/sys/modules/vmware/Makefile
  user/markj/netdump/sys/net/bpf.c
  user/markj/netdump/sys/net/bpfdesc.h
  user/markj/netdump/sys/net/ethernet.h
  user/markj/netdump/sys/net/if.c
  user/markj/netdump/sys/net/if.h
  user/markj/netdump/sys/net/if_arcsubr.c
  user/markj/netdump/sys/net/if_bridge.c
  user/markj/netdump/sys/net/if_enc.c
  user/markj/netdump/sys/net/if_ethersubr.c
  user/markj/netdump/sys/net/if_fddisubr.c
  user/markj/netdump/sys/net/if_fwsubr.c
  user/markj/netdump/sys/net/if_gif.c
  user/markj/netdump/sys/net/if_gre.c
  user/markj/netdump/sys/net/if_ipsec.c
  user/markj/netdump/sys/net/if_spppsubr.c
  user/markj/netdump/sys/net/if_var.h
  user/markj/netdump/sys/net/if_vlan.c
  user/markj/netdump/sys/net/if_vlan_var.h
  user/markj/netdump/sys/net/iflib.c
  user/markj/netdump/sys/net/pfil.c
  user/markj/netdump/sys/net/pfil.h
  user/markj/netdump/sys/net/pfvar.h
  user/markj/netdump/sys/net80211/ieee80211_ioctl.c
  user/markj/netdump/sys/netinet/cc/cc.h
  user/markj/netdump/sys/netinet/cc/cc_cubic.c
  user/markj/netdump/sys/netinet/cc/cc_cubic.h
  user/markj/netdump/sys/netinet/in_pcb.c
  user/markj/netdump/sys/netinet/ip_carp.c
  user/markj/netdump/sys/netinet/ip_fastfwd.c
  user/markj/netdump/sys/netinet/ip_input.c
  user/markj/netdump/sys/netinet/ip_output.c
  user/markj/netdump/sys/netinet/tcp.h
  user/markj/netdump/sys/netinet/tcp_input.c
  user/markj/netdump/sys/netinet/tcp_offload.c
  user/markj/netdump/sys/netinet/tcp_offload.h
  user/markj/netdump/sys/netinet/tcp_output.c
  user/markj/netdump/sys/netinet/tcp_seq.h
  user/markj/netdump/sys/netinet/tcp_subr.c
  user/markj/netdump/sys/netinet/tcp_timer.c
  user/markj/netdump/sys/netinet/tcp_timewait.c
  user/markj/netdump/sys/netinet/tcp_usrreq.c
  user/markj/netdump/sys/netinet/tcp_var.h
  user/markj/netdump/sys/netinet/toecore.c
  user/markj/netdump/sys/netinet/toecore.h
  user/markj/netdump/sys/netinet6/dest6.c
  user/markj/netdump/sys/netinet6/icmp6.c
  user/markj/netdump/sys/netinet6/in6.c
  user/markj/netdump/sys/netinet6/in6_ifattach.c
  user/markj/netdump/sys/netinet6/in6_pcb.c
  user/markj/netdump/sys/netinet6/ip6_fastfwd.c
  user/markj/netdump/sys/netinet6/ip6_forward.c
  user/markj/netdump/sys/netinet6/ip6_input.c
  user/markj/netdump/sys/netinet6/ip6_output.c
  user/markj/netdump/sys/netinet6/nd6.c
  user/markj/netdump/sys/netinet6/nd6_nbr.c
  user/markj/netdump/sys/netinet6/udp6_usrreq.c
  user/markj/netdump/sys/netipsec/xform.h
  user/markj/netdump/sys/netipsec/xform_ah.c
  user/markj/netdump/sys/netipsec/xform_esp.c
  user/markj/netdump/sys/netipsec/xform_ipcomp.c
  user/markj/netdump/sys/netpfil/pf/if_pfsync.c
  user/markj/netdump/sys/netpfil/pf/pf.c
  user/markj/netdump/sys/netpfil/pf/pf.h
  user/markj/netdump/sys/netpfil/pf/pf_ioctl.c
  user/markj/netdump/sys/nfs/bootp_subr.c
  user/markj/netdump/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
  user/markj/netdump/sys/opencrypto/crypto.c
  user/markj/netdump/sys/opencrypto/cryptodev.c
  user/markj/netdump/sys/opencrypto/cryptodev.h
  user/markj/netdump/sys/opencrypto/cryptosoft.c
  user/markj/netdump/sys/opencrypto/xform_auth.h
  user/markj/netdump/sys/opencrypto/xform_enc.h
  user/markj/netdump/sys/powerpc/aim/locore32.S
  user/markj/netdump/sys/powerpc/aim/locore64.S
  user/markj/netdump/sys/powerpc/booke/locore.S
  user/markj/netdump/sys/powerpc/booke/pmap.c
  user/markj/netdump/sys/powerpc/include/vmparam.h
  user/markj/netdump/sys/powerpc/powerpc/cpu_subr64.S
  user/markj/netdump/sys/powerpc/powerpc/sigcode32.S
  user/markj/netdump/sys/powerpc/powerpc/sigcode64.S
  user/markj/netdump/sys/powerpc/powerpc/swtch32.S
  user/markj/netdump/sys/powerpc/powerpc/swtch64.S
  user/markj/netdump/sys/powerpc/powerpc/trap.c
  user/markj/netdump/sys/riscv/riscv/copyinout.S
  user/markj/netdump/sys/riscv/riscv/exception.S
  user/markj/netdump/sys/riscv/riscv/locore.S
  user/markj/netdump/sys/riscv/riscv/support.S
  user/markj/netdump/sys/riscv/riscv/swtch.S
  user/markj/netdump/sys/security/mac/mac_net.c
  user/markj/netdump/sys/sparc64/pci/psycho.c
  user/markj/netdump/sys/sparc64/sbus/sbus.c
  user/markj/netdump/sys/sparc64/sparc64/exception.S
  user/markj/netdump/sys/sparc64/sparc64/interrupt.S
  user/markj/netdump/sys/sparc64/sparc64/locore.S
  user/markj/netdump/sys/sparc64/sparc64/mp_exception.S
  user/markj/netdump/sys/sparc64/sparc64/mp_locore.S
  user/markj/netdump/sys/sparc64/sparc64/support.S
  user/markj/netdump/sys/sparc64/sparc64/swtch.S
  user/markj/netdump/sys/sys/_bitset.h
  user/markj/netdump/sys/sys/_stdarg.h
  user/markj/netdump/sys/sys/cdefs.h
  user/markj/netdump/sys/sys/cpuset.h
  user/markj/netdump/sys/sys/domainset.h
  user/markj/netdump/sys/sys/elf_common.h
  user/markj/netdump/sys/sys/imgact.h
  user/markj/netdump/sys/sys/kernel.h
  user/markj/netdump/sys/sys/ktr_class.h
  user/markj/netdump/sys/sys/linker_set.h
  user/markj/netdump/sys/sys/lock.h
  user/markj/netdump/sys/sys/namei.h
  user/markj/netdump/sys/sys/priv.h
  user/markj/netdump/sys/sys/proc.h
  user/markj/netdump/sys/sys/random.h
  user/markj/netdump/sys/sys/refcount.h
  user/markj/netdump/sys/sys/seq.h
  user/markj/netdump/sys/sys/sockio.h
  user/markj/netdump/sys/sys/syscall.h
  user/markj/netdump/sys/sys/syscall.mk
  user/markj/netdump/sys/sys/syscallsubr.h
  user/markj/netdump/sys/sys/sysproto.h
  user/markj/netdump/sys/sys/uio.h
  user/markj/netdump/sys/vm/uma.h
  user/markj/netdump/sys/vm/uma_core.c
  user/markj/netdump/sys/vm/vm.h
  user/markj/netdump/sys/vm/vm_domainset.c
  user/markj/netdump/sys/vm/vm_domainset.h
  user/markj/netdump/sys/vm/vm_fault.c
  user/markj/netdump/sys/vm/vm_glue.c
  user/markj/netdump/sys/vm/vm_map.c
  user/markj/netdump/sys/vm/vm_map.h
  user/markj/netdump/sys/vm/vm_page.c
  user/markj/netdump/sys/vm/vm_pageout.c
  user/markj/netdump/sys/vm/vm_pagequeue.h
  user/markj/netdump/sys/vm/vm_phys.c
  user/markj/netdump/sys/vm/vm_phys.h
  user/markj/netdump/sys/vm/vm_reserv.c
  user/markj/netdump/sys/vm/vm_reserv.h
  user/markj/netdump/sys/vm/vnode_pager.c
  user/markj/netdump/sys/x86/include/signal.h
  user/markj/netdump/sys/x86/include/trap.h
  user/markj/netdump/sys/x86/include/x86_var.h
  user/markj/netdump/sys/x86/x86/cpu_machdep.c
  user/markj/netdump/sys/x86/x86/identcpu.c
  user/markj/netdump/sys/x86/x86/intr_machdep.c
  user/markj/netdump/sys/x86/x86/io_apic.c
  user/markj/netdump/sys/x86/x86/msi.c
  user/markj/netdump/sys/x86/x86/nexus.c
  user/markj/netdump/sys/x86/xen/xen_intr.c
  user/markj/netdump/tests/sys/cddl/zfs/bin/devname2devid.c
  user/markj/netdump/tests/sys/cddl/zfs/bin/zpool_bsd.ksh
  user/markj/netdump/tests/sys/cddl/zfs/bin/zpool_smi.ksh
  user/markj/netdump/tests/sys/cddl/zfs/include/libtest.kshlib
  user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add.kshlib
  user/markj/netdump/tests/sys/cddl/zfs/tests/delegate/delegate_common.kshlib
  user/markj/netdump/tests/sys/cddl/zfs/tests/devices/devices_common.kshlib
  user/markj/netdump/tests/sys/cddl/zfs/tests/hotspare/hotspare_add_003_neg.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/hotspare/hotspare_create_001_neg.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/hotspare/hotspare_remove_002_neg.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/interop/interop.cfg
  user/markj/netdump/tests/sys/cddl/zfs/tests/largest_pool/largest_pool.cfg
  user/markj/netdump/tests/sys/cddl/zfs/tests/slog/slog_013_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/utils_test/utils_test_001_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/utils_test/utils_test_002_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/utils_test/utils_test_005_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/utils_test/utils_test_006_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/utils_test/utils_test_008_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/utils_test/utils_test_009_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/xattr/xattr_004_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zones/zones_001_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_common.kshlib
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_001_neg.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_003_neg.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_004_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_005_neg.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_006_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/cleanup.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_001_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_002_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_003_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_004_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_005_pos.ksh
  user/markj/netdump/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_006_pos.ksh
  user/markj/netdump/tests/sys/kern/Makefile
  user/markj/netdump/tests/sys/opencrypto/Makefile
  user/markj/netdump/tools/boot/lua-lint.sh
  user/markj/netdump/tools/tools/crypto/Makefile
  user/markj/netdump/tools/tools/crypto/cryptotest.c
  user/markj/netdump/usr.bin/calendar/calendars/calendar.freebsd
  user/markj/netdump/usr.bin/cpuset/cpuset.1
  user/markj/netdump/usr.bin/cpuset/cpuset.c
  user/markj/netdump/usr.bin/netstat/inet.c
  user/markj/netdump/usr.bin/netstat/main.c
  user/markj/netdump/usr.bin/netstat/netstat.1
  user/markj/netdump/usr.bin/netstat/netstat.h
  user/markj/netdump/usr.bin/timeout/timeout.1
  user/markj/netdump/usr.bin/truss/syscall.h
  user/markj/netdump/usr.bin/truss/syscalls.c
  user/markj/netdump/usr.sbin/arp/arp.c
  user/markj/netdump/usr.sbin/ctld/ctld.8
  user/markj/netdump/usr.sbin/makefs/cd9660.c
  user/markj/netdump/usr.sbin/makefs/cd9660/cd9660_eltorito.c
  user/markj/netdump/usr.sbin/makefs/cd9660/cd9660_eltorito.h
  user/markj/netdump/usr.sbin/makefs/ffs.c
  user/markj/netdump/usr.sbin/makefs/makefs.8
  user/markj/netdump/usr.sbin/syslogd/syslogd.c
  user/markj/netdump/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5
Directory Properties:
  user/markj/netdump/   (props changed)
  user/markj/netdump/cddl/   (props changed)
  user/markj/netdump/cddl/contrib/opensolaris/   (props changed)
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/   (props changed)
  user/markj/netdump/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  user/markj/netdump/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  user/markj/netdump/contrib/llvm/   (props changed)
  user/markj/netdump/contrib/llvm/projects/libunwind/   (props changed)
  user/markj/netdump/contrib/llvm/tools/lld/   (props changed)
  user/markj/netdump/contrib/tzdata/   (props changed)
  user/markj/netdump/crypto/openssl/   (props changed)
  user/markj/netdump/sys/cddl/contrib/opensolaris/   (props changed)
  user/markj/netdump/sys/contrib/ck/   (props changed)
  user/markj/netdump/sys/contrib/zstd/   (props changed)

Modified: user/markj/netdump/Makefile.inc1
==============================================================================
--- user/markj/netdump/Makefile.inc1	Tue Apr  3 14:09:34 2018	(r331928)
+++ user/markj/netdump/Makefile.inc1	Tue Apr  3 14:29:56 2018	(r331929)
@@ -1394,6 +1394,14 @@ INSTALLKERNEL= ${_kernel}
 .endif
 .endfor
 
+_cleankernobj_fast_depend_hack: .PHONY
+# 20180320 remove stale generated assym.s after renaming to .inc in r331254
+.if exists(${OBJTOP}/sys/${KERNCONF}/assym.s)
+	@echo Removing stale generated assym files
+	@rm -f ${OBJTOP}/sys/${KERNCONF}/assym.* \
+	    ${OBJTOP}/sys/${KERNCONF}/.depend.assym.*
+.endif
+
 ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY
 
 #
@@ -1429,6 +1437,8 @@ buildkernel: .MAKE .PHONY
 	@echo ">>> stage 2.1: cleaning up the object tree"
 	@echo "--------------------------------------------------------------"
 	${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
+.else
+	${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack
 .endif
 .if !defined(NO_KERNELOBJ)
 	@echo

Modified: user/markj/netdump/ObsoleteFiles.inc
==============================================================================
--- user/markj/netdump/ObsoleteFiles.inc	Tue Apr  3 14:09:34 2018	(r331928)
+++ user/markj/netdump/ObsoleteFiles.inc	Tue Apr  3 14:29:56 2018	(r331929)
@@ -59,7 +59,6 @@ OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz
 # 20180206: remove gdbtui
 OLD_FILES+=usr/bin/gdbtui
 # 20180201: Obsolete forth files
-OLD_FILES+=boot/efi.4th
 OLD_FILES+=boot/pcibios.4th
 # 20180114: new clang import which bumps version from 5.0.1 to 6.0.0.
 OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h

Modified: user/markj/netdump/UPDATING
==============================================================================
--- user/markj/netdump/UPDATING	Tue Apr  3 14:09:34 2018	(r331928)
+++ user/markj/netdump/UPDATING	Tue Apr  3 14:29:56 2018	(r331929)
@@ -51,6 +51,22 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ****************************** SPECIAL WARNING: ******************************
 
+20180328:
+	Support for token ring networks has been removed. If you
+	have "device token" in your kernel config you should remove
+	it. No device drivers supported token ring.
+
+20180323:
+	makefs was modified to be able to tag ISO9660 El Torito boot catalog
+	entries as EFI instead of overloading the i386 tag as done previously.
+	The amd64 mkisoimages.sh script used to build amd64 ISO images for
+	release was updated to use this. This may mean that makefs must be
+	updated before "make cdrom" can be run in the release directory. This
+	should be as simple as:
+
+		$ cd $SRCDIR/usr.sbin/makefs
+		$ make depend all install
+
 20180212:
 	FreeBSD boot loader enhanced with Lua scripting. It's purely opt-in for
 	now by building WITH_LOADER_LUA and WITHOUT_FORTH in /etc/src.conf.
@@ -613,7 +629,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 	rebooting, e.g.:
 
 	make buildworld
-	make kernel KERNCONF=YOUR_KERNEL_HERE
+	make buildkernel KERNCONF=YOUR_KERNEL_HERE
+	make installkernel KERNCONF=YOUR_KERNEL_HERE
 	make -C sys/boot install
 	<reboot in single user>
 
@@ -1984,7 +2001,8 @@ COMMON ITEMS:
 	----------------------------------------------
 	<make sure you have good level 0 dumps>
 	make buildworld					[9]
-	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
+	make buildkernel KERNCONF=YOUR_KERNEL_HERE	[8]
+	make installkernel KERNCONF=YOUR_KERNEL_HERE
 							[1]
 	<reboot in single user>				[3]
 	mergemaster -Fp					[5]

Modified: user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.8
==============================================================================
--- user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.8	Tue Apr  3 14:09:34 2018	(r331928)
+++ user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.8	Tue Apr  3 14:29:56 2018	(r331929)
@@ -21,7 +21,7 @@
 .Nd display zpool debugging and consistency information
 .Sh SYNOPSIS
 .Nm
-.Op Fl AbcdDFGhiLMPsvX
+.Op Fl AbcdDFGhikLMPsvX
 .Op Fl e Oo Fl V Oc Op Fl p Ar path ...
 .Op Fl I Ar inflight I/Os
 .Oo Fl o Ar var Ns = Ns Ar value Oc Ns ...
@@ -170,6 +170,9 @@ Display information about intent log
 .Pq ZIL
 entries relating to each dataset.
 If specified multiple times, display counts of each intent log transaction type.
+.It Fl k
+Examine the checkpointed state of the pool.
+Note, the on disk format of the pool is not reverted to the checkpointed state.
 .It Fl l Ar device
 Read the vdev labels from the specified device.
 .Nm Fl l

Modified: user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Tue Apr  3 14:09:34 2018	(r331928)
+++ user/markj/netdump/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Tue Apr  3 14:29:56 2018	(r331929)
@@ -24,6 +24,7 @@
  * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2017 Nexenta Systems, Inc.
+ * Copyright 2017 RackTop Systems.
  */
 
 #include <stdio.h>
@@ -88,12 +89,14 @@ extern boolean_t zfs_recover;
 extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
 extern int zfs_vdev_async_read_max_active;
 extern boolean_t spa_load_verify_dryrun;
+extern int aok;
 #else
 int reference_tracking_enable;
 boolean_t zfs_recover;
 uint64_t zfs_arc_max, zfs_arc_meta_limit;
 int zfs_vdev_async_read_max_active;
 boolean_t spa_load_verify_dryrun;
+int aok;
 #endif
 
 static const char cmdname[] = "zdb";
@@ -128,7 +131,7 @@ static void
 usage(void)
 {
 	(void) fprintf(stderr,
-	    "Usage:\t%s [-AbcdDFGhiLMPsvX] [-e [-V] [-p <path> ...]] "
+	    "Usage:\t%s [-AbcdDFGhikLMPsvX] [-e [-V] [-p <path> ...]] "
 	    "[-I <inflight I/Os>]\n"
 	    "\t\t[-o <var>=<value>]... [-t <txg>] [-U <cache>] [-x <dumpdir>]\n"
 	    "\t\t[<poolname> [<object> ...]]\n"
@@ -165,6 +168,8 @@ usage(void)
 	(void) fprintf(stderr, "        -h pool history\n");
 	(void) fprintf(stderr, "        -i intent logs\n");
 	(void) fprintf(stderr, "        -l read label contents\n");
+	(void) fprintf(stderr, "        -k examine the checkpointed state "
+	    "of the pool\n");
 	(void) fprintf(stderr, "        -L disable leak tracking (do not "
 	    "load spacemaps)\n");
 	(void) fprintf(stderr, "        -m metaslabs\n");
@@ -726,6 +731,22 @@ get_prev_obsolete_spacemap_refcount(spa_t *spa)
 }
 
 static int
+get_checkpoint_refcount(vdev_t *vd)
+{
+	int refcount = 0;
+
+	if (vd->vdev_top == vd && vd->vdev_top_zap != 0 &&
+	    zap_contains(spa_meta_objset(vd->vdev_spa),
+	    vd->vdev_top_zap, VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) == 0)
+		refcount++;
+
+	for (uint64_t c = 0; c < vd->vdev_children; c++)
+		refcount += get_checkpoint_refcount(vd->vdev_child[c]);
+
+	return (refcount);
+}
+
+static int
 verify_spacemap_refcounts(spa_t *spa)
 {
 	uint64_t expected_refcount = 0;
@@ -738,6 +759,7 @@ verify_spacemap_refcounts(spa_t *spa)
 	actual_refcount += get_metaslab_refcount(spa->spa_root_vdev);
 	actual_refcount += get_obsolete_refcount(spa->spa_root_vdev);
 	actual_refcount += get_prev_obsolete_spacemap_refcount(spa);
+	actual_refcount += get_checkpoint_refcount(spa->spa_root_vdev);
 
 	if (expected_refcount != actual_refcount) {
 		(void) printf("space map refcount mismatch: expected %lld != "
@@ -811,8 +833,8 @@ static void
 dump_metaslab_stats(metaslab_t *msp)
 {
 	char maxbuf[32];
-	range_tree_t *rt = msp->ms_tree;
-	avl_tree_t *t = &msp->ms_size_tree;
+	range_tree_t *rt = msp->ms_allocatable;
+	avl_tree_t *t = &msp->ms_allocatable_by_size;
 	int free_pct = range_tree_space(rt) * 100 / msp->ms_size;
 
 	/* max sure nicenum has enough space */
@@ -848,7 +870,7 @@ dump_metaslab(metaslab_t *msp)
 		metaslab_load_wait(msp);
 		if (!msp->ms_loaded) {
 			VERIFY0(metaslab_load(msp));
-			range_tree_stat_verify(msp->ms_tree);
+			range_tree_stat_verify(msp->ms_allocatable);
 		}
 		dump_metaslab_stats(msp);
 		metaslab_unload(msp);
@@ -2286,6 +2308,8 @@ dump_uberblock(uberblock_t *ub, const char *header, co
 		snprintf_blkptr(blkbuf, sizeof (blkbuf), &ub->ub_rootbp);
 		(void) printf("\trootbp = %s\n", blkbuf);
 	}
+	(void) printf("\tcheckpoint_txg = %llu\n",
+	    (u_longlong_t)ub->ub_checkpoint_txg);
 	(void) printf("%s", footer ? footer : "");
 }
 
@@ -2646,6 +2670,7 @@ static const char *zdb_ot_extname[] = {
 typedef struct zdb_cb {
 	zdb_blkstats_t	zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1];
 	uint64_t	zcb_removing_size;
+	uint64_t	zcb_checkpoint_size;
 	uint64_t	zcb_dedup_asize;
 	uint64_t	zcb_dedup_blocks;
 	uint64_t	zcb_embedded_blocks[NUM_BP_EMBEDDED_TYPES];
@@ -2745,7 +2770,7 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t *zilog, const b
 	}
 
 	VERIFY3U(zio_wait(zio_claim(NULL, zcb->zcb_spa,
-	    refcnt ? 0 : spa_first_txg(zcb->zcb_spa),
+	    refcnt ? 0 : spa_min_claim_txg(zcb->zcb_spa),
 	    bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0);
 }
 
@@ -2947,7 +2972,7 @@ claim_segment_impl_cb(uint64_t inner_offset, vdev_t *v
 	ASSERT(vdev_is_concrete(vd));
 
 	VERIFY0(metaslab_claim_impl(vd, offset, size,
-	    spa_first_txg(vd->vdev_spa)));
+	    spa_min_claim_txg(vd->vdev_spa)));
 }
 
 static void
@@ -3008,70 +3033,6 @@ zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb)
 	spa_config_exit(spa, SCL_CONFIG, FTAG);
 }
 
-/*
- * vm_idxp is an in-out parameter which (for indirect vdevs) is the
- * index in vim_entries that has the first entry in this metaslab.  On
- * return, it will be set to the first entry after this metaslab.
- */
-static void
-zdb_leak_init_ms(metaslab_t *msp, uint64_t *vim_idxp)
-{
-	metaslab_group_t *mg = msp->ms_group;
-	vdev_t *vd = mg->mg_vd;
-	vdev_t *rvd = vd->vdev_spa->spa_root_vdev;
-
-	mutex_enter(&msp->ms_lock);
-	metaslab_unload(msp);
-
-	/*
-	 * We don't want to spend the CPU manipulating the size-ordered
-	 * tree, so clear the range_tree ops.
-	 */
-	msp->ms_tree->rt_ops = NULL;
-
-	(void) fprintf(stderr,
-	    "\rloading vdev %llu of %llu, metaslab %llu of %llu ...",
-	    (longlong_t)vd->vdev_id,
-	    (longlong_t)rvd->vdev_children,
-	    (longlong_t)msp->ms_id,
-	    (longlong_t)vd->vdev_ms_count);
-
-	/*
-	 * For leak detection, we overload the metaslab ms_tree to
-	 * contain allocated segments instead of free segments. As a
-	 * result, we can't use the normal metaslab_load/unload
-	 * interfaces.
-	 */
-	if (vd->vdev_ops == &vdev_indirect_ops) {
-		vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
-		for (; *vim_idxp < vdev_indirect_mapping_num_entries(vim);
-		    (*vim_idxp)++) {
-			vdev_indirect_mapping_entry_phys_t *vimep =
-			    &vim->vim_entries[*vim_idxp];
-			uint64_t ent_offset = DVA_MAPPING_GET_SRC_OFFSET(vimep);
-			uint64_t ent_len = DVA_GET_ASIZE(&vimep->vimep_dst);
-			ASSERT3U(ent_offset, >=, msp->ms_start);
-			if (ent_offset >= msp->ms_start + msp->ms_size)
-				break;
-
-			/*
-			 * Mappings do not cross metaslab boundaries,
-			 * because we create them by walking the metaslabs.
-			 */
-			ASSERT3U(ent_offset + ent_len, <=,
-			    msp->ms_start + msp->ms_size);
-			range_tree_add(msp->ms_tree, ent_offset, ent_len);
-		}
-	} else if (msp->ms_sm != NULL) {
-		VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC));
-	}
-
-	if (!msp->ms_loaded) {
-		msp->ms_loaded = B_TRUE;
-	}
-	mutex_exit(&msp->ms_lock);
-}
-
 /* ARGSUSED */
 static int
 increment_indirect_mapping_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
@@ -3128,7 +3089,243 @@ zdb_load_obsolete_counts(vdev_t *vd)
 	return (counts);
 }
 
+typedef struct checkpoint_sm_exclude_entry_arg {
+	vdev_t *cseea_vd;
+	uint64_t cseea_checkpoint_size;
+} checkpoint_sm_exclude_entry_arg_t;
+
+static int
+checkpoint_sm_exclude_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
+    void *arg)
+{
+	checkpoint_sm_exclude_entry_arg_t *cseea = arg;
+	vdev_t *vd = cseea->cseea_vd;
+	metaslab_t *ms = vd->vdev_ms[offset >> vd->vdev_ms_shift];
+	uint64_t end = offset + size;
+
+	ASSERT(type == SM_FREE);
+
+	/*
+	 * Since the vdev_checkpoint_sm exists in the vdev level
+	 * and the ms_sm space maps exist in the metaslab level,
+	 * an entry in the checkpoint space map could theoretically
+	 * cross the boundaries of the metaslab that it belongs.
+	 *
+	 * In reality, because of the way that we populate and
+	 * manipulate the checkpoint's space maps currently,
+	 * there shouldn't be any entries that cross metaslabs.
+	 * Hence the assertion below.
+	 *
+	 * That said, there is no fundamental requirement that
+	 * the checkpoint's space map entries should not cross
+	 * metaslab boundaries. So if needed we could add code
+	 * that handles metaslab-crossing segments in the future.
+	 */
+	VERIFY3U(offset, >=, ms->ms_start);
+	VERIFY3U(end, <=, ms->ms_start + ms->ms_size);
+
+	/*
+	 * By removing the entry from the allocated segments we
+	 * also verify that the entry is there to begin with.
+	 */
+	mutex_enter(&ms->ms_lock);
+	range_tree_remove(ms->ms_allocatable, offset, size);
+	mutex_exit(&ms->ms_lock);
+
+	cseea->cseea_checkpoint_size += size;
+	return (0);
+}
+
 static void
+zdb_leak_init_vdev_exclude_checkpoint(vdev_t *vd, zdb_cb_t *zcb)
+{
+	spa_t *spa = vd->vdev_spa;
+	space_map_t *checkpoint_sm = NULL;
+	uint64_t checkpoint_sm_obj;
+
+	/*
+	 * If there is no vdev_top_zap, we are in a pool whose
+	 * version predates the pool checkpoint feature.
+	 */
+	if (vd->vdev_top_zap == 0)
+		return;
+
+	/*
+	 * If there is no reference of the vdev_checkpoint_sm in
+	 * the vdev_top_zap, then one of the following scenarios
+	 * is true:
+	 *
+	 * 1] There is no checkpoint
+	 * 2] There is a checkpoint, but no checkpointed blocks
+	 *    have been freed yet
+	 * 3] The current vdev is indirect
+	 *
+	 * In these cases we return immediately.
+	 */
+	if (zap_contains(spa_meta_objset(spa), vd->vdev_top_zap,
+	    VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) != 0)
+		return;
+
+	VERIFY0(zap_lookup(spa_meta_objset(spa), vd->vdev_top_zap,
+	    VDEV_TOP_ZAP_POOL_CHECKPOINT_SM, sizeof (uint64_t), 1,
+	    &checkpoint_sm_obj));
+
+	checkpoint_sm_exclude_entry_arg_t cseea;
+	cseea.cseea_vd = vd;
+	cseea.cseea_checkpoint_size = 0;
+
+	VERIFY0(space_map_open(&checkpoint_sm, spa_meta_objset(spa),
+	    checkpoint_sm_obj, 0, vd->vdev_asize, vd->vdev_ashift));
+	space_map_update(checkpoint_sm);
+
+	VERIFY0(space_map_iterate(checkpoint_sm,
+	    checkpoint_sm_exclude_entry_cb, &cseea));
+	space_map_close(checkpoint_sm);
+
+	zcb->zcb_checkpoint_size += cseea.cseea_checkpoint_size;
+}
+
+static void
+zdb_leak_init_exclude_checkpoint(spa_t *spa, zdb_cb_t *zcb)
+{
+	vdev_t *rvd = spa->spa_root_vdev;
+	for (uint64_t c = 0; c < rvd->vdev_children; c++) {
+		ASSERT3U(c, ==, rvd->vdev_child[c]->vdev_id);
+		zdb_leak_init_vdev_exclude_checkpoint(rvd->vdev_child[c], zcb);
+	}
+}
+
+static void
+load_concrete_ms_allocatable_trees(spa_t *spa, maptype_t maptype)
+{
+	vdev_t *rvd = spa->spa_root_vdev;
+	for (uint64_t i = 0; i < rvd->vdev_children; i++) {
+		vdev_t *vd = rvd->vdev_child[i];
+
+		ASSERT3U(i, ==, vd->vdev_id);
+
+		if (vd->vdev_ops == &vdev_indirect_ops)
+			continue;
+
+		for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
+			metaslab_t *msp = vd->vdev_ms[m];
+
+			(void) fprintf(stderr,
+			    "\rloading concrete vdev %llu, "
+			    "metaslab %llu of %llu ...",
+			    (longlong_t)vd->vdev_id,
+			    (longlong_t)msp->ms_id,
+			    (longlong_t)vd->vdev_ms_count);
+
+			mutex_enter(&msp->ms_lock);
+			metaslab_unload(msp);
+
+			/*
+			 * We don't want to spend the CPU manipulating the
+			 * size-ordered tree, so clear the range_tree ops.
+			 */
+			msp->ms_allocatable->rt_ops = NULL;
+
+			if (msp->ms_sm != NULL) {
+				VERIFY0(space_map_load(msp->ms_sm,
+				    msp->ms_allocatable, maptype));
+			}
+			if (!msp->ms_loaded)
+				msp->ms_loaded = B_TRUE;
+			mutex_exit(&msp->ms_lock);
+		}
+	}
+}
+
+/*
+ * vm_idxp is an in-out parameter which (for indirect vdevs) is the
+ * index in vim_entries that has the first entry in this metaslab.
+ * On return, it will be set to the first entry after this metaslab.
+ */
+static void
+load_indirect_ms_allocatable_tree(vdev_t *vd, metaslab_t *msp,
+    uint64_t *vim_idxp)
+{
+	vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+
+	mutex_enter(&msp->ms_lock);
+	metaslab_unload(msp);
+
+	/*
+	 * We don't want to spend the CPU manipulating the
+	 * size-ordered tree, so clear the range_tree ops.
+	 */
+	msp->ms_allocatable->rt_ops = NULL;
+
+	for (; *vim_idxp < vdev_indirect_mapping_num_entries(vim);
+	    (*vim_idxp)++) {
+		vdev_indirect_mapping_entry_phys_t *vimep =
+		    &vim->vim_entries[*vim_idxp];
+		uint64_t ent_offset = DVA_MAPPING_GET_SRC_OFFSET(vimep);
+		uint64_t ent_len = DVA_GET_ASIZE(&vimep->vimep_dst);
+		ASSERT3U(ent_offset, >=, msp->ms_start);
+		if (ent_offset >= msp->ms_start + msp->ms_size)
+			break;
+
+		/*
+		 * Mappings do not cross metaslab boundaries,
+		 * because we create them by walking the metaslabs.
+		 */
+		ASSERT3U(ent_offset + ent_len, <=,
+		    msp->ms_start + msp->ms_size);
+		range_tree_add(msp->ms_allocatable, ent_offset, ent_len);
+	}
+
+	if (!msp->ms_loaded)
+		msp->ms_loaded = B_TRUE;
+	mutex_exit(&msp->ms_lock);
+}
+
+static void
+zdb_leak_init_prepare_indirect_vdevs(spa_t *spa, zdb_cb_t *zcb)
+{
+	vdev_t *rvd = spa->spa_root_vdev;
+	for (uint64_t c = 0; c < rvd->vdev_children; c++) {
+		vdev_t *vd = rvd->vdev_child[c];
+
+		ASSERT3U(c, ==, vd->vdev_id);
+
+		if (vd->vdev_ops != &vdev_indirect_ops)
+			continue;
+
+		/*
+		 * Note: we don't check for mapping leaks on
+		 * removing vdevs because their ms_allocatable's
+		 * are used to look for leaks in allocated space.
+		 */
+		zcb->zcb_vd_obsolete_counts[c] = zdb_load_obsolete_counts(vd);
+
+		/*
+		 * Normally, indirect vdevs don't have any
+		 * metaslabs.  We want to set them up for
+		 * zio_claim().
+		 */
+		VERIFY0(vdev_metaslab_init(vd, 0));
+
+		vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+		uint64_t vim_idx = 0;
+		for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
+
+			(void) fprintf(stderr,
+			    "\rloading indirect vdev %llu, "
+			    "metaslab %llu of %llu ...",
+			    (longlong_t)vd->vdev_id,
+			    (longlong_t)vd->vdev_ms[m]->ms_id,
+			    (longlong_t)vd->vdev_ms_count);
+
+			load_indirect_ms_allocatable_tree(vd, vd->vdev_ms[m],
+			    &vim_idx);
+		}
+		ASSERT3U(vim_idx, ==, vdev_indirect_mapping_num_entries(vim));
+	}
+}
+
+static void
 zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 {
 	zcb->zcb_spa = spa;
@@ -3139,7 +3336,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 
 		/*
 		 * We are going to be changing the meaning of the metaslab's
-		 * ms_tree.  Ensure that the allocator doesn't try to
+		 * ms_allocatable.  Ensure that the allocator doesn't try to
 		 * use the tree.
 		 */
 		spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
@@ -3149,39 +3346,37 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 		    umem_zalloc(rvd->vdev_children * sizeof (uint32_t *),
 		    UMEM_NOFAIL);
 
+		/*
+		 * For leak detection, we overload the ms_allocatable trees
+		 * to contain allocated segments instead of free segments.
+		 * As a result, we can't use the normal metaslab_load/unload
+		 * interfaces.
+		 */
+		zdb_leak_init_prepare_indirect_vdevs(spa, zcb);
+		load_concrete_ms_allocatable_trees(spa, SM_ALLOC);
 
-		for (uint64_t c = 0; c < rvd->vdev_children; c++) {
-			vdev_t *vd = rvd->vdev_child[c];
-			uint64_t vim_idx = 0;
+		/*
+		 * On load_concrete_ms_allocatable_trees() we loaded all the
+		 * allocated entries from the ms_sm to the ms_allocatable for
+		 * each metaslab. If the pool has a checkpoint or is in the
+		 * middle of discarding a checkpoint, some of these blocks
+		 * may have been freed but their ms_sm may not have been
+		 * updated because they are referenced by the checkpoint. In
+		 * order to avoid false-positives during leak-detection, we
+		 * go through the vdev's checkpoint space map and exclude all
+		 * its entries from their relevant ms_allocatable.
+		 *
+		 * We also aggregate the space held by the checkpoint and add
+		 * it to zcb_checkpoint_size.
+		 *
+		 * Note that at this point we are also verifying that all the
+		 * entries on the checkpoint_sm are marked as allocated in
+		 * the ms_sm of their relevant metaslab.
+		 * [see comment in checkpoint_sm_exclude_entry_cb()]
+		 */
+		zdb_leak_init_exclude_checkpoint(spa, zcb);
 
-			ASSERT3U(c, ==, vd->vdev_id);
-
-			/*
-			 * Note: we don't check for mapping leaks on
-			 * removing vdevs because their ms_tree's are
-			 * used to look for leaks in allocated space.
-			 */
-			if (vd->vdev_ops == &vdev_indirect_ops) {
-				zcb->zcb_vd_obsolete_counts[c] =
-				    zdb_load_obsolete_counts(vd);
-
-				/*
-				 * Normally, indirect vdevs don't have any
-				 * metaslabs.  We want to set them up for
-				 * zio_claim().
-				 */
-				VERIFY0(vdev_metaslab_init(vd, 0));
-			}
-
-			for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
-				zdb_leak_init_ms(vd->vdev_ms[m], &vim_idx);
-			}
-			if (vd->vdev_ops == &vdev_indirect_ops) {
-				ASSERT3U(vim_idx, ==,
-				    vdev_indirect_mapping_num_entries(
-				    vd->vdev_indirect_mapping));
-			}
-		}
+		/* for cleaner progress output */
 		(void) fprintf(stderr, "\n");
 
 		if (bpobj_is_open(&dp->dp_obsolete_bpobj)) {
@@ -3190,12 +3385,16 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 			(void) bpobj_iterate_nofree(&dp->dp_obsolete_bpobj,
 			    increment_indirect_mapping_cb, zcb, NULL);
 		}
+	} else {
+		/*
+		 * If leak tracing is disabled, we still need to consider
+		 * any checkpointed space in our space verification.
+		 */
+		zcb->zcb_checkpoint_size += spa_get_checkpoint_space(spa);
 	}
 
 	spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
-
 	zdb_ddt_leak_init(spa, zcb);
-
 	spa_config_exit(spa, SCL_CONFIG, FTAG);
 }
 
@@ -3222,7 +3421,7 @@ zdb_check_for_obsolete_leaks(vdev_t *vd, zdb_cb_t *zcb
 		for (uint64_t inner_offset = 0;
 		    inner_offset < DVA_GET_ASIZE(&vimep->vimep_dst);
 		    inner_offset += 1 << vd->vdev_ashift) {
-			if (range_tree_contains(msp->ms_tree,
+			if (range_tree_contains(msp->ms_allocatable,
 			    offset + inner_offset, 1 << vd->vdev_ashift)) {
 				obsolete_bytes += 1 << vd->vdev_ashift;
 			}
@@ -3288,23 +3487,23 @@ zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb)
 				ASSERT3P(mg, ==, msp->ms_group);
 
 				/*
-				 * The ms_tree has been overloaded to
-				 * contain allocated segments. Now that we
-				 * finished traversing all blocks, any
-				 * block that remains in the ms_tree
+				 * ms_allocatable has been overloaded
+				 * to contain allocated segments. Now that
+				 * we finished traversing all blocks, any
+				 * block that remains in the ms_allocatable
 				 * represents an allocated block that we
 				 * did not claim during the traversal.
 				 * Claimed blocks would have been removed
-				 * from the ms_tree.  For indirect vdevs,
-				 * space remaining in the tree represents
-				 * parts of the mapping that are not
-				 * referenced, which is not a bug.
+				 * from the ms_allocatable.  For indirect
+				 * vdevs, space remaining in the tree
+				 * represents parts of the mapping that are
+				 * not referenced, which is not a bug.
 				 */
 				if (vd->vdev_ops == &vdev_indirect_ops) {
-					range_tree_vacate(msp->ms_tree,
+					range_tree_vacate(msp->ms_allocatable,
 					    NULL, NULL);
 				} else {
-					range_tree_vacate(msp->ms_tree,
+					range_tree_vacate(msp->ms_allocatable,
 					    zdb_leak, vd);
 				}
 
@@ -3427,7 +3626,7 @@ dump_block_stats(spa_t *spa)
 
 	total_alloc = norm_alloc + metaslab_class_get_alloc(spa_log_class(spa));
 	total_found = tzb->zb_asize - zcb.zcb_dedup_asize +
-	    zcb.zcb_removing_size;
+	    zcb.zcb_removing_size + zcb.zcb_checkpoint_size;
 
 	if (total_found == total_alloc) {
 		if (!dump_opt['L'])
@@ -3836,7 +4035,385 @@ verify_device_removal_feature_counts(spa_t *spa)
 	return (ret);
 }
 
+#define	BOGUS_SUFFIX "_CHECKPOINTED_UNIVERSE"
+/*
+ * Import the checkpointed state of the pool specified by the target
+ * parameter as readonly. The function also accepts a pool config
+ * as an optional parameter, else it attempts to infer the config by
+ * the name of the target pool.
+ *
+ * Note that the checkpointed state's pool name will be the name of
+ * the original pool with the above suffix appened to it. In addition,
+ * if the target is not a pool name (e.g. a path to a dataset) then
+ * the new_path parameter is populated with the updated path to
+ * reflect the fact that we are looking into the checkpointed state.
+ *
+ * The function returns a newly-allocated copy of the name of the
+ * pool containing the checkpointed state. When this copy is no
+ * longer needed it should be freed with free(3C). Same thing
+ * applies to the new_path parameter if allocated.
+ */
+static char *
+import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
+{
+	int error = 0;
+	char *poolname, *bogus_name;
+
+	/* If the target is not a pool, the extract the pool name */
+	char *path_start = strchr(target, '/');
+	if (path_start != NULL) {
+		size_t poolname_len = path_start - target;
+		poolname = strndup(target, poolname_len);
+	} else {
+		poolname = target;
+	}
+
+	if (cfg == NULL) {
+		error = spa_get_stats(poolname, &cfg, NULL, 0);
+		if (error != 0) {
+			fatal("Tried to read config of pool \"%s\" but "
+			    "spa_get_stats() failed with error %d\n",
+			    poolname, error);
+		}
+	}
+
+	(void) asprintf(&bogus_name, "%s%s", poolname, BOGUS_SUFFIX);
+	fnvlist_add_string(cfg, ZPOOL_CONFIG_POOL_NAME, bogus_name);
+
+	error = spa_import(bogus_name, cfg, NULL,
+	    ZFS_IMPORT_MISSING_LOG | ZFS_IMPORT_CHECKPOINT);
+	if (error != 0) {
+		fatal("Tried to import pool \"%s\" but spa_import() failed "
+		    "with error %d\n", bogus_name, error);
+	}
+
+	if (new_path != NULL && path_start != NULL)
+		(void) asprintf(new_path, "%s%s", bogus_name, path_start);
+
+	if (target != poolname)
+		free(poolname);
+
+	return (bogus_name);
+}
+
+typedef struct verify_checkpoint_sm_entry_cb_arg {
+	vdev_t *vcsec_vd;
+
+	/* the following fields are only used for printing progress */
+	uint64_t vcsec_entryid;
+	uint64_t vcsec_num_entries;
+} verify_checkpoint_sm_entry_cb_arg_t;
+
+#define	ENTRIES_PER_PROGRESS_UPDATE 10000
+
+static int
+verify_checkpoint_sm_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
+    void *arg)
+{
+	verify_checkpoint_sm_entry_cb_arg_t *vcsec = arg;
+	vdev_t *vd = vcsec->vcsec_vd;
+	metaslab_t *ms = vd->vdev_ms[offset >> vd->vdev_ms_shift];
+	uint64_t end = offset + size;
+
+	ASSERT(type == SM_FREE);
+
+	if ((vcsec->vcsec_entryid % ENTRIES_PER_PROGRESS_UPDATE) == 0) {
+		(void) fprintf(stderr,
+		    "\rverifying vdev %llu, space map entry %llu of %llu ...",
+		    (longlong_t)vd->vdev_id,
+		    (longlong_t)vcsec->vcsec_entryid,
+		    (longlong_t)vcsec->vcsec_num_entries);
+	}
+	vcsec->vcsec_entryid++;
+
+	/*
+	 * See comment in checkpoint_sm_exclude_entry_cb()
+	 */
+	VERIFY3U(offset, >=, ms->ms_start);
+	VERIFY3U(end, <=, ms->ms_start + ms->ms_size);
+
+	/*
+	 * The entries in the vdev_checkpoint_sm should be marked as
+	 * allocated in the checkpointed state of the pool, therefore
+	 * their respective ms_allocateable trees should not contain them.
+	 */
+	mutex_enter(&ms->ms_lock);
+	range_tree_verify(ms->ms_allocatable, offset, size);
+	mutex_exit(&ms->ms_lock);
+
+	return (0);
+}
+
+/*
+ * Verify that all segments in the vdev_checkpoint_sm are allocated
+ * according to the checkpoint's ms_sm (i.e. are not in the checkpoint's
+ * ms_allocatable).
+ *
+ * Do so by comparing the checkpoint space maps (vdev_checkpoint_sm) of
+ * each vdev in the current state of the pool to the metaslab space maps
+ * (ms_sm) of the checkpointed state of the pool.
+ *
+ * Note that the function changes the state of the ms_allocatable
+ * trees of the current spa_t. The entries of these ms_allocatable
+ * trees are cleared out and then repopulated from with the free
+ * entries of their respective ms_sm space maps.
+ */
 static void
+verify_checkpoint_vdev_spacemaps(spa_t *checkpoint, spa_t *current)
+{
+	vdev_t *ckpoint_rvd = checkpoint->spa_root_vdev;
+	vdev_t *current_rvd = current->spa_root_vdev;
+
+	load_concrete_ms_allocatable_trees(checkpoint, SM_FREE);
+
+	for (uint64_t c = 0; c < ckpoint_rvd->vdev_children; c++) {
+		vdev_t *ckpoint_vd = ckpoint_rvd->vdev_child[c];
+		vdev_t *current_vd = current_rvd->vdev_child[c];
+
+		space_map_t *checkpoint_sm = NULL;
+		uint64_t checkpoint_sm_obj;
+
+		if (ckpoint_vd->vdev_ops == &vdev_indirect_ops) {
+			/*
+			 * Since we don't allow device removal in a pool
+			 * that has a checkpoint, we expect that all removed
+			 * vdevs were removed from the pool before the
+			 * checkpoint.
+			 */
+			ASSERT3P(current_vd->vdev_ops, ==, &vdev_indirect_ops);
+			continue;
+		}
+
+		/*
+		 * If the checkpoint space map doesn't exist, then nothing
+		 * here is checkpointed so there's nothing to verify.
+		 */
+		if (current_vd->vdev_top_zap == 0 ||
+		    zap_contains(spa_meta_objset(current),
+		    current_vd->vdev_top_zap,
+		    VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) != 0)
+			continue;
+
+		VERIFY0(zap_lookup(spa_meta_objset(current),
+		    current_vd->vdev_top_zap, VDEV_TOP_ZAP_POOL_CHECKPOINT_SM,
+		    sizeof (uint64_t), 1, &checkpoint_sm_obj));
+
+		VERIFY0(space_map_open(&checkpoint_sm, spa_meta_objset(current),
+		    checkpoint_sm_obj, 0, current_vd->vdev_asize,
+		    current_vd->vdev_ashift));
+		space_map_update(checkpoint_sm);
+
+		verify_checkpoint_sm_entry_cb_arg_t vcsec;
+		vcsec.vcsec_vd = ckpoint_vd;
+		vcsec.vcsec_entryid = 0;
+		vcsec.vcsec_num_entries =
+		    space_map_length(checkpoint_sm) / sizeof (uint64_t);
+		VERIFY0(space_map_iterate(checkpoint_sm,
+		    verify_checkpoint_sm_entry_cb, &vcsec));
+		dump_spacemap(current->spa_meta_objset, checkpoint_sm);
+		space_map_close(checkpoint_sm);
+	}
+
+	/*
+	 * If we've added vdevs since we took the checkpoint, ensure
+	 * that their checkpoint space maps are empty.
+	 */
+	if (ckpoint_rvd->vdev_children < current_rvd->vdev_children) {
+		for (uint64_t c = ckpoint_rvd->vdev_children;
+		    c < current_rvd->vdev_children; c++) {
+			vdev_t *current_vd = current_rvd->vdev_child[c];
+			ASSERT3P(current_vd->vdev_checkpoint_sm, ==, NULL);
+		}
+	}
+
+	/* for cleaner progress output */
+	(void) fprintf(stderr, "\n");
+}
+
+/*
+ * Verifies that all space that's allocated in the checkpoint is
+ * still allocated in the current version, by checking that everything
+ * in checkpoint's ms_allocatable (which is actually allocated, not
+ * allocatable/free) is not present in current's ms_allocatable.
+ *
+ * Note that the function changes the state of the ms_allocatable
+ * trees of both spas when called. The entries of all ms_allocatable
+ * trees are cleared out and then repopulated from their respective
+ * ms_sm space maps. In the checkpointed state we load the allocated
+ * entries, and in the current state we load the free entries.
+ */
+static void
+verify_checkpoint_ms_spacemaps(spa_t *checkpoint, spa_t *current)
+{
+	vdev_t *ckpoint_rvd = checkpoint->spa_root_vdev;
+	vdev_t *current_rvd = current->spa_root_vdev;
+
+	load_concrete_ms_allocatable_trees(checkpoint, SM_ALLOC);
+	load_concrete_ms_allocatable_trees(current, SM_FREE);
+
+	for (uint64_t i = 0; i < ckpoint_rvd->vdev_children; i++) {
+		vdev_t *ckpoint_vd = ckpoint_rvd->vdev_child[i];
+		vdev_t *current_vd = current_rvd->vdev_child[i];
+
+		if (ckpoint_vd->vdev_ops == &vdev_indirect_ops) {
+			/*
+			 * See comment in verify_checkpoint_vdev_spacemaps()
+			 */
+			ASSERT3P(current_vd->vdev_ops, ==, &vdev_indirect_ops);
+			continue;
+		}
+
+		for (uint64_t m = 0; m < ckpoint_vd->vdev_ms_count; m++) {
+			metaslab_t *ckpoint_msp = ckpoint_vd->vdev_ms[m];
+			metaslab_t *current_msp = current_vd->vdev_ms[m];
+
+			(void) fprintf(stderr,
+			    "\rverifying vdev %llu of %llu, "
+			    "metaslab %llu of %llu ...",
+			    (longlong_t)current_vd->vdev_id,
+			    (longlong_t)current_rvd->vdev_children,
+			    (longlong_t)current_vd->vdev_ms[m]->ms_id,
+			    (longlong_t)current_vd->vdev_ms_count);
+
+			/*
+			 * We walk through the ms_allocatable trees that
+			 * are loaded with the allocated blocks from the
+			 * ms_sm spacemaps of the checkpoint. For each
+			 * one of these ranges we ensure that none of them
+			 * exists in the ms_allocatable trees of the
+			 * current state which are loaded with the ranges
+			 * that are currently free.
+			 *
+			 * This way we ensure that none of the blocks that
+			 * are part of the checkpoint were freed by mistake.
+			 */
+			range_tree_walk(ckpoint_msp->ms_allocatable,
+			    (range_tree_func_t *)range_tree_verify,
+			    current_msp->ms_allocatable);
+		}
+	}
+
+	/* for cleaner progress output */
+	(void) fprintf(stderr, "\n");
+}
+
+static void
+verify_checkpoint_blocks(spa_t *spa)
+{
+	spa_t *checkpoint_spa;
+	char *checkpoint_pool;
+	nvlist_t *config = NULL;
+	int error = 0;
+
+	/*
+	 * We import the checkpointed state of the pool (under a different
+	 * name) so we can do verification on it against the current state
+	 * of the pool.
+	 */
+	checkpoint_pool = import_checkpointed_state(spa->spa_name, config,
+	    NULL);
+	ASSERT(strcmp(spa->spa_name, checkpoint_pool) != 0);
+
+	error = spa_open(checkpoint_pool, &checkpoint_spa, FTAG);
+	if (error != 0) {
+		fatal("Tried to open pool \"%s\" but spa_open() failed with "
+		    "error %d\n", checkpoint_pool, error);
+	}
+
+	/*
+	 * Ensure that ranges in the checkpoint space maps of each vdev
+	 * are allocated according to the checkpointed state's metaslab
+	 * space maps.
+	 */
+	verify_checkpoint_vdev_spacemaps(checkpoint_spa, spa);
+
+	/*
+	 * Ensure that allocated ranges in the checkpoint's metaslab
+	 * space maps remain allocated in the metaslab space maps of
+	 * the current state.
+	 */
+	verify_checkpoint_ms_spacemaps(checkpoint_spa, spa);
+
+	/*
+	 * Once we are done, we get rid of the checkpointed state.

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@freebsd.org  Tue Apr  3 18:33:04 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ABB9F75ABD
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Tue,  3 Apr 2018 18:33:04 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 0E2F66BAD8;
 Tue,  3 Apr 2018 18:33:04 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0919942F;
 Tue,  3 Apr 2018 18:33:04 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w33IX3sK082594;
 Tue, 3 Apr 2018 18:33:03 GMT (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w33IX3ef082593;
 Tue, 3 Apr 2018 18:33:03 GMT (envelope-from glebius@FreeBSD.org)
Message-Id: <201804031833.w33IX3ef082593@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: glebius set sender to
 glebius@FreeBSD.org using -f
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Tue, 3 Apr 2018 18:33:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331932 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: glebius
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 331932
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Apr 2018 18:33:04 -0000

Author: glebius
Date: Tue Apr  3 18:33:03 2018
New Revision: 331932
URL: https://svnweb.freebsd.org/changeset/base/331932

Log:
  Indentation fixups. No functional changes.

Modified:
  user/pho/stress2/misc/sendfile.sh

Modified: user/pho/stress2/misc/sendfile.sh
==============================================================================
--- user/pho/stress2/misc/sendfile.sh	Tue Apr  3 17:16:06 2018	(r331931)
+++ user/pho/stress2/misc/sendfile.sh	Tue Apr  3 18:33:03 2018	(r331932)
@@ -110,16 +110,17 @@ reader(void) {
 
 	t = 0;
 	if ((buf = malloc(bufsize)) == NULL)
-			err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__);
+		err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__);
 
 	if ((fd = open(outputFile, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1)
-			err(1, "open(%s)", outputFile);
+		err(1, "open(%s)", outputFile);
 
 	for (;;) {
 		if ((n = read(msgsock, buf, bufsize)) < 0)
 			err(1, "read(), %s:%d", __FILE__, __LINE__);
 		t += n;
-		if (n == 0) break;
+		if (n == 0)
+			break;
 
 		if ((write(fd, buf, n)) != n)
 			err(1, "write");
@@ -152,9 +153,10 @@ writer(void) {
 
 #if 1		/* livelock trigger */
 		size = getpagesize() -4;
-		if (setsockopt(tcpsock,
-		    SOL_SOCKET, SO_SNDBUF, (void *)&size, sizeof(size)) < 0)
-			err(1, "setsockopt(SO_SNDBUF), %s:%d", __FILE__, __LINE__);
+		if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size,
+		    sizeof(size)) < 0)
+			err(1, "setsockopt(SO_SNDBUF), %s:%d",
+			    __FILE__, __LINE__);
 #endif
 
 		hostent = gethostbyname ("localhost");
@@ -194,8 +196,9 @@ main(int argc, char **argv)
 	pid_t pid;
 
 	if (argc != 4) {
-		fprintf(stderr, "Usage: %s <inputFile outputFile portNumber\n", argv[0]);
-			return (1);
+		fprintf(stderr, "Usage: %s <inputFile outputFile portNumber\n",
+		    argv[0]);
+		return (1);
 	}
 	inputFile = argv[1];
 	outputFile = argv[2];
@@ -204,7 +207,6 @@ main(int argc, char **argv)
 	if ((pid = fork()) == 0) {
 		writer();
 		exit(EXIT_SUCCESS);
-
 	} else if (pid > 0) {
 		reader();
 		kill(pid, SIGINT);

From owner-svn-src-user@freebsd.org  Wed Apr  4 08:06:05 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 738FEF9C1E6
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 08:06:05 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 214936A7BB;
 Wed,  4 Apr 2018 08:06:05 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C2A810F56;
 Wed,  4 Apr 2018 08:06:05 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34864pC095481;
 Wed, 4 Apr 2018 08:06:04 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34864Ix095480;
 Wed, 4 Apr 2018 08:06:04 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040806.w34864Ix095480@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 08:06:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331990 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 331990
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 08:06:05 -0000

Author: pho
Date: Wed Apr  4 08:06:04 2018
New Revision: 331990
URL: https://svnweb.freebsd.org/changeset/base/331990

Log:
  Test must run as root. Added check.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/core2.sh

Modified: user/pho/stress2/misc/core2.sh
==============================================================================
--- user/pho/stress2/misc/core2.sh	Wed Apr  4 06:44:24 2018	(r331989)
+++ user/pho/stress2/misc/core2.sh	Wed Apr  4 08:06:04 2018	(r331990)
@@ -30,6 +30,7 @@
 
 # Test multiple (parallel) core dumps and umount
 
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
 . ../default.cfg
 
 odir=`pwd`

From owner-svn-src-user@freebsd.org  Wed Apr  4 08:07:08 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C251DF9C2D7
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 08:07:08 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 709E76A8C7;
 Wed,  4 Apr 2018 08:07:08 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B9BB10F58;
 Wed,  4 Apr 2018 08:07:08 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34878cV096229;
 Wed, 4 Apr 2018 08:07:08 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34878jK096228;
 Wed, 4 Apr 2018 08:07:08 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040807.w34878jK096228@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 08:07:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331991 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 331991
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 08:07:08 -0000

Author: pho
Date: Wed Apr  4 08:07:08 2018
New Revision: 331991
URL: https://svnweb.freebsd.org/changeset/base/331991

Log:
  Added root check. Limit output.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/core3.sh

Modified: user/pho/stress2/misc/core3.sh
==============================================================================
--- user/pho/stress2/misc/core3.sh	Wed Apr  4 08:06:04 2018	(r331990)
+++ user/pho/stress2/misc/core3.sh	Wed Apr  4 08:07:08 2018	(r331991)
@@ -37,6 +37,7 @@
 # "Sleeping on "pmapdi" with the following non-sleepable locks held:"
 # https://people.freebsd.org/~pho/stress/log/kostik883.txt
 
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
 . ../default.cfg
 
 odir=`pwd`
@@ -84,7 +85,7 @@ sleep 1
 while pgrep -q core3; do
 	[ -d $mntpoint/d ] &&
 	   umount -f $mntpoint
-done &
+done > /dev/null &
 while pgrep -q core3; do
 	if [ ! -d $mntpoint/d ]; then
 		mount -t tmpfs tmpfs $mntpoint

From owner-svn-src-user@freebsd.org  Wed Apr  4 08:09:26 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACA25F9C47D
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 08:09:26 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5CA1B6AA3E;
 Wed,  4 Apr 2018 08:09:26 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5558110F5C;
 Wed,  4 Apr 2018 08:09:26 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3489QgY097687;
 Wed, 4 Apr 2018 08:09:26 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3489QFQ097684;
 Wed, 4 Apr 2018 08:09:26 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040809.w3489QFQ097684@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 08:09:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331992 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 331992
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 08:09:26 -0000

Author: pho
Date: Wed Apr  4 08:09:25 2018
New Revision: 331992
URL: https://svnweb.freebsd.org/changeset/base/331992

Log:
  Added check for root.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/fifo3.sh
  user/pho/stress2/misc/pageout.sh

Modified: user/pho/stress2/misc/fifo3.sh
==============================================================================
--- user/pho/stress2/misc/fifo3.sh	Wed Apr  4 08:07:08 2018	(r331991)
+++ user/pho/stress2/misc/fifo3.sh	Wed Apr  4 08:09:25 2018	(r331992)
@@ -65,6 +65,7 @@
 # (gdb)
 #
 
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
 . ../default.cfg
 
 cat > /tmp/fifo3.c <<EOF

Modified: user/pho/stress2/misc/pageout.sh
==============================================================================
--- user/pho/stress2/misc/pageout.sh	Wed Apr  4 08:07:08 2018	(r331991)
+++ user/pho/stress2/misc/pageout.sh	Wed Apr  4 08:09:25 2018	(r331992)
@@ -35,6 +35,7 @@
 # "panic: handle_written_filepage: not started" seen:
 # https://people.freebsd.org/~pho/stress/log/pageout-2.txt
 
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
 . ../default.cfg
 
 dir=/tmp

From owner-svn-src-user@freebsd.org  Wed Apr  4 09:01:48 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E153CF9F66C
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 09:01:47 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 842936D66D;
 Wed,  4 Apr 2018 09:01:47 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F2431193B;
 Wed,  4 Apr 2018 09:01:47 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3491lAN063198;
 Wed, 4 Apr 2018 09:01:47 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3491l8f063197;
 Wed, 4 Apr 2018 09:01:47 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040901.w3491l8f063197@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 09:01:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331998 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 331998
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 09:01:48 -0000

Author: pho
Date: Wed Apr  4 09:01:47 2018
New Revision: 331998
URL: https://svnweb.freebsd.org/changeset/base/331998

Log:
  Style fix and added when reported problem was fixed.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/growfs.sh

Modified: user/pho/stress2/misc/growfs.sh
==============================================================================
--- user/pho/stress2/misc/growfs.sh	Wed Apr  4 08:45:41 2018	(r331997)
+++ user/pho/stress2/misc/growfs.sh	Wed Apr  4 09:01:47 2018	(r331998)
@@ -31,6 +31,7 @@
 # growfs(8) test
 # "checksum failed: cg 52, cgp: 0x0 != bp: 0xe35de2ca" seen.
 # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222876
+# Fixed by r324499
 
 . ../default.cfg
 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
@@ -61,4 +62,4 @@ umount $mntpoint
 checkfs /dev/md${mdstart}p1 || { s=1; echo "Final fsck fail";  }
 
 mdconfig -d -u $mdstart
-exit $s 
+exit $s

From owner-svn-src-user@freebsd.org  Wed Apr  4 09:02:40 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D68D3F9F692
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 09:02:40 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 8665C6D7CF;
 Wed,  4 Apr 2018 09:02:40 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 803DE11974;
 Wed,  4 Apr 2018 09:02:40 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3492eAd063802;
 Wed, 4 Apr 2018 09:02:40 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3492eTH063801;
 Wed, 4 Apr 2018 09:02:40 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040902.w3492eTH063801@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 09:02:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r331999 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 331999
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 09:02:41 -0000

Author: pho
Date: Wed Apr  4 09:02:40 2018
New Revision: 331999
URL: https://svnweb.freebsd.org/changeset/base/331999

Log:
  Added missing cleanup.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/msdos7.sh

Modified: user/pho/stress2/misc/msdos7.sh
==============================================================================
--- user/pho/stress2/misc/msdos7.sh	Wed Apr  4 09:01:47 2018	(r331998)
+++ user/pho/stress2/misc/msdos7.sh	Wed Apr  4 09:02:40 2018	(r331999)
@@ -55,4 +55,5 @@ rm -f msdos7.c
 
 umount $mntpoint
 mdconfig -d -u $mdstart
+rm -f /tmp/msdos7
 exit 0

From owner-svn-src-user@freebsd.org  Wed Apr  4 09:05:49 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5581EF9F7EB
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 09:05:49 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E79BB6DA89;
 Wed,  4 Apr 2018 09:05:48 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E21701197F;
 Wed,  4 Apr 2018 09:05:48 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3495mYk066268;
 Wed, 4 Apr 2018 09:05:48 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3495mb0066267;
 Wed, 4 Apr 2018 09:05:48 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040905.w3495mb0066267@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 09:05:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332000 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332000
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 09:05:49 -0000

Author: pho
Date: Wed Apr  4 09:05:48 2018
New Revision: 332000
URL: https://svnweb.freebsd.org/changeset/base/332000

Log:
  Do not loop forever on umount(8) failure. Fix exit status calculation.

Modified:
  user/pho/stress2/misc/trim3.sh

Modified: user/pho/stress2/misc/trim3.sh
==============================================================================
--- user/pho/stress2/misc/trim3.sh	Wed Apr  4 09:02:40 2018	(r331999)
+++ user/pho/stress2/misc/trim3.sh	Wed Apr  4 09:05:48 2018	(r332000)
@@ -42,6 +42,7 @@ size="1g"
 [ $# -eq 0 ] && trim=-t
 n=0
 opt=""
+s=0
 [ "$newfs_flags" = "-U" ] && opt="-U -j"
 for flag in ' ' $opt; do
 	echo "mdconfig -a -t swap -s $size -u $mdstart"
@@ -59,10 +60,13 @@ for flag in ' ' $opt; do
 
 	su $testuser -c 'cd ..; ./run.sh marcus.cfg' > /dev/null 2>&1
 
-	while mount | grep $mntpoint | grep -q /dev/md; do
-		umount $mntpoint || sleep 1
+	for i in `jot 6`; do
+		mount | grep -q "on $mntpoint " || break
+		umount $mntpoint && break || sleep 10
+		[ $i -eq 6 ] &&
+		    { echo FATAL; fstat -mf $mntpoint; exit 1; }
 	done
-	checkfs /dev/md${mdstart}$part; s=$?
+	checkfs /dev/md${mdstart}$part || s=$?
 	mdconfig -d -u $mdstart
 done
 exit $s

From owner-svn-src-user@freebsd.org  Wed Apr  4 09:11:16 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A9E6F9FA95
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 09:11:16 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 498226DE54;
 Wed,  4 Apr 2018 09:11:16 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43FEC119C9;
 Wed,  4 Apr 2018 09:11:16 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w349BGSE070190;
 Wed, 4 Apr 2018 09:11:16 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w349BG8S070186;
 Wed, 4 Apr 2018 09:11:16 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804040911.w349BG8S070186@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 09:11:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332001 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332001
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 09:11:16 -0000

Author: pho
Date: Wed Apr  4 09:11:15 2018
New Revision: 332001
URL: https://svnweb.freebsd.org/changeset/base/332001

Log:
  Scale back memory usage when no swap disk is available.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/crossmp3.sh

Modified: user/pho/stress2/misc/crossmp3.sh
==============================================================================
--- user/pho/stress2/misc/crossmp3.sh	Wed Apr  4 09:05:48 2018	(r332000)
+++ user/pho/stress2/misc/crossmp3.sh	Wed Apr  4 09:11:15 2018	(r332001)
@@ -41,14 +41,15 @@
 . ../default.cfg
 
 CONT=/tmp/crossmp3.continue
-N=`sysctl -n hw.ncpu`
-usermem=`sysctl -n hw.usermem`
-[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80))
-size=$((usermem / 1024 / 1024 / N))
+if [ $# -eq 0 ]; then
+	N=`sysctl -n hw.ncpu`
+	usermem=`sysctl -n hw.usermem`
+	[ `sysctl -n vm.swap_total` -eq 0 ] && usermem=$((usermem / 2))
+	size=$((usermem / 1024 / 1024 / N))
+	echo "Using $N memory disks of size $size MB."
 
-mounts=$N		# Number of parallel scripts
+	mounts=$N		# Number of parallel scripts
 
-if [ $# -eq 0 ]; then
 	for i in `jot $mounts`; do
 		m=$(( i + mdstart - 1 ))
 		[ ! -d ${mntpoint}$m ] &&
@@ -68,14 +69,13 @@ if [ $# -eq 0 ]; then
 		./$0 $m &
 		./$0 find &
 	done
-
 	wait
 
 	for i in `jot $mounts`; do
 		m=$(( i + mdstart - 1 ))
 		mdconfig -d -u $m
 	done
-
+	exit 0
 else
 	if [ $1 = find ]; then
 		while [ -f $CONT ]; do

From owner-svn-src-user@freebsd.org  Wed Apr  4 11:03:41 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F321F84101
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 11:03:41 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 2A6E3731EC;
 Wed,  4 Apr 2018 11:03:41 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 252DC12D6F;
 Wed,  4 Apr 2018 11:03:41 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34B3ekv010053;
 Wed, 4 Apr 2018 11:03:40 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34B3et3010052;
 Wed, 4 Apr 2018 11:03:40 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804041103.w34B3et3010052@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 11:03:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332004 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332004
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 11:03:41 -0000

Author: pho
Date: Wed Apr  4 11:03:40 2018
New Revision: 332004
URL: https://svnweb.freebsd.org/changeset/base/332004

Log:
  Added a regression test for "open with O_CREAT | O_DIRECTORY when path
  references a symlink."
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/open.sh   (contents, props changed)

Added: user/pho/stress2/misc/open.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/open.sh	Wed Apr  4 11:03:40 2018	(r332004)
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2015 EMC Corp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# Regression test for:
+# Bug 202892 open with O_CREAT | O_DIRECTORY when path references a symlink.
+# Fixed by r287599.
+
+. ../default.cfg
+
+dir=/tmp
+odir=`pwd`
+cd $dir
+sed '1,/^EOF/d' < $odir/$0 > $dir/open.c
+mycc -o open -Wall -Wextra -O0 -g open.c || exit 1
+rm -f open.c
+
+wdir=/tmp/open.$$
+rm -rf $wdir
+mkdir -p $wdir
+cd $wdir
+status=0
+/tmp/open || { echo FAIL; status=$?; }
+[ -f broken -o -f broken2 ]  && { ls -l; echo FAIL; status=1; }
+cd $odir
+
+rm -rf /tmp/open $wdir
+exit $status
+
+EOF
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main(void)
+{
+	int fd;
+
+	/* Setup. */
+	if (unlink("broken") <= 0 && errno != ENOENT)
+		err(1, "unlink(broken)");
+	if (unlink("target") <= 0 && errno != ENOENT)
+		err(1, "unlink(target)");
+	if (symlink("target", "broken") < 0)
+		err(1, "symlink(target, broken)");
+
+	/* Test. */
+	fd = open("broken", O_CREAT | O_DIRECTORY, 0600);
+	if (fd >= 0)
+		errx(1, "open(broken, O_CREAT | O_DIRECTORY) - no error");
+
+	fd = open("broken2", O_CREAT | O_DIRECTORY | O_EXCL, 0600);
+	if (fd != -1)
+		errx(1, "open() O_CREAT | O_DIRECTORY | O_EXCL");
+
+	return (0);
+}

From owner-svn-src-user@freebsd.org  Wed Apr  4 11:05:36 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 449F6F842C7
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 11:05:36 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id EC45C73374;
 Wed,  4 Apr 2018 11:05:35 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E68BE12D71;
 Wed,  4 Apr 2018 11:05:35 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34B5ZWd011495;
 Wed, 4 Apr 2018 11:05:35 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34B5Z65011494;
 Wed, 4 Apr 2018 11:05:35 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804041105.w34B5Z65011494@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 11:05:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332005 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332005
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 11:05:36 -0000

Author: pho
Date: Wed Apr  4 11:05:35 2018
New Revision: 332005
URL: https://svnweb.freebsd.org/changeset/base/332005

Log:
  Added a regression test for seekdir/telldir.
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/seekdir.sh   (contents, props changed)

Added: user/pho/stress2/misc/seekdir.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/seekdir.sh	Wed Apr  4 11:05:35 2018	(r332005)
@@ -0,0 +1,160 @@
+#!/bin/sh
+
+# A regression test for seekdir/telldir
+# submitted by julian@freebsd.org
+# https://reviews.freebsd.org/D2410.
+# Fixed by r282485
+
+# $FreeBSD$
+
+. ../default.cfg
+
+odir=`pwd`
+cd /tmp
+sed '1,/^EOF/d' < $odir/$0 > seekdir.c
+rm -f /tmp/seekdir
+mycc -o seekdir -O2 seekdir.c || exit 1
+rm -f seekdir.c
+cd $odir
+
+mount | grep -q "$mntpoint " && umount -f $mntpoint
+mount -o size=1g -t tmpfs tmpfs $mntpoint
+
+cd $mntpoint
+mkdir test2
+/tmp/seekdir > /dev/null
+[ `echo $mntpoint/test2/* | wc -w` -eq 1 ] ||
+    { echo FAIL; status=1; }
+cd $odir
+
+while mount | grep $mntpoint | grep -q /dev/md; do
+	umount $mntpoint || sleep 1
+done
+rm -f /tmp/seekdir
+exit $status
+EOF
+#include <stdio.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sysexits.h>
+#include <err.h>
+
+#define CHUNKSIZE 5
+#define TOTALFILES 40
+
+static void
+SeekDir(DIR *dirp, long loc)
+{
+    printf("Seeking back to location %ld\n", loc);
+    seekdir(dirp, loc);
+}
+
+static long
+TellDir(DIR *dirp)
+{
+    long loc;
+
+    loc = telldir(dirp);
+    printf("telldir assigned location %ld\n", loc);
+    return (loc);
+}
+
+int
+main(int argc, char *argv[])
+{
+    DIR            *dirp;
+    int        i;
+    int        j;
+    long        offset = 0, prev_offset = 0;
+    char           *files[100];
+    char        filename[100];
+    int        fd;
+    struct dirent  *dp = NULL;
+
+    if (chdir("./test2") != 0) {
+        err(EX_OSERR, "chdir");
+    }
+
+    /*****************************************************/
+    /* Put a set of sample files in the target directory */
+    /*****************************************************/
+
+    for (i=1; i < TOTALFILES ; i++)
+    {
+        sprintf(filename, "file-%d", i);
+        fd = open(filename, O_CREAT, 0666);
+        if (fd == -1) {
+            err(EX_OSERR, "open");
+        }
+        close(fd);
+    }
+    dirp = opendir(".");
+    offset = TellDir(dirp);
+    for (i = 0; i < 20; i++)
+        files[i] = malloc(20);
+
+    /*******************************************************/
+    /* enumerate and delete small sets of files, one group */
+    /* at a time.                                          */
+    /*******************************************************/
+    do {
+
+        /*****************************************/
+        /* Read in up to CHUNKSIZE file names    */
+        /* i will be the number of files we hold */
+        /*****************************************/
+        for (i = 0; i < CHUNKSIZE; i++) {
+            if ((dp = readdir(dirp)) != NULL) {
+                strcpy(files[i], dp->d_name);
+
+                printf("readdir (%ld) returned file %s\n",
+                    offset, files[i]);
+
+                prev_offset = offset;
+                offset = TellDir(dirp);
+
+            } else {
+                printf("readdir returned null\n");
+                break;
+            }
+        }
+
+
+/****************************************************************/
+        /* Simuate the last entry not fitting into our (samba's) buffer */
+        /* If we read someting in on the last slot, push it back        */
+        /* Pretend it didn't fit. This is approximately what SAMBA does.*/
+/****************************************************************/
+        if (dp != NULL) {
+            /* Step back */
+            SeekDir(dirp, prev_offset);
+            offset = TellDir(dirp);
+            i--;
+            printf("file %s returned\n", files[i]);
+        }
+
+        /*****************************************/
+        /* i is the number of names we have left.*/
+        /*  Delete them.                         */
+        /*****************************************/
+        for (j = 0; j < i; j++) {
+            if (*files[j] == '.') {
+                printf ("skipping %s\n", files[j]);
+            } else {
+                printf("Unlinking file %s\n", files[j]);
+                if (unlink(files[j]) != 0) {
+                    err(EX_OSERR, "unlink");
+                }
+            }
+        }
+    } while (dp != NULL);
+
+    closedir(dirp);
+    //chdir("..");
+
+}

From owner-svn-src-user@freebsd.org  Wed Apr  4 11:07:51 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E25DF84480
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 11:07:51 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 51801734BD;
 Wed,  4 Apr 2018 11:07:51 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3280812D75;
 Wed,  4 Apr 2018 11:07:51 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34B7pIR013140;
 Wed, 4 Apr 2018 11:07:51 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34B7p08013139;
 Wed, 4 Apr 2018 11:07:51 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804041107.w34B7p08013139@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 11:07:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332006 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332006
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 11:07:51 -0000

Author: pho
Date: Wed Apr  4 11:07:50 2018
New Revision: 332006
URL: https://svnweb.freebsd.org/changeset/base/332006

Log:
  Added a test for newfs(8) with different sector sizes.
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/gnop5.sh   (contents, props changed)

Added: user/pho/stress2/misc/gnop5.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/gnop5.sh	Wed Apr  4 11:07:50 2018	(r332006)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2017 Dell EMC Isilon
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# Test newfs with different sector size.
+# newfs(8) issue fixed by r323157.
+# mount(8) still fail with a sector size > 8k.
+
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+. ../default.cfg
+
+kldstat | grep -q geom_nop || { gnop load 2>/dev/null || exit 0 &&
+    loaded=1; }
+gnop status > /dev/null || exit 1
+
+s=0
+set -e
+for i in 1k 2k 4k 8k 16k 32k 64k; do
+	echo $i
+	mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
+	[ -c /dev/md$mdstart ] &&  mdconfig -d -u $mdstart
+
+	mdconfig -a -t swap -s 2g -u $mdstart
+	gnop create -S $i /dev/md$mdstart
+	newfs $newfs_flags /dev/md$mdstart.nop > /dev/null ||
+	    { s=1; continue; }
+	mount /dev/md$mdstart.nop $mntpoint ||
+	    { gnop destroy /dev/md$mdstart.nop; mdconfig -d -u $mdstart
+	    s=1; break; }
+	chmod 777 $mntpoint
+
+	(cd $mntpoint; jot 100 | xargs touch)
+
+	while mount | grep $mntpoint | grep -q /dev/md; do
+		umount $mntpoint || sleep 1
+	done
+	checkfs /dev/md$mdstart.nop || s=1
+	gnop destroy /dev/md$mdstart.nop
+	mdconfig -d -u $mdstart
+done
+
+[ $loaded ] && gnop unload
+exit $s

From owner-svn-src-user@freebsd.org  Wed Apr  4 11:09:28 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C7B9F845E0
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 11:09:28 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 35C2373638;
 Wed,  4 Apr 2018 11:09:28 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FBC712D78;
 Wed,  4 Apr 2018 11:09:28 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34B9SHO014350;
 Wed, 4 Apr 2018 11:09:28 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34B9Rwa014343;
 Wed, 4 Apr 2018 11:09:27 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804041109.w34B9Rwa014343@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 11:09:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332007 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332007
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 11:09:28 -0000

Author: pho
Date: Wed Apr  4 11:09:27 2018
New Revision: 332007
URL: https://svnweb.freebsd.org/changeset/base/332007

Log:
  Added sysctl(8) test scenarios.
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/sysctl.sh   (contents, props changed)
  user/pho/stress2/misc/sysctl2.sh   (contents, props changed)
  user/pho/stress2/misc/sysctl3.sh   (contents, props changed)
  user/pho/stress2/misc/sysctl4.sh   (contents, props changed)

Added: user/pho/stress2/misc/sysctl.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/sysctl.sh	Wed Apr  4 11:09:27 2018	(r332007)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2009 Peter Holm <pho@FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# sysctl(3) regression test by using pstat and vmstat
+
+for i in `jot 100`; do
+	pstat -T | grep -q files || echo "pstat -T Failed"
+	pstat -f | grep -q inode || echo "pstat -f Failed"
+	pstat -s | grep -q /dev/ || echo "pstat -s Failed"
+	pstat -t | grep -q tty   || echo "pstat -t Failed"
+
+	[ `vmstat -P | wc -l` -eq 3 ] || echo "vmstat -P Failed"
+	vmstat -f | grep -q forks     || echo "vmstat -f Failed"
+	vmstat -i | grep -q cpu       || echo "vmstat -i Failed"
+	vmstat -m | grep -q lockf     || echo "vmstat -m Failed"
+	vmstat -s | grep -q inter     || echo "vmstat -s Failed"
+	vmstat -z | grep -q dinode    || echo "vmstat -z Failed"
+done
+exit 0

Added: user/pho/stress2/misc/sysctl2.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/sysctl2.sh	Wed Apr  4 11:09:27 2018	(r332007)
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2014 EMC Corp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# sysctl(8) test
+
+. ../default.cfg
+
+export runRUNTIME=5m
+pkill -9 -f run.sh
+daemon sh -c '(cd ../; ./run.sh > /dev/null 2>&1)'
+
+while pgrep -fq run.sh; do
+	for i in `jot 3`; do
+		sysctl -a > /dev/null 2>&1 &
+	done
+	wait
+done
+exit 0

Added: user/pho/stress2/misc/sysctl3.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/sysctl3.sh	Wed Apr  4 11:09:27 2018	(r332007)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2017 Dell EMC Isilon
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# sysctl(8) test.
+
+. ../default.cfg
+
+export runRUNTIME=10m
+export TESTPROGS="
+testcases/swap/swap
+testcases/creat/creat
+testcases/mkdir/mkdir
+testcases/rw/rw
+"
+export swapLOAD=100
+
+su $testuser -c 'cd ..; ./testcases/run/run $TESTPROGS' > /dev/null 2>&1 &
+pid=$!
+
+while kill -0 $pid > /dev/null 2>&1; do
+	pids=
+	for i in `jot 3`; do
+		sysctl -a > /dev/null 2>&1 &
+		pids="$pids $!"
+	done
+	for p in $pids; do
+		wait $p
+	done
+done
+wait $pid
+exit 0

Added: user/pho/stress2/misc/sysctl4.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/sysctl4.sh	Wed Apr  4 11:09:27 2018	(r332007)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2017 Dell EMC Isilon
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# Test with short lived threads.
+
+. ../default.cfg
+
+(cd ../testcases/thr2; ./thr2 -t 1h -i 20 -l 100 > /dev/null 2>&1) &
+pid=$!
+
+[ -n "`sysctl -i kern.proc.all_stacks`" ] && all_stacks=1 # Custom OID
+start=`date +%s`
+while [ $((`date +%s` - start)) -lt 180 ]; do
+        pids=""
+        for j in `jot 3`; do
+                if [ $all_stacks ]; then
+			sysctl kern.proc.all_stacks > /dev/null &
+		else
+			ps -lH > /dev/null &
+		fi
+                pids="$pids $!"
+        done
+        for j in $pids; do
+                wait $j
+        done
+done
+kill $pid
+pkill thr2
+exit 0

From owner-svn-src-user@freebsd.org  Wed Apr  4 11:12:48 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5426BF84ABD
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 11:12:48 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 0804E73A61;
 Wed,  4 Apr 2018 11:12:48 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02D5512F0B;
 Wed,  4 Apr 2018 11:12:48 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34BClSB020967;
 Wed, 4 Apr 2018 11:12:47 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34BClRM020965;
 Wed, 4 Apr 2018 11:12:47 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804041112.w34BClRM020965@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 11:12:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332008 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332008
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 11:12:48 -0000

Author: pho
Date: Wed Apr  4 11:12:47 2018
New Revision: 332008
URL: https://svnweb.freebsd.org/changeset/base/332008

Log:
  Added a test scenario to demonstrate a memory leak for threaded programs.
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/thr3.sh   (contents, props changed)

Added: user/pho/stress2/misc/thr3.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/thr3.sh	Wed Apr  4 11:12:47 2018	(r332008)
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2016 EMC Corp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+# Demonstrate VM leakage. Not seen on FreeBSD HEAD.
+
+. ../default.cfg
+
+here=`pwd`
+cd /tmp
+sed '1,/^EOF/d' < $here/$0 > thr3.c
+mycc -o thr3 -Wall -Wextra -O0 thr3.c -lpthread || exit 1
+rm -f thr3.c
+
+./thr3 &
+pid=$!
+
+log=/tmp/$0.$$
+trap "rm -f $log" EXIT INT
+r=`ps -Ovsz -p $pid | head -1`
+echo "        $r" > $log
+export max=0
+export n=0
+while true; do
+	sleep 30
+	vsz=`ps -Ovsz -p $pid | tail -1 | awk '{print $2}'`
+	[ -z "$vsz" -o "$vsz" = VSZ ] && break
+	if [ $vsz -gt $max ]; then
+		max=$vsz
+		r=`ps -Ovsz -p $pid | tail -1`
+		echo "`date '+%T'` $r"
+		n=$((n + 1))
+	fi
+done >> $log 2>&1
+[ $n -gt 1 ] && cat $log
+wait
+rm -f thr3
+[ $n -gt 1 ] && exit 1 || exit 0
+EOF
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#define NTHREADS 256
+#define RUNTIME (3 * 60)
+
+static void *
+thr_routine(void *arg __unused)
+{
+	getuid();
+	return (NULL);
+}
+
+int
+main(void)
+{
+	pthread_t threads[NTHREADS];
+	time_t start;
+	int i, r;
+
+	start = time(NULL);
+	while (time(NULL) - start < RUNTIME) {
+		for (i = 0; i < NTHREADS; i++)
+			if ((r = pthread_create(&threads[i], NULL,
+			    thr_routine, NULL)) != 0)
+				errc(1, r, "pthread_create()");
+
+		for (i = 0; i < NTHREADS; i++)
+			if ((r = pthread_join(threads[i], NULL)) != 0)
+				errc(1, r, "pthread_join(%d)", i);
+	}
+
+	return (0);
+}

From owner-svn-src-user@freebsd.org  Wed Apr  4 11:14:28 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FBFBF84C7D
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Wed,  4 Apr 2018 11:14:28 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id BC5F573BF9;
 Wed,  4 Apr 2018 11:14:27 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B517712F14;
 Wed,  4 Apr 2018 11:14:27 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34BERL7022196;
 Wed, 4 Apr 2018 11:14:27 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34BERPi022195;
 Wed, 4 Apr 2018 11:14:27 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804041114.w34BERPi022195@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Wed, 4 Apr 2018 11:14:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332009 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332009
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 11:14:28 -0000

Author: pho
Date: Wed Apr  4 11:14:27 2018
New Revision: 332009
URL: https://svnweb.freebsd.org/changeset/base/332009

Log:
  Added a regression test for: "Page fault seen in call from
  handle_workitem_freeblocks()".
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/snap11.sh   (contents, props changed)

Added: user/pho/stress2/misc/snap11.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/snap11.sh	Wed Apr  4 11:14:27 2018	(r332009)
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2017 Dell EMC Isilon
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+
+# Page fault seen in call from handle_workitem_freeblocks():
+# https://people.freebsd.org/~pho/stress/log/snap11.txt
+
+# Fixed by r321347-9.
+
+. ../default.cfg
+
+s=0
+log=/tmp/snap11.log
+mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint
+[ -c /dev/md$mdstart ] &&  mdconfig -d -u $mdstart
+mdconfig -a -t swap -s 2g -u $mdstart || exit 1
+bsdlabel -w md$mdstart auto
+newfs $newfs_flags md${mdstart}$part > /dev/null
+mount /dev/md${mdstart}$part $mntpoint
+
+export RUNDIR=$mntpoint/stressX
+export runRUNTIME=2m
+(cd ..; ./run.sh io.cfg) > /dev/null &
+
+while kill -0 $! 2>/dev/null; do
+	rm -f $mntpoint/.snap/stress2
+	mksnap_ffs $mntpoint $mntpoint/.snap/stress2 || continue
+
+	m2=$((mdstart + 1))
+	[ -c /dev/md$m2 ] && mdconfig -d -u $m2
+	mdconfig -a -t vnode -f $mntpoint/.snap/stress2 -u $m2 2>/dev/null
+	fsck -t ufs -y /dev/md$m2 2>&1 > $log 2>&1
+	egrep -v "WARNING|WRITE" $log | grep -q "[A-Z]" $log || { cat $log; s=1; }
+	mdconfig -d -u $m2
+done
+wait
+
+sleep 1
+tail -50 /var/log/messages | grep -m 1 "g_vfs_done():md5a" && s=1
+
+for i in `jot 6`; do
+	mount | grep -q "on $mntpoint " || break
+	umount $mntpoint && break || sleep 10
+done
+[ $i -eq 6 ] && exit 1
+fsck -t ufs -y /dev/md${mdstart}$part 2>&1 > $log 2>&1
+egrep -v "IS CLEAN" $log | grep -q "[A-Z]" $log || { cat $log; s=1; }
+mdconfig -d -u $mdstart
+rm -rf $log
+exit $s

From owner-svn-src-user@freebsd.org  Thu Apr  5 06:20:32 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82283F8E9EE
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Thu,  5 Apr 2018 06:20:32 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 389B66B97E;
 Thu,  5 Apr 2018 06:20:32 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 337C91EC9C;
 Thu,  5 Apr 2018 06:20:32 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w356KW04076668;
 Thu, 5 Apr 2018 06:20:32 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w356KVgc076651;
 Thu, 5 Apr 2018 06:20:31 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804050620.w356KVgc076651@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Thu, 5 Apr 2018 06:20:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332058 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332058
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Apr 2018 06:20:32 -0000

Author: pho
Date: Thu Apr  5 06:20:30 2018
New Revision: 332058
URL: https://svnweb.freebsd.org/changeset/base/332058

Log:
  Style fix. No functional change intended.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/sendfile.sh
  user/pho/stress2/misc/sendfile11.sh
  user/pho/stress2/misc/sendfile12.sh
  user/pho/stress2/misc/sendfile2.sh
  user/pho/stress2/misc/sendfile3.sh
  user/pho/stress2/misc/sendfile4.sh
  user/pho/stress2/misc/sendfile5.sh
  user/pho/stress2/misc/sendfile6.sh
  user/pho/stress2/misc/sendfile8.sh
  user/pho/stress2/misc/sendfile9.sh
  user/pho/stress2/misc/tmpfs7.sh

Modified: user/pho/stress2/misc/sendfile.sh
==============================================================================
--- user/pho/stress2/misc/sendfile.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -48,8 +48,7 @@ out=outputFile
 
 for i in 1 2 3 4 8 16 1k 2k 3k 4k 5k 1m 2m 3m 4m 5m ; do
 	rm -f $in $out
-	dd if=/dev/random of=$in bs=$i count=1 2>&1 | \
-		egrep -v "records|transferred"
+	dd if=/dev/random of=$in bs=$i count=1 status=none
 	/tmp/sendfile $in $out 12345
 	cmp $in $out || { echo FAIL; ls -l $in $out; }
 	rm -f $in $out

Modified: user/pho/stress2/misc/sendfile11.sh
==============================================================================
--- user/pho/stress2/misc/sendfile11.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile11.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -46,7 +46,7 @@ mount | grep $mntpoint | grep -q /dev/md && umount -f 
 [ -c /dev/md$mdstart ] &&  mdconfig -d -u $mdstart
 mdconfig -a -t swap -s 2g -u $mdstart
 
-dd if=/dev/random of=/tmp/geli.key bs=64 count=1 > /dev/null 2>&1
+dd if=/dev/random of=/tmp/geli.key bs=64 count=1 status=none
 echo test | geli init -s 8192 -J - -K /tmp/geli.key /dev/md$mdstart > /dev/null
 echo test | geli attach -j - -k /tmp/geli.key /dev/md$mdstart
 newfs $newfs_flags /dev/md$mdstart.eli > /dev/null
@@ -56,7 +56,7 @@ chmod 777 $mntpoint
 set +e
 
 cd $mntpoint
-dd if=/dev/zero of=file bs=1m count=512
+dd if=/dev/zero of=file bs=1m count=512 status=none
 (cd $odir/../testcases/swap; ./swap -t 5m -i 20 -h -l 100) &
 sleep 5
 /tmp/sendfile11 file output 12345; s=$?
@@ -223,7 +223,6 @@ main(int argc, char **argv)
 	if ((pid = fork()) == 0) {
 		writer();
 		exit(EXIT_SUCCESS);
-
 	} else if (pid > 0) {
 		reader();
 		kill(pid, SIGINT);

Modified: user/pho/stress2/misc/sendfile12.sh
==============================================================================
--- user/pho/stress2/misc/sendfile12.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile12.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -55,7 +55,7 @@ chmod 777 $mntpoint
 set +e
 
 cd $mntpoint
-dd if=/dev/zero of=file bs=1m count=512 2>&1 | egrep -v "records|transferred"
+dd if=/dev/zero of=file bs=1m count=512 status=none
 (cd $odir/../testcases/swap; ./swap -t 5m -i 20 -h -l 100) > /dev/null &
 sleep 5
 /tmp/sendfile12 file output 12345; s=$?
@@ -231,7 +231,6 @@ main(int argc, char **argv)
 	if ((pid = fork()) == 0) {
 		writer();
 		exit(EXIT_SUCCESS);
-
 	} else if (pid > 0) {
 		reader();
 		kill(pid, SIGINT);

Modified: user/pho/stress2/misc/sendfile2.sh
==============================================================================
--- user/pho/stress2/misc/sendfile2.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile2.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -43,8 +43,7 @@ rm -f sendfile2.c
 [ -d "$RUNDIR" ] || mkdir -p $RUNDIR
 cd $RUNDIR
 
-dd if=/dev/random of=large bs=1m count=3 2>&1 |
-    egrep -v "records|transferred"
+dd if=/dev/random of=large bs=1m count=3 status=none
 md1=`md5 large`
 
 nc -l 7000 > lf &

Modified: user/pho/stress2/misc/sendfile3.sh
==============================================================================
--- user/pho/stress2/misc/sendfile3.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile3.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -50,8 +50,7 @@ parallel=20
 
 for i in 50m 100m; do
 	rm -f $in
-	dd if=/dev/random of=$in bs=$i count=1 2>&1 | \
-		egrep -v "records|transferred"
+	dd if=/dev/random of=$in bs=$i count=1 status=none
 	for j in `jot $parallel`; do
 		rm -f ${out}$j
 		/tmp/sendfile3 $in ${out}$j 1234$j &
@@ -120,10 +119,10 @@ reader(void) {
 
 	t = 0;
 	if ((buf = malloc(bufsize)) == NULL)
-			err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__);
+		err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__);
 
 	if ((fd = open(outputFile, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1)
-			err(1, "open(%s)", outputFile);
+		err(1, "open(%s)", outputFile);
 
 	for (;;) {
 		if ((n = read(msgsock, buf, bufsize)) < 0)
@@ -203,7 +202,6 @@ main(int argc, char **argv)
 	if ((pid = fork()) == 0) {
 		writer();
 		exit(EXIT_SUCCESS);
-
 	} else if (pid > 0) {
 		reader();
 		kill(pid, SIGINT);

Modified: user/pho/stress2/misc/sendfile4.sh
==============================================================================
--- user/pho/stress2/misc/sendfile4.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile4.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -40,9 +40,7 @@ mycc -o sendfile4 -Wall -Wextra -O2 sendfile4.c || exi
 rm -f sendfile4.c
 cd $here
 
-dd if=/dev/zero of=$diskimage bs=1m count=6 2>&1 | \
-    egrep -v "records|transferred"
-
+dd if=/dev/zero of=$diskimage bs=1m count=6 status=none
 /tmp/sendfile4 $diskimage || echo FAIL
 
 rm -f /tmp/sendfile4 $diskimage

Modified: user/pho/stress2/misc/sendfile5.sh
==============================================================================
--- user/pho/stress2/misc/sendfile5.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile5.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -46,8 +46,7 @@ need=1024
 [ `df -k $(dirname $diskimage) | tail -1 | awk '{print int($4 / 1024)'}` \
     -lt $need ] &&
     printf "Need %d MB on %s.\n" $need `dirname $diskimage` && exit 0
-dd if=/dev/zero of=$diskimage bs=1m count=$need 2>&1 |
-    egrep -v "records|transferred"
+dd if=/dev/zero of=$diskimage bs=1m count=$need status=none
 cd $here
 
 mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint

Modified: user/pho/stress2/misc/sendfile6.sh
==============================================================================
--- user/pho/stress2/misc/sendfile6.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile6.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -242,7 +242,7 @@ bsdlabel -w md$mdstart auto
 newfs $newfs_flags md${mdstart}$part > /dev/null
 mount /dev/md${mdstart}$part $mntpoint
 
-dd if=/dev/random of=$mntpoint/data bs=123456 count=1 > /dev/null 2>&1
+dd if=/dev/random of=$mntpoint/data bs=123456 count=1 status=none
 ./sendfile6_server $mntpoint/data mysocket &
 sleep 0.2
 ./sendfile6_client mysocket > data.$$

Modified: user/pho/stress2/misc/sendfile8.sh
==============================================================================
--- user/pho/stress2/misc/sendfile8.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile8.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -51,7 +51,7 @@ newfs $newfs_flags md${mdstart}$part > /dev/null
 mount /dev/md${mdstart}$part $mntpoint
 
 cd $mntpoint
-dd if=/dev/random of=in bs=1m count=50  2>&1 | egrep -v "records|transferred"
+dd if=/dev/random of=in bs=1m count=50 status=none
 /tmp/sendfile8 in out 76543
 s=$?
 cd $odir

Modified: user/pho/stress2/misc/sendfile9.sh
==============================================================================
--- user/pho/stress2/misc/sendfile9.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/sendfile9.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -50,7 +50,7 @@ newfs $newfs_flags -n md${mdstart}$part > /dev/null
 mount /dev/md${mdstart}$part $mntpoint
 
 cd $mntpoint
-dd if=/dev/random of=in bs=1m count=50  2>&1 | egrep -v "records|transferred"
+dd if=/dev/random of=in bs=1m count=50 status=none
 /tmp/sendfile9 in out 76543
 s=$?
 cd $odir

Modified: user/pho/stress2/misc/tmpfs7.sh
==============================================================================
--- user/pho/stress2/misc/tmpfs7.sh	Thu Apr  5 03:26:42 2018	(r332057)
+++ user/pho/stress2/misc/tmpfs7.sh	Thu Apr  5 06:20:30 2018	(r332058)
@@ -237,7 +237,7 @@ rm -f server.c client.c util.c util.o util.h mysocket
 mount | grep "$mntpoint" | grep -q tmpfs && umount $mntpoint
 mount -t tmpfs tmpfs  $mntpoint
 
-dd if=/dev/random of=$mntpoint/data bs=123456 count=1 > /dev/null 2>&1
+dd if=/dev/random of=$mntpoint/data bs=123456 count=1 status=none
 ./server $mntpoint/data mysocket &
 sleep 0.2
 ./client mysocket > data.$$

From owner-svn-src-user@freebsd.org  Thu Apr  5 06:21:52 2018
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46F35F8EC3D
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Thu,  5 Apr 2018 06:21:52 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id EBDA46BB51;
 Thu,  5 Apr 2018 06:21:51 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E655B1EDF7;
 Thu,  5 Apr 2018 06:21:51 +0000 (UTC) (envelope-from pho@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w356LpfY077811;
 Thu, 5 Apr 2018 06:21:51 GMT (envelope-from pho@FreeBSD.org)
Received: (from pho@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w356Lpvq077810;
 Thu, 5 Apr 2018 06:21:51 GMT (envelope-from pho@FreeBSD.org)
Message-Id: <201804050621.w356Lpvq077810@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org
 using -f
From: Peter Holm <pho@FreeBSD.org>
Date: Thu, 5 Apr 2018 06:21:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r332059 - user/pho/stress2/misc
X-SVN-Group: user
X-SVN-Commit-Author: pho
X-SVN-Commit-Paths: user/pho/stress2/misc
X-SVN-Commit-Revision: 332059
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Apr 2018 06:21:52 -0000

Author: pho
Date: Thu Apr  5 06:21:51 2018
New Revision: 332059
URL: https://svnweb.freebsd.org/changeset/base/332059

Log:
  Added a regression test for gpart page fault seen.
  
  Sponsored by:	Dell EMC Isilon

Added:
  user/pho/stress2/misc/sendfile13.sh   (contents, props changed)

Added: user/pho/stress2/misc/sendfile13.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/pho/stress2/misc/sendfile13.sh	Thu Apr  5 06:21:51 2018	(r332059)
@@ -0,0 +1,359 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2018 Dell EMC Isilon
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# Move files between two FSs using sendfile(2).
+# CG checksum errors reported.
+
+# Unrelated gpart page fault seen:
+# https://people.freebsd.org/~pho/stress/log/sendfile13.txt
+# Fixed by r329262
+
+. ../default.cfg
+[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1
+
+dir=/tmp
+odir=`pwd`
+cd $dir
+sed '1,/^EOF/d' < $odir/$0 > $dir/sendfile13.c
+mycc -o sendfile13 -Wall -Wextra -O0 -g sendfile13.c || exit 1
+rm -f sendfile13.c
+cd $odir
+
+set -e
+size="$((`sysctl -n hw.usermem` / 2 / 1024 / 1024 / 1024))"
+size="$((size * 8 / 10))g"
+[ "$size" = "0g" ] && exit 0
+[ "$newfs_flags" = "-U" ] || exit 0
+newfs_flags="-j"
+
+mp1=$mntpoint
+mkdir -p $mp1
+md1=$mdstart
+mount | grep "on $mp1 " | grep -q /dev/md && umount -f $mp1
+[ -c /dev/md$md1 ] &&  mdconfig -d -u $md1
+mdconfig -a -t swap -s $size -u $md1
+bsdlabel -w md$md1 auto
+newfs $newfs_flags -n md${md1}$part > /dev/null 2>&1
+mount /dev/md${md1}$part $mp1
+
+mp2=${mntpoint}2
+mkdir -p $mp2
+md2=$((mdstart + 1))
+mount | grep "on $mp2 " | grep -q /dev/md && umount -f $mp2
+[ -c /dev/md$md2 ] &&  mdconfig -d -u $md2
+mdconfig -a -t swap -s $size -u $md2
+bsdlabel -w md$md2 auto
+newfs $newfs_flags -n md${md2}$part > /dev/null 2>&1
+mount /dev/md${md2}$part $mp2
+set +e
+
+free=`df $mp1 | tail -1 | awk '{print $4}'`
+$dir/sendfile13 5432 $mp1 $mp2 $((free * 8 / 10)) &
+$dir/sendfile13 5433 $mp2 $mp1 $((free * 8 / 10)) &
+cd $odir
+while [ ! -f $mp1/done ]; do
+	sleep 1
+done
+s=0
+wait
+[ -f sendfile13.core -a $s -eq 0 ] &&
+    { ls -l sendfile13.core; mv sendfile13.core /tmp; s=1; }
+cd $odir
+
+for i in `jot 6`; do
+	mount | grep -q "on $mp1 " || break
+	umount $mp1 && break || sleep 10
+	[ $i -eq 6 ] &&
+	    { echo FATAL; fstat -mf $mp1; exit 1; }
+done
+checkfs /dev/md${md1}$part || s=1
+mdconfig -d -u $md1 || s=1
+
+for i in `jot 6`; do
+	mount | grep -q "on $mp2 " || break
+	umount $mp2 && break || sleep 10
+	[ $i -eq 6 ] &&
+	    { echo FATAL; fstat -mf $mp2; exit 1; }
+done
+checkfs /dev/md${md2}$part || s=1
+
+rm -rf $dir/sendfile13
+exit $s
+
+EOF
+#include <sys/param.h>
+#include <sys/mman.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <netinet/in.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#define BUFSIZE 8192
+#define MAXTHREADS 32
+
+static int files, port;
+static char *fromdir, *todir;
+
+static void
+create(char *path, size_t size)
+{
+	size_t s;
+	int fd, i, ifd;
+	char *cp, file[128], help[128];
+
+	i = 0;
+	while (size > 0) {
+		do {
+			s =arc4random() % size + 1;
+		} while (s > 1024 * 1024 * 1024);
+		size -= s;
+		sprintf(file, "%s/f%06d.%06d", path, getpid(), i++);
+		if ((ifd = open("/dev/zero", O_RDONLY)) == -1)
+			err(1, "open(/dev/zero)");
+		if ((cp = mmap(0, s, PROT_READ, MAP_SHARED, ifd, 0)) ==
+			(caddr_t) - 1)
+			err(1, "mmap error for input");
+		if ((fd = open(file, O_WRONLY | O_CREAT, 0640)) == -1)
+			err(1, "create(%s)", file);
+		if (write(fd, cp, s) != (ssize_t)s)
+			err(1, "write(%s)", file);
+		munmap(cp, s);
+		close(fd);
+		close(ifd);
+		files++;
+	}
+	if ((fd = open("done", O_WRONLY | O_CREAT, 0640)) == -1)
+		err(1, "create(%s)", file);
+	close(fd);
+	snprintf(help, sizeof(help),
+	    "umount %s 2>&1 | grep -v 'Device busy'", path);
+	system(help);
+#if defined(DEBUG)
+	fprintf(stderr, "%d files created\n", files);
+#endif
+}
+
+static void
+server(void)
+{
+	pid_t pid;
+        struct sigaction sa;
+	struct sockaddr_in inetaddr, inetpeer;
+	socklen_t len;
+	int tcpsock, msgsock;
+	int *buf, fd, idx, n, on, t;
+	char ofile[128], nfile[128];
+
+        sa.sa_handler = SIG_IGN;
+        sigemptyset(&sa.sa_mask);
+        sa.sa_flags = 0;
+        if (sigaction(SIGCHLD, &sa, 0) == -1)
+                err(1, "sigaction");
+
+	on = 1;
+	if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+		err(1, "socket(), %s:%d", __FILE__, __LINE__);
+
+	if (setsockopt(tcpsock,
+	    SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0)
+		err(1, "setsockopt(), %s:%d", __FILE__, __LINE__);
+
+	inetaddr.sin_family = AF_INET;
+	inetaddr.sin_addr.s_addr = INADDR_ANY;
+	inetaddr.sin_port = htons(port);
+	inetaddr.sin_len = sizeof(inetaddr);
+
+	if (bind(tcpsock,
+	    (struct sockaddr *)&inetaddr, sizeof (inetaddr)) < 0)
+		err(1, "bind(), %s:%d", __FILE__, __LINE__);
+
+	if (listen(tcpsock, 5) < 0)
+		err(1, "listen(), %s:%d", __FILE__, __LINE__);
+
+	idx = 0;
+	len = sizeof(inetpeer);
+	for (;;) {
+		if ((msgsock = accept(tcpsock,
+		    (struct sockaddr *)&inetpeer, &len)) < 0)
+			err(1, "accept(), %s:%d", __FILE__, __LINE__);
+
+		if ((pid = fork()) == 0) {
+			t = 0;
+			if ((buf = malloc(BUFSIZE)) == NULL)
+				err(1, "malloc(%d), %s:%d", BUFSIZE,
+				    __FILE__, __LINE__);
+
+			sprintf(ofile, "%s/g%06d.%06d", todir, getpid(),
+			    idx);
+			sprintf(nfile, "%s/n%06d.%06d", todir, getpid(),
+			    idx);
+			if ((fd = open(ofile, O_RDWR | O_CREAT | O_TRUNC,
+			    0640)) == -1)
+				err(1, "open(%s)", ofile);
+
+			for (;;) {
+				if ((n = read(msgsock, buf, BUFSIZE)) < 0)
+					err(1, "read(), %s:%d", __FILE__,
+					    __LINE__);
+				t += n;
+				if (n == 0) break;
+
+				if ((write(fd, buf, n)) != n)
+					err(1, "write");
+			}
+			close(msgsock);
+			close(fd);
+			if (rename(ofile, nfile) != 0)
+				err(1, "rename(%s, %s)", ofile, nfile);
+			_exit(0);
+		}
+		close(msgsock);
+		if (++idx == files)
+			break;
+	}
+
+	_exit(0);
+}
+
+static void
+writer(char *inputFile) {
+	struct sockaddr_in inetaddr;
+	struct hostent *hostent;
+	struct stat statb;
+	off_t off = 0;
+	size_t size;
+	int i, fd, on, r, tcpsock;
+
+	on = 1;
+	for (i = 1; i < 5; i++) {
+		if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+			err(1, "socket(), %s:%d", __FILE__, __LINE__);
+
+		if (setsockopt(tcpsock,
+		    SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0)
+			err(1, "setsockopt(), %s:%d", __FILE__, __LINE__);
+
+		size = getpagesize();
+		if (setsockopt(tcpsock,
+		    SOL_SOCKET, SO_SNDBUF, (void *)&size, sizeof(size)) < 0)
+			err(1, "setsockopt(SO_SNDBUF), %s:%d", __FILE__,
+			    __LINE__);
+
+		hostent = gethostbyname ("localhost");
+		memcpy (&inetaddr.sin_addr.s_addr, hostent->h_addr,
+			sizeof (struct in_addr));
+
+		inetaddr.sin_family = AF_INET;
+		inetaddr.sin_addr.s_addr = INADDR_ANY;
+		inetaddr.sin_port = htons(port);
+		inetaddr.sin_len = sizeof(inetaddr);
+
+		r = connect(tcpsock, (struct sockaddr *) &inetaddr,
+			sizeof(inetaddr));
+		if (r == 0)
+			break;
+		sleep(1);
+		close(tcpsock);
+	}
+	if (r < 0)
+		err(1, "connect(), %s:%d", __FILE__, __LINE__);
+
+        if (stat(inputFile, &statb) != 0)
+                err(1, "stat(%s)", inputFile);
+
+	if ((fd = open(inputFile, O_RDWR)) == -1)
+		err(1, "open(%s)", inputFile);
+
+	if (sendfile(fd, tcpsock, 0, statb.st_size, NULL, &off,
+	    SF_NOCACHE) == -1)
+		err(1, "sendfile");
+	close(fd);
+
+	return;
+}
+
+static void
+move(int num)
+{
+	char ifile[128];
+
+	sprintf(ifile, "%s/f%06d.%06d", fromdir, getpid(), num);
+	writer(ifile);
+
+	if (unlink(ifile) != 0)
+		err(1, "unlink(%s)", ifile);
+}
+
+int
+main(int argc, char *argv[])
+{
+	pid_t spid;
+	size_t size;
+	int e, i;
+
+	if (argc != 5) {
+		fprintf(stderr,
+		    "Usage %s <port> <from dir> <to dir> <size in k>",
+		    argv[0]);
+		exit(1);
+	}
+	port = atoi(argv[1]);
+	fromdir = argv[2];
+	if (chdir(fromdir) == -1)
+		err(1, "chdir(%s)", fromdir);
+	todir = argv[3];
+	e = 0;
+	sscanf(argv[4], "%zd", &size);
+	size = size * 1024;
+	create(fromdir, size);
+
+	if ((spid = fork()) == 0)
+		server();
+
+	for (i = 0; i < files; i++) {
+		move(i);
+		sleep(10);
+	}
+	if (waitpid(spid, NULL, 0) != spid)
+		err(1, "waitpid");
+
+	return (e);
+}