From owner-svn-src-user@FreeBSD.ORG  Sun Nov 29 21:29:26 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 680B31065670;
	Sun, 29 Nov 2009 21:29:26 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F25EA8FC13;
	Sun, 29 Nov 2009 21:29:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATLTPME010118;
	Sun, 29 Nov 2009 21:29:25 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATLTPR4010115;
	Sun, 29 Nov 2009 21:29:25 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200911292129.nATLTPR4010115@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Sun, 29 Nov 2009 21:29:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199951 - in user/kmacy/releng_8_fcs_buf_xen/sys:
	i386/i386 sys
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Nov 2009 21:29:26 -0000

Author: kmacy
Date: Sun Nov 29 21:29:25 2009
New Revision: 199951
URL: http://svn.freebsd.org/changeset/base/199951

Log:
  add ability to handle minimum segment size in busdma to cope with highly defective
  devices (virtual or otherwise)

Modified:
  user/kmacy/releng_8_fcs_buf_xen/sys/i386/i386/busdma_machdep.c
  user/kmacy/releng_8_fcs_buf_xen/sys/sys/bus_dma.h

Modified: user/kmacy/releng_8_fcs_buf_xen/sys/i386/i386/busdma_machdep.c
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/sys/i386/i386/busdma_machdep.c	Sun Nov 29 21:03:54 2009	(r199950)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/i386/i386/busdma_machdep.c	Sun Nov 29 21:29:25 2009	(r199951)
@@ -62,6 +62,7 @@ struct bounce_zone;
 struct bus_dma_tag {
 	bus_dma_tag_t	  parent;
 	bus_size_t	  alignment;
+	bus_size_t	  minsegsz;
 	bus_size_t	  boundary;
 	bus_addr_t	  lowaddr;
 	bus_addr_t	  highaddr;
@@ -212,6 +213,16 @@ dflt_lock(void *arg, bus_dma_lock_op_t o
 	panic("driver error: busdma dflt_lock called");
 }
 
+int
+bus_dma_tag_set(bus_dma_tag_t dmat, int op, bus_size_t arg)
+{
+	if (op != BUS_DMA_SET_MINSEGSZ)
+		return (EINVAL);
+
+	dmat->minsegsz = arg;
+	return (0);
+}
+
 /*
  * Allocate a device specific dma_tag.
  */
@@ -698,6 +709,11 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 				sgsize = (baddr - curaddr);
 		}
 
+		if ((dmat->minsegsz > 0) &&
+		    (sgsize % dmat->minsegsz))
+			sgsize -= (sgsize % dmat->minsegsz-1);
+		
+
 		if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
 		    map->pagesneeded != 0 && run_filter(dmat, curaddr))
 			curaddr = add_bounce_page(dmat, map, vaddr, sgsize);

Modified: user/kmacy/releng_8_fcs_buf_xen/sys/sys/bus_dma.h
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/sys/sys/bus_dma.h	Sun Nov 29 21:03:54 2009	(r199950)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/sys/bus_dma.h	Sun Nov 29 21:29:25 2009	(r199951)
@@ -82,6 +82,9 @@
  *     (yet) be included directly.
  */
 
+
+#define	BUS_DMA_SET_MINSEGSZ	3
+
 /*
  * Flags used in various bus DMA methods.
  */
@@ -175,6 +178,8 @@ int bus_dma_tag_create(bus_dma_tag_t par
 		       bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
 		       void *lockfuncarg, bus_dma_tag_t *dmat);
 
+int bus_dma_tag_set(bus_dma_tag_t dmat, int op, bus_size_t arg);
+
 int bus_dma_tag_destroy(bus_dma_tag_t dmat);
 
 /*

From owner-svn-src-user@FreeBSD.ORG  Sun Nov 29 21:34:52 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF0421065693;
	Sun, 29 Nov 2009 21:34:52 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 957958FC17;
	Sun, 29 Nov 2009 21:34:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATLYqSH010268;
	Sun, 29 Nov 2009 21:34:52 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATLYqWe010267;
	Sun, 29 Nov 2009 21:34:52 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200911292134.nATLYqWe010267@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Sun, 29 Nov 2009 21:34:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199952 - user/kmacy/head_zlib
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Nov 2009 21:34:52 -0000

Author: kmacy
Date: Sun Nov 29 21:34:52 2009
New Revision: 199952
URL: http://svn.freebsd.org/changeset/base/199952

Log:
  create branch for merging multiple zlib instances

Added:
     - copied from r199951, head/
Directory Properties:
  user/kmacy/head_zlib/   (props changed)

From owner-svn-src-user@FreeBSD.ORG  Sun Nov 29 22:43:52 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 922E31065672;
	Sun, 29 Nov 2009 22:43:52 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7D36F8FC1F;
	Sun, 29 Nov 2009 22:43:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nATMhqtA011767;
	Sun, 29 Nov 2009 22:43:52 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nATMhqBT011744;
	Sun, 29 Nov 2009 22:43:52 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200911292243.nATMhqBT011744@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Sun, 29 Nov 2009 22:43:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199954 - in user/kmacy/head_zlib/sys:
	cddl/contrib/opensolaris/uts/common/zmod conf dev/mxge
	geom/uzip kern libkern/zlib modules/crypto modules/netgraph
	modules/zfs modules/zlib net ne...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Nov 2009 22:43:52 -0000

Author: kmacy
Date: Sun Nov 29 22:43:51 2009
New Revision: 199954
URL: http://svn.freebsd.org/changeset/base/199954

Log:
  - update zlib to 1.2.3
  - move files in to libkern
  - point all of the kernel at updated zlib
  
  - bz needs to integrate his ng_deflate fixes (currently disabled in the build)
  - zfs needs to now be marked as depending on zlib (add MODULE_DEPEND to zmod.c)

Added:
  user/kmacy/head_zlib/sys/libkern/zlib/
     - copied from r193049, user/kmacy/releng_7_2_fcs/sys/libkern/zlib/
  user/kmacy/head_zlib/sys/opencrypto/opencrypto_deflate.c
     - copied, changed from r199952, user/kmacy/head_zlib/sys/opencrypto/deflate.c
Deleted:
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/adler32.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/deflate.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/inffast.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/inflate.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/inftrees.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/opensolaris_crc32.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/trees.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/zutil.c
  user/kmacy/head_zlib/sys/kern/inflate.c
  user/kmacy/head_zlib/sys/net/zlib.c
  user/kmacy/head_zlib/sys/net/zlib.h
  user/kmacy/head_zlib/sys/opencrypto/deflate.c
Modified:
  user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/zmod.c
  user/kmacy/head_zlib/sys/conf/NOTES
  user/kmacy/head_zlib/sys/conf/files
  user/kmacy/head_zlib/sys/dev/mxge/if_mxge.c
  user/kmacy/head_zlib/sys/geom/uzip/g_uzip.c
  user/kmacy/head_zlib/sys/kern/link_elf.c
  user/kmacy/head_zlib/sys/kern/link_elf_obj.c
  user/kmacy/head_zlib/sys/libkern/zlib/deflate.c
  user/kmacy/head_zlib/sys/libkern/zlib/inflate.c
  user/kmacy/head_zlib/sys/libkern/zlib/trees.c
  user/kmacy/head_zlib/sys/libkern/zlib/uncompr.c
  user/kmacy/head_zlib/sys/libkern/zlib/zl_crc32.c
  user/kmacy/head_zlib/sys/libkern/zlib/zlib.h
  user/kmacy/head_zlib/sys/libkern/zlib/zutil.c
  user/kmacy/head_zlib/sys/libkern/zlib/zutil.h
  user/kmacy/head_zlib/sys/modules/crypto/Makefile
  user/kmacy/head_zlib/sys/modules/netgraph/Makefile
  user/kmacy/head_zlib/sys/modules/zfs/Makefile
  user/kmacy/head_zlib/sys/modules/zlib/Makefile
  user/kmacy/head_zlib/sys/netgraph/ng_deflate.c
  user/kmacy/head_zlib/sys/opencrypto/deflate.h

Modified: user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/zmod.c
==============================================================================
--- user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/zmod.c	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/cddl/contrib/opensolaris/uts/common/zmod/zmod.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -30,41 +30,6 @@
 #include "zlib.h"
 #include "zutil.h"
 
-/*
- * Uncompress the buffer 'src' into the buffer 'dst'.  The caller must store
- * the expected decompressed data size externally so it can be passed in.
- * The resulting decompressed size is then returned through dstlen.  This
- * function return Z_OK on success, or another error code on failure.
- */
-int
-z_uncompress(void *dst, size_t *dstlen, const void *src, size_t srclen)
-{
-	z_stream zs;
-	int err;
-
-	bzero(&zs, sizeof (zs));
-	zs.next_in = (uchar_t *)src;
-	zs.avail_in = srclen;
-	zs.next_out = dst;
-	zs.avail_out = *dstlen;
-
-	/*
-	 * Call inflateInit2() specifying a window size of DEF_WBITS
-	 * with the 6th bit set to indicate that the compression format
-	 * type (zlib or gzip) should be automatically detected.
-	 */
-	if ((err = inflateInit2(&zs, DEF_WBITS | 0x20)) != Z_OK)
-		return (err);
-
-	if ((err = inflate(&zs, Z_FINISH)) != Z_STREAM_END) {
-		(void) inflateEnd(&zs);
-		return (err == Z_OK ? Z_BUF_ERROR : err);
-	}
-
-	*dstlen = zs.total_out;
-	return (inflateEnd(&zs));
-}
-
 int
 z_compress_level(void *dst, size_t *dstlen, const void *src, size_t srclen,
     int level)
@@ -91,13 +56,6 @@ z_compress_level(void *dst, size_t *dstl
 	return (deflateEnd(&zs));
 }
 
-int
-z_compress(void *dst, size_t *dstlen, const void *src, size_t srclen)
-{
-	return (z_compress_level(dst, dstlen, src, srclen,
-	    Z_DEFAULT_COMPRESSION));
-}
-
 /*
  * Convert a zlib error code into a string error message.
  */

Modified: user/kmacy/head_zlib/sys/conf/NOTES
==============================================================================
--- user/kmacy/head_zlib/sys/conf/NOTES	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/conf/NOTES	Sun Nov 29 22:43:51 2009	(r199954)
@@ -670,7 +670,7 @@ options 	NETGRAPH_BPF
 options 	NETGRAPH_BRIDGE
 options 	NETGRAPH_CAR
 options 	NETGRAPH_CISCO
-options 	NETGRAPH_DEFLATE
+#options 	NETGRAPH_DEFLATE
 options 	NETGRAPH_DEVICE
 options 	NETGRAPH_ECHO
 options 	NETGRAPH_EIFACE

Modified: user/kmacy/head_zlib/sys/conf/files
==============================================================================
--- user/kmacy/head_zlib/sys/conf/files	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/conf/files	Sun Nov 29 22:43:51 2009	(r199954)
@@ -1964,7 +1964,6 @@ kern/cpufreq_if.m		standard
 kern/device_if.m		standard
 kern/imgact_elf.c		standard
 kern/imgact_shell.c		standard
-kern/inflate.c			optional gzip
 kern/init_main.c		standard
 kern/init_sysent.c		standard
 kern/ksched.c			optional _kposix_priority_scheduling
@@ -2272,10 +2271,36 @@ net/route.c			standard
 net/rtsock.c			standard
 net/slcompress.c		optional netgraph_vjc | sppp | \
 					 netgraph_sppp
-net/vnet.c			optional vimage
-net/zlib.c			optional crypto | geom_uzip | ipsec | \
-					 mxge | netgraph_deflate | \
-					 ddb_ctf
+libkern/zlib/adler32.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/compress.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/deflate.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/inflate.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/inffast.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip
+libkern/zlib/inftrees.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip
+libkern/zlib/trees.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/uncompr.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/zutil.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
+libkern/zlib/zl_crc32.c		optional zfs | crypto | geom_uzip | ipsec | \
+					 mxge | ppp_deflate | \
+					 netgraph_deflate | ddb_ctf | gzip	
 net80211/ieee80211.c		optional wlan
 net80211/ieee80211_acl.c	optional wlan wlan_acl
 net80211/ieee80211_action.c	optional wlan
@@ -2569,7 +2594,7 @@ opencrypto/crypto.c		optional crypto
 opencrypto/cryptodev.c		optional cryptodev
 opencrypto/cryptodev_if.m	optional crypto
 opencrypto/cryptosoft.c		optional crypto
-opencrypto/deflate.c		optional crypto
+opencrypto/opencrypto_deflate.c	optional crypto
 opencrypto/rmd160.c		optional crypto | ipsec
 opencrypto/skipjack.c		optional crypto
 opencrypto/xform.c		optional crypto

Modified: user/kmacy/head_zlib/sys/dev/mxge/if_mxge.c
==============================================================================
--- user/kmacy/head_zlib/sys/dev/mxge/if_mxge.c	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/dev/mxge/if_mxge.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
 
 #include <net/if_types.h>
 #include <net/if_vlan_var.h>
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 
 #include <netinet/in_systm.h>
 #include <netinet/in.h>

Modified: user/kmacy/head_zlib/sys/geom/uzip/g_uzip.c
==============================================================================
--- user/kmacy/head_zlib/sys/geom/uzip/g_uzip.c	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/geom/uzip/g_uzip.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 
 #include <geom/geom.h>
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 
 #undef GEOM_UZIP_DEBUG
 #ifdef GEOM_UZIP_DEBUG

Modified: user/kmacy/head_zlib/sys/kern/link_elf.c
==============================================================================
--- user/kmacy/head_zlib/sys/kern/link_elf.c	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/kern/link_elf.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/link_elf.h>
 
 #ifdef DDB_CTF
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 #endif
 
 #include "linker_if.h"

Modified: user/kmacy/head_zlib/sys/kern/link_elf_obj.c
==============================================================================
--- user/kmacy/head_zlib/sys/kern/link_elf_obj.c	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/kern/link_elf_obj.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/link_elf.h>
 
 #ifdef DDB_CTF
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 #endif
 
 #include "linker_if.h"

Modified: user/kmacy/head_zlib/sys/libkern/zlib/deflate.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/deflate.c	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/deflate.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -93,10 +93,12 @@ local uInt longest_match  OF((deflate_st
 #endif
 local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
 
+#if 0
 #ifdef DEBUG
 local  void check_match OF((deflate_state *s, IPos start, IPos match,
                             int length));
 #endif
+#endif
 
 /* ===========================================================================
  * Local data
@@ -297,7 +299,7 @@ int ZEXPORT deflateInit2_(strm, level, m
     if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
         s->pending_buf == Z_NULL) {
         s->status = FINISH_STATE;
-        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+        strm->msg = __DECONST(char*, ERR_MSG(Z_MEM_ERROR));
         deflateEnd (strm);
         return Z_MEM_ERROR;
     }
@@ -1225,7 +1227,7 @@ local uInt longest_match_fast(s, cur_mat
     return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
 }
 
-#ifdef DEBUG
+#if 0
 /* ===========================================================================
  * Check that the match at match_start is indeed a match.
  */

Modified: user/kmacy/head_zlib/sys/libkern/zlib/inflate.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/inflate.c	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/inflate.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -245,7 +245,7 @@ struct inflate_state FAR *state;
     state->distbits = 5;
 }
 
-#ifdef MAKEFIXED
+#if 0
 #include <stdio.h>
 
 /*

Modified: user/kmacy/head_zlib/sys/libkern/zlib/trees.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/trees.c	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/trees.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -35,9 +35,6 @@
 
 #include <libkern/zlib/deflate.h>
 
-#ifdef DEBUG
-#  include <ctype.h>
-#endif
 
 /* ===========================================================================
  * Constants
@@ -163,7 +160,7 @@ local void copy_block     OF((deflate_st
 local void gen_trees_header OF((void));
 #endif
 
-#ifndef DEBUG
+#if 1
 #  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
    /* Send a code of the given tree. c and tree must not have side effects */
 
@@ -318,7 +315,7 @@ local void tr_static_init()
 /* ===========================================================================
  * Genererate the file trees.h describing the static trees.
  */
-#ifdef GEN_TREES_H
+#if 0
 #  ifndef DEBUG
 #    include <stdio.h>
 #  endif
@@ -986,7 +983,8 @@ void _tr_flush_block(s, buf, stored_len,
     } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
 #endif
         send_bits(s, (STATIC_TREES<<1)+eof, 3);
-        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+        compress_block(s, __DECONST(ct_data *,static_ltree),
+	    __DECONST(ct_data *,static_dtree));
 #ifdef DEBUG
         s->compressed_len += 3 + s->static_len;
 #endif

Modified: user/kmacy/head_zlib/sys/libkern/zlib/uncompr.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/uncompr.c	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/uncompr.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -32,7 +32,7 @@ int ZEXPORT uncompress (dest, destLen, s
     z_stream stream;
     int err;
 
-    stream.next_in = (Bytef*)source;
+    stream.next_in = (Bytef*)(uintptr_t)source;
     stream.avail_in = (uInt)sourceLen;
     /* Check for source > 64K on 16-bit machine: */
     if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;

Modified: user/kmacy/head_zlib/sys/libkern/zlib/zl_crc32.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/zl_crc32.c	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/zl_crc32.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -22,7 +22,7 @@
   one thread to use crc32().
  */
 
-#ifdef MAKECRCH
+#if 0
 #  include <stdio.h>
 #  ifndef DYNAMIC_CRC_TABLE
 #    define DYNAMIC_CRC_TABLE

Modified: user/kmacy/head_zlib/sys/libkern/zlib/zlib.h
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/zlib.h	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/zlib.h	Sun Nov 29 22:43:51 2009	(r199954)
@@ -30,7 +30,7 @@
 
 #ifndef ZLIB_H
 #define ZLIB_H
-
+#include <sys/types.h>
 #include <libkern/zlib/zconf.h>
 
 #ifdef __cplusplus

Modified: user/kmacy/head_zlib/sys/libkern/zlib/zutil.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/zutil.c	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/zutil.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -5,8 +5,20 @@
 
 /* @(#) $Id$ */
 
+
+#ifdef _KERNEL
 #include <libkern/zlib/zutil.h>
 
+/* Assume this is a *BSD or SVR4 kernel */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/systm.h>
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#  define HAVE_MEMCPY
+#endif
+
 #ifndef NO_DUMMY_DECL
 struct internal_state      {int dummy;}; /* for buggy compilers */
 #endif
@@ -112,7 +124,7 @@ uLong ZEXPORT zlibCompileFlags()
     return flags;
 }
 
-#ifdef DEBUG
+#if 0
 
 #  ifndef verbose
 #    define verbose 0
@@ -334,3 +346,25 @@ zcfree(void *opaque, void *ptr)
 
 
 #endif /* MY_ZCALLOC */
+
+#ifdef _KERNEL
+static int
+zlib_modevent(module_t mod, int type, void *unused)
+{
+	switch (type) {
+	case MOD_LOAD:
+		return 0;
+	case MOD_UNLOAD:
+		return 0;
+	}
+	return EINVAL;
+}
+
+static moduledata_t zlib_mod = {
+	"zlib",
+	zlib_modevent,
+	0
+};
+DECLARE_MODULE(zlib, zlib_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
+MODULE_VERSION(zlib, 1);
+#endif /* _KERNEL */

Modified: user/kmacy/head_zlib/sys/libkern/zlib/zutil.h
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/libkern/zlib/zutil.h	Fri May 29 19:06:02 2009	(r193049)
+++ user/kmacy/head_zlib/sys/libkern/zlib/zutil.h	Sun Nov 29 22:43:51 2009	(r199954)
@@ -61,7 +61,7 @@ extern const char * const z_errmsg[10]; 
 #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
 
 #define ERR_RETURN(strm,err) \
-  return (strm->msg = (char*)ERR_MSG(err), (err))
+	return (strm->msg = (char*)(uintptr_t)ERR_MSG(err), (err))
 /* To be used only when the state is known to be valid */
 
         /* common constants */
@@ -243,7 +243,7 @@ extern const char * const z_errmsg[10]; 
 #endif
 
 /* Diagnostic functions */
-#ifdef DEBUG
+#if 0
 #  include <stdio.h>
    extern int z_verbose;
    extern void z_error    OF((char *m));

Modified: user/kmacy/head_zlib/sys/modules/crypto/Makefile
==============================================================================
--- user/kmacy/head_zlib/sys/modules/crypto/Makefile	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/modules/crypto/Makefile	Sun Nov 29 22:43:51 2009	(r199954)
@@ -11,8 +11,8 @@
 KMOD	= crypto
 SRCS	= crypto.c cryptodev_if.c
 SRCS	+= criov.c cryptosoft.c xform.c
-SRCS	+= cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c
-SRCS	+= skipjack.c bf_enc.c bf_skey.c
+SRCS	+= cast.c opencrypto_deflate.c rmd160.c rijndael-alg-fst.c 
+SRCS	+= rijndael-api.c skipjack.c bf_enc.c bf_skey.c
 SRCS	+= des_ecb.c des_enc.c des_setkey.c
 SRCS	+= sha1.c sha2.c
 SRCS	+= opt_param.h cryptodev_if.h bus_if.h device_if.h

Modified: user/kmacy/head_zlib/sys/modules/netgraph/Makefile
==============================================================================
--- user/kmacy/head_zlib/sys/modules/netgraph/Makefile	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/modules/netgraph/Makefile	Sun Nov 29 22:43:51 2009	(r199954)
@@ -11,7 +11,6 @@ SUBDIR=	async \
 	bridge \
 	car \
 	cisco \
-	deflate \
 	device \
 	echo \
 	eiface \
@@ -53,6 +52,9 @@ SUBDIR=	async \
 	vjc \
 	vlan
 
+#	deflate \
+	
+
 .if ${MK_BLUETOOTH} != "no" || defined(ALL_MODULES)
 _bluetooth=	bluetooth
 .endif

Modified: user/kmacy/head_zlib/sys/modules/zfs/Makefile
==============================================================================
--- user/kmacy/head_zlib/sys/modules/zfs/Makefile	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/modules/zfs/Makefile	Sun Nov 29 22:43:51 2009	(r199954)
@@ -45,16 +45,7 @@ SRCS+=	list.c
 SRCS+=	nvpair_alloc_system.c
 
 .PATH:	${SUNW}/uts/common/zmod
-SRCS+=	adler32.c
-SRCS+=	opensolaris_crc32.c
-SRCS+=	deflate.c
-SRCS+=	inffast.c
-SRCS+=	inflate.c
-SRCS+=	inftrees.c
-SRCS+=	trees.c
 SRCS+=	zmod.c
-SRCS+=	zmod_subr.c
-SRCS+=	zutil.c
 
 .PATH:	${SUNW}/common/zfs
 .include "${SUNW}/uts/common/Makefile.files"

Modified: user/kmacy/head_zlib/sys/modules/zlib/Makefile
==============================================================================
--- user/kmacy/head_zlib/sys/modules/zlib/Makefile	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/modules/zlib/Makefile	Sun Nov 29 22:43:51 2009	(r199954)
@@ -1,8 +1,9 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../net
+.PATH: ${.CURDIR}/../../libkern/zlib
 
 KMOD=	zlib
-SRCS=	zlib.c
+SRCS=	adler32.c compress.c deflate.c inflate.c inffast.c inftrees.c
+SRCS+=  trees.c uncompr.c zutil.c zl_crc32.c
 
 .include <bsd.kmod.mk>

Modified: user/kmacy/head_zlib/sys/netgraph/ng_deflate.c
==============================================================================
--- user/kmacy/head_zlib/sys/netgraph/ng_deflate.c	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/netgraph/ng_deflate.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -39,7 +39,7 @@
 #include <sys/errno.h>
 #include <sys/syslog.h>
 
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 
 #include <netgraph/ng_message.h>
 #include <netgraph/netgraph.h>

Modified: user/kmacy/head_zlib/sys/opencrypto/deflate.h
==============================================================================
--- user/kmacy/head_zlib/sys/opencrypto/deflate.h	Sun Nov 29 22:33:59 2009	(r199953)
+++ user/kmacy/head_zlib/sys/opencrypto/deflate.h	Sun Nov 29 22:43:51 2009	(r199954)
@@ -36,7 +36,7 @@
 #ifndef _CRYPTO_DEFLATE_H_
 #define _CRYPTO_DEFLATE_H_
 
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 
 #define Z_METHOD	8
 #define Z_MEMLEVEL	8

Copied and modified: user/kmacy/head_zlib/sys/opencrypto/opencrypto_deflate.c (from r199952, user/kmacy/head_zlib/sys/opencrypto/deflate.c)
==============================================================================
--- user/kmacy/head_zlib/sys/opencrypto/deflate.c	Sun Nov 29 21:34:52 2009	(r199952, copy source)
+++ user/kmacy/head_zlib/sys/opencrypto/opencrypto_deflate.c	Sun Nov 29 22:43:51 2009	(r199954)
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/kernel.h>
 #include <sys/sdt.h>
 #include <sys/systm.h>
-#include <net/zlib.h>
+#include <libkern/zlib/zlib.h>
 
 #include <opencrypto/cryptodev.h>
 #include <opencrypto/deflate.h>

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 05:36:40 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 989C9106566B;
	Mon, 30 Nov 2009 05:36:40 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8701C8FC1D;
	Mon, 30 Nov 2009 05:36:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAU5ae2W019644;
	Mon, 30 Nov 2009 05:36:40 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAU5aelc019642;
	Mon, 30 Nov 2009 05:36:40 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200911300536.nAU5aelc019642@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Mon, 30 Nov 2009 05:36:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199961 -
	user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 05:36:40 -0000

Author: kmacy
Date: Mon Nov 30 05:36:40 2009
New Revision: 199961
URL: http://svn.freebsd.org/changeset/base/199961

Log:
  arcs_lsize only has two fields - undo breakage

Modified:
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Mon Nov 30 04:32:34 2009	(r199960)
+++ user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Mon Nov 30 05:36:40 2009	(r199961)
@@ -1548,9 +1548,7 @@ arc_evict(arc_state_t *state, spa_t *spa
 		list_count = ARC_BUFC_NUMDATALISTS;
 		idx = evict_data_offset;
 	}
-	for (bytes_remaining = 0, i = 0; i < list_count; i++) 
-                bytes_remaining += evicted_state->arcs_lsize[i + offset]; 
-
+	bytes_remaining = evicted_state->arcs_lsize[type];
 	count = 0;
 	
 evict_start:

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 06:49:42 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 437A410656A9;
	Mon, 30 Nov 2009 06:49:42 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 32DFB8FC19;
	Mon, 30 Nov 2009 06:49:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAU6nf4Q021077;
	Mon, 30 Nov 2009 06:49:41 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAU6nfvY021075;
	Mon, 30 Nov 2009 06:49:41 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911300649.nAU6nfvY021075@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Mon, 30 Nov 2009 06:49:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199962 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 06:49:42 -0000

Author: dougb
Date: Mon Nov 30 06:49:41 2009
New Revision: 199962
URL: http://svn.freebsd.org/changeset/base/199962

Log:
  Add a new option, --always-fetch
  If that option is NOT used, check the local file system for the package
  we're looking for. If it's not available, or the option IS used, fetch it.
  
  Move the code for package fetching into a function
  
  If we don't get a rational value from grep'ing the list of available
  package versions, and/or the "newest" available port seems to be older
  than the latest version from the ports tree, try fetching the exact
  version of $new_port by name. This solves the issue of (for example)
  autoconf-2.1.3 vs. autoconf-2.6.2. The latter appears never to have
  a current package if the former exists.
  
  Move a comment to the section it directly applies to

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Nov 30 05:36:40 2009	(r199961)
+++ user/dougb/portmaster/portmaster	Mon Nov 30 06:49:41 2009	(r199962)
@@ -315,6 +315,7 @@ usage () {
 	echo '--packages-build use packages for all build dependencies'
 	echo '--packages-if-newer use package if newer than installed even'
 	echo '   if the package is not the latest according to the ports tree'
+	echo '--always-fetch fetch package even if it already exists locally'
 	echo ''
 	echo '-l list installed ports by category'
 	echo '-L list installed ports by category, and search for updates'
@@ -426,6 +427,8 @@ for var in "$@" ; do
 	--packages-if-newer)	packages_init newer
 				PM_PACKAGES_NEWER=pmp_newer
 				export PM_PACKAGES_NEWER ;;
+	--always-fetch)		PM_ALWAYS_FETCH=pm_always_fetch
+				export PM_ALWAYS_FETCH ;;
 	-[A-Za-z0-9]*)		newopts="$newopts $var" ;;
 	--delete-build-only)	PM_DEL_BUILD_ONLY=pm_dbo
 				PM_BUILD_ONLY_LIST=pm_bol
@@ -2422,6 +2425,49 @@ fi
 
 new_port=`pm_make -V PKGNAME`
 
+if [ -n "$PM_PACKAGES" -o "$PM_PACKAGES_BUILD" = doing_build_only_dep ]; then
+fetch_package () {
+	local do_fetch
+
+	# Duplicated from pkg_init()
+	[ -z "$packages" ] &&
+		packages=`pm_make -f/usr/share/mk/bsd.port.mk -V PACKAGES`
+	[ -n "$packages" ] || fail 'The value of PACKAGES cannot be empty'
+
+	[ -z "$ppd" ] && { ppd=$packages/portmaster-download; export ppd; }
+
+	if [ ! -d "$ppd" ]; then
+		[ -n "$PM_SU_VERBOSE" ] &&
+			echo "===>>> Creating $ppd"
+		pm_mkdir_s $ppd
+	fi
+
+	[ -z "$fetch_args" ] && {
+		fetch_args=`pm_make -f/usr/share/mk/bsd.port.mk -V FETCH_ARGS`;
+		export fetch_args; }
+
+	if [ -z "$PM_ALWAYS_FETCH" ]; then
+		if [ -e "${ppd}/${1}.tbz" ]; then
+			[ -n "$PM_VERBOSE" ] &&
+				echo "===>>> Package exists, skipping fetch"
+		else
+			do_fetch=1
+		fi
+	else
+		do_fetch=1
+	fi
+
+	if [ -n "$do_fetch" ]; then
+		[ -n "$PM_VERBOSE" ] && echo "===>>> Starting package fetch"
+
+		fetch $fetch_args -o $ppd ${sitepath}${1}.tbz 2>/dev/null || {
+			pm_unlink ${ppd}/${1}.tbz;
+			fetch $fetch_args -o $ppd ${sitepath}${1}.tbz ||
+				fail "Fetch for ${1}.tbz failed"; }
+	fi
+}
+fi
+
 # XXX Build or package?
 
 if [ -n "$PM_PACKAGES" -o "$PM_PACKAGES_BUILD" = doing_build_only_dep ]; then
@@ -2465,6 +2511,13 @@ if [ -n "$PM_PACKAGES" -o "$PM_PACKAGES_
 	unset s
 
 	if [ -z "$latest_pv" ]; then
+		fetch_package $new_port
+		if [ $? -eq 0 ]; then
+			latest_pv=$new_port
+		fi
+	fi
+
+	if [ -z "$latest_pv" ]; then
 		echo "===>>> Package and/or archive not found at:"
 		echo "${sitepath}"
 		echo ''
@@ -2510,22 +2563,29 @@ notnewer () {
 			echo "===>>> There is a package available ($latest_pv)"
 		fi
 	else
-		# Could happen if ports tree is out of date
 		case `pkg_version -t $new_port $latest_pv` in
-		\<)	use_package=up_old_tree
+		\<)	# Could happen if ports tree is out of date
+			use_package=up_old_tree
 			[ -n "$PM_VERBOSE" ] && {
 			echo "===>>> Available package ($latest_pv)";
 			echo "       is newer than ports tree ($new_port)"; } ;;
 		=)	;;	# Should not be reached
-		*)	echo ''
-			echo "===>>> The newest available package ($latest_pv)"
+		*)	# Packages like autoconf-2.1* vs. 2.6* can be false neg.
+			fetch_package $new_port
+			if [ $? -eq 0 ]; then
+				latest_pv=$new_port
+				use_package=up_auto
+			else
+				echo ''
+		echo "===>>> The newest available package ($latest_pv)"
 		echo "       is older than the version in ports ($new_port)"
-			if [ "$PM_PACKAGES" = only ]; then
-				if [ -n "$PM_FORCE" ]; then
-					use_package=up_force2
+				if [ "$PM_PACKAGES" = only ]; then
+					if [ -n "$PM_FORCE" ]; then
+						use_package=up_force2
 				echo "===>>> Installing anyway due to -f"
-				else
+					else
 	fail "Try --packages-if-newer, or do not use -PP/--packages-only"
+					fi
 				fi
 			fi ;;
 		esac
@@ -2573,28 +2633,7 @@ if [ -z "$use_package" ]; then
 	eval pm_make $port_log_args || fail "make failed for $portdir"
 else
 	# XXX fetch
-
-	# Duplicated from pkg_init()
-	[ -z "$packages" ] &&
-		packages=`pm_make -f/usr/share/mk/bsd.port.mk -V PACKAGES`
-	[ -n "$packages" ] || fail 'The value of PACKAGES cannot be empty'
-
-	ppd=$packages/portmaster-download
-
-	if [ ! -d "$ppd" ]; then
-		[ -n "$PM_SU_VERBOSE" ] &&
-			echo "===>>> Creating $ppd"
-		pm_mkdir_s $ppd
-	fi
-	export ppd
-
-	[ -n "$PM_VERBOSE" ] && echo "===>>> Starting package fetch"
-
-	fetch_args=`pm_make -f/usr/share/mk/bsd.port.mk -V FETCH_ARGS`
-	fetch $fetch_args -o $ppd ${sitepath}${latest_pv}.tbz 2>/dev/null || {
-		pm_unlink ${ppd}/${latest_pv}.tbz;
-		fetch $fetch_args -o $ppd ${sitepath}${latest_pv}.tbz ||
-			fail "Fetch for ${latest_pv}.tbz failed"; }
+	fetch_package $latest_pv
 fi
 
 # XXX Build or package?

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 07:00:24 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 595B8106566C;
	Mon, 30 Nov 2009 07:00:24 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4936E8FC12;
	Mon, 30 Nov 2009 07:00:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAU70O83021337;
	Mon, 30 Nov 2009 07:00:24 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAU70Oeo021335;
	Mon, 30 Nov 2009 07:00:24 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911300700.nAU70Oeo021335@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Mon, 30 Nov 2009 07:00:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199963 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 07:00:24 -0000

Author: dougb
Date: Mon Nov 30 07:00:24 2009
New Revision: 199963
URL: http://svn.freebsd.org/changeset/base/199963

Log:
  Failure to fetch should not be fatal if we're trying the exact match

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Nov 30 06:49:41 2009	(r199962)
+++ user/dougb/portmaster/portmaster	Mon Nov 30 07:00:24 2009	(r199963)
@@ -2462,8 +2462,7 @@ fetch_package () {
 
 		fetch $fetch_args -o $ppd ${sitepath}${1}.tbz 2>/dev/null || {
 			pm_unlink ${ppd}/${1}.tbz;
-			fetch $fetch_args -o $ppd ${sitepath}${1}.tbz ||
-				fail "Fetch for ${1}.tbz failed"; }
+			fetch $fetch_args -o $ppd ${sitepath}${1}.tbz; }
 	fi
 }
 fi
@@ -2633,7 +2632,7 @@ if [ -z "$use_package" ]; then
 	eval pm_make $port_log_args || fail "make failed for $portdir"
 else
 	# XXX fetch
-	fetch_package $latest_pv
+	fetch_package $latest_pv || fail "Fetch for ${latest_pv}.tbz failed"
 fi
 
 # XXX Build or package?

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 07:23:27 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8715F1065676;
	Mon, 30 Nov 2009 07:23:27 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76E218FC08;
	Mon, 30 Nov 2009 07:23:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAU7NRB8021911;
	Mon, 30 Nov 2009 07:23:27 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAU7NRBx021909;
	Mon, 30 Nov 2009 07:23:27 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911300723.nAU7NRBx021909@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Mon, 30 Nov 2009 07:23:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199964 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 07:23:27 -0000

Author: dougb
Date: Mon Nov 30 07:23:27 2009
New Revision: 199964
URL: http://svn.freebsd.org/changeset/base/199964

Log:
  Remove redundant test around package fetching code

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Nov 30 07:00:24 2009	(r199963)
+++ user/dougb/portmaster/portmaster	Mon Nov 30 07:23:27 2009	(r199964)
@@ -2465,11 +2465,6 @@ fetch_package () {
 			fetch $fetch_args -o $ppd ${sitepath}${1}.tbz; }
 	fi
 }
-fi
-
-# XXX Build or package?
-
-if [ -n "$PM_PACKAGES" -o "$PM_PACKAGES_BUILD" = doing_build_only_dep ]; then
 	if [ -z "$PACKAGESITE" ]; then
 		release=`uname -r`
 		#release=7.0-RELEASE-p12

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 18:48:08 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D9591065676;
	Mon, 30 Nov 2009 18:48:08 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F5938FC14;
	Mon, 30 Nov 2009 18:48:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAUIm7Np037657;
	Mon, 30 Nov 2009 18:48:07 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAUIm77V037655;
	Mon, 30 Nov 2009 18:48:07 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200911301848.nAUIm77V037655@svn.freebsd.org>
From: Ed Schouten <ed@FreeBSD.org>
Date: Mon, 30 Nov 2009 18:48:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199971 - user/ed/newcons/sys/dev/vt
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 18:48:08 -0000

Author: ed
Date: Mon Nov 30 18:48:07 2009
New Revision: 199971
URL: http://svn.freebsd.org/changeset/base/199971

Log:
  Optimize vtfont_bisearch() for the common case (ASCII).
  
  More than 90% of the time we'll probably just display ASCII characters.
  In almost all cases this is stored in entry 0 of the map, so validate
  the first map by hand.

Modified:
  user/ed/newcons/sys/dev/vt/vt_font.c

Modified: user/ed/newcons/sys/dev/vt/vt_font.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/vt_font.c	Mon Nov 30 18:26:46 2009	(r199970)
+++ user/ed/newcons/sys/dev/vt/vt_font.c	Mon Nov 30 18:48:07 2009	(r199971)
@@ -53,10 +53,20 @@ vtfont_bisearch(const struct vt_font_map
 	min = 0;
 	max = len - 1;
 
-	if (len == 0 || src < map[0].vfm_src ||
-	    src > map[max].vfm_src + map[max].vfm_len)
+	/* Empty font map. */
+	if (len == 0)
+		return (0);
+	/* Character below minimal entry. */
+	if (src < map[0].vfm_src)
+		return (0);
+	/* Optimization: ASCII characters occur very often. */
+	if (src <= map[0].vfm_src + map[0].vfm_len)
+		return (src - map[0].vfm_src + map[0].vfm_dst);
+	/* Character above maximum entry. */
+	if (src > map[max].vfm_src + map[max].vfm_len)
 		return (0);
 
+	/* Binary search. */
 	while (max >= min) {
 		mid = (min + max) / 2;
 		if (src < map[mid].vfm_src)

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 23:52:22 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4950C106566B;
	Mon, 30 Nov 2009 23:52:22 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1DFDD8FC08;
	Mon, 30 Nov 2009 23:52:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAUNqL8D046091;
	Mon, 30 Nov 2009 23:52:21 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAUNqLm1046090;
	Mon, 30 Nov 2009 23:52:21 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200911302352.nAUNqLm1046090@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Mon, 30 Nov 2009 23:52:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199976 - user/kmacy/releng_8_fcs
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 23:52:22 -0000

Author: kmacy
Date: Mon Nov 30 23:52:21 2009
New Revision: 199976
URL: http://svn.freebsd.org/changeset/base/199976

Log:
  rename branch to make room for a new one

Added:
     - copied from r199975, user/kmacy/releng_8_fcs/
Directory Properties:
  user/kmacy/releng_8_old/   (props changed)
Deleted:
  user/kmacy/releng_8_fcs/

From owner-svn-src-user@FreeBSD.ORG  Mon Nov 30 23:54:16 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E5CD1106566C;
	Mon, 30 Nov 2009 23:54:16 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B9DEE8FC14;
	Mon, 30 Nov 2009 23:54:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAUNsGMG046174;
	Mon, 30 Nov 2009 23:54:16 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAUNsGh0046173;
	Mon, 30 Nov 2009 23:54:16 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200911302354.nAUNsGh0046173@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Mon, 30 Nov 2009 23:54:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199977 - user/kmacy/releng_8_fcs
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 23:54:17 -0000

Author: kmacy
Date: Mon Nov 30 23:54:16 2009
New Revision: 199977
URL: http://svn.freebsd.org/changeset/base/199977

Log:
  create new releng_8_fcs branch

Added:
     - copied from r199976, stable/8/
Directory Properties:
  user/kmacy/releng_8_fcs/   (props changed)

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 00:42:18 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 25C60106568D;
	Tue,  1 Dec 2009 00:42:18 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FA5C8FC16;
	Tue,  1 Dec 2009 00:42:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB10gIU4047330;
	Tue, 1 Dec 2009 00:42:18 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB10gHV1047316;
	Tue, 1 Dec 2009 00:42:17 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200912010042.nB10gHV1047316@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Tue, 1 Dec 2009 00:42:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199978 - in user/kmacy/releng_8_fcs:
	cddl/contrib/opensolaris/cmd/ztest
	cddl/contrib/opensolaris/lib/libzpool/common/sys
	sys/amd64/amd64 sys/amd64/include sys/cddl/compat/opensolaris/s...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 00:42:18 -0000

Author: kmacy
Date: Tue Dec  1 00:42:17 2009
New Revision: 199978
URL: http://svn.freebsd.org/changeset/base/199978

Log:
  - merge updated FCS changes

Modified:
  user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
  user/kmacy/releng_8_fcs/sys/amd64/amd64/minidump_machdep.c
  user/kmacy/releng_8_fcs/sys/amd64/amd64/pmap.c
  user/kmacy/releng_8_fcs/sys/amd64/amd64/uma_machdep.c
  user/kmacy/releng_8_fcs/sys/amd64/include/md_var.h
  user/kmacy/releng_8_fcs/sys/amd64/include/vmparam.h
  user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/kmem.h
  user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/mutex.h
  user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/rwlock.h
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
  user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
  user/kmacy/releng_8_fcs/sys/compat/freebsd32/freebsd32_misc.c
  user/kmacy/releng_8_fcs/sys/conf/files
  user/kmacy/releng_8_fcs/sys/conf/files.amd64
  user/kmacy/releng_8_fcs/sys/conf/files.i386
  user/kmacy/releng_8_fcs/sys/conf/kern.pre.mk
  user/kmacy/releng_8_fcs/sys/conf/options
  user/kmacy/releng_8_fcs/sys/kern/uipc_sockbuf.c
  user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c
  user/kmacy/releng_8_fcs/sys/kern/uipc_syscalls.c
  user/kmacy/releng_8_fcs/sys/kern/vfs_bio.c
  user/kmacy/releng_8_fcs/sys/modules/zfs/Makefile
  user/kmacy/releng_8_fcs/sys/netinet/in_pcb.c
  user/kmacy/releng_8_fcs/sys/netinet/in_pcb.h
  user/kmacy/releng_8_fcs/sys/netinet/ip_output.c
  user/kmacy/releng_8_fcs/sys/netinet/tcp_input.c
  user/kmacy/releng_8_fcs/sys/netinet/tcp_usrreq.c
  user/kmacy/releng_8_fcs/sys/sys/buf.h
  user/kmacy/releng_8_fcs/sys/sys/file.h
  user/kmacy/releng_8_fcs/sys/sys/malloc.h
  user/kmacy/releng_8_fcs/sys/sys/param.h
  user/kmacy/releng_8_fcs/sys/sys/sockbuf.h
  user/kmacy/releng_8_fcs/sys/sys/socket.h
  user/kmacy/releng_8_fcs/sys/sys/socketvar.h
  user/kmacy/releng_8_fcs/sys/sys/sockstate.h
  user/kmacy/releng_8_fcs/sys/sys/syscallsubr.h
  user/kmacy/releng_8_fcs/sys/vm/pmap.h
  user/kmacy/releng_8_fcs/sys/vm/uma.h
  user/kmacy/releng_8_fcs/sys/vm/uma_core.c
  user/kmacy/releng_8_fcs/sys/vm/vm.h
  user/kmacy/releng_8_fcs/sys/vm/vm_contig.c
  user/kmacy/releng_8_fcs/sys/vm/vm_glue.c
  user/kmacy/releng_8_fcs/sys/vm/vm_kern.c
  user/kmacy/releng_8_fcs/sys/vm/vm_page.c
  user/kmacy/releng_8_fcs/sys/vm/vnode_pager.c

Modified: user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Tue Dec  1 00:42:17 2009	(r199978)
@@ -1304,7 +1304,7 @@ ztest_dmu_objset_create_destroy(ztest_ar
 	if (ztest_random(2) == 0 &&
 	    dmu_objset_open(name, DMU_OST_OTHER, DS_MODE_OWNER, &os) == 0) {
 		zr.zr_os = os;
-		zil_replay(os, &zr, &zr.zr_assign, ztest_replay_vector, NULL);
+		zil_replay(os, &zr, ztest_replay_vector);
 		dmu_objset_close(os);
 	}
 
@@ -3321,8 +3321,7 @@ ztest_run(char *pool)
 			if (test_future)
 				ztest_dmu_check_future_leak(&za[t]);
 			zr.zr_os = za[d].za_os;
-			zil_replay(zr.zr_os, &zr, &zr.zr_assign,
-			    ztest_replay_vector, NULL);
+			zil_replay(zr.zr_os, &zr, ztest_replay_vector);
 			za[d].za_zilog = zil_open(za[d].za_os, NULL);
 		}
 

Modified: user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
==============================================================================
--- user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Tue Dec  1 00:42:17 2009	(r199978)
@@ -305,6 +305,8 @@ extern void cv_broadcast(kcondvar_t *cv)
 #define	KM_PUSHPAGE		KM_SLEEP
 #define	KM_NOSLEEP		UMEM_DEFAULT
 #define	KMC_NODEBUG		UMC_NODEBUG
+#define	KM_NODEBUG		KMC_NODEBUG
+
 #define	kmem_alloc(_s, _f)	umem_alloc(_s, _f)
 #define	kmem_zalloc(_s, _f)	umem_zalloc(_s, _f)
 #define	kmem_free(_b, _s)	umem_free(_b, _s)

Modified: user/kmacy/releng_8_fcs/sys/amd64/amd64/minidump_machdep.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/amd64/amd64/minidump_machdep.c	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/amd64/amd64/minidump_machdep.c	Tue Dec  1 00:42:17 2009	(r199978)
@@ -56,6 +56,7 @@ CTASSERT(sizeof(struct kerneldumpheader)
 extern uint64_t KPDPphys;
 
 uint64_t *vm_page_dump;
+uint64_t *vm_page_dump_exclude;
 int vm_page_dump_size;
 
 static struct kerneldumpheader kdh;
@@ -71,10 +72,16 @@ CTASSERT(sizeof(*vm_page_dump) == 8);
 static int
 is_dumpable(vm_paddr_t pa)
 {
-	int i;
+	int i, idx, bit, isdata;
+	uint64_t pfn = pa;
+
+	pfn >>= PAGE_SHIFT;
+	idx = pfn >> 6;		/* 2^6 = 64 */
+	bit = pfn & 63;
+	isdata = ((vm_page_dump_exclude[idx] & (1ul << bit)) == 0);
 
 	for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) {
-		if (pa >= dump_avail[i] && pa < dump_avail[i + 1])
+		if (pa >= dump_avail[i] && pa < dump_avail[i + 1] && isdata)
 			return (1);
 	}
 	return (0);
@@ -226,6 +233,7 @@ minidumpsys(struct dumperinfo *di)
 	dumpsize = ptesize;
 	dumpsize += round_page(msgbufp->msg_size);
 	dumpsize += round_page(vm_page_dump_size);
+	printf("dumpsize: ");
 	for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) {
 		bits = vm_page_dump[i];
 		while (bits) {
@@ -238,10 +246,13 @@ minidumpsys(struct dumperinfo *di)
 				dump_drop_page(pa);
 			}
 			bits &= ~(1ul << bit);
+			if ((dumpsize % (1<<29)) == 0)
+				printf("%ldMB ", (dumpsize>>20));
 		}
 	}
 	dumpsize += PAGE_SIZE;
 
+	printf("\n");
 	/* Determine dump offset on device. */
 	if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) {
 		error = ENOSPC;
@@ -273,6 +284,7 @@ minidumpsys(struct dumperinfo *di)
 		goto fail;
 	dumplo += sizeof(kdh);
 
+	printf("write header\n");
 	/* Dump my header */
 	bzero(&fakept, sizeof(fakept));
 	bcopy(&mdhdr, &fakept, sizeof(mdhdr));
@@ -280,16 +292,19 @@ minidumpsys(struct dumperinfo *di)
 	if (error)
 		goto fail;
 
+	printf("write msgbuf\n");
 	/* Dump msgbuf up front */
 	error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size));
 	if (error)
 		goto fail;
 
+	printf("write bitmap\n");
 	/* Dump bitmap */
 	error = blk_write(di, (char *)vm_page_dump, 0, round_page(vm_page_dump_size));
 	if (error)
 		goto fail;
 
+	printf("\nDump kernel page table pages\n");
 	/* Dump kernel page table pages */
 	pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys);
 	for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR,
@@ -343,8 +358,10 @@ minidumpsys(struct dumperinfo *di)
 
 	/* Dump memory chunks */
 	/* XXX cluster it up and use blk_dump() */
-	for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) {
-		bits = vm_page_dump[i];
+	printf("\nclustering memory chunks\n");
+	for (i = 0;
+	     i < vm_page_dump_size / sizeof(*vm_page_dump); i++) {
+		bits = vm_page_dump[i] & ~(vm_page_dump_exclude[i]);
 		while (bits) {
 			bit = bsfq(bits);
 			pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE;
@@ -354,7 +371,6 @@ minidumpsys(struct dumperinfo *di)
 			bits &= ~(1ul << bit);
 		}
 	}
-
 	error = blk_flush(di);
 	if (error)
 		goto fail;
@@ -365,6 +381,7 @@ minidumpsys(struct dumperinfo *di)
 		goto fail;
 	dumplo += sizeof(kdh);
 
+	printf("\nstarting dump\n");
 	/* Signal completion, signoff and exit stage left. */
 	dump_write(di, NULL, 0, 0, 0);
 	printf("\nDump complete\n");
@@ -403,3 +420,25 @@ dump_drop_page(vm_paddr_t pa)
 	bit = pa & 63;
 	atomic_clear_long(&vm_page_dump[idx], 1ul << bit);
 }
+
+void
+dump_exclude_page(vm_paddr_t pa)
+{
+	int idx, bit;
+
+	pa >>= PAGE_SHIFT;
+	idx = pa >> 6;		/* 2^6 = 64 */
+	bit = pa & 63;
+	atomic_set_long(&vm_page_dump_exclude[idx], 1ul << bit);
+}
+
+void
+dump_unexclude_page(vm_paddr_t pa)
+{
+	int idx, bit;
+
+	pa >>= PAGE_SHIFT;
+	idx = pa >> 6;		/* 2^6 = 64 */
+	bit = pa & 63;
+	atomic_clear_long(&vm_page_dump_exclude[idx], 1ul << bit);
+}

Modified: user/kmacy/releng_8_fcs/sys/amd64/amd64/pmap.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/amd64/amd64/pmap.c	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/amd64/amd64/pmap.c	Tue Dec  1 00:42:17 2009	(r199978)
@@ -1137,10 +1137,16 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s
  * Note: SMP coherent.  Uses a ranged shootdown IPI.
  */
 void
-pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count)
+pmap_qenter_prot(vm_offset_t sva, vm_page_t *ma, int count, vm_prot_t prot)
 {
 	pt_entry_t *endpte, oldpte, *pte;
+	uint64_t flags = PG_V;
 
+	if (prot & VM_PROT_WRITE)
+		flags |= PG_RW;
+	if ((prot & VM_PROT_EXECUTE) == 0)
+		flags |= PG_NX;
+	
 	oldpte = 0;
 	pte = vtopte(sva);
 	endpte = pte + count;
@@ -1148,6 +1154,9 @@ pmap_qenter(vm_offset_t sva, vm_page_t *
 		oldpte |= *pte;
 		pte_store(pte, VM_PAGE_TO_PHYS(*ma) | PG_G |
 		    pmap_cache_bits((*ma)->md.pat_mode, 0) | PG_RW | PG_V);
+		pte_store(pte, VM_PAGE_TO_PHYS(*ma) | PG_G | flags);
+		if (prot & VM_PROT_EXCLUDE)
+			dump_exclude_page(VM_PAGE_TO_PHYS(*ma));
 		pte++;
 		ma++;
 	}
@@ -1156,6 +1165,16 @@ pmap_qenter(vm_offset_t sva, vm_page_t *
 		    PAGE_SIZE);
 }
 
+void
+pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count)
+{
+
+	pmap_qenter_prot(sva, ma, count,
+	    VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
+
+}
+
+
 /*
  * This routine tears out page mappings from the
  * kernel -- it is meant only for temporary mappings.
@@ -1168,6 +1187,7 @@ pmap_qremove(vm_offset_t sva, int count)
 
 	va = sva;
 	while (count-- > 0) {
+		dump_unexclude_page(pmap_kextract(va));
 		pmap_kremove(va);
 		va += PAGE_SIZE;
 	}

Modified: user/kmacy/releng_8_fcs/sys/amd64/amd64/uma_machdep.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/amd64/amd64/uma_machdep.c	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/amd64/amd64/uma_machdep.c	Tue Dec  1 00:42:17 2009	(r199978)
@@ -66,7 +66,8 @@ uma_small_alloc(uma_zone_t zone, int byt
 			break;
 	}
 	pa = m->phys_addr;
-	dump_add_page(pa);
+	if ((wait & M_NODUMP) == 0)
+		dump_add_page(pa);
 	va = (void *)PHYS_TO_DMAP(pa);
 	if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
 		pagezero(va);

Modified: user/kmacy/releng_8_fcs/sys/amd64/include/md_var.h
==============================================================================
--- user/kmacy/releng_8_fcs/sys/amd64/include/md_var.h	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/amd64/include/md_var.h	Tue Dec  1 00:42:17 2009	(r199978)
@@ -60,6 +60,7 @@ extern	char	kstack[];
 extern	char	sigcode[];
 extern	int	szsigcode;
 extern	uint64_t *vm_page_dump;
+extern	uint64_t *vm_page_dump_exclude;
 extern	int	vm_page_dump_size;
 extern	int	_udatasel;
 extern	int	_ucodesel;
@@ -88,6 +89,8 @@ void	fs_load_fault(void) __asm(__STRING(
 void	gs_load_fault(void) __asm(__STRING(gs_load_fault));
 void	dump_add_page(vm_paddr_t);
 void	dump_drop_page(vm_paddr_t);
+void	dump_exclude_page(vm_paddr_t);
+void	dump_unexclude_page(vm_paddr_t);
 void	initializecpu(void);
 void	initializecpucache(void);
 void	fillw(int /*u_short*/ pat, void *base, size_t cnt);

Modified: user/kmacy/releng_8_fcs/sys/amd64/include/vmparam.h
==============================================================================
--- user/kmacy/releng_8_fcs/sys/amd64/include/vmparam.h	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/amd64/include/vmparam.h	Tue Dec  1 00:42:17 2009	(r199978)
@@ -88,6 +88,11 @@
 #define	UMA_MD_SMALL_ALLOC
 
 /*
+ * We machine specific sparse kernel dump
+ */
+#define	VM_MD_MINIDUMP
+
+/*
  * The physical address space is densely populated.
  */
 #define	VM_PHYSSEG_DENSE

Modified: user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/kmem.h
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/kmem.h	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/kmem.h	Tue Dec  1 00:42:17 2009	(r199978)
@@ -40,7 +40,8 @@
 #define	KM_SLEEP		M_WAITOK
 #define	KM_PUSHPAGE		M_WAITOK
 #define	KM_NOSLEEP		M_NOWAIT
-#define	KMC_NODEBUG		0
+#define	KMC_NODEBUG		UMA_ZONE_NODUMP
+#define	KM_NODEBUG		M_NODUMP
 
 typedef struct kmem_cache {
 	char		kc_name[32];

Modified: user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/mutex.h
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/mutex.h	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/mutex.h	Tue Dec  1 00:42:17 2009	(r199978)
@@ -46,11 +46,7 @@ typedef enum {
 
 typedef struct sx	kmutex_t;
 
-#ifndef DEBUG
-#define	MUTEX_FLAGS	(SX_DUPOK | SX_NOWITNESS)
-#else
 #define	MUTEX_FLAGS	(SX_DUPOK)
-#endif
 
 #define	mutex_init(lock, desc, type, arg)	do {			\
 	const char *_name;						\

Modified: user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/rwlock.h
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/rwlock.h	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/rwlock.h	Tue Dec  1 00:42:17 2009	(r199978)
@@ -48,11 +48,7 @@ typedef enum {
 
 typedef	struct sx	krwlock_t;
 
-#ifndef DEBUG
-#define	RW_FLAGS	(SX_DUPOK | SX_NOWITNESS)
-#else
 #define	RW_FLAGS	(SX_DUPOK)
-#endif
 
 #define	RW_READ_HELD(x)		(rw_read_held((x)))
 #define	RW_WRITE_HELD(x)	(rw_write_held((x)))

Modified: user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Tue Dec  1 00:42:17 2009	(r199978)
@@ -186,6 +186,11 @@ SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min,
 SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN,
     &zfs_mdcomp_disable, 0, "Disable metadata compression");
 
+#ifdef ZIO_USE_UMA
+extern kmem_cache_t	*zio_buf_cache[];
+extern kmem_cache_t	*zio_data_buf_cache[];
+#endif
+
 /*
  * Note that buffers can be in one of 6 states:
  *	ARC_anon	- anonymous (discussed below)
@@ -218,13 +223,31 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_di
  * second level ARC benefit from these fast lookups.
  */
 
+#define	ARCS_LOCK_PAD		128
+struct arcs_lock {
+	kmutex_t	arcs_lock;
+#ifdef _KERNEL
+	unsigned char	pad[(ARCS_LOCK_PAD - sizeof (kmutex_t))];
+#endif
+};
+
+/*
+ * must be power of two for mask use to work
+ *
+ */
+#define ARC_BUFC_NUMDATALISTS		16
+#define ARC_BUFC_NUMMETADATALISTS	16
+#define ARC_BUFC_NUMLISTS	(ARC_BUFC_NUMMETADATALISTS+ARC_BUFC_NUMDATALISTS)
+
 typedef struct arc_state {
-	list_t	arcs_list[ARC_BUFC_NUMTYPES];	/* list of evictable buffers */
 	uint64_t arcs_lsize[ARC_BUFC_NUMTYPES];	/* amount of evictable data */
 	uint64_t arcs_size;	/* total amount of data in this state */
-	kmutex_t arcs_mtx;
+	list_t	arcs_lists[ARC_BUFC_NUMLISTS]; /* list of evictable buffers */
+	struct arcs_lock arcs_locks[ARC_BUFC_NUMLISTS] __aligned(128);
 } arc_state_t;
 
+#define ARCS_LOCK(s, i) &((s)->arcs_locks[(i)].arcs_lock)
+
 /* The 6 states: */
 static arc_state_t ARC_anon;
 static arc_state_t ARC_mru;
@@ -953,20 +976,42 @@ arc_buf_freeze(arc_buf_t *buf)
 }
 
 static void
+get_buf_info(arc_buf_hdr_t *ab, arc_state_t *state, list_t **list, kmutex_t **lock)
+{
+	uint64_t buf_hashid = buf_hash(ab->b_spa, &ab->b_dva, ab->b_birth);
+
+	if (ab->b_type == ARC_BUFC_METADATA) 
+		buf_hashid &= (ARC_BUFC_NUMMETADATALISTS-1);
+	else {
+		buf_hashid &= (ARC_BUFC_NUMDATALISTS-1);
+		buf_hashid += ARC_BUFC_NUMMETADATALISTS;
+	}
+
+	*list = &state->arcs_lists[buf_hashid];
+	*lock = ARCS_LOCK(state, buf_hashid);
+}
+
+
+static void
 add_reference(arc_buf_hdr_t *ab, kmutex_t *hash_lock, void *tag)
 {
+
 	ASSERT(MUTEX_HELD(hash_lock));
 
 	if ((refcount_add(&ab->b_refcnt, tag) == 1) &&
 	    (ab->b_state != arc_anon)) {
+		list_t *list;
+		kmutex_t *lock;
 		uint64_t delta = ab->b_size * ab->b_datacnt;
-		list_t *list = &ab->b_state->arcs_list[ab->b_type];
 		uint64_t *size = &ab->b_state->arcs_lsize[ab->b_type];
 
-		ASSERT(!MUTEX_HELD(&ab->b_state->arcs_mtx));
-		mutex_enter(&ab->b_state->arcs_mtx);
+		get_buf_info(ab, ab->b_state, &list, &lock);
+		ASSERT(!MUTEX_HELD(lock));
+		mutex_enter(lock);
 		ASSERT(list_link_active(&ab->b_arc_node));
 		list_remove(list, ab);
+		mutex_exit(lock);
+
 		if (GHOST_STATE(ab->b_state)) {
 			ASSERT3U(ab->b_datacnt, ==, 0);
 			ASSERT3P(ab->b_buf, ==, NULL);
@@ -975,7 +1020,6 @@ add_reference(arc_buf_hdr_t *ab, kmutex_
 		ASSERT(delta > 0);
 		ASSERT3U(*size, >=, delta);
 		atomic_add_64(size, -delta);
-		mutex_exit(&ab->b_state->arcs_mtx);
 		/* remove the prefetch flag if we get a reference */
 		if (ab->b_flags & ARC_PREFETCH)
 			ab->b_flags &= ~ARC_PREFETCH;
@@ -994,14 +1038,19 @@ remove_reference(arc_buf_hdr_t *ab, kmut
 	if (((cnt = refcount_remove(&ab->b_refcnt, tag)) == 0) &&
 	    (state != arc_anon)) {
 		uint64_t *size = &state->arcs_lsize[ab->b_type];
+		list_t *list;
+		kmutex_t *lock;
 
-		ASSERT(!MUTEX_HELD(&state->arcs_mtx));
-		mutex_enter(&state->arcs_mtx);
+		get_buf_info(ab, state, &list, &lock);
+		
+		ASSERT(!MUTEX_HELD(lock));
+		mutex_enter(lock);
 		ASSERT(!list_link_active(&ab->b_arc_node));
-		list_insert_head(&state->arcs_list[ab->b_type], ab);
+		list_insert_head(list, ab);
+		mutex_exit(lock);
+
 		ASSERT(ab->b_datacnt > 0);
 		atomic_add_64(size, ab->b_size * ab->b_datacnt);
-		mutex_exit(&state->arcs_mtx);
 	}
 	return (cnt);
 }
@@ -1016,6 +1065,8 @@ arc_change_state(arc_state_t *new_state,
 	arc_state_t *old_state = ab->b_state;
 	int64_t refcnt = refcount_count(&ab->b_refcnt);
 	uint64_t from_delta, to_delta;
+	list_t *list;
+	kmutex_t *lock;
 
 	ASSERT(MUTEX_HELD(hash_lock));
 	ASSERT(new_state != old_state);
@@ -1030,14 +1081,17 @@ arc_change_state(arc_state_t *new_state,
 	 */
 	if (refcnt == 0) {
 		if (old_state != arc_anon) {
-			int use_mutex = !MUTEX_HELD(&old_state->arcs_mtx);
+			int use_mutex;
 			uint64_t *size = &old_state->arcs_lsize[ab->b_type];
 
+			get_buf_info(ab, old_state, &list, &lock);
+			use_mutex = !MUTEX_HELD(lock);
+
 			if (use_mutex)
-				mutex_enter(&old_state->arcs_mtx);
+				mutex_enter(lock);
 
 			ASSERT(list_link_active(&ab->b_arc_node));
-			list_remove(&old_state->arcs_list[ab->b_type], ab);
+			list_remove(list, ab);
 
 			/*
 			 * If prefetching out of the ghost cache,
@@ -1052,16 +1106,20 @@ arc_change_state(arc_state_t *new_state,
 			atomic_add_64(size, -from_delta);
 
 			if (use_mutex)
-				mutex_exit(&old_state->arcs_mtx);
+				mutex_exit(lock);
 		}
 		if (new_state != arc_anon) {
-			int use_mutex = !MUTEX_HELD(&new_state->arcs_mtx);
+			int use_mutex; 
 			uint64_t *size = &new_state->arcs_lsize[ab->b_type];
 
+			get_buf_info(ab, new_state, &list, &lock);
+			use_mutex = !MUTEX_HELD(lock);
+			
+			
 			if (use_mutex)
-				mutex_enter(&new_state->arcs_mtx);
+				mutex_enter(lock);
 
-			list_insert_head(&new_state->arcs_list[ab->b_type], ab);
+			list_insert_head(list, ab);
 
 			/* ghost elements have a ghost size */
 			if (GHOST_STATE(new_state)) {
@@ -1072,7 +1130,7 @@ arc_change_state(arc_state_t *new_state,
 			atomic_add_64(size, to_delta);
 
 			if (use_mutex)
-				mutex_exit(&new_state->arcs_mtx);
+				mutex_exit(lock);
 		}
 	}
 
@@ -1462,21 +1520,49 @@ arc_evict(arc_state_t *state, spa_t *spa
 {
 	arc_state_t *evicted_state;
 	uint64_t bytes_evicted = 0, skipped = 0, missed = 0;
+	int64_t bytes_remaining;
 	arc_buf_hdr_t *ab, *ab_prev = NULL;
-	list_t *list = &state->arcs_list[type];
+	list_t *evicted_list, *list, *evicted_list_start, *list_start;
+	kmutex_t *lock, *evicted_lock;
 	kmutex_t *hash_lock;
 	boolean_t have_lock;
 	void *stolen = NULL;
+	static int evict_metadata_offset, evict_data_offset;
+	int i, idx, offset, list_count, count;
 
 	ASSERT(state == arc_mru || state == arc_mfu);
 
 	evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost;
+	
+	if (type == ARC_BUFC_METADATA) {
+		offset = 0;
+		list_count = ARC_BUFC_NUMMETADATALISTS;
+		list_start = &state->arcs_lists[0];
+		evicted_list_start = &evicted_state->arcs_lists[0];
+		idx = evict_metadata_offset;
+	} else {
+		offset = ARC_BUFC_NUMMETADATALISTS;
+
+		list_start = &state->arcs_lists[offset];
+		evicted_list_start = &evicted_state->arcs_lists[offset];
+		list_count = ARC_BUFC_NUMDATALISTS;
+		idx = evict_data_offset;
+	}
+	bytes_remaining = evicted_state->arcs_lsize[type];
+	count = 0;
+	
+evict_start:
+	list = &list_start[idx];
+	evicted_list = &evicted_list_start[idx];
+	lock = ARCS_LOCK(state, (offset + idx));
+	evicted_lock = ARCS_LOCK(evicted_state, (offset + idx)); 
 
-	mutex_enter(&state->arcs_mtx);
-	mutex_enter(&evicted_state->arcs_mtx);
+	mutex_enter(lock);
+	mutex_enter(evicted_lock);
 
 	for (ab = list_tail(list); ab; ab = ab_prev) {
 		ab_prev = list_prev(list, ab);
+		bytes_remaining -= (ab->b_size * ab->b_datacnt);
 		/* prefetch buffers have a minimum lifespan */
 		if (HDR_IO_IN_PROGRESS(ab) ||
 		    (spa && ab->b_spa != spa) ||
@@ -1536,18 +1622,36 @@ arc_evict(arc_state_t *state, spa_t *spa
 				mutex_exit(hash_lock);
 			if (bytes >= 0 && bytes_evicted >= bytes)
 				break;
+			if (bytes_remaining > 0) {
+				mutex_exit(evicted_lock);
+				mutex_exit(lock);
+				idx  = ((idx + 1)&(list_count-1));
+				count++;
+				goto evict_start;
+			}
 		} else {
 			missed += 1;
 		}
 	}
 
-	mutex_exit(&evicted_state->arcs_mtx);
-	mutex_exit(&state->arcs_mtx);
-
-	if (bytes_evicted < bytes)
-		dprintf("only evicted %lld bytes from %x",
-		    (longlong_t)bytes_evicted, state);
+	mutex_exit(evicted_lock);
+	mutex_exit(lock);
+	
+	idx  = ((idx + 1)&(list_count-1));
+	count++;
 
+	if (bytes_evicted < bytes) {
+		if (count < list_count)
+			goto evict_start;
+		else
+			dprintf("only evicted %lld bytes from %x",
+			    (longlong_t)bytes_evicted, state);
+	}
+	if (type == ARC_BUFC_METADATA) 
+		evict_metadata_offset = idx;
+	else
+		evict_data_offset = idx;
+		
 	if (skipped)
 		ARCSTAT_INCR(arcstat_evict_skip, skipped);
 
@@ -1586,14 +1690,28 @@ static void
 arc_evict_ghost(arc_state_t *state, spa_t *spa, int64_t bytes)
 {
 	arc_buf_hdr_t *ab, *ab_prev;
-	list_t *list = &state->arcs_list[ARC_BUFC_DATA];
-	kmutex_t *hash_lock;
+	list_t *list, *list_start;
+	kmutex_t *hash_lock, *lock;
 	uint64_t bytes_deleted = 0;
 	uint64_t bufs_skipped = 0;
+	static int evict_offset;
+	int list_count, idx = evict_offset;
+	int offset, count = 0;
 
 	ASSERT(GHOST_STATE(state));
-top:
-	mutex_enter(&state->arcs_mtx);
+
+	/*
+	 * data lists come after metadata lists
+	 */
+	list_start = &state->arcs_lists[ARC_BUFC_NUMMETADATALISTS];
+	list_count = ARC_BUFC_NUMDATALISTS;
+	offset = ARC_BUFC_NUMMETADATALISTS;
+	
+evict_start:
+	list = &list_start[idx];
+	lock = ARCS_LOCK(state, idx + offset);
+
+	mutex_enter(lock);
 	for (ab = list_tail(list); ab; ab = ab_prev) {
 		ab_prev = list_prev(list, ab);
 		if (spa && ab->b_spa != spa)
@@ -1623,20 +1741,31 @@ top:
 				break;
 		} else {
 			if (bytes < 0) {
-				mutex_exit(&state->arcs_mtx);
+				/*
+				 * we're draining the ARC, retry
+				 */
+				mutex_exit(lock);
 				mutex_enter(hash_lock);
 				mutex_exit(hash_lock);
-				goto top;
+				goto evict_start;
 			}
 			bufs_skipped += 1;
 		}
 	}
-	mutex_exit(&state->arcs_mtx);
-
-	if (list == &state->arcs_list[ARC_BUFC_DATA] &&
+	mutex_exit(lock);
+	idx  = ((idx + 1)&(ARC_BUFC_NUMDATALISTS-1));
+	count++;
+	
+	if (count < list_count)
+		goto evict_start;
+	
+	evict_offset = idx;
+	if ((uintptr_t)list > (uintptr_t)&state->arcs_lists[ARC_BUFC_NUMMETADATALISTS] &&
 	    (bytes < 0 || bytes_deleted < bytes)) {
-		list = &state->arcs_list[ARC_BUFC_METADATA];
-		goto top;
+		list_start = &state->arcs_lists[0];
+		list_count = ARC_BUFC_NUMMETADATALISTS;
+		offset = count = 0;
+		goto evict_start;
 	}
 
 	if (bufs_skipped) {
@@ -1750,22 +1879,22 @@ restart:	
 void
 arc_flush(spa_t *spa)
 {
-	while (list_head(&arc_mru->arcs_list[ARC_BUFC_DATA])) {
+	while (arc_mru->arcs_lsize[ARC_BUFC_DATA]) {
 		(void) arc_evict(arc_mru, spa, -1, FALSE, ARC_BUFC_DATA);
 		if (spa)
 			break;
 	}
-	while (list_head(&arc_mru->arcs_list[ARC_BUFC_METADATA])) {
+	while (arc_mru->arcs_lsize[ARC_BUFC_METADATA]) {
 		(void) arc_evict(arc_mru, spa, -1, FALSE, ARC_BUFC_METADATA);
 		if (spa)
 			break;
 	}
-	while (list_head(&arc_mfu->arcs_list[ARC_BUFC_DATA])) {
+	while (arc_mfu->arcs_lsize[ARC_BUFC_DATA]) {
 		(void) arc_evict(arc_mfu, spa, -1, FALSE, ARC_BUFC_DATA);
 		if (spa)
 			break;
 	}
-	while (list_head(&arc_mfu->arcs_list[ARC_BUFC_METADATA])) {
+	while (arc_mfu->arcs_lsize[ARC_BUFC_METADATA]) {
 		(void) arc_evict(arc_mfu, spa, -1, FALSE, ARC_BUFC_METADATA);
 		if (spa)
 			break;
@@ -1821,6 +1950,12 @@ arc_reclaim_needed(void)
 #endif
 
 #ifdef _KERNEL
+	if (needfree)
+		return (1);
+	if (arc_size > arc_c_max)
+		return (1);
+	if (arc_size <= arc_c_min)
+		return (0);
 
 	/*
 	 * If pages are needed or we're within 2048 pages 
@@ -1829,9 +1964,6 @@ arc_reclaim_needed(void)
 	if (vm_pages_needed || (vm_paging_target() > -2048))
 		return (1);
 
-	if (needfree)
-		return (1);
-
 #if 0
 	/*
 	 * take 'desfree' extra pages, so we reclaim sooner, rather than later
@@ -1893,8 +2025,6 @@ arc_kmem_reap_now(arc_reclaim_strategy_t
 	size_t			i;
 	kmem_cache_t		*prev_cache = NULL;
 	kmem_cache_t		*prev_data_cache = NULL;
-	extern kmem_cache_t	*zio_buf_cache[];
-	extern kmem_cache_t	*zio_data_buf_cache[];
 #endif
 
 #ifdef _KERNEL
@@ -2820,7 +2950,9 @@ arc_buf_evict(arc_buf_t *buf)
 	arc_buf_hdr_t *hdr;
 	kmutex_t *hash_lock;
 	arc_buf_t **bufp;
-
+	list_t *list, *evicted_list;
+	kmutex_t *lock, *evicted_lock;
+	
 	rw_enter(&buf->b_lock, RW_WRITER);
 	hdr = buf->b_hdr;
 	if (hdr == NULL) {
@@ -2868,16 +3000,18 @@ arc_buf_evict(arc_buf_t *buf)
 		evicted_state =
 		    (old_state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost;
 
-		mutex_enter(&old_state->arcs_mtx);
-		mutex_enter(&evicted_state->arcs_mtx);
+		get_buf_info(hdr, old_state, &list, &lock);
+		get_buf_info(hdr, evicted_state, &evicted_list, &evicted_lock);
+		mutex_enter(lock);
+		mutex_enter(evicted_lock);
 
 		arc_change_state(evicted_state, hdr, hash_lock);
 		ASSERT(HDR_IN_HASH_TABLE(hdr));
 		hdr->b_flags |= ARC_IN_HASH_TABLE;
 		hdr->b_flags &= ~ARC_BUF_AVAILABLE;
 
-		mutex_exit(&evicted_state->arcs_mtx);
-		mutex_exit(&old_state->arcs_mtx);
+		mutex_exit(evicted_lock);
+		mutex_exit(lock);
 	}
 	mutex_exit(hash_lock);
 	rw_exit(&buf->b_lock);
@@ -3423,7 +3557,8 @@ void
 arc_init(void)
 {
 	int prefetch_tunable_set = 0;
-	
+	int i;
+
 	mutex_init(&arc_reclaim_thr_lock, NULL, MUTEX_DEFAULT, NULL);
 	cv_init(&arc_reclaim_thr_cv, NULL, CV_DEFAULT, NULL);
 	mutex_init(&arc_lowmem_lock, NULL, MUTEX_DEFAULT, NULL);
@@ -3491,33 +3626,34 @@ arc_init(void)
 	arc_l2c_only = &ARC_l2c_only;
 	arc_size = 0;
 
-	mutex_init(&arc_anon->arcs_mtx, NULL, MUTEX_DEFAULT, NULL);
-	mutex_init(&arc_mru->arcs_mtx, NULL, MUTEX_DEFAULT, NULL);
-	mutex_init(&arc_mru_ghost->arcs_mtx, NULL, MUTEX_DEFAULT, NULL);
-	mutex_init(&arc_mfu->arcs_mtx, NULL, MUTEX_DEFAULT, NULL);
-	mutex_init(&arc_mfu_ghost->arcs_mtx, NULL, MUTEX_DEFAULT, NULL);
-	mutex_init(&arc_l2c_only->arcs_mtx, NULL, MUTEX_DEFAULT, NULL);
-
-	list_create(&arc_mru->arcs_list[ARC_BUFC_METADATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mru->arcs_list[ARC_BUFC_DATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mfu->arcs_list[ARC_BUFC_METADATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mfu->arcs_list[ARC_BUFC_DATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
-	list_create(&arc_l2c_only->arcs_list[ARC_BUFC_DATA],
-	    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+	for (i = 0; i < ARC_BUFC_NUMLISTS; i++) {
+		
+		mutex_init(&arc_anon->arcs_locks[i].arcs_lock,
+		    NULL, MUTEX_DEFAULT, NULL);
+		mutex_init(&arc_mru->arcs_locks[i].arcs_lock,
+		    NULL, MUTEX_DEFAULT, NULL);
+		mutex_init(&arc_mru_ghost->arcs_locks[i].arcs_lock,
+		    NULL, MUTEX_DEFAULT, NULL);
+		mutex_init(&arc_mfu->arcs_locks[i].arcs_lock,
+		    NULL, MUTEX_DEFAULT, NULL);
+		mutex_init(&arc_mfu_ghost->arcs_locks[i].arcs_lock,
+		    NULL, MUTEX_DEFAULT, NULL);
+		mutex_init(&arc_l2c_only->arcs_locks[i].arcs_lock,
+		    NULL, MUTEX_DEFAULT, NULL);
+	
+		list_create(&arc_mru->arcs_lists[i],
+		    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+		list_create(&arc_mru_ghost->arcs_lists[i],
+		    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+		list_create(&arc_mfu->arcs_lists[i],
+		    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+		list_create(&arc_mfu_ghost->arcs_lists[i],
+		    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+		list_create(&arc_mfu_ghost->arcs_lists[i],
+		    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+		list_create(&arc_l2c_only->arcs_lists[i],
+		    sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node));
+	}
 
 	buf_init();
 
@@ -3591,7 +3727,8 @@ arc_init(void)
 void
 arc_fini(void)
 {
-
+	int i;
+	
 	mutex_enter(&arc_reclaim_thr_lock);
 	arc_thread_exit = 1;
 	cv_signal(&arc_reclaim_thr_cv);
@@ -3612,21 +3749,19 @@ arc_fini(void)
 	mutex_destroy(&arc_reclaim_thr_lock);
 	cv_destroy(&arc_reclaim_thr_cv);
 
-	list_destroy(&arc_mru->arcs_list[ARC_BUFC_METADATA]);
-	list_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA]);
-	list_destroy(&arc_mfu->arcs_list[ARC_BUFC_METADATA]);
-	list_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA]);
-	list_destroy(&arc_mru->arcs_list[ARC_BUFC_DATA]);
-	list_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA]);
-	list_destroy(&arc_mfu->arcs_list[ARC_BUFC_DATA]);
-	list_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA]);
-
-	mutex_destroy(&arc_anon->arcs_mtx);
-	mutex_destroy(&arc_mru->arcs_mtx);
-	mutex_destroy(&arc_mru_ghost->arcs_mtx);
-	mutex_destroy(&arc_mfu->arcs_mtx);
-	mutex_destroy(&arc_mfu_ghost->arcs_mtx);
-
+	for (i = 0; i < ARC_BUFC_NUMLISTS; i++) {
+		list_destroy(&arc_mru->arcs_lists[i]);
+		list_destroy(&arc_mru_ghost->arcs_lists[i]);
+		list_destroy(&arc_mfu->arcs_lists[i]);
+		list_destroy(&arc_mfu_ghost->arcs_lists[i]);
+
+		mutex_destroy(&arc_anon->arcs_locks[i].arcs_lock);
+		mutex_destroy(&arc_mru->arcs_locks[i].arcs_lock);
+		mutex_destroy(&arc_mru_ghost->arcs_locks[i].arcs_lock);
+		mutex_destroy(&arc_mfu->arcs_locks[i].arcs_lock);
+		mutex_destroy(&arc_mfu_ghost->arcs_locks[i].arcs_lock);
+	}
+	
 	mutex_destroy(&zfs_write_limit_lock);
 
 	buf_fini();
@@ -4021,26 +4156,26 @@ static list_t *
 l2arc_list_locked(int list_num, kmutex_t **lock)
 {
 	list_t *list;
+	int idx;
+	
+	ASSERT(list_num >= 0 && list_num <= 2*ARC_BUFC_NUMLISTS);
 
-	ASSERT(list_num >= 0 && list_num <= 3);
-
-	switch (list_num) {
-	case 0:
-		list = &arc_mfu->arcs_list[ARC_BUFC_METADATA];
-		*lock = &arc_mfu->arcs_mtx;
-		break;
-	case 1:
-		list = &arc_mru->arcs_list[ARC_BUFC_METADATA];
-		*lock = &arc_mru->arcs_mtx;
-		break;
-	case 2:
-		list = &arc_mfu->arcs_list[ARC_BUFC_DATA];
-		*lock = &arc_mfu->arcs_mtx;
-		break;
-	case 3:
-		list = &arc_mru->arcs_list[ARC_BUFC_DATA];
-		*lock = &arc_mru->arcs_mtx;
-		break;
+	if (list_num < ARC_BUFC_NUMMETADATALISTS) {
+		list = &arc_mfu->arcs_lists[list_num];
+		*lock = ARCS_LOCK(arc_mfu, list_num);
+	} else if (list_num < ARC_BUFC_NUMMETADATALISTS*2) {
+		idx = list_num - ARC_BUFC_NUMMETADATALISTS;
+		list = &arc_mru->arcs_lists[idx];
+		*lock = ARCS_LOCK(arc_mru, idx);
+	} else if (list_num < (ARC_BUFC_NUMMETADATALISTS*2 +
+		ARC_BUFC_NUMDATALISTS)) {
+		idx = list_num - ARC_BUFC_NUMLISTS;
+		list = &arc_mfu->arcs_lists[idx];
+		*lock = ARCS_LOCK(arc_mfu, idx);
+	} else {
+		idx = list_num - ARC_BUFC_NUMLISTS - ARC_BUFC_NUMMETADATALISTS;
+		list = &arc_mru->arcs_lists[idx];
+		*lock = ARCS_LOCK(arc_mru, idx);
 	}
 
 	ASSERT(!(MUTEX_HELD(*lock)));
@@ -4211,7 +4346,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de
 	 * Copy buffers for L2ARC writing.
 	 */
 	mutex_enter(&l2arc_buflist_mtx);
-	for (try = 0; try <= 3; try++) {
+	for (try = 0; try <= 2*ARC_BUFC_NUMLISTS; try++) {
 		list = l2arc_list_locked(try, &list_lock);
 		passed_sz = 0;
 

Modified: user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Mon Nov 30 23:54:16 2009	(r199977)
+++ user/kmacy/releng_8_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Tue Dec  1 00:42:17 2009	(r199978)
@@ -177,22 +177,22 @@ dmu_bonus_hold(objset_t *os, uint64_t ob
  * whose dnodes are in the same block.
  */
 static int
-dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
-    uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
+dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
+    int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp, uint32_t flags)
 {
 	dsl_pool_t *dp = NULL;
 	dmu_buf_t **dbp;
 	uint64_t blkid, nblks, i;
-	uint32_t flags;
+	uint32_t dbuf_flags;
 	int err;
 	zio_t *zio;
 	hrtime_t start;
 
 	ASSERT(length <= DMU_MAX_ACCESS);
 
-	flags = DB_RF_CANFAIL | DB_RF_NEVERWAIT;
-	if (length > zfetch_array_rd_sz)
-		flags |= DB_RF_NOPREFETCH;
+	dbuf_flags = DB_RF_CANFAIL | DB_RF_NEVERWAIT;
+	if (flags & DMU_READ_NO_PREFETCH || length > zfetch_array_rd_sz)
+		dbuf_flags |= DB_RF_NOPREFETCH;
 
 	rw_enter(&dn->dn_struct_rwlock, RW_READER);
 	if (dn->dn_datablkshift) {
@@ -230,7 +230,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn,
 		/* initiate async i/o */
 		if (read) {
 			rw_exit(&dn->dn_struct_rwlock);
-			(void) dbuf_read(db, zio, flags);
+			(void) dbuf_read(db, zio, dbuf_flags);
 			rw_enter(&dn->dn_struct_rwlock, RW_READER);
 		}
 		dbp[i] = &db->db;
@@ -282,7 +282,7 @@ dmu_buf_hold_array(objset_t *os, uint64_
 		return (err);
 
 	err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag,
-	    numbufsp, dbpp);
+	    numbufsp, dbpp, DMU_READ_PREFETCH);
 
 	dnode_rele(dn, FTAG);
 
@@ -297,7 +297,7 @@ dmu_buf_hold_array_by_bonus(dmu_buf_t *d
 	int err;
 
 	err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag,
-	    numbufsp, dbpp);
+	    numbufsp, dbpp, DMU_READ_PREFETCH);
 
 	return (err);
 }
@@ -536,8 +536,8 @@ dmu_free_range(objset_t *os, uint64_t ob
 }
 
 int
-dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
-    void *buf)
+dmu_read_flags(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
+    void *buf, uint32_t flags)
 {
 	dnode_t *dn;
 	dmu_buf_t **dbp;
@@ -567,7 +567,7 @@ dmu_read(objset_t *os, uint64_t object, 
 		 * to be reading in parallel.

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

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 03:52:51 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 45EB1106566B;
	Tue,  1 Dec 2009 03:52:51 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 35A498FC24;
	Tue,  1 Dec 2009 03:52:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB13qpYC051773;
	Tue, 1 Dec 2009 03:52:51 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB13qpQ2051771;
	Tue, 1 Dec 2009 03:52:51 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200912010352.nB13qpQ2051771@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Tue, 1 Dec 2009 03:52:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199982 -
	user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 03:52:51 -0000

Author: kmacy
Date: Tue Dec  1 03:52:50 2009
New Revision: 199982
URL: http://svn.freebsd.org/changeset/base/199982

Log:
  reduce I/O priorities to avoid starving network threads

Modified:
  user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/proc.h

Modified: user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/proc.h
==============================================================================
--- user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/proc.h	Tue Dec  1 03:00:16 2009	(r199981)
+++ user/kmacy/releng_8_fcs/sys/cddl/compat/opensolaris/sys/proc.h	Tue Dec  1 03:52:50 2009	(r199982)
@@ -43,8 +43,8 @@
 #ifdef _KERNEL
 
 #define	CPU		curcpu
-#define	minclsyspri	PRIBIO
-#define	maxclsyspri	PVM
+#define	maxclsyspri	PRIBIO
+#define	minclsyspri	PVFS
 #define	max_ncpus	mp_ncpus
 #define	boot_max_ncpus	mp_ncpus
 

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 15:27:41 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 27E621065676;
	Tue,  1 Dec 2009 15:27:41 +0000 (UTC) (envelope-from eri@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 12AC08FC23;
	Tue,  1 Dec 2009 15:27:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1FRfNq068618;
	Tue, 1 Dec 2009 15:27:41 GMT (envelope-from eri@svn.freebsd.org)
Received: (from eri@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1FRefT068586;
	Tue, 1 Dec 2009 15:27:40 GMT (envelope-from eri@svn.freebsd.org)
Message-Id: <200912011527.nB1FRefT068586@svn.freebsd.org>
From: Ermal Luçi <eri@FreeBSD.org>
Date: Tue, 1 Dec 2009 15:27:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199994 - in user/eri/pf45/head: . bin bin/cat bin/csh
	bin/getfacl bin/ps bin/pwait bin/sh bin/uuidgen contrib/bind9
	contrib/bind9/bin/dig contrib/bind9/bin/named
	contrib/bind9/lib/dns ...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 15:27:41 -0000

Author: eri
Date: Tue Dec  1 15:27:39 2009
New Revision: 199994
URL: http://svn.freebsd.org/changeset/base/199994

Log:
  MFH

Added:
  user/eri/pf45/head/bin/pwait/
     - copied from r199991, head/bin/pwait/
  user/eri/pf45/head/etc/etc.pc98/
     - copied from r199991, head/etc/etc.pc98/
  user/eri/pf45/head/include/termios.h
     - copied unchanged from r199991, head/include/termios.h
  user/eri/pf45/head/lib/libc/gen/_once_stub.c
     - copied unchanged from r199991, head/lib/libc/gen/_once_stub.c
  user/eri/pf45/head/lib/libc/nls/ja_JP.UTF-8.msg
     - copied unchanged from r199991, head/lib/libc/nls/ja_JP.UTF-8.msg
  user/eri/pf45/head/lib/libc/nls/ja_JP.eucJP.msg
     - copied unchanged from r199991, head/lib/libc/nls/ja_JP.eucJP.msg
  user/eri/pf45/head/lib/libc/sys/pselect.2
     - copied unchanged from r199991, head/lib/libc/sys/pselect.2
  user/eri/pf45/head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S
     - copied unchanged from r199991, head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S
  user/eri/pf45/head/share/examples/ses/srcs/eltsub.h
     - copied unchanged from r199991, head/share/examples/ses/srcs/eltsub.h
  user/eri/pf45/head/share/man/man4/ada.4
     - copied unchanged from r199991, head/share/man/man4/ada.4
  user/eri/pf45/head/share/man/man4/amdsbwd.4
     - copied unchanged from r199991, head/share/man/man4/amdsbwd.4
  user/eri/pf45/head/share/man/man4/atp.4
     - copied unchanged from r199991, head/share/man/man4/atp.4
  user/eri/pf45/head/share/man/man9/BUS_BIND_INTR.9
     - copied unchanged from r199991, head/share/man/man9/BUS_BIND_INTR.9
  user/eri/pf45/head/share/man/man9/BUS_DESCRIBE_INTR.9
     - copied unchanged from r199991, head/share/man/man9/BUS_DESCRIBE_INTR.9
  user/eri/pf45/head/sys/boot/i386/libi386/spinconsole.c
     - copied unchanged from r199991, head/sys/boot/i386/libi386/spinconsole.c
  user/eri/pf45/head/sys/boot/i386/zfsloader/
     - copied from r199991, head/sys/boot/i386/zfsloader/
  user/eri/pf45/head/sys/cam/ata/ata_pmp.c
     - copied unchanged from r199991, head/sys/cam/ata/ata_pmp.c
  user/eri/pf45/head/sys/contrib/dev/acpica/common/dmextern.c
     - copied unchanged from r199991, head/sys/contrib/dev/acpica/common/dmextern.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nsrepair2.c
     - copied unchanged from r199991, head/sys/contrib/dev/acpica/namespace/nsrepair2.c
  user/eri/pf45/head/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu
     - copied unchanged from r199991, head/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu
  user/eri/pf45/head/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu
     - copied unchanged from r199991, head/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu
  user/eri/pf45/head/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu
     - copied unchanged from r199991, head/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu
  user/eri/pf45/head/sys/dev/amdsbwd/
     - copied from r199991, head/sys/dev/amdsbwd/
  user/eri/pf45/head/sys/dev/usb/controller/ehcireg.h
     - copied unchanged from r199991, head/sys/dev/usb/controller/ehcireg.h
  user/eri/pf45/head/sys/dev/usb/controller/ohcireg.h
     - copied unchanged from r199991, head/sys/dev/usb/controller/ohcireg.h
  user/eri/pf45/head/sys/dev/usb/controller/uhcireg.h
     - copied unchanged from r199991, head/sys/dev/usb/controller/uhcireg.h
  user/eri/pf45/head/sys/dev/usb/input/atp.c
     - copied unchanged from r199991, head/sys/dev/usb/input/atp.c
  user/eri/pf45/head/sys/ia64/ia64/highfp.c
     - copied unchanged from r199991, head/sys/ia64/ia64/highfp.c
  user/eri/pf45/head/sys/libkern/inet_aton.c
     - copied unchanged from r199991, head/sys/libkern/inet_aton.c
  user/eri/pf45/head/sys/modules/amdsbwd/
     - copied from r199991, head/sys/modules/amdsbwd/
  user/eri/pf45/head/sys/modules/iwnfw/Makefile.inc
     - copied unchanged from r199991, head/sys/modules/iwnfw/Makefile.inc
  user/eri/pf45/head/sys/modules/iwnfw/iwn4965/
     - copied from r199991, head/sys/modules/iwnfw/iwn4965/
  user/eri/pf45/head/sys/modules/iwnfw/iwn5000/
     - copied from r199991, head/sys/modules/iwnfw/iwn5000/
  user/eri/pf45/head/sys/modules/iwnfw/iwn5150/
     - copied from r199991, head/sys/modules/iwnfw/iwn5150/
  user/eri/pf45/head/sys/modules/usb/atp/
     - copied from r199991, head/sys/modules/usb/atp/
  user/eri/pf45/head/sys/sys/_termios.h
     - copied unchanged from r199991, head/sys/sys/_termios.h
  user/eri/pf45/head/tools/regression/bin/sh/builtins/cd2.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/builtins/cd2.0
  user/eri/pf45/head/tools/regression/bin/sh/builtins/fc1.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/builtins/fc1.0
  user/eri/pf45/head/tools/regression/bin/sh/builtins/trap3.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/builtins/trap3.0
  user/eri/pf45/head/tools/regression/bin/sh/execution/redir1.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/execution/redir1.0
  user/eri/pf45/head/tools/regression/bin/sh/execution/redir2.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/execution/redir2.0
  user/eri/pf45/head/tools/regression/bin/sh/expansion/question1.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/expansion/question1.0
  user/eri/pf45/head/tools/regression/bin/sh/expansion/set-u1.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/expansion/set-u1.0
  user/eri/pf45/head/tools/regression/bin/sh/expansion/set-u2.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/expansion/set-u2.0
  user/eri/pf45/head/tools/regression/bin/sh/parser/for1.0
     - copied unchanged from r199991, head/tools/regression/bin/sh/parser/for1.0
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/tests/test0084.h
     - copied unchanged from r199991, head/tools/regression/bpf/bpf_filter/tests/test0084.h
  user/eri/pf45/head/tools/regression/lib/libutil/test-pidfile.c
     - copied unchanged from r199991, head/tools/regression/lib/libutil/test-pidfile.c
  user/eri/pf45/head/tools/tools/nanobsd/pcengines/
     - copied from r199991, head/tools/tools/nanobsd/pcengines/
Deleted:
  user/eri/pf45/head/lib/libc/gen/pselect.3
  user/eri/pf45/head/lib/libc/gen/pselect.c
  user/eri/pf45/head/sys/compat/x86bios/x86bios_alloc.c
  user/eri/pf45/head/sys/contrib/dev/iwn/iwlwifi-4965-4.44.17.fw.uu
  user/eri/pf45/head/sys/contrib/x86emu/x86emu_util.c
  user/eri/pf45/head/sys/dev/ata/ata-usb.c
  user/eri/pf45/head/sys/dev/usb/serial/uch341.c
  user/eri/pf45/head/sys/modules/ata/atausb/
  user/eri/pf45/head/sys/modules/usb/uch341/
  user/eri/pf45/head/usr.sbin/sysinstall/acpi.c
  user/eri/pf45/head/usr.sbin/sysinstall/acpidump.h
  user/eri/pf45/head/usr.sbin/sysinstall/biosmptable.c
Modified:
  user/eri/pf45/head/Makefile.inc1
  user/eri/pf45/head/ObsoleteFiles.inc
  user/eri/pf45/head/UPDATING
  user/eri/pf45/head/bin/Makefile
  user/eri/pf45/head/bin/cat/Makefile
  user/eri/pf45/head/bin/csh/iconv_stub.c
  user/eri/pf45/head/bin/getfacl/getfacl.1
  user/eri/pf45/head/bin/ps/keyword.c
  user/eri/pf45/head/bin/sh/arith_lex.l
  user/eri/pf45/head/bin/sh/cd.c
  user/eri/pf45/head/bin/sh/error.c
  user/eri/pf45/head/bin/sh/error.h
  user/eri/pf45/head/bin/sh/eval.c
  user/eri/pf45/head/bin/sh/expand.c
  user/eri/pf45/head/bin/sh/histedit.c
  user/eri/pf45/head/bin/sh/input.c
  user/eri/pf45/head/bin/sh/input.h
  user/eri/pf45/head/bin/sh/jobs.c
  user/eri/pf45/head/bin/sh/main.c
  user/eri/pf45/head/bin/sh/output.c
  user/eri/pf45/head/bin/sh/output.h
  user/eri/pf45/head/bin/sh/parser.c
  user/eri/pf45/head/bin/sh/redir.c
  user/eri/pf45/head/bin/sh/sh.1
  user/eri/pf45/head/bin/sh/trap.c
  user/eri/pf45/head/bin/sh/var.c
  user/eri/pf45/head/bin/uuidgen/Makefile
  user/eri/pf45/head/contrib/bind9/CHANGES
  user/eri/pf45/head/contrib/bind9/bin/dig/dighost.c
  user/eri/pf45/head/contrib/bind9/bin/named/query.c
  user/eri/pf45/head/contrib/bind9/lib/dns/api
  user/eri/pf45/head/contrib/bind9/lib/dns/include/dns/types.h
  user/eri/pf45/head/contrib/bind9/lib/dns/masterdump.c
  user/eri/pf45/head/contrib/bind9/lib/dns/rbtdb.c
  user/eri/pf45/head/contrib/bind9/lib/dns/resolver.c
  user/eri/pf45/head/contrib/bind9/lib/dns/validator.c
  user/eri/pf45/head/contrib/bind9/version
  user/eri/pf45/head/contrib/ee/ee.c
  user/eri/pf45/head/contrib/gcc/config/i386/i386.c
  user/eri/pf45/head/contrib/ipfilter/man/ipf.8
  user/eri/pf45/head/contrib/ncurses/ncurses/base/lib_getch.c
  user/eri/pf45/head/contrib/telnet/telnet/externs.h
  user/eri/pf45/head/crypto/openssh/ssh_namespace.h
  user/eri/pf45/head/crypto/openssh/sshd.c
  user/eri/pf45/head/etc/Makefile
  user/eri/pf45/head/etc/defaults/rc.conf
  user/eri/pf45/head/etc/etc.amd64/ttys
  user/eri/pf45/head/etc/etc.arm/ttys
  user/eri/pf45/head/etc/etc.i386/ttys
  user/eri/pf45/head/etc/etc.ia64/ttys
  user/eri/pf45/head/etc/etc.mips/ttys
  user/eri/pf45/head/etc/etc.powerpc/ttys
  user/eri/pf45/head/etc/etc.sparc64/ttys
  user/eri/pf45/head/etc/gettytab
  user/eri/pf45/head/etc/rc.d/faith
  user/eri/pf45/head/etc/rc.d/jail
  user/eri/pf45/head/etc/rc.d/netoptions
  user/eri/pf45/head/etc/rc.d/stf
  user/eri/pf45/head/etc/rc.subr
  user/eri/pf45/head/etc/root/dot.profile
  user/eri/pf45/head/games/factor/factor.c
  user/eri/pf45/head/games/fortune/datfiles/fortunes
  user/eri/pf45/head/games/fortune/datfiles/fortunes-o.real
  user/eri/pf45/head/gnu/lib/libgcov/Makefile
  user/eri/pf45/head/include/Makefile
  user/eri/pf45/head/include/signal.h
  user/eri/pf45/head/lib/bind/config.h
  user/eri/pf45/head/lib/libbluetooth/bluetooth.3
  user/eri/pf45/head/lib/libbluetooth/bluetooth.h
  user/eri/pf45/head/lib/libc/compat-43/Makefile.inc
  user/eri/pf45/head/lib/libc/compat-43/Symbol.map
  user/eri/pf45/head/lib/libc/compat-43/sigcompat.c
  user/eri/pf45/head/lib/libc/compat-43/sigpause.2
  user/eri/pf45/head/lib/libc/gen/Makefile.inc
  user/eri/pf45/head/lib/libc/gen/Symbol.map
  user/eri/pf45/head/lib/libc/gen/exec.c
  user/eri/pf45/head/lib/libc/gen/fmtmsg.c
  user/eri/pf45/head/lib/libc/gen/fts.3
  user/eri/pf45/head/lib/libc/gen/fts.c
  user/eri/pf45/head/lib/libc/gen/getcap.c
  user/eri/pf45/head/lib/libc/gen/getusershell.c
  user/eri/pf45/head/lib/libc/gen/posix_spawn.3
  user/eri/pf45/head/lib/libc/gen/posix_spawn_file_actions_addopen.3
  user/eri/pf45/head/lib/libc/gen/posix_spawn_file_actions_init.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_getflags.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_getpgroup.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_getschedparam.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_getschedpolicy.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_getsigdefault.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_getsigmask.3
  user/eri/pf45/head/lib/libc/gen/posix_spawnattr_init.3
  user/eri/pf45/head/lib/libc/gen/tzset.3
  user/eri/pf45/head/lib/libc/gen/wordexp.c
  user/eri/pf45/head/lib/libc/include/libc_private.h
  user/eri/pf45/head/lib/libc/locale/isblank.3
  user/eri/pf45/head/lib/libc/locale/isgraph.3
  user/eri/pf45/head/lib/libc/locale/isprint.3
  user/eri/pf45/head/lib/libc/locale/nl_langinfo.3
  user/eri/pf45/head/lib/libc/net/gai_strerror.c
  user/eri/pf45/head/lib/libc/net/getnameinfo.c
  user/eri/pf45/head/lib/libc/net/ip6opt.c
  user/eri/pf45/head/lib/libc/net/sctp_send.3
  user/eri/pf45/head/lib/libc/net/sctp_sendmsg.3
  user/eri/pf45/head/lib/libc/nls/C.msg
  user/eri/pf45/head/lib/libc/nls/Makefile.inc
  user/eri/pf45/head/lib/libc/nls/hu_HU.ISO8859-2.msg
  user/eri/pf45/head/lib/libc/nls/ko_KR.UTF-8.msg   (contents, props changed)
  user/eri/pf45/head/lib/libc/nls/ko_KR.eucKR.msg   (contents, props changed)
  user/eri/pf45/head/lib/libc/nls/nl_NL.ISO8859-1.msg
  user/eri/pf45/head/lib/libc/nls/uk_UA.UTF-8.msg   (contents, props changed)
  user/eri/pf45/head/lib/libc/posix1e/acl_from_text.c
  user/eri/pf45/head/lib/libc/rpc/clnt_raw.c
  user/eri/pf45/head/lib/libc/rpc/getnetconfig.c
  user/eri/pf45/head/lib/libc/rpc/getrpcent.c
  user/eri/pf45/head/lib/libc/rpc/key_call.c
  user/eri/pf45/head/lib/libc/rpc/svc_raw.c
  user/eri/pf45/head/lib/libc/stdio/fgetws.c
  user/eri/pf45/head/lib/libc/stdio/fvwrite.c
  user/eri/pf45/head/lib/libc/stdio/vfwprintf.c
  user/eri/pf45/head/lib/libc/stdio/xprintf_time.c
  user/eri/pf45/head/lib/libc/stdlib/malloc.c
  user/eri/pf45/head/lib/libc/stdtime/localtime.c
  user/eri/pf45/head/lib/libc/string/strcat.3
  user/eri/pf45/head/lib/libc/sys/Makefile.inc
  user/eri/pf45/head/lib/libc/sys/Symbol.map
  user/eri/pf45/head/lib/libc/sys/accept.2
  user/eri/pf45/head/lib/libc/sys/mmap.2
  user/eri/pf45/head/lib/libc/sys/setpgid.2
  user/eri/pf45/head/lib/libc/sys/vfork.2
  user/eri/pf45/head/lib/libc/yp/yplib.c
  user/eri/pf45/head/lib/libdevinfo/devinfo.h
  user/eri/pf45/head/lib/libfetch/common.c
  user/eri/pf45/head/lib/libfetch/ftp.c
  user/eri/pf45/head/lib/libkvm/kvm_i386.c
  user/eri/pf45/head/lib/libpam/modules/pam_unix/pam_unix.8
  user/eri/pf45/head/lib/libpmc/libpmc.c
  user/eri/pf45/head/lib/libpmc/pmc_attach.3
  user/eri/pf45/head/lib/librt/Makefile
  user/eri/pf45/head/lib/librt/mq.c
  user/eri/pf45/head/lib/librt/sigev_thread.c
  user/eri/pf45/head/lib/libstand/open.c
  user/eri/pf45/head/lib/libstand/udp.c
  user/eri/pf45/head/lib/libtacplus/taclib.c
  user/eri/pf45/head/lib/libthr/arch/ia64/Makefile.inc
  user/eri/pf45/head/lib/libthr/arch/ia64/include/pthread_md.h
  user/eri/pf45/head/lib/libthr/thread/thr_syscalls.c
  user/eri/pf45/head/lib/libusb/libusb.h
  user/eri/pf45/head/lib/libusb/libusb10.c
  user/eri/pf45/head/lib/libusb/libusb10.h
  user/eri/pf45/head/lib/libusb/libusb10_desc.c
  user/eri/pf45/head/lib/libusb/libusb10_io.c
  user/eri/pf45/head/lib/libusb/libusb20.3
  user/eri/pf45/head/lib/libusb/libusb20.c
  user/eri/pf45/head/lib/libusb/libusb20.h
  user/eri/pf45/head/lib/libusb/libusb20_desc.c
  user/eri/pf45/head/lib/libusb/libusb20_ugen20.c
  user/eri/pf45/head/lib/libutil/pw_util.c
  user/eri/pf45/head/libexec/rtld-elf/rtld.c
  user/eri/pf45/head/libexec/rtld-elf/rtld.h
  user/eri/pf45/head/release/doc/README
  user/eri/pf45/head/release/doc/en_US.ISO8859-1/errata/article.sgml
  user/eri/pf45/head/release/doc/share/mk/doc.relnotes.mk
  user/eri/pf45/head/release/doc/share/sgml/release.dsl
  user/eri/pf45/head/release/doc/share/sgml/release.ent
  user/eri/pf45/head/release/picobsd/bridge/PICOBSD
  user/eri/pf45/head/release/picobsd/floppy.tree/etc/ttys
  user/eri/pf45/head/release/picobsd/tinyware/oinit/oinit.c
  user/eri/pf45/head/release/scripts/package-split.py
  user/eri/pf45/head/sbin/Makefile.inc
  user/eri/pf45/head/sbin/adjkerntz/Makefile
  user/eri/pf45/head/sbin/atacontrol/Makefile
  user/eri/pf45/head/sbin/atacontrol/atacontrol.c
  user/eri/pf45/head/sbin/atm/atmconfig/Makefile
  user/eri/pf45/head/sbin/badsect/Makefile
  user/eri/pf45/head/sbin/bsdlabel/Makefile
  user/eri/pf45/head/sbin/camcontrol/Makefile
  user/eri/pf45/head/sbin/camcontrol/camcontrol.8
  user/eri/pf45/head/sbin/camcontrol/camcontrol.c
  user/eri/pf45/head/sbin/ccdconfig/Makefile
  user/eri/pf45/head/sbin/clri/Makefile
  user/eri/pf45/head/sbin/comcontrol/Makefile
  user/eri/pf45/head/sbin/conscontrol/Makefile
  user/eri/pf45/head/sbin/ddb/ddb_capture.c
  user/eri/pf45/head/sbin/dhclient/Makefile
  user/eri/pf45/head/sbin/dhclient/bpf.c
  user/eri/pf45/head/sbin/dhclient/dhcpd.h
  user/eri/pf45/head/sbin/dhclient/packet.c
  user/eri/pf45/head/sbin/dmesg/Makefile
  user/eri/pf45/head/sbin/dump/Makefile
  user/eri/pf45/head/sbin/dumpfs/Makefile
  user/eri/pf45/head/sbin/dumpfs/dumpfs.c
  user/eri/pf45/head/sbin/dumpon/Makefile
  user/eri/pf45/head/sbin/fsck/fsck.c
  user/eri/pf45/head/sbin/geom/Makefile
  user/eri/pf45/head/sbin/geom/Makefile.inc
  user/eri/pf45/head/sbin/geom/class/part/Makefile
  user/eri/pf45/head/sbin/geom/class/part/geom_part.c
  user/eri/pf45/head/sbin/geom/class/part/gpart.8
  user/eri/pf45/head/sbin/ggate/Makefile.inc
  user/eri/pf45/head/sbin/growfs/Makefile
  user/eri/pf45/head/sbin/gvinum/Makefile
  user/eri/pf45/head/sbin/ifconfig/ifconfig.c
  user/eri/pf45/head/sbin/init/Makefile
  user/eri/pf45/head/sbin/ipf/Makefile.inc
  user/eri/pf45/head/sbin/ipfw/dummynet.c
  user/eri/pf45/head/sbin/iscontrol/Makefile
  user/eri/pf45/head/sbin/kldunload/Makefile
  user/eri/pf45/head/sbin/ldconfig/Makefile
  user/eri/pf45/head/sbin/md5/Makefile
  user/eri/pf45/head/sbin/mdconfig/Makefile
  user/eri/pf45/head/sbin/mdmfs/Makefile
  user/eri/pf45/head/sbin/mknod/mknod.8
  user/eri/pf45/head/sbin/mksnap_ffs/Makefile
  user/eri/pf45/head/sbin/mount/Makefile
  user/eri/pf45/head/sbin/mount/mount.8
  user/eri/pf45/head/sbin/mount_autofs/Makefile
  user/eri/pf45/head/sbin/mount_cd9660/Makefile
  user/eri/pf45/head/sbin/mount_cd9660/mount_cd9660.c
  user/eri/pf45/head/sbin/mount_ext2fs/Makefile
  user/eri/pf45/head/sbin/mount_msdosfs/Makefile
  user/eri/pf45/head/sbin/mount_nfs/mount_nfs.c
  user/eri/pf45/head/sbin/mount_nullfs/Makefile
  user/eri/pf45/head/sbin/mount_reiserfs/Makefile
  user/eri/pf45/head/sbin/mount_unionfs/Makefile
  user/eri/pf45/head/sbin/newfs_msdos/Makefile
  user/eri/pf45/head/sbin/nfsiod/Makefile
  user/eri/pf45/head/sbin/pfctl/Makefile
  user/eri/pf45/head/sbin/rcorder/Makefile
  user/eri/pf45/head/sbin/reboot/Makefile
  user/eri/pf45/head/sbin/reboot/reboot.c
  user/eri/pf45/head/sbin/recoverdisk/Makefile
  user/eri/pf45/head/sbin/routed/Makefile
  user/eri/pf45/head/sbin/savecore/Makefile
  user/eri/pf45/head/sbin/sconfig/Makefile
  user/eri/pf45/head/sbin/shutdown/Makefile
  user/eri/pf45/head/sbin/spppcontrol/Makefile
  user/eri/pf45/head/sbin/swapon/Makefile
  user/eri/pf45/head/sbin/sysctl/sysctl.c
  user/eri/pf45/head/sbin/tunefs/Makefile
  user/eri/pf45/head/sbin/tunefs/tunefs.8
  user/eri/pf45/head/secure/lib/libssh/Makefile
  user/eri/pf45/head/secure/usr.bin/bdes/bdes.c
  user/eri/pf45/head/share/examples/ses/srcs/chpmon.c
  user/eri/pf45/head/share/examples/ses/srcs/eltsub.c
  user/eri/pf45/head/share/examples/ses/srcs/getencstat.c
  user/eri/pf45/head/share/examples/ses/srcs/getnobj.c
  user/eri/pf45/head/share/examples/ses/srcs/getobjmap.c
  user/eri/pf45/head/share/examples/ses/srcs/getobjstat.c
  user/eri/pf45/head/share/examples/ses/srcs/inienc.c
  user/eri/pf45/head/share/examples/ses/srcs/sesd.c
  user/eri/pf45/head/share/examples/ses/srcs/setencstat.c
  user/eri/pf45/head/share/examples/ses/srcs/setobjstat.c
  user/eri/pf45/head/share/man/man3/queue.3
  user/eri/pf45/head/share/man/man3/tree.3
  user/eri/pf45/head/share/man/man4/Makefile
  user/eri/pf45/head/share/man/man4/acpi_hp.4
  user/eri/pf45/head/share/man/man4/acpi_wmi.4
  user/eri/pf45/head/share/man/man4/ata.4
  user/eri/pf45/head/share/man/man4/atapicam.4
  user/eri/pf45/head/share/man/man4/bge.4
  user/eri/pf45/head/share/man/man4/hifn.4
  user/eri/pf45/head/share/man/man4/hptrr.4
  user/eri/pf45/head/share/man/man4/ichwd.4
  user/eri/pf45/head/share/man/man4/ipsec.4
  user/eri/pf45/head/share/man/man4/iwn.4
  user/eri/pf45/head/share/man/man4/iwnfw.4
  user/eri/pf45/head/share/man/man4/mac_mls.4
  user/eri/pf45/head/share/man/man4/malo.4
  user/eri/pf45/head/share/man/man4/mfi.4
  user/eri/pf45/head/share/man/man4/msk.4
  user/eri/pf45/head/share/man/man4/sbp_targ.4
  user/eri/pf45/head/share/man/man4/sctp.4
  user/eri/pf45/head/share/man/man4/snd_hda.4
  user/eri/pf45/head/share/man/man4/targ.4
  user/eri/pf45/head/share/man/man4/tty.4
  user/eri/pf45/head/share/man/man4/umass.4
  user/eri/pf45/head/share/man/man4/urtw.4
  user/eri/pf45/head/share/man/man4/wi.4
  user/eri/pf45/head/share/man/man5/ar.5
  user/eri/pf45/head/share/man/man5/make.conf.5
  user/eri/pf45/head/share/man/man5/msdosfs.5
  user/eri/pf45/head/share/man/man5/rc.conf.5
  user/eri/pf45/head/share/man/man5/regdomain.5
  user/eri/pf45/head/share/man/man7/adding_user.7
  user/eri/pf45/head/share/man/man8/Makefile
  user/eri/pf45/head/share/man/man8/rc.8
  user/eri/pf45/head/share/man/man9/Makefile
  user/eri/pf45/head/share/man/man9/get_cyclecount.9
  user/eri/pf45/head/share/misc/bsd-family-tree
  user/eri/pf45/head/share/misc/committers-ports.dot
  user/eri/pf45/head/share/misc/committers-src.dot
  user/eri/pf45/head/share/misc/iso3166
  user/eri/pf45/head/share/misc/organization.dot
  user/eri/pf45/head/share/mk/bsd.sys.mk
  user/eri/pf45/head/share/skel/dot.profile
  user/eri/pf45/head/share/timedef/ja_JP.SJIS.src
  user/eri/pf45/head/share/timedef/ja_JP.UTF-8.src
  user/eri/pf45/head/share/timedef/ja_JP.eucJP.src
  user/eri/pf45/head/share/zoneinfo/Makefile
  user/eri/pf45/head/share/zoneinfo/antarctica
  user/eri/pf45/head/share/zoneinfo/asia
  user/eri/pf45/head/share/zoneinfo/australasia
  user/eri/pf45/head/share/zoneinfo/etcetera
  user/eri/pf45/head/share/zoneinfo/europe
  user/eri/pf45/head/share/zoneinfo/southamerica
  user/eri/pf45/head/share/zoneinfo/zone.tab
  user/eri/pf45/head/sys/amd64/acpica/acpi_wakecode.S
  user/eri/pf45/head/sys/amd64/acpica/acpi_wakeup.c
  user/eri/pf45/head/sys/amd64/amd64/bpf_jit_machdep.c
  user/eri/pf45/head/sys/amd64/amd64/bpf_jit_machdep.h
  user/eri/pf45/head/sys/amd64/amd64/identcpu.c
  user/eri/pf45/head/sys/amd64/amd64/initcpu.c
  user/eri/pf45/head/sys/amd64/amd64/intr_machdep.c
  user/eri/pf45/head/sys/amd64/amd64/machdep.c
  user/eri/pf45/head/sys/amd64/amd64/mp_machdep.c
  user/eri/pf45/head/sys/amd64/amd64/nexus.c
  user/eri/pf45/head/sys/amd64/amd64/pmap.c
  user/eri/pf45/head/sys/amd64/amd64/trap.c
  user/eri/pf45/head/sys/amd64/amd64/vm_machdep.c
  user/eri/pf45/head/sys/amd64/conf/NOTES
  user/eri/pf45/head/sys/amd64/ia32/ia32_signal.c
  user/eri/pf45/head/sys/amd64/include/intr_machdep.h
  user/eri/pf45/head/sys/amd64/include/md_var.h
  user/eri/pf45/head/sys/amd64/include/param.h
  user/eri/pf45/head/sys/amd64/include/specialreg.h
  user/eri/pf45/head/sys/amd64/isa/isa_dma.c
  user/eri/pf45/head/sys/amd64/linux32/linux32_machdep.c
  user/eri/pf45/head/sys/amd64/linux32/linux32_sysvec.c
  user/eri/pf45/head/sys/arm/arm/db_trace.c
  user/eri/pf45/head/sys/arm/arm/gdb_machdep.c
  user/eri/pf45/head/sys/arm/arm/machdep.c
  user/eri/pf45/head/sys/arm/arm/pmap.c
  user/eri/pf45/head/sys/arm/arm/trap.c
  user/eri/pf45/head/sys/arm/arm/vm_machdep.c
  user/eri/pf45/head/sys/arm/at91/at91_machdep.c
  user/eri/pf45/head/sys/arm/at91/if_ate.c
  user/eri/pf45/head/sys/arm/mv/mv_machdep.c
  user/eri/pf45/head/sys/arm/mv/mv_sata.c
  user/eri/pf45/head/sys/arm/sa11x0/assabet_machdep.c
  user/eri/pf45/head/sys/boot/Makefile
  user/eri/pf45/head/sys/boot/common/Makefile.inc
  user/eri/pf45/head/sys/boot/common/boot.c
  user/eri/pf45/head/sys/boot/common/commands.c
  user/eri/pf45/head/sys/boot/forth/loader.conf.5
  user/eri/pf45/head/sys/boot/i386/Makefile
  user/eri/pf45/head/sys/boot/i386/libi386/Makefile
  user/eri/pf45/head/sys/boot/i386/libi386/elf32_freebsd.c
  user/eri/pf45/head/sys/boot/i386/libi386/elf64_freebsd.c
  user/eri/pf45/head/sys/boot/i386/libi386/vidconsole.c
  user/eri/pf45/head/sys/boot/i386/loader/Makefile
  user/eri/pf45/head/sys/boot/i386/loader/conf.c
  user/eri/pf45/head/sys/boot/i386/zfsboot/zfsboot.c
  user/eri/pf45/head/sys/boot/i386/zfsboot/zfsldr.S
  user/eri/pf45/head/sys/boot/uboot/common/metadata.c
  user/eri/pf45/head/sys/boot/uboot/lib/glue.c
  user/eri/pf45/head/sys/boot/zfs/zfs.c
  user/eri/pf45/head/sys/boot/zfs/zfsimpl.c
  user/eri/pf45/head/sys/cam/ata/ata_all.c
  user/eri/pf45/head/sys/cam/ata/ata_all.h
  user/eri/pf45/head/sys/cam/ata/ata_da.c
  user/eri/pf45/head/sys/cam/ata/ata_xpt.c
  user/eri/pf45/head/sys/cam/cam.c
  user/eri/pf45/head/sys/cam/cam.h
  user/eri/pf45/head/sys/cam/cam_ccb.h
  user/eri/pf45/head/sys/cam/cam_periph.c
  user/eri/pf45/head/sys/cam/cam_periph.h
  user/eri/pf45/head/sys/cam/cam_queue.c
  user/eri/pf45/head/sys/cam/cam_queue.h
  user/eri/pf45/head/sys/cam/cam_xpt.c
  user/eri/pf45/head/sys/cam/cam_xpt_internal.h
  user/eri/pf45/head/sys/cam/scsi/scsi_all.c
  user/eri/pf45/head/sys/cam/scsi/scsi_cd.c
  user/eri/pf45/head/sys/cam/scsi/scsi_ch.c
  user/eri/pf45/head/sys/cam/scsi/scsi_da.c
  user/eri/pf45/head/sys/cam/scsi/scsi_low.c
  user/eri/pf45/head/sys/cam/scsi/scsi_pt.c
  user/eri/pf45/head/sys/cam/scsi/scsi_sa.c
  user/eri/pf45/head/sys/cam/scsi/scsi_sg.c
  user/eri/pf45/head/sys/cam/scsi/scsi_targ_bh.c
  user/eri/pf45/head/sys/cam/scsi/scsi_target.c
  user/eri/pf45/head/sys/cam/scsi/scsi_xpt.c
  user/eri/pf45/head/sys/cddl/boot/zfs/zfsimpl.h
  user/eri/pf45/head/sys/cddl/boot/zfs/zfssubr.c
  user/eri/pf45/head/sys/cddl/compat/opensolaris/sys/vnode.h
  user/eri/pf45/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
  user/eri/pf45/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  user/eri/pf45/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  user/eri/pf45/head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h
  user/eri/pf45/head/sys/compat/freebsd32/freebsd32_misc.c
  user/eri/pf45/head/sys/compat/freebsd32/freebsd32_proto.h
  user/eri/pf45/head/sys/compat/freebsd32/freebsd32_syscall.h
  user/eri/pf45/head/sys/compat/freebsd32/freebsd32_syscalls.c
  user/eri/pf45/head/sys/compat/freebsd32/freebsd32_sysent.c
  user/eri/pf45/head/sys/compat/freebsd32/syscalls.master
  user/eri/pf45/head/sys/compat/linux/linux_ipc.c
  user/eri/pf45/head/sys/compat/linux/linux_socket.c
  user/eri/pf45/head/sys/compat/ndis/kern_ndis.c
  user/eri/pf45/head/sys/compat/ndis/kern_windrv.c
  user/eri/pf45/head/sys/compat/ndis/subr_hal.c
  user/eri/pf45/head/sys/compat/ndis/subr_ndis.c
  user/eri/pf45/head/sys/compat/ndis/subr_ntoskrnl.c
  user/eri/pf45/head/sys/compat/ndis/subr_pe.c
  user/eri/pf45/head/sys/compat/ndis/subr_usbd.c
  user/eri/pf45/head/sys/compat/svr4/svr4_termios.c
  user/eri/pf45/head/sys/compat/x86bios/x86bios.c
  user/eri/pf45/head/sys/compat/x86bios/x86bios.h
  user/eri/pf45/head/sys/conf/NOTES
  user/eri/pf45/head/sys/conf/files
  user/eri/pf45/head/sys/conf/files.amd64
  user/eri/pf45/head/sys/conf/files.i386
  user/eri/pf45/head/sys/conf/files.ia64
  user/eri/pf45/head/sys/conf/options
  user/eri/pf45/head/sys/contrib/altq/altq/altq_hfsc.c
  user/eri/pf45/head/sys/contrib/dev/acpica/changes.txt
  user/eri/pf45/head/sys/contrib/dev/acpica/common/adfile.c
  user/eri/pf45/head/sys/contrib/dev/acpica/common/adisasm.c
  user/eri/pf45/head/sys/contrib/dev/acpica/common/adwalk.c
  user/eri/pf45/head/sys/contrib/dev/acpica/common/dmtable.c
  user/eri/pf45/head/sys/contrib/dev/acpica/common/getopt.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/aslcompile.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/aslerror.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/aslload.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/asllookup.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/asloperands.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/asltransform.c
  user/eri/pf45/head/sys/contrib/dev/acpica/compiler/asltypes.h
  user/eri/pf45/head/sys/contrib/dev/acpica/debugger/dbcmds.c
  user/eri/pf45/head/sys/contrib/dev/acpica/debugger/dbexec.c
  user/eri/pf45/head/sys/contrib/dev/acpica/debugger/dbinput.c
  user/eri/pf45/head/sys/contrib/dev/acpica/debugger/dbstats.c
  user/eri/pf45/head/sys/contrib/dev/acpica/disassembler/dmutils.c
  user/eri/pf45/head/sys/contrib/dev/acpica/disassembler/dmwalk.c
  user/eri/pf45/head/sys/contrib/dev/acpica/dispatcher/dsinit.c
  user/eri/pf45/head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
  user/eri/pf45/head/sys/contrib/dev/acpica/dispatcher/dsobject.c
  user/eri/pf45/head/sys/contrib/dev/acpica/dispatcher/dswload.c
  user/eri/pf45/head/sys/contrib/dev/acpica/events/evgpeblk.c
  user/eri/pf45/head/sys/contrib/dev/acpica/events/evregion.c
  user/eri/pf45/head/sys/contrib/dev/acpica/executer/exconfig.c
  user/eri/pf45/head/sys/contrib/dev/acpica/executer/exconvrt.c
  user/eri/pf45/head/sys/contrib/dev/acpica/executer/exfield.c
  user/eri/pf45/head/sys/contrib/dev/acpica/executer/exoparg1.c
  user/eri/pf45/head/sys/contrib/dev/acpica/executer/exoparg6.c
  user/eri/pf45/head/sys/contrib/dev/acpica/executer/exregion.c
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acapps.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acconfig.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acdebug.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acdisasm.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acglobal.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/aclocal.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acmacros.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acnamesp.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acpixf.h
  user/eri/pf45/head/sys/contrib/dev/acpica/include/acutils.h
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nsdump.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nsdumpdv.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nseval.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nsinit.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nspredef.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nsrepair.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nswalk.c
  user/eri/pf45/head/sys/contrib/dev/acpica/namespace/nsxfeval.c
  user/eri/pf45/head/sys/contrib/dev/acpica/parser/psloop.c
  user/eri/pf45/head/sys/contrib/dev/acpica/parser/psparse.c
  user/eri/pf45/head/sys/contrib/dev/acpica/parser/psxface.c
  user/eri/pf45/head/sys/contrib/dev/acpica/utilities/utglobal.c
  user/eri/pf45/head/sys/contrib/dev/acpica/utilities/utmisc.c
  user/eri/pf45/head/sys/contrib/dev/acpica/utilities/utobject.c
  user/eri/pf45/head/sys/contrib/dev/iwn/LICENSE
  user/eri/pf45/head/sys/contrib/rdma/krping/krping.c
  user/eri/pf45/head/sys/ddb/db_command.c
  user/eri/pf45/head/sys/dev/aac/aac.c
  user/eri/pf45/head/sys/dev/aac/aac_cam.c
  user/eri/pf45/head/sys/dev/aac/aacreg.h
  user/eri/pf45/head/sys/dev/aac/aacvar.h
  user/eri/pf45/head/sys/dev/acpi_support/acpi_aiboost.c
  user/eri/pf45/head/sys/dev/acpica/acpi.c
  user/eri/pf45/head/sys/dev/acpica/acpi_cpu.c
  user/eri/pf45/head/sys/dev/acpica/acpi_dock.c
  user/eri/pf45/head/sys/dev/acpica/acpi_ec.c
  user/eri/pf45/head/sys/dev/acpica/acpi_hpet.c
  user/eri/pf45/head/sys/dev/acpica/acpi_pci.c
  user/eri/pf45/head/sys/dev/acpica/acpi_video.c
  user/eri/pf45/head/sys/dev/acpica/acpivar.h
  user/eri/pf45/head/sys/dev/adb/adb.h
  user/eri/pf45/head/sys/dev/adb/adb_bus.c
  user/eri/pf45/head/sys/dev/adb/adb_mouse.c
  user/eri/pf45/head/sys/dev/ahci/ahci.c
  user/eri/pf45/head/sys/dev/ahci/ahci.h
  user/eri/pf45/head/sys/dev/aic7xxx/ahd_pci.c
  user/eri/pf45/head/sys/dev/aic7xxx/aic79xx.c
  user/eri/pf45/head/sys/dev/aic7xxx/aic79xx.h
  user/eri/pf45/head/sys/dev/aic7xxx/aic79xx_osm.c
  user/eri/pf45/head/sys/dev/aic7xxx/aic79xx_osm.h
  user/eri/pf45/head/sys/dev/aic7xxx/aic79xx_pci.c
  user/eri/pf45/head/sys/dev/aic7xxx/aicasm/aicasm.c
  user/eri/pf45/head/sys/dev/amr/amr.c
  user/eri/pf45/head/sys/dev/an/if_an.c
  user/eri/pf45/head/sys/dev/an/if_an_isa.c
  user/eri/pf45/head/sys/dev/an/if_an_pccard.c
  user/eri/pf45/head/sys/dev/an/if_an_pci.c
  user/eri/pf45/head/sys/dev/an/if_anreg.h
  user/eri/pf45/head/sys/dev/arcmsr/arcmsr.c
  user/eri/pf45/head/sys/dev/arcmsr/arcmsr.h
  user/eri/pf45/head/sys/dev/ata/ata-all.c
  user/eri/pf45/head/sys/dev/ata/ata-all.h
  user/eri/pf45/head/sys/dev/ata/ata-disk.c
  user/eri/pf45/head/sys/dev/ata/ata-dma.c
  user/eri/pf45/head/sys/dev/ata/ata-lowlevel.c
  user/eri/pf45/head/sys/dev/ata/ata-pci.c
  user/eri/pf45/head/sys/dev/ata/ata-pci.h
  user/eri/pf45/head/sys/dev/ata/ata-queue.c
  user/eri/pf45/head/sys/dev/ata/ata-raid.c
  user/eri/pf45/head/sys/dev/ata/ata-sata.c
  user/eri/pf45/head/sys/dev/ata/atapi-cam.c
  user/eri/pf45/head/sys/dev/ata/atapi-cd.c
  user/eri/pf45/head/sys/dev/ata/atapi-fd.c
  user/eri/pf45/head/sys/dev/ata/atapi-tape.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-adaptec.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-ahci.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-intel.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-jmicron.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-marvell.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-nvidia.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-promise.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-serverworks.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-siliconimage.c
  user/eri/pf45/head/sys/dev/ata/chipsets/ata-via.c
  user/eri/pf45/head/sys/dev/ath/ath_hal/ah_regdomain.c
  user/eri/pf45/head/sys/dev/ath/if_ath.c
  user/eri/pf45/head/sys/dev/atkbdc/atkbd.c
  user/eri/pf45/head/sys/dev/bce/if_bce.c
  user/eri/pf45/head/sys/dev/bce/if_bcereg.h
  user/eri/pf45/head/sys/dev/bge/if_bge.c
  user/eri/pf45/head/sys/dev/bge/if_bgereg.h
  user/eri/pf45/head/sys/dev/bwi/if_bwi.c
  user/eri/pf45/head/sys/dev/bwi/if_bwivar.h
  user/eri/pf45/head/sys/dev/ce/if_ce.c
  user/eri/pf45/head/sys/dev/cm/smc90cx6.c
  user/eri/pf45/head/sys/dev/cm/smc90cx6var.h
  user/eri/pf45/head/sys/dev/cp/if_cp.c
  user/eri/pf45/head/sys/dev/ctau/if_ct.c
  user/eri/pf45/head/sys/dev/cx/if_cx.c
  user/eri/pf45/head/sys/dev/cxgb/common/cxgb_ael1002.c
  user/eri/pf45/head/sys/dev/cxgb/common/cxgb_aq100x.c
  user/eri/pf45/head/sys/dev/cxgb/common/cxgb_xgmac.c
  user/eri/pf45/head/sys/dev/cxgb/cxgb_main.c
  user/eri/pf45/head/sys/dev/cxgb/ulp/tom/cxgb_vm.c
  user/eri/pf45/head/sys/dev/de/if_de.c
  user/eri/pf45/head/sys/dev/de/if_devar.h
  user/eri/pf45/head/sys/dev/dpms/dpms.c
  user/eri/pf45/head/sys/dev/drm/drmP.h
  user/eri/pf45/head/sys/dev/drm/drm_scatter.c
  user/eri/pf45/head/sys/dev/drm/mach64_state.c
  user/eri/pf45/head/sys/dev/drm/r600_blit.c
  user/eri/pf45/head/sys/dev/drm/radeon_cp.c
  user/eri/pf45/head/sys/dev/e1000/if_igb.c
  user/eri/pf45/head/sys/dev/ed/if_ed.c
  user/eri/pf45/head/sys/dev/ed/if_ed_pccard.c
  user/eri/pf45/head/sys/dev/ed/if_edvar.h
  user/eri/pf45/head/sys/dev/ep/if_ep.c
  user/eri/pf45/head/sys/dev/ep/if_epvar.h
  user/eri/pf45/head/sys/dev/et/if_et.c
  user/eri/pf45/head/sys/dev/et/if_etreg.h
  user/eri/pf45/head/sys/dev/et/if_etvar.h
  user/eri/pf45/head/sys/dev/fatm/if_fatm.c
  user/eri/pf45/head/sys/dev/fatm/if_fatmvar.h
  user/eri/pf45/head/sys/dev/fb/vesa.c
  user/eri/pf45/head/sys/dev/fb/vesa.h
  user/eri/pf45/head/sys/dev/fb/vgareg.h
  user/eri/pf45/head/sys/dev/fdc/fdc.c
  user/eri/pf45/head/sys/dev/fe/if_fe_pccard.c
  user/eri/pf45/head/sys/dev/gem/if_gem_pci.c
  user/eri/pf45/head/sys/dev/hatm/if_hatm.c
  user/eri/pf45/head/sys/dev/hptrr/hptrr_osm_bsd.c
  user/eri/pf45/head/sys/dev/hwpmc/hwpmc_core.c
  user/eri/pf45/head/sys/dev/hwpmc/hwpmc_logging.c
  user/eri/pf45/head/sys/dev/hwpmc/hwpmc_mod.c
  user/eri/pf45/head/sys/dev/ichwd/ichwd.c
  user/eri/pf45/head/sys/dev/ieee488/ibfoo.c
  user/eri/pf45/head/sys/dev/if_ndis/if_ndis.c
  user/eri/pf45/head/sys/dev/if_ndis/if_ndis_usb.c
  user/eri/pf45/head/sys/dev/ips/ips_disk.c
  user/eri/pf45/head/sys/dev/isp/isp_sbus.c
  user/eri/pf45/head/sys/dev/iwn/if_iwn.c
  user/eri/pf45/head/sys/dev/iwn/if_iwnreg.h
  user/eri/pf45/head/sys/dev/iwn/if_iwnvar.h
  user/eri/pf45/head/sys/dev/ixgb/if_ixgb.c
  user/eri/pf45/head/sys/dev/ixgb/if_ixgb.h
  user/eri/pf45/head/sys/dev/ixgbe/ixgbe.c
  user/eri/pf45/head/sys/dev/lge/if_lge.c
  user/eri/pf45/head/sys/dev/lge/if_lgereg.h
  user/eri/pf45/head/sys/dev/lmc/if_lmc.c
  user/eri/pf45/head/sys/dev/lmc/if_lmc.h
  user/eri/pf45/head/sys/dev/malo/if_malo.c
  user/eri/pf45/head/sys/dev/malo/if_malo.h
  user/eri/pf45/head/sys/dev/mii/brgphy.c
  user/eri/pf45/head/sys/dev/mii/miidevs
  user/eri/pf45/head/sys/dev/mpt/mpt.c
  user/eri/pf45/head/sys/dev/mpt/mpt.h
  user/eri/pf45/head/sys/dev/mpt/mpt_cam.c
  user/eri/pf45/head/sys/dev/mpt/mpt_raid.c
  user/eri/pf45/head/sys/dev/msk/if_msk.c
  user/eri/pf45/head/sys/dev/msk/if_mskreg.h
  user/eri/pf45/head/sys/dev/mwl/if_mwl.c
  user/eri/pf45/head/sys/dev/mwl/if_mwl_pci.c
  user/eri/pf45/head/sys/dev/mwl/if_mwlvar.h
  user/eri/pf45/head/sys/dev/mxge/if_mxge.c
  user/eri/pf45/head/sys/dev/mxge/if_mxge_var.h
  user/eri/pf45/head/sys/dev/my/if_my.c
  user/eri/pf45/head/sys/dev/my/if_myreg.h
  user/eri/pf45/head/sys/dev/nfe/if_nfe.c
  user/eri/pf45/head/sys/dev/nve/if_nve.c
  user/eri/pf45/head/sys/dev/nve/if_nvereg.h
  user/eri/pf45/head/sys/dev/nxge/if_nxge.c
  user/eri/pf45/head/sys/dev/patm/if_patm_attach.c
  user/eri/pf45/head/sys/dev/pci/pci.c
  user/eri/pf45/head/sys/dev/pci/vga_pci.c
  user/eri/pf45/head/sys/dev/pcn/if_pcn.c
  user/eri/pf45/head/sys/dev/pcn/if_pcnreg.h
  user/eri/pf45/head/sys/dev/pdq/if_fea.c
  user/eri/pf45/head/sys/dev/pdq/if_fpa.c
  user/eri/pf45/head/sys/dev/pdq/pdq_freebsd.h
  user/eri/pf45/head/sys/dev/pdq/pdq_ifsubr.c
  user/eri/pf45/head/sys/dev/ppbus/lpt.c
  user/eri/pf45/head/sys/dev/ppbus/pcfclock.c
  user/eri/pf45/head/sys/dev/re/if_re.c
  user/eri/pf45/head/sys/dev/siis/siis.c
  user/eri/pf45/head/sys/dev/siis/siis.h
  user/eri/pf45/head/sys/dev/sk/if_sk.c
  user/eri/pf45/head/sys/dev/sn/if_sn.c
  user/eri/pf45/head/sys/dev/sn/if_sn_pccard.c
  user/eri/pf45/head/sys/dev/sn/if_snvar.h
  user/eri/pf45/head/sys/dev/sound/pci/hda/hdac.c
  user/eri/pf45/head/sys/dev/sound/usb/uaudio.c
  user/eri/pf45/head/sys/dev/ste/if_ste.c
  user/eri/pf45/head/sys/dev/ste/if_stereg.h
  user/eri/pf45/head/sys/dev/stge/if_stge.c
  user/eri/pf45/head/sys/dev/sym/sym_hipd.c
  user/eri/pf45/head/sys/dev/syscons/scterm-teken.c
  user/eri/pf45/head/sys/dev/syscons/scvidctl.c
  user/eri/pf45/head/sys/dev/syscons/syscons.c
  user/eri/pf45/head/sys/dev/syscons/syscons.h
  user/eri/pf45/head/sys/dev/syscons/sysmouse.c
  user/eri/pf45/head/sys/dev/ti/if_ti.c
  user/eri/pf45/head/sys/dev/ti/if_tireg.h
  user/eri/pf45/head/sys/dev/tl/if_tl.c
  user/eri/pf45/head/sys/dev/tl/if_tlreg.h
  user/eri/pf45/head/sys/dev/tsec/if_tsec.c
  user/eri/pf45/head/sys/dev/uart/uart_core.c
  user/eri/pf45/head/sys/dev/uart/uart_tty.c
  user/eri/pf45/head/sys/dev/usb/controller/at91dci.c
  user/eri/pf45/head/sys/dev/usb/controller/atmegadci.c
  user/eri/pf45/head/sys/dev/usb/controller/avr32dci.c
  user/eri/pf45/head/sys/dev/usb/controller/ehci.c
  user/eri/pf45/head/sys/dev/usb/controller/ehci.h
  user/eri/pf45/head/sys/dev/usb/controller/ehci_ixp4xx.c
  user/eri/pf45/head/sys/dev/usb/controller/ehci_mbus.c
  user/eri/pf45/head/sys/dev/usb/controller/ehci_pci.c
  user/eri/pf45/head/sys/dev/usb/controller/musb_otg.c
  user/eri/pf45/head/sys/dev/usb/controller/musb_otg.h
  user/eri/pf45/head/sys/dev/usb/controller/ohci.c
  user/eri/pf45/head/sys/dev/usb/controller/ohci.h
  user/eri/pf45/head/sys/dev/usb/controller/ohci_atmelarm.c
  user/eri/pf45/head/sys/dev/usb/controller/ohci_pci.c
  user/eri/pf45/head/sys/dev/usb/controller/uhci.c
  user/eri/pf45/head/sys/dev/usb/controller/uhci.h
  user/eri/pf45/head/sys/dev/usb/controller/uhci_pci.c
  user/eri/pf45/head/sys/dev/usb/controller/usb_controller.c
  user/eri/pf45/head/sys/dev/usb/controller/uss820dci.c
  user/eri/pf45/head/sys/dev/usb/input/uhid.c
  user/eri/pf45/head/sys/dev/usb/input/ukbd.c
  user/eri/pf45/head/sys/dev/usb/input/ums.c
  user/eri/pf45/head/sys/dev/usb/net/if_aue.c
  user/eri/pf45/head/sys/dev/usb/net/if_axe.c
  user/eri/pf45/head/sys/dev/usb/net/if_cdce.c
  user/eri/pf45/head/sys/dev/usb/net/if_cue.c
  user/eri/pf45/head/sys/dev/usb/net/if_kue.c
  user/eri/pf45/head/sys/dev/usb/net/if_rue.c
  user/eri/pf45/head/sys/dev/usb/net/if_udav.c
  user/eri/pf45/head/sys/dev/usb/serial/u3g.c
  user/eri/pf45/head/sys/dev/usb/serial/uark.c
  user/eri/pf45/head/sys/dev/usb/serial/ubser.c
  user/eri/pf45/head/sys/dev/usb/serial/uchcom.c
  user/eri/pf45/head/sys/dev/usb/serial/ucycom.c
  user/eri/pf45/head/sys/dev/usb/serial/ufoma.c
  user/eri/pf45/head/sys/dev/usb/serial/uftdi.c
  user/eri/pf45/head/sys/dev/usb/serial/ugensa.c
  user/eri/pf45/head/sys/dev/usb/serial/umct.c
  user/eri/pf45/head/sys/dev/usb/serial/umodem.c
  user/eri/pf45/head/sys/dev/usb/serial/uplcom.c
  user/eri/pf45/head/sys/dev/usb/serial/usb_serial.c
  user/eri/pf45/head/sys/dev/usb/serial/usb_serial.h
  user/eri/pf45/head/sys/dev/usb/storage/umass.c
  user/eri/pf45/head/sys/dev/usb/template/usb_template.c
  user/eri/pf45/head/sys/dev/usb/usb_busdma.c
  user/eri/pf45/head/sys/dev/usb/usb_compat_linux.c
  user/eri/pf45/head/sys/dev/usb/usb_compat_linux.h
  user/eri/pf45/head/sys/dev/usb/usb_core.h
  user/eri/pf45/head/sys/dev/usb/usb_debug.c
  user/eri/pf45/head/sys/dev/usb/usb_debug.h
  user/eri/pf45/head/sys/dev/usb/usb_dev.c
  user/eri/pf45/head/sys/dev/usb/usb_device.c
  user/eri/pf45/head/sys/dev/usb/usb_generic.c
  user/eri/pf45/head/sys/dev/usb/usb_hid.c
  user/eri/pf45/head/sys/dev/usb/usb_hub.c
  user/eri/pf45/head/sys/dev/usb/usb_hub.h
  user/eri/pf45/head/sys/dev/usb/usb_msctest.c
  user/eri/pf45/head/sys/dev/usb/usb_process.c
  user/eri/pf45/head/sys/dev/usb/usb_request.c
  user/eri/pf45/head/sys/dev/usb/usb_transfer.c
  user/eri/pf45/head/sys/dev/usb/usbdevs
  user/eri/pf45/head/sys/dev/usb/usbdi.h
  user/eri/pf45/head/sys/dev/usb/wlan/if_rum.c
  user/eri/pf45/head/sys/dev/usb/wlan/if_uath.c
  user/eri/pf45/head/sys/dev/usb/wlan/if_upgt.c
  user/eri/pf45/head/sys/dev/usb/wlan/if_ural.c
  user/eri/pf45/head/sys/dev/usb/wlan/if_urtw.c
  user/eri/pf45/head/sys/dev/usb/wlan/if_urtwreg.h
  user/eri/pf45/head/sys/dev/usb/wlan/if_urtwvar.h
  user/eri/pf45/head/sys/dev/usb/wlan/if_zyd.c
  user/eri/pf45/head/sys/dev/vge/if_vge.c
  user/eri/pf45/head/sys/dev/vge/if_vgevar.h
  user/eri/pf45/head/sys/dev/vx/if_vx.c
  user/eri/pf45/head/sys/dev/vx/if_vxvar.h
  user/eri/pf45/head/sys/dev/wb/if_wb.c
  user/eri/pf45/head/sys/dev/wb/if_wbreg.h
  user/eri/pf45/head/sys/dev/wl/if_wl.c
  user/eri/pf45/head/sys/dev/wpi/if_wpi.c
  user/eri/pf45/head/sys/dev/xen/blkfront/blkfront.c
  user/eri/pf45/head/sys/dev/xen/blkfront/block.h
  user/eri/pf45/head/sys/dev/xen/console/console.c
  user/eri/pf45/head/sys/dev/xen/netfront/netfront.c
  user/eri/pf45/head/sys/fs/fifofs/fifo_vnops.c
  user/eri/pf45/head/sys/fs/nfs/nfs_var.h
  user/eri/pf45/head/sys/fs/nfsclient/nfs_clport.c
  user/eri/pf45/head/sys/fs/nfsclient/nfs_clstate.c
  user/eri/pf45/head/sys/fs/nfsclient/nfs_clsubs.c
  user/eri/pf45/head/sys/fs/nfsclient/nfs_clvnops.c
  user/eri/pf45/head/sys/fs/nfsserver/nfs_nfsdport.c
  user/eri/pf45/head/sys/fs/nfsserver/nfs_nfsdserv.c
  user/eri/pf45/head/sys/fs/smbfs/smbfs_vfsops.c
  user/eri/pf45/head/sys/fs/tmpfs/tmpfs_subr.c
  user/eri/pf45/head/sys/geom/label/g_label.c
  user/eri/pf45/head/sys/geom/label/g_label.h
  user/eri/pf45/head/sys/geom/label/g_label_ext2fs.c
  user/eri/pf45/head/sys/geom/label/g_label_gpt.c
  user/eri/pf45/head/sys/geom/label/g_label_iso9660.c
  user/eri/pf45/head/sys/geom/label/g_label_msdosfs.c
  user/eri/pf45/head/sys/geom/label/g_label_ntfs.c
  user/eri/pf45/head/sys/geom/label/g_label_reiserfs.c
  user/eri/pf45/head/sys/geom/label/g_label_ufs.c
  user/eri/pf45/head/sys/geom/part/g_part_gpt.c
  user/eri/pf45/head/sys/gnu/fs/ext2fs/ext2_inode_cnv.c
  user/eri/pf45/head/sys/gnu/fs/ext2fs/ext2_vnops.c
  user/eri/pf45/head/sys/i386/bios/apm.c
  user/eri/pf45/head/sys/i386/conf/NOTES
  user/eri/pf45/head/sys/i386/cpufreq/est.c
  user/eri/pf45/head/sys/i386/i386/bpf_jit_machdep.c
  user/eri/pf45/head/sys/i386/i386/bpf_jit_machdep.h
  user/eri/pf45/head/sys/i386/i386/identcpu.c
  user/eri/pf45/head/sys/i386/i386/initcpu.c
  user/eri/pf45/head/sys/i386/i386/intr_machdep.c
  user/eri/pf45/head/sys/i386/i386/machdep.c
  user/eri/pf45/head/sys/i386/i386/nexus.c
  user/eri/pf45/head/sys/i386/i386/pmap.c
  user/eri/pf45/head/sys/i386/i386/trap.c
  user/eri/pf45/head/sys/i386/i386/vm_machdep.c
  user/eri/pf45/head/sys/i386/include/intr_machdep.h
  user/eri/pf45/head/sys/i386/include/specialreg.h
  user/eri/pf45/head/sys/i386/isa/isa_dma.c
  user/eri/pf45/head/sys/i386/linux/linux_machdep.c
  user/eri/pf45/head/sys/i386/linux/linux_sysvec.c
  user/eri/pf45/head/sys/i386/xen/exception.s
  user/eri/pf45/head/sys/i386/xen/pmap.c
  user/eri/pf45/head/sys/ia64/conf/GENERIC
  user/eri/pf45/head/sys/ia64/ia64/db_machdep.c
  user/eri/pf45/head/sys/ia64/ia64/exception.S
  user/eri/pf45/head/sys/ia64/ia64/interrupt.c
  user/eri/pf45/head/sys/ia64/ia64/machdep.c
  user/eri/pf45/head/sys/ia64/ia64/pmap.c
  user/eri/pf45/head/sys/ia64/ia64/trap.c
  user/eri/pf45/head/sys/ia64/ia64/vm_machdep.c
  user/eri/pf45/head/sys/ia64/include/asm.h
  user/eri/pf45/head/sys/ia64/include/md_var.h
  user/eri/pf45/head/sys/ia64/include/pcpu.h
  user/eri/pf45/head/sys/ia64/include/proc.h
  user/eri/pf45/head/sys/isa/vga_isa.c
  user/eri/pf45/head/sys/kern/bus_if.m
  user/eri/pf45/head/sys/kern/imgact_elf.c
  user/eri/pf45/head/sys/kern/init_main.c
  user/eri/pf45/head/sys/kern/init_sysent.c
  user/eri/pf45/head/sys/kern/kern_context.c
  user/eri/pf45/head/sys/kern/kern_cpuset.c
  user/eri/pf45/head/sys/kern/kern_descrip.c
  user/eri/pf45/head/sys/kern/kern_exec.c
  user/eri/pf45/head/sys/kern/kern_idle.c
  user/eri/pf45/head/sys/kern/kern_intr.c
  user/eri/pf45/head/sys/kern/kern_ktrace.c
  user/eri/pf45/head/sys/kern/kern_linker.c
  user/eri/pf45/head/sys/kern/kern_lock.c
  user/eri/pf45/head/sys/kern/kern_shutdown.c
  user/eri/pf45/head/sys/kern/kern_sig.c
  user/eri/pf45/head/sys/kern/kern_thread.c
  user/eri/pf45/head/sys/kern/sched_4bsd.c
  user/eri/pf45/head/sys/kern/sched_ule.c
  user/eri/pf45/head/sys/kern/stack_protector.c
  user/eri/pf45/head/sys/kern/subr_bus.c
  user/eri/pf45/head/sys/kern/subr_log.c
  user/eri/pf45/head/sys/kern/subr_prf.c
  user/eri/pf45/head/sys/kern/subr_taskqueue.c
  user/eri/pf45/head/sys/kern/subr_trap.c
  user/eri/pf45/head/sys/kern/sys_generic.c
  user/eri/pf45/head/sys/kern/sys_process.c
  user/eri/pf45/head/sys/kern/syscalls.c
  user/eri/pf45/head/sys/kern/syscalls.master
  user/eri/pf45/head/sys/kern/systrace_args.c
  user/eri/pf45/head/sys/kern/sysv_shm.c
  user/eri/pf45/head/sys/kern/tty.c
  user/eri/pf45/head/sys/kern/tty_ttydisc.c
  user/eri/pf45/head/sys/kern/uipc_syscalls.c
  user/eri/pf45/head/sys/kern/vfs_acl.c
  user/eri/pf45/head/sys/kern/vfs_lookup.c
  user/eri/pf45/head/sys/kern/vfs_mount.c
  user/eri/pf45/head/sys/kern/vfs_subr.c
  user/eri/pf45/head/sys/mips/adm5120/if_admsw.c
  user/eri/pf45/head/sys/mips/adm5120/if_admswvar.h
  user/eri/pf45/head/sys/mips/include/pcb.h
  user/eri/pf45/head/sys/mips/mips/machdep.c
  user/eri/pf45/head/sys/mips/mips/pm_machdep.c
  user/eri/pf45/head/sys/mips/mips/pmap.c
  user/eri/pf45/head/sys/mips/mips/trap.c
  user/eri/pf45/head/sys/mips/mips/vm_machdep.c
  user/eri/pf45/head/sys/modules/Makefile
  user/eri/pf45/head/sys/modules/acpi/acpi/Makefile
  user/eri/pf45/head/sys/modules/cam/Makefile
  user/eri/pf45/head/sys/modules/dpms/Makefile
  user/eri/pf45/head/sys/modules/ichwd/Makefile
  user/eri/pf45/head/sys/modules/iwnfw/Makefile
  user/eri/pf45/head/sys/modules/usb/Makefile
  user/eri/pf45/head/sys/modules/usb/ucom/Makefile
  user/eri/pf45/head/sys/modules/vesa/Makefile
  user/eri/pf45/head/sys/modules/x86bios/Makefile
  user/eri/pf45/head/sys/net/bpf.c
  user/eri/pf45/head/sys/net/bpf_jitter.c
  user/eri/pf45/head/sys/net/bpf_jitter.h
  user/eri/pf45/head/sys/net/flowtable.c
  user/eri/pf45/head/sys/net/if.c
  user/eri/pf45/head/sys/net/if_dead.c
  user/eri/pf45/head/sys/net/if_ef.c
  user/eri/pf45/head/sys/net/if_enc.c
  user/eri/pf45/head/sys/net/if_gif.c
  user/eri/pf45/head/sys/net/if_var.h
  user/eri/pf45/head/sys/net/pfil.c
  user/eri/pf45/head/sys/net/pfil.h
  user/eri/pf45/head/sys/net/route.c
  user/eri/pf45/head/sys/net80211/ieee80211.c
  user/eri/pf45/head/sys/net80211/ieee80211_action.c
  user/eri/pf45/head/sys/net80211/ieee80211_hwmp.c
  user/eri/pf45/head/sys/net80211/ieee80211_ioctl.h
  user/eri/pf45/head/sys/net80211/ieee80211_mesh.c
  user/eri/pf45/head/sys/net80211/ieee80211_mesh.h
  user/eri/pf45/head/sys/net80211/ieee80211_output.c
  user/eri/pf45/head/sys/net80211/ieee80211_proto.h
  user/eri/pf45/head/sys/netgraph/NOTES
  user/eri/pf45/head/sys/netgraph/ng_eiface.c
  user/eri/pf45/head/sys/netgraph/ng_fec.c
  user/eri/pf45/head/sys/netgraph/ng_iface.c
  user/eri/pf45/head/sys/netgraph/ng_sppp.c
  user/eri/pf45/head/sys/netinet/if_ether.c
  user/eri/pf45/head/sys/netinet/in.c
  user/eri/pf45/head/sys/netinet/in.h
  user/eri/pf45/head/sys/netinet/in_mcast.c
  user/eri/pf45/head/sys/netinet/ip_input.c
  user/eri/pf45/head/sys/netinet/ip_ipsec.c
  user/eri/pf45/head/sys/netinet/ip_ipsec.h
  user/eri/pf45/head/sys/netinet/ip_output.c
  user/eri/pf45/head/sys/netinet/ipfw/ip_dummynet.c
  user/eri/pf45/head/sys/netinet/libalias/alias.c
  user/eri/pf45/head/sys/netinet/libalias/alias_proxy.c
  user/eri/pf45/head/sys/netinet/raw_ip.c
  user/eri/pf45/head/sys/netinet/sctp_asconf.c
  user/eri/pf45/head/sys/netinet/sctp_auth.c
  user/eri/pf45/head/sys/netinet/sctp_cc_functions.c
  user/eri/pf45/head/sys/netinet/sctp_constants.h
  user/eri/pf45/head/sys/netinet/sctp_input.c
  user/eri/pf45/head/sys/netinet/sctp_os_bsd.h
  user/eri/pf45/head/sys/netinet/sctp_output.c
  user/eri/pf45/head/sys/netinet/sctp_pcb.c
  user/eri/pf45/head/sys/netinet/sctp_structs.h
  user/eri/pf45/head/sys/netinet/sctp_usrreq.c
  user/eri/pf45/head/sys/netinet/sctputil.c
  user/eri/pf45/head/sys/netinet/tcp_output.c
  user/eri/pf45/head/sys/netinet6/icmp6.c
  user/eri/pf45/head/sys/netinet6/in6.c
  user/eri/pf45/head/sys/netinet6/in6_mcast.c
  user/eri/pf45/head/sys/netinet6/nd6.c
  user/eri/pf45/head/sys/netinet6/raw_ip6.c
  user/eri/pf45/head/sys/netipsec/ipcomp_var.h
  user/eri/pf45/head/sys/netipsec/ipsec_mbuf.c
  user/eri/pf45/head/sys/netipsec/key.c
  user/eri/pf45/head/sys/netipsec/xform_ipcomp.c
  user/eri/pf45/head/sys/nfsclient/nfs_vnops.c
  user/eri/pf45/head/sys/nfsserver/nfs_fha.c
  user/eri/pf45/head/sys/opencrypto/crypto.c
  user/eri/pf45/head/sys/opencrypto/cryptosoft.c
  user/eri/pf45/head/sys/opencrypto/deflate.c
  user/eri/pf45/head/sys/opencrypto/deflate.h
  user/eri/pf45/head/sys/pc98/cbus/cbus_dma.c
  user/eri/pf45/head/sys/pc98/cbus/scterm-sck.c
  user/eri/pf45/head/sys/pc98/conf/NOTES
  user/eri/pf45/head/sys/pc98/pc98/machdep.c
  user/eri/pf45/head/sys/powerpc/aim/clock.c
  user/eri/pf45/head/sys/powerpc/aim/copyinout.c
  user/eri/pf45/head/sys/powerpc/aim/machdep.c
  user/eri/pf45/head/sys/powerpc/aim/mmu_oea.c
  user/eri/pf45/head/sys/powerpc/aim/mmu_oea64.c
  user/eri/pf45/head/sys/powerpc/aim/mp_cpudep.c
  user/eri/pf45/head/sys/powerpc/aim/ofw_machdep.c
  user/eri/pf45/head/sys/powerpc/aim/platform_chrp.c
  user/eri/pf45/head/sys/powerpc/aim/swtch.S
  user/eri/pf45/head/sys/powerpc/aim/trap.c
  user/eri/pf45/head/sys/powerpc/aim/trap_subr.S
  user/eri/pf45/head/sys/powerpc/aim/vm_machdep.c
  user/eri/pf45/head/sys/powerpc/booke/machdep.c
  user/eri/pf45/head/sys/powerpc/booke/mp_cpudep.c
  user/eri/pf45/head/sys/powerpc/booke/pmap.c
  user/eri/pf45/head/sys/powerpc/booke/trap.c
  user/eri/pf45/head/sys/powerpc/booke/vm_machdep.c
  user/eri/pf45/head/sys/powerpc/conf/GENERIC
  user/eri/pf45/head/sys/powerpc/include/cpu.h
  user/eri/pf45/head/sys/powerpc/include/hid.h
  user/eri/pf45/head/sys/powerpc/include/md_var.h
  user/eri/pf45/head/sys/powerpc/include/pcpu.h
  user/eri/pf45/head/sys/powerpc/include/pmap.h
  user/eri/pf45/head/sys/powerpc/include/smp.h
  user/eri/pf45/head/sys/powerpc/include/spr.h
  user/eri/pf45/head/sys/powerpc/mpc85xx/pci_ocp.c
  user/eri/pf45/head/sys/powerpc/powermac/hrowpic.c
  user/eri/pf45/head/sys/powerpc/powerpc/cpu.c
  user/eri/pf45/head/sys/powerpc/powerpc/mmu_if.m
  user/eri/pf45/head/sys/powerpc/powerpc/mp_machdep.c
  user/eri/pf45/head/sys/powerpc/powerpc/pmap_dispatch.c
  user/eri/pf45/head/sys/powerpc/powerpc/stack_machdep.c
  user/eri/pf45/head/sys/powerpc/powerpc/uio_machdep.c
  user/eri/pf45/head/sys/rpc/clnt_vc.c
  user/eri/pf45/head/sys/sparc64/include/elf.h
  user/eri/pf45/head/sys/sparc64/include/in_cksum.h
  user/eri/pf45/head/sys/sparc64/include/pcb.h
  user/eri/pf45/head/sys/sparc64/sparc64/machdep.c
  user/eri/pf45/head/sys/sparc64/sparc64/pmap.c
  user/eri/pf45/head/sys/sparc64/sparc64/trap.c
  user/eri/pf45/head/sys/sparc64/sparc64/vm_machdep.c
  user/eri/pf45/head/sys/sun4v/include/elf.h
  user/eri/pf45/head/sys/sun4v/sun4v/machdep.c
  user/eri/pf45/head/sys/sun4v/sun4v/pmap.c
  user/eri/pf45/head/sys/sun4v/sun4v/trap.c
  user/eri/pf45/head/sys/sun4v/sun4v/vm_machdep.c
  user/eri/pf45/head/sys/sys/aac_ioctl.h
  user/eri/pf45/head/sys/sys/ata.h
  user/eri/pf45/head/sys/sys/bus.h
  user/eri/pf45/head/sys/sys/conf.h
  user/eri/pf45/head/sys/sys/elf_common.h
  user/eri/pf45/head/sys/sys/fbio.h
  user/eri/pf45/head/sys/sys/interrupt.h
  user/eri/pf45/head/sys/sys/kernel.h
  user/eri/pf45/head/sys/sys/ktrace.h
  user/eri/pf45/head/sys/sys/mman.h
  user/eri/pf45/head/sys/sys/msgbuf.h
  user/eri/pf45/head/sys/sys/param.h
  user/eri/pf45/head/sys/sys/proc.h
  user/eri/pf45/head/sys/sys/sdt.h
  user/eri/pf45/head/sys/sys/signal.h
  user/eri/pf45/head/sys/sys/signalvar.h
  user/eri/pf45/head/sys/sys/syscall.h
  user/eri/pf45/head/sys/sys/syscall.mk
  user/eri/pf45/head/sys/sys/syscallsubr.h
  user/eri/pf45/head/sys/sys/sysproto.h
  user/eri/pf45/head/sys/sys/termios.h
  user/eri/pf45/head/sys/sys/time.h
  user/eri/pf45/head/sys/sys/tty.h
  user/eri/pf45/head/sys/sys/ttyqueue.h
  user/eri/pf45/head/sys/teken/teken.c
  user/eri/pf45/head/sys/teken/teken.h
  user/eri/pf45/head/sys/teken/teken_subr.h
  user/eri/pf45/head/sys/tools/fw_stub.awk
  user/eri/pf45/head/sys/tools/makeobjops.awk
  user/eri/pf45/head/sys/vm/pmap.h
  user/eri/pf45/head/sys/vm/swap_pager.c
  user/eri/pf45/head/sys/vm/vm.h
  user/eri/pf45/head/sys/vm/vm_extern.h
  user/eri/pf45/head/sys/vm/vm_fault.c
  user/eri/pf45/head/sys/vm/vm_glue.c
  user/eri/pf45/head/sys/vm/vm_map.c
  user/eri/pf45/head/sys/vm/vm_map.h
  user/eri/pf45/head/sys/vm/vm_zeroidle.c
  user/eri/pf45/head/tools/regression/bin/sh/builtins/cd1.0
  user/eri/pf45/head/tools/regression/bin/sh/errors/backquote-error1.0
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/Makefile
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/bpf_test.c
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/tests/test0075.h
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/tests/test0076.h
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/tests/test0077.h
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/tests/test0078.h
  user/eri/pf45/head/tools/regression/bpf/bpf_filter/tests/test0080.h
  user/eri/pf45/head/tools/regression/environ/Makefile.envctl
  user/eri/pf45/head/tools/regression/environ/envctl.c
  user/eri/pf45/head/tools/regression/environ/envtest.t
  user/eri/pf45/head/tools/regression/fstest/tests/rename/21.t
  user/eri/pf45/head/tools/regression/lib/libc/gen/test-wordexp.c
  user/eri/pf45/head/tools/regression/lib/libutil/Makefile
  user/eri/pf45/head/tools/regression/lib/libutil/test-flopen.c
  user/eri/pf45/head/tools/regression/lib/libutil/test-grp.c
  user/eri/pf45/head/tools/regression/lib/libutil/test-trimdomain-nodomain.c
  user/eri/pf45/head/tools/regression/lib/libutil/test-trimdomain.c
  user/eri/pf45/head/tools/tools/nanobsd/gateworks/Files/root/.profile
  user/eri/pf45/head/tools/tools/nanobsd/rescue/Files/etc/ttys
  user/eri/pf45/head/tools/tools/ncpus/acpi.c
  user/eri/pf45/head/tools/tools/netrate/netsend/netsend.c
  user/eri/pf45/head/tools/tools/tinybsd/conf/wrap/etc/ttys
  user/eri/pf45/head/tools/tools/tinybsd/tinybsd
  user/eri/pf45/head/usr.bin/bsdiff/bsdiff/bsdiff.1
  user/eri/pf45/head/usr.bin/bsdiff/bspatch/bspatch.1
  user/eri/pf45/head/usr.bin/gcore/Makefile
  user/eri/pf45/head/usr.bin/gcore/elfcore.c
  user/eri/pf45/head/usr.bin/gcore/gcore.1
  user/eri/pf45/head/usr.bin/gcore/gcore.c
  user/eri/pf45/head/usr.bin/gencat/gencat.c
  user/eri/pf45/head/usr.bin/gzip/unbzip2.c
  user/eri/pf45/head/usr.bin/kdump/kdump.c
  user/eri/pf45/head/usr.bin/ldd/ldd.1
  user/eri/pf45/head/usr.bin/leave/leave.c
  user/eri/pf45/head/usr.bin/logger/logger.c
  user/eri/pf45/head/usr.bin/make/arch.c
  user/eri/pf45/head/usr.bin/make/dir.c
  user/eri/pf45/head/usr.bin/make/job.c
  user/eri/pf45/head/usr.bin/make/main.c
  user/eri/pf45/head/usr.bin/netstat/if.c
  user/eri/pf45/head/usr.bin/netstat/ipsec.c
  user/eri/pf45/head/usr.bin/netstat/route.c
  user/eri/pf45/head/usr.bin/perror/perror.c
  user/eri/pf45/head/usr.bin/systat/Makefile
  user/eri/pf45/head/usr.bin/systat/main.c
  user/eri/pf45/head/usr.bin/tail/tail.1
  user/eri/pf45/head/usr.bin/touch/touch.c
  user/eri/pf45/head/usr.bin/unifdef/unifdef.1
  user/eri/pf45/head/usr.bin/unifdef/unifdef.c
  user/eri/pf45/head/usr.bin/unifdef/unifdefall.sh
  user/eri/pf45/head/usr.bin/vmstat/vmstat.c
  user/eri/pf45/head/usr.bin/w/w.c
  user/eri/pf45/head/usr.sbin/acpi/acpidb/Makefile
  user/eri/pf45/head/usr.sbin/acpi/iasl/Makefile
  user/eri/pf45/head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
  user/eri/pf45/head/usr.sbin/crashinfo/crashinfo.sh
  user/eri/pf45/head/usr.sbin/cron/cron/cron.c
  user/eri/pf45/head/usr.sbin/devinfo/devinfo.c
  user/eri/pf45/head/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c
  user/eri/pf45/head/usr.sbin/i2c/i2c.8
  user/eri/pf45/head/usr.sbin/inetd/inetd.c
  user/eri/pf45/head/usr.sbin/jail/jail.8
  user/eri/pf45/head/usr.sbin/nfsd/stablerestart.5
  user/eri/pf45/head/usr.sbin/sade/termcap.c
  user/eri/pf45/head/usr.sbin/sysinstall/Makefile
  user/eri/pf45/head/usr.sbin/sysinstall/cdrom.c
  user/eri/pf45/head/usr.sbin/sysinstall/dist.c
  user/eri/pf45/head/usr.sbin/sysinstall/install.c
  user/eri/pf45/head/usr.sbin/sysinstall/menus.c
  user/eri/pf45/head/usr.sbin/sysinstall/sysinstall.8
  user/eri/pf45/head/usr.sbin/sysinstall/tcpip.c
  user/eri/pf45/head/usr.sbin/sysinstall/termcap.c
  user/eri/pf45/head/usr.sbin/syslogd/syslogd.c
  user/eri/pf45/head/usr.sbin/tzsetup/tzsetup.8
  user/eri/pf45/head/usr.sbin/tzsetup/tzsetup.c
  user/eri/pf45/head/usr.sbin/usbconfig/dump.c
  user/eri/pf45/head/usr.sbin/usbconfig/usbconfig.8
  user/eri/pf45/head/usr.sbin/vidcontrol/vidcontrol.1
  user/eri/pf45/head/usr.sbin/vidcontrol/vidcontrol.c
  user/eri/pf45/head/usr.sbin/wake/wake.8
  user/eri/pf45/head/usr.sbin/zic/zdump.c
  user/eri/pf45/head/usr.sbin/zic/zic.8
Directory Properties:
  user/eri/pf45/head/   (props changed)
  user/eri/pf45/head/contrib/bind9/   (props changed)
  user/eri/pf45/head/contrib/ncurses/   (props changed)
  user/eri/pf45/head/games/fortune/datfiles/gerrold.limerick   (props changed)
  user/eri/pf45/head/lib/libc/stdio/asprintf.c   (props changed)
  user/eri/pf45/head/lib/libc/string/ffsll.c   (props changed)
  user/eri/pf45/head/lib/libc/string/flsll.c   (props changed)
  user/eri/pf45/head/lib/libc/string/wcpcpy.c   (props changed)
  user/eri/pf45/head/lib/libc/string/wcpncpy.c   (props changed)
  user/eri/pf45/head/share/zoneinfo/   (props changed)
  user/eri/pf45/head/sys/contrib/dev/acpica/   (props changed)
  user/eri/pf45/head/tools/regression/usr.bin/pkill/pgrep-_g.t   (props changed)
  user/eri/pf45/head/tools/regression/usr.bin/pkill/pgrep-_s.t   (props changed)
  user/eri/pf45/head/tools/regression/usr.bin/pkill/pkill-_g.t   (props changed)
  user/eri/pf45/head/tools/tools/termcap/termcap.pl   (props changed)
  user/eri/pf45/head/usr.sbin/dumpcis/cardinfo.h   (props changed)
  user/eri/pf45/head/usr.sbin/dumpcis/cis.h   (props changed)
  user/eri/pf45/head/usr.sbin/mfiutil/mfiutil.8   (props changed)
  user/eri/pf45/head/usr.sbin/zic/   (props changed)

Modified: user/eri/pf45/head/Makefile.inc1
==============================================================================
--- user/eri/pf45/head/Makefile.inc1	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/Makefile.inc1	Tue Dec  1 15:27:39 2009	(r199994)
@@ -272,7 +272,7 @@ LIB32CPUFLAGS=	-march=i686 -mmmx -msse -
 LIB32CPUFLAGS=	-march=${TARGET_CPUTYPE}
 .endif
 LIB32FLAGS=	-m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \
-		-iprefix ${LIB32TMP}/usr/ \
+		-isystem ${LIB32TMP}/usr/include/ \
 		-L${LIB32TMP}/usr/lib32 \
 		-B${LIB32TMP}/usr/lib32
 
@@ -599,11 +599,14 @@ installcheck_UGID:
 .if ${MK_INFO} != "no"
 _install-info=	install-info
 .endif
+.if ${MK_ZONEINFO} != "no"
+_zoneinfo=	zic tzsetup
+.endif
 
 ITOOLS=	[ awk cap_mkdb cat chflags chmod chown \
 	date echo egrep find grep ${_install-info} \
 	ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
-	test true uname wc zic
+	test true uname wc ${_zoneinfo}
 
 #
 # distributeworld
@@ -929,6 +932,10 @@ _ar=		usr.bin/ar
 _mklocale=	usr.bin/mklocale
 .endif
 
+.if ${BOOTSTRAPPING} < 900002
+_sed=		usr.bin/sed
+.endif
+
 .if ${BOOTSTRAPPING} < 700018
 _gensnmptree=	usr.sbin/bsnmpd/gensnmptree
 .endif
@@ -954,6 +961,7 @@ bootstrap-tools:
     usr.bin/makewhatis \
     ${_mklocale} \
     usr.bin/rpcgen \
+    ${_sed} \
     usr.bin/xinstall \
     ${_gensnmptree} \
     usr.sbin/config \
@@ -1033,7 +1041,6 @@ cross-tools:
 .for _tool in \
     gnu/usr.bin/binutils \
     gnu/usr.bin/cc \
-    usr.bin/sed \
     usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
     ${_btxld} \
     ${_crunchide} \

Modified: user/eri/pf45/head/ObsoleteFiles.inc
==============================================================================
--- user/eri/pf45/head/ObsoleteFiles.inc	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/ObsoleteFiles.inc	Tue Dec  1 15:27:39 2009	(r199994)
@@ -14,6 +14,13 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20091117: removal of rc.early(8) link
+OLD_FILES+=usr/share/man/man8/rc.early.8.gz
+# 20091027: pselect.3 implemented as syscall
+OLD_FILES+=usr/share/man/man3/pselect.3.gz
+# 20091005: fusword.9 and susword.9 removed
+OLD_FILES+=usr/share/man/man9/fusword.9.gz
+OLD_FILES+=usr/share/man/man9/susword.9.gz
 # 20090909: vesa and dpms promoted to be i386/amd64 common
 OLD_FILES+=usr/include/machine/pc/vesa.h
 OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz
@@ -26,6 +33,49 @@ OLD_FILES+=usr/share/man/man8/lukemftpd.
 OLD_FILES+=etc/mtree/BSD.local.dist
 OLD_FILES+=etc/mtree/BSD.x11.dist
 OLD_FILES+=etc/mtree/BSD.x11-4.dist
+# 20090812: net80211 documentation overhaul
+OLD_FILES+=usr/share/man/man9/ieee80211_add_rates.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_add_xrates.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_alloc_node.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_attach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_begin_scan.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_cfgget.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_cfgset.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_chan2ieee.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_chan2mode.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_create_ibss.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_crypto_attach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_crypto_detach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_decap.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_dump_pkt.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_dup_bss.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_encap.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_end_scan.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_find_node.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_fix_rate.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_free_allnodes.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_ieee2mhz.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_ioctl.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_lookup_node.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_media2rate.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_media_change.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_media_init.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_media_status.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_mhz2ieee.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_next_scan.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_node_attach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_node_detach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_node_lateattach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_print_essid.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_proto_attach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_proto_detach.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_rate2media.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_recv_mgmt.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_send_mgmt.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_setmode.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_timeout_nodes.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_watchdog.9.gz
+OLD_FILES+=usr/share/man/man9/ieee80211_wep_crypt.9.gz
 # 20090801: vimage.h removed in favour of vnet.h
 OLD_FILES+=usr/include/sys/vimage.h
 # 20090719: library version bump for 8.0

Modified: user/eri/pf45/head/UPDATING
==============================================================================
--- user/eri/pf45/head/UPDATING	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/UPDATING	Tue Dec  1 15:27:39 2009	(r199994)
@@ -22,6 +22,38 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20091113:
+	The default terminal emulation for syscons(4) has been changed
+	from cons25 to xterm on all platforms except pc98.  This means
+	that the /etc/ttys file needs to be updated to ensure correct
+	operation of applications on the console.
+
+	The terminal emulation style can be toggled per window by using
+	vidcontrol(1)'s -T flag.  The TEKEN_CONS25 kernel configuration
+	options can be used to change the compile-time default back to
+	cons25.
+
+	To prevent graphical artifacts, make sure the TERM environment
+	variable is set to match the terminal emulation that is being
+	performed by syscons(4).
+
+20091109:
+	The layout of the structure ieee80211req_scan_result has changed.
+	Applications that require wireless scan results (e.g. ifconfig(8))
+	from net80211 need to be recompiled.
+
+	Applications such as wpa_supplicant(8) may require a full world
+	build without using NO_CLEAN in order to get synchronized with the
+	new structure.
+
+20091025:
+	The iwn(4) driver has been updated to support the 5000 and 5150 series.
+	There's one kernel module for each firmware. Adding "device iwnfw"
+	to the kernel configuration file means including all three firmware
+	images inside the kernel. If you want to include just the one for
+	your wireless card, use the the devices iwn4965fw, iwn5000fw or
+	iwn5150fw.
+
 20090926:
 	The rc.d/network_ipv6, IPv6 configuration script has been integrated
 	into rc.d/netif.  The changes are the following:
@@ -529,6 +561,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 		# Map old usb library to new one for usb2 stack
 		libusb-0.1.so.8	libusb20.so.1
 
+20090209:
+	All USB ethernet devices now attach as interfaces under the name ueN
+	(eg. ue0). This is to provide a predictable name as vendors often
+	change usb chipsets in a product without notice.
+
 20090203:
 	The ichsmb(4) driver has been changed to require SMBus slave
 	addresses be left-justified (xxxxxxx0b) rather than right-justified.
@@ -624,6 +661,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	userland (libpmc(3)) and the kernel module (hwpmc(4)) in
 	sync.
 
+20081009:
+	atapci kernel module now includes only generic PCI ATA
+	driver. AHCI driver moved to ataahci kernel module.
+	All vendor-specific code moved into separate kernel modules:
+	ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek,
+	atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron,
+	atamarvell, atamicron, atanational, atanetcell, atanvidia,
+	atapromise, ataserverworks, atasiliconimage, atasis, atavia
+
 20080820:
 	The TTY subsystem of the kernel has been replaced by a new
 	implementation, which provides better scalability and an

Modified: user/eri/pf45/head/bin/Makefile
==============================================================================
--- user/eri/pf45/head/bin/Makefile	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/Makefile	Tue Dec  1 15:27:39 2009	(r199994)
@@ -27,6 +27,7 @@ SUBDIR= cat \
 	pax \
 	pkill \
 	ps \
+	pwait \
 	pwd \
 	${_rcp} \
 	realpath \

Modified: user/eri/pf45/head/bin/cat/Makefile
==============================================================================
--- user/eri/pf45/head/bin/cat/Makefile	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/cat/Makefile	Tue Dec  1 15:27:39 2009	(r199994)
@@ -2,6 +2,5 @@
 # $FreeBSD$
 
 PROG=	cat
-WARNS?=	6
 
 .include <bsd.prog.mk>

Modified: user/eri/pf45/head/bin/csh/iconv_stub.c
==============================================================================
--- user/eri/pf45/head/bin/csh/iconv_stub.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/csh/iconv_stub.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -61,9 +61,20 @@ dl_iconv_open(const char *tocode, const 
 		if (iconvlib == NULL)
 			return (iconv_t)-1;
 		iconv_open = (iconv_open_t *)dlfunc(iconvlib, ICONV_OPEN);
+		if (iconv_open == NULL)
+			goto dlfunc_err;
 		dl_iconv = (dl_iconv_t *)dlfunc(iconvlib, ICONV_ENGINE);
+		if (dl_iconv == NULL)
+			goto dlfunc_err;
 		dl_iconv_close = (dl_iconv_close_t *)dlfunc(iconvlib,
 		    ICONV_CLOSE);
+		if (dl_iconv_close == NULL)
+			goto dlfunc_err;
 	}
 	return iconv_open(tocode, fromcode);
+
+dlfunc_err:
+	dlclose(iconvlib);
+	iconvlib = NULL;
+	return (iconv_t)-1;
 }

Modified: user/eri/pf45/head/bin/getfacl/getfacl.1
==============================================================================
--- user/eri/pf45/head/bin/getfacl/getfacl.1	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/getfacl/getfacl.1	Tue Dec  1 15:27:39 2009	(r199994)
@@ -30,7 +30,7 @@
 .\" Developed by the TrustedBSD Project.
 .\" Support for POSIX.1e access control lists.
 .\"
-.Dd September 04, 2009
+.Dd September 4, 2009
 .Dt GETFACL 1
 .Os
 .Sh NAME

Modified: user/eri/pf45/head/bin/ps/keyword.c
==============================================================================
--- user/eri/pf45/head/bin/ps/keyword.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/ps/keyword.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -70,7 +70,7 @@ static int  vcmp(const void *, const voi
 
 /* PLEASE KEEP THE TABLE BELOW SORTED ALPHABETICALLY!!! */
 static VAR var[] = {
-	{"%cpu", "%CPU", NULL, 0, pcpu, NULL, 4, 0, CHAR, NULL, 0},
+	{"%cpu", "%CPU", NULL, 0, pcpu, NULL, 5, 0, CHAR, NULL, 0},
 	{"%mem", "%MEM", NULL, 0, pmem, NULL, 4, 0, CHAR, NULL, 0},
 	{"acflag", "ACFLG", NULL, 0, kvar, NULL, 3, KOFF(ki_acflag), USHORT,
 		"x", 0},
@@ -159,7 +159,7 @@ static VAR var[] = {
 		UINT, UIDFMT, 0},
 	{"rgroup", "RGROUP", NULL, LJUST|DSIZ, rgroupname, s_rgroupname,
 		USERLEN, 0, CHAR, NULL, 0},
-	{"rss", "RSS", NULL, 0, kvar, NULL, 5, KOFF(ki_rssize), PGTOK, "ld", 0},
+	{"rss", "RSS", NULL, 0, kvar, NULL, 6, KOFF(ki_rssize), PGTOK, "ld", 0},
 	{"rtprio", "RTPRIO", NULL, 0, priorityr, NULL, 7, KOFF(ki_pri), CHAR,
 		NULL, 0},
 	{"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid),
@@ -207,7 +207,7 @@ static VAR var[] = {
 		NULL, 0},
 	{"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
 	{"vsize", "", "vsz", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
-	{"vsz", "VSZ", NULL, 0, vsize, NULL, 5, 0, CHAR, NULL, 0},
+	{"vsz", "VSZ", NULL, 0, vsize, NULL, 6, 0, CHAR, NULL, 0},
 	{"wchan", "WCHAN", NULL, LJUST, wchan, NULL, 6, 0, CHAR, NULL, 0},
 	{"xstat", "XSTAT", NULL, 0, kvar, NULL, 4, KOFF(ki_xstat), USHORT,
 		"x", 0},
@@ -330,6 +330,7 @@ findvar(char *p, int user, char **header
 				errx(1, "malloc failed");
 			snprintf(realfmt, rflen, "%s=%s", v->alias, hp);
 			parsefmt(realfmt, user);
+			free(realfmt);
 		}
 		return ((VAR *)NULL);
 	}

Modified: user/eri/pf45/head/bin/sh/arith_lex.l
==============================================================================
--- user/eri/pf45/head/bin/sh/arith_lex.l	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/arith_lex.l	Tue Dec  1 15:27:39 2009	(r199994)
@@ -51,6 +51,13 @@ __FBSDID("$FreeBSD$");
 
 int yylex(void);
 
+struct varname
+{
+	struct varname *next;
+	char name[1];
+};
+static struct varname *varnames;
+
 #undef YY_INPUT
 #define YY_INPUT(buf,result,max) \
 	result = (*buf = *arith_buf++) ? 1 : YY_NULL;
@@ -80,11 +87,14 @@ int yylex(void);
 			 * If variable doesn't exist, we should initialize
 			 * it to zero.
 			 */
-			char *temp;
+			struct varname *temp;
 			if (lookupvar(yytext) == NULL)
 				setvarsafe(yytext, "0", 0);
-			temp = (char *)ckmalloc(strlen(yytext) + 1);
-			yylval.s_value = strcpy(temp, yytext);
+			temp = ckmalloc(sizeof(struct varname) +
+			    strlen(yytext));
+			temp->next = varnames;
+			varnames = temp;
+			yylval.s_value = strcpy(temp->name, yytext);
 
 			return ARITH_VAR;
 		}
@@ -130,5 +140,15 @@ int yylex(void);
 void
 arith_lex_reset(void)
 {
+	struct varname *name, *next;
+
 	YY_NEW_FILE;
+
+	name = varnames;
+	while (name != NULL) {
+		next = name->next;
+		ckfree(name);
+		name = next;
+	}
+	varnames = NULL;
 }

Modified: user/eri/pf45/head/bin/sh/cd.c
==============================================================================
--- user/eri/pf45/head/bin/sh/cd.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/cd.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -70,7 +70,7 @@ STATIC int docd(char *, int, int);
 STATIC char *getcomponent(void);
 STATIC char *findcwd(char *);
 STATIC void updatepwd(char *);
-STATIC char *getpwd2(char *, size_t);
+STATIC char *getpwd2(void);
 
 STATIC char *curdir = NULL;	/* current working directory */
 STATIC char *prevdir;		/* previous working directory */
@@ -263,10 +263,8 @@ findcwd(char *dir)
 	 * any more because we traversed a symbolic link or something
 	 * we couldn't stat().
 	 */
-	if (dir == NULL || curdir == NULL)  {
-		p = stalloc(PATH_MAX);
-		return getpwd2(p, PATH_MAX);
-	}
+	if (dir == NULL || curdir == NULL)
+		return getpwd2();
 	cdcomppath = stalloc(strlen(dir) + 1);
 	scopy(dir, cdcomppath);
 	STARTSTACKSTR(new);
@@ -313,7 +311,7 @@ updatepwd(char *dir)
 int
 pwdcmd(int argc, char **argv)
 {
-	char buf[PATH_MAX];
+	char *p;
 	int ch, phys;
 
 	optreset = 1; optind = 1; opterr = 0; /* initialize getopt */
@@ -341,9 +339,9 @@ pwdcmd(int argc, char **argv)
 		out1str(curdir);
 		out1c('\n');
 	} else {
-		if (getcwd(buf, sizeof(buf)) == NULL)
+		if ((p = getpwd2()) == NULL)
 			error(".: %s", strerror(errno));
-		out1str(buf);
+		out1str(p);
 		out1c('\n');
 	}
 
@@ -356,36 +354,45 @@ pwdcmd(int argc, char **argv)
 char *
 getpwd(void)
 {
-	char buf[PATH_MAX];
 	char *p;
 
 	if (curdir)
 		return curdir;
 
-	p = getpwd2(buf, sizeof(buf));
+	p = getpwd2();
 	if (p != NULL)
 		curdir = savestr(p);
 
 	return curdir;
 }
 
+#define MAXPWD 256
+
 /*
  * Return the current directory.
  */
 STATIC char *
-getpwd2(char *buf, size_t size)
+getpwd2(void)
 {
-	if (getcwd(buf, size) == NULL) {
-		char *pwd = getenv("PWD");
-		struct stat stdot, stpwd;
-
-		if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
-		    stat(pwd, &stpwd) != -1 &&
-		    stdot.st_dev == stpwd.st_dev &&
-		    stdot.st_ino == stpwd.st_ino) {
+	struct stat stdot, stpwd;
+	char *pwd;
+	int i;
+
+	for (i = MAXPWD;; i *= 2) {
+		pwd = stalloc(i);
+		if (getcwd(pwd, i) != NULL)
 			return pwd;
-		}
-		return NULL;
+		stunalloc(pwd);
+		if (errno != ERANGE)
+			break;
+	}
+
+	pwd = getenv("PWD");
+	if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
+	    stat(pwd, &stpwd) != -1 &&
+	    stdot.st_dev == stpwd.st_dev &&
+	    stdot.st_ino == stpwd.st_ino) {
+		return pwd;
 	}
-	return buf;
+	return NULL;
 }

Modified: user/eri/pf45/head/bin/sh/error.c
==============================================================================
--- user/eri/pf45/head/bin/sh/error.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/error.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -73,11 +73,15 @@ static void exverror(int, const char *, 
  * Called to raise an exception.  Since C doesn't include exceptions, we
  * just do a longjmp to the exception handler.  The type of exception is
  * stored in the global variable "exception".
+ *
+ * Interrupts are disabled; they should be reenabled when the exception is
+ * caught.
  */
 
 void
 exraise(int e)
 {
+	INTOFF;
 	if (handler == NULL)
 		abort();
 	exception = e;
@@ -138,8 +142,15 @@ onint(void)
 static void
 exverror(int cond, const char *msg, va_list ap)
 {
-	CLEAR_PENDING_INT;
-	INTOFF;
+	/*
+	 * An interrupt trumps an error.  Certain places catch error
+	 * exceptions or transform them to a plain nonzero exit code
+	 * in child processes, and if an error exception can be handled,
+	 * an interrupt can be handled as well.
+	 *
+	 * exraise() will disable interrupts for the exception handler.
+	 */
+	FORCEINTON;
 
 #ifdef DEBUG
 	if (msg)

Modified: user/eri/pf45/head/bin/sh/error.h
==============================================================================
--- user/eri/pf45/head/bin/sh/error.h	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/error.h	Tue Dec  1 15:27:39 2009	(r199994)
@@ -72,6 +72,8 @@ extern volatile sig_atomic_t intpending;
 
 #define INTOFF suppressint++
 #define INTON { if (--suppressint == 0 && intpending) onint(); }
+#define is_int_on() suppressint
+#define SETINTON(s) suppressint = (s)
 #define FORCEINTON {suppressint = 0; if (intpending) onint();}
 #define CLEAR_PENDING_INT intpending = 0
 #define int_pending() intpending

Modified: user/eri/pf45/head/bin/sh/eval.c
==============================================================================
--- user/eri/pf45/head/bin/sh/eval.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/eval.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -593,6 +593,7 @@ evalcommand(union node *cmd, int flags, 
 	char *savecmdname;
 	struct shparam saveparam;
 	struct localvar *savelocalvars;
+	struct parsefile *savetopfile;
 	volatile int e;
 	char *lastarg;
 	int realstatus;
@@ -781,7 +782,6 @@ evalcommand(union node *cmd, int flags, 
 		savelocalvars = localvars;
 		localvars = NULL;
 		reffunc(cmdentry.u.func);
-		INTON;
 		savehandler = handler;
 		if (setjmp(jmploc.loc)) {
 			if (exception == EXSHELLPROC)
@@ -797,6 +797,7 @@ evalcommand(union node *cmd, int flags, 
 			longjmp(handler->loc, 1);
 		}
 		handler = &jmploc;
+		INTON;
 		for (sp = varlist.list ; sp ; sp = sp->next)
 			mklocal(sp->text);
 		funcnest++;
@@ -833,6 +834,7 @@ evalcommand(union node *cmd, int flags, 
 			mode |= REDIR_BACKQ;
 		}
 		savecmdname = commandname;
+		savetopfile = getcurrentfile();
 		cmdenviron = varlist.list;
 		e = -1;
 		savehandler = handler;
@@ -867,6 +869,7 @@ cmddone:
 			if ((e != EXERROR && e != EXEXEC)
 			    || cmdentry.special)
 				exraise(e);
+			popfilesupto(savetopfile);
 			FORCEINTON;
 		}
 		if (cmdentry.u.index != EXECCMD)
@@ -880,7 +883,6 @@ cmddone:
 #ifdef DEBUG
 		trputs("normal command:  ");  trargs(argv);
 #endif
-		clearredir();
 		redirect(cmd->ncmd.redirect, 0);
 		for (sp = varlist.list ; sp ; sp = sp->next)
 			setvareq(sp->text, VEXPORT|VSTACK);

Modified: user/eri/pf45/head/bin/sh/expand.c
==============================================================================
--- user/eri/pf45/head/bin/sh/expand.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/expand.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -657,7 +657,7 @@ again: /* jump here after setting a vari
 	}
 	varlen = 0;
 	startloc = expdest - stackblock();
-	if (!set && uflag) {
+	if (!set && uflag && *var != '@' && *var != '*') {
 		switch (subtype) {
 		case VSNORMAL:
 		case VSTRIMLEFT:

Modified: user/eri/pf45/head/bin/sh/histedit.c
==============================================================================
--- user/eri/pf45/head/bin/sh/histedit.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/histedit.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -92,7 +92,7 @@ histedit(void)
 			if (hist != NULL)
 				sethistsize(histsizeval());
 			else
-				out2str("sh: can't initialize history\n");
+				out2fmt_flush("sh: can't initialize history\n");
 		}
 		if (editing && !el && isatty(0)) { /* && isatty(2) ??? */
 			/*
@@ -114,7 +114,7 @@ histedit(void)
 				el_set(el, EL_PROMPT, getprompt);
 			} else {
 bad:
-				out2str("sh: can't initialize editing\n");
+				out2fmt_flush("sh: can't initialize editing\n");
 			}
 			INTON;
 		} else if (!editing && el) {
@@ -336,6 +336,7 @@ histcmd(int argc, char **argv)
 			if (sflg) {
 				if (displayhist) {
 					out2str(s);
+					flushout(out2);
 				}
 				evalstring(s, 0);
 				if (displayhist && hist) {

Modified: user/eri/pf45/head/bin/sh/input.c
==============================================================================
--- user/eri/pf45/head/bin/sh/input.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/input.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -215,7 +215,7 @@ retry:
                                 if (flags >= 0 && flags & O_NONBLOCK) {
                                         flags &=~ O_NONBLOCK;
                                         if (fcntl(0, F_SETFL, flags) >= 0) {
-						out2str("sh: turning off NDELAY mode\n");
+						out2fmt_flush("sh: turning off NDELAY mode\n");
                                                 goto retry;
                                         }
                                 }
@@ -359,7 +359,7 @@ pushstring(char *s, int len, void *ap)
 	struct strpush *sp;
 
 	INTOFF;
-/*dprintf("*** calling pushstring: %s, %d\n", s, len);*/
+/*out2fmt_flush("*** calling pushstring: %s, %d\n", s, len);*/
 	if (parsefile->strpush) {
 		sp = ckmalloc(sizeof (struct strpush));
 		sp->prev = parsefile->strpush;
@@ -386,7 +386,7 @@ popstring(void)
 	parsenextc = sp->prevstring;
 	parsenleft = sp->prevnleft;
 	parselleft = sp->prevlleft;
-/*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/
+/*out2fmt_flush("*** calling popstring: restoring to '%s'\n", parsenextc);*/
 	if (sp->ap)
 		sp->ap->flag &= ~ALIASINUSE;
 	parsefile->strpush = sp->prev;
@@ -509,6 +509,32 @@ popfile(void)
 
 
 /*
+ * Return current file (to go back to it later using popfilesupto()).
+ */
+
+struct parsefile *
+getcurrentfile(void)
+{
+	return parsefile;
+}
+
+
+/*
+ * Pop files until the given file is on top again. Useful for regular
+ * builtins that read shell commands from files or strings.
+ * If the given file is not an active file, an error is raised.
+ */
+
+void
+popfilesupto(struct parsefile *file)
+{
+	while (parsefile != file && parsefile != &basepf)
+		popfile();
+	if (parsefile != file)
+		error("popfilesupto() misused");
+}
+
+/*
  * Return to top level.
  */
 

Modified: user/eri/pf45/head/bin/sh/input.h
==============================================================================
--- user/eri/pf45/head/bin/sh/input.h	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/input.h	Tue Dec  1 15:27:39 2009	(r199994)
@@ -45,6 +45,8 @@ extern int parsenleft;		/* number of cha
 extern char *parsenextc;	/* next character in input buffer */
 extern int init_editline;	/* 0 == not setup, 1 == OK, -1 == failed */
 
+struct parsefile;
+
 char *pfgets(char *, int);
 int pgetc(void);
 int preadbuffer(void);
@@ -56,6 +58,8 @@ void setinputfile(char *, int);
 void setinputfd(int, int);
 void setinputstring(char *, int);
 void popfile(void);
+struct parsefile *getcurrentfile(void);
+void popfilesupto(struct parsefile *);
 void popallfiles(void);
 void closescript(void);
 

Modified: user/eri/pf45/head/bin/sh/jobs.c
==============================================================================
--- user/eri/pf45/head/bin/sh/jobs.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/jobs.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -146,7 +146,7 @@ setjobctl(int on)
 		do { /* while we are in the background */
 			initialpgrp = tcgetpgrp(ttyfd);
 			if (initialpgrp < 0) {
-out:				out2str("sh: can't access tty; job control turned off\n");
+out:				out2fmt_flush("sh: can't access tty; job control turned off\n");
 				mflag = 0;
 				return;
 			}
@@ -1046,7 +1046,7 @@ stoppedjobs(void)
 		if (jp->used == 0)
 			continue;
 		if (jp->state == JOBSTOPPED) {
-			out2str("You have stopped jobs.\n");
+			out2fmt_flush("You have stopped jobs.\n");
 			job_warning = 2;
 			return (1);
 		}

Modified: user/eri/pf45/head/bin/sh/main.c
==============================================================================
--- user/eri/pf45/head/bin/sh/main.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/main.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -154,7 +154,7 @@ main(int argc, char *argv[])
 	setstackmark(&smark);
 	procargs(argc, argv);
 	if (getpwd() == NULL && iflag)
-		out2str("sh: cannot determine working directory\n");
+		out2fmt_flush("sh: cannot determine working directory\n");
 	if (getpwd() != NULL)
 		setvar ("PWD", getpwd(), VEXPORT);
 	if (argv[0] && argv[0][0] == '-') {
@@ -223,7 +223,7 @@ cmdloop(int top)
 			if (!stoppedjobs()) {
 				if (!Iflag)
 					break;
-				out2str("\nUse \"exit\" to leave shell.\n");
+				out2fmt_flush("\nUse \"exit\" to leave shell.\n");
 			}
 			numeof++;
 		} else if (n != NULL && nflag == 0) {

Modified: user/eri/pf45/head/bin/sh/output.c
==============================================================================
--- user/eri/pf45/head/bin/sh/output.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/output.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
 static int doformat_wr(void *, const char *, int);
 
 struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
-struct output errout = {NULL, 0, NULL, 100, 2, 0};
+struct output errout = {NULL, 0, NULL, 256, 2, 0};
 struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0};
 struct output *out1 = &output;
 struct output *out2 = &errout;
@@ -124,8 +124,6 @@ outstr(const char *p, struct output *fil
 {
 	while (*p)
 		outc(*p++, file);
-	if (file == out2)
-		flushout(file);
 }
 
 /* Like outstr(), but quote for re-input into the shell. */
@@ -255,7 +253,7 @@ out1fmt(const char *fmt, ...)
 }
 
 void
-dprintf(const char *fmt, ...)
+out2fmt_flush(const char *fmt, ...)
 {
 	va_list ap;
 

Modified: user/eri/pf45/head/bin/sh/output.h
==============================================================================
--- user/eri/pf45/head/bin/sh/output.h	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/output.h	Tue Dec  1 15:27:39 2009	(r199994)
@@ -65,7 +65,7 @@ void flushout(struct output *);
 void freestdout(void);
 void outfmt(struct output *, const char *, ...) __printflike(2, 3);
 void out1fmt(const char *, ...) __printflike(1, 2);
-void dprintf(const char *, ...) __printflike(1, 2);
+void out2fmt_flush(const char *, ...) __printflike(1, 2);
 void fmtstr(char *, int, const char *, ...) __printflike(3, 4);
 void doformat(struct output *, const char *, va_list) __printflike(2, 0);
 int xwrite(int, char *, int);

Modified: user/eri/pf45/head/bin/sh/parser.c
==============================================================================
--- user/eri/pf45/head/bin/sh/parser.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/parser.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -364,7 +364,9 @@ TRACE(("expecting DO got %s %s\n", tokna
 		n1 = (union node *)stalloc(sizeof (struct nfor));
 		n1->type = NFOR;
 		n1->nfor.var = wordtext;
-		if (readtoken() == TWORD && ! quoteflag && equal(wordtext, "in")) {
+		while (readtoken() == TNL)
+			;
+		if (lasttoken == TWORD && ! quoteflag && equal(wordtext, "in")) {
 			app = &ap;
 			while (readtoken() == TWORD) {
 				n2 = (union node *)stalloc(sizeof (struct narg));
@@ -1308,15 +1310,20 @@ parsebackq: {
 	struct jmploc *const savehandler = handler;
 	int savelen;
 	int saveprompt;
+	const int bq_startlinno = plinno;
 
+	str = NULL;
 	if (setjmp(jmploc.loc)) {
 		if (str)
 			ckfree(str);
 		handler = savehandler;
+		if (exception == EXERROR) {
+			startlinno = bq_startlinno;
+			synerror("Error in command substitution");
+		}
 		longjmp(handler->loc, 1);
 	}
 	INTOFF;
-	str = NULL;
 	savelen = out - stackblock();
 	if (savelen > 0) {
 		str = ckmalloc(savelen);
@@ -1556,7 +1563,10 @@ setprompt(int which)
 #ifndef NO_HISTORY
 	if (!el)
 #endif
+	{
 		out2str(getprompt(NULL));
+		flushout(out2);
+	}
 }
 
 /*

Modified: user/eri/pf45/head/bin/sh/redir.c
==============================================================================
--- user/eri/pf45/head/bin/sh/redir.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/redir.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
 
 
 #define EMPTY -2		/* marks an unused slot in redirtab */
+#define CLOSED -1		/* fd was not open before redir */
 #define PIPESIZE 4096		/* amount of buffering in a pipe */
 
 
@@ -101,7 +102,6 @@ redirect(union node *redir, int flags)
 	struct redirtab *sv = NULL;
 	int i;
 	int fd;
-	int try;
 	char memory[10];	/* file descriptors to write to memory */
 
 	for (i = 10 ; --i >= 0 ; )
@@ -116,38 +116,30 @@ redirect(union node *redir, int flags)
 	}
 	for (n = redir ; n ; n = n->nfile.next) {
 		fd = n->nfile.fd;
-		try = 0;
 		if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) &&
 		    n->ndup.dupfd == fd)
 			continue; /* redirect from/to same file descriptor */
 
 		if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) {
 			INTOFF;
-again:
 			if ((i = fcntl(fd, F_DUPFD, 10)) == -1) {
 				switch (errno) {
 				case EBADF:
-					if (!try) {
-						openredirect(n, memory);
-						try++;
-						goto again;
-					}
-					/* FALLTHROUGH*/
+					i = CLOSED;
+					break;
 				default:
 					INTON;
 					error("%d: %s", fd, strerror(errno));
 					break;
 				}
-			}
-			if (!try) {
-				sv->renamed[fd] = i;
-			}
+			} else
+				(void)fcntl(i, F_SETFD, FD_CLOEXEC);
+			sv->renamed[fd] = i;
 			INTON;
 		}
 		if (fd == 0)
 			fd0_redirected++;
-		if (!try)
-			openredirect(n, memory);
+		openredirect(n, memory);
 	}
 	if (memory[1])
 		out1 = &memout;
@@ -166,8 +158,11 @@ openredirect(union node *redir, char mem
 
 	/*
 	 * We suppress interrupts so that we won't leave open file
-	 * descriptors around.  This may not be such a good idea because
-	 * an open of a device or a fifo can block indefinitely.
+	 * descriptors around.  Because the signal handler remains
+	 * installed and we do not use system call restart, interrupts
+	 * will still abort blocking opens such as fifos (they will fail
+	 * with EINTR). There is, however, a race condition if an interrupt
+	 * arrives after INTOFF and before open blocks.
 	 */
 	INTOFF;
 	memory[fd] = 0;

Modified: user/eri/pf45/head/bin/sh/sh.1
==============================================================================
--- user/eri/pf45/head/bin/sh/sh.1	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/sh.1	Tue Dec  1 15:27:39 2009	(r199994)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd May 31, 2009
+.Dd October 24, 2009
 .Dt SH 1
 .Os
 .Sh NAME
@@ -296,7 +296,10 @@ sh -T -c "trap 'exit 1' 2 ; some-blockin
 .Ed
 .It Fl u Li nounset
 Write a message to standard error when attempting
-to expand a variable that is not set, and if the
+to expand a variable, a positional parameter or
+the special parameter
+.Va \&!
+that is not set, and if the
 shell is not interactive, exit immediately.
 .It Fl V Li vi
 Enable the built-in

Modified: user/eri/pf45/head/bin/sh/trap.c
==============================================================================
--- user/eri/pf45/head/bin/sh/trap.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/trap.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -149,6 +149,7 @@ trapcmd(int argc, char **argv)
 {
 	char *action;
 	int signo;
+	int errors = 0;
 
 	if (argc <= 1) {
 		for (signo = 0 ; signo < sys_nsig ; signo++) {
@@ -183,8 +184,10 @@ trapcmd(int argc, char **argv)
 		}
 	}
 	while (*argv) {
-		if ((signo = sigstring_to_signum(*argv)) == -1)
-			error("bad signal %s", *argv);
+		if ((signo = sigstring_to_signum(*argv)) == -1) {
+			out2fmt_flush("trap: bad signal %s\n", *argv);
+			errors = 1;
+		}
 		INTOFF;
 		if (action)
 			action = savestr(action);
@@ -196,7 +199,7 @@ trapcmd(int argc, char **argv)
 		INTON;
 		argv++;
 	}
-	return 0;
+	return errors;
 }
 
 
@@ -244,7 +247,8 @@ void
 setsignal(int signo)
 {
 	int action;
-	sig_t sig, sigact = SIG_DFL;
+	sig_t sigact = SIG_DFL;
+	struct sigaction sa;
 	char *t;
 
 	if ((t = trap[signo]) == NULL)
@@ -320,9 +324,10 @@ setsignal(int signo)
 		case S_IGN:	sigact = SIG_IGN;	break;
 	}
 	*t = action;
-	sig = signal(signo, sigact);
-	if (sig != SIG_ERR && action == S_CATCH)
-		siginterrupt(signo, 1);
+	sa.sa_handler = sigact;
+	sa.sa_flags = 0;
+	sigemptyset(&sa.sa_mask);
+	sigaction(signo, &sa, NULL);
 }
 
 

Modified: user/eri/pf45/head/bin/sh/var.c
==============================================================================
--- user/eri/pf45/head/bin/sh/var.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/sh/var.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -195,7 +195,9 @@ setvarsafe(char *name, char *val, int fl
 	struct jmploc jmploc;
 	struct jmploc *const savehandler = handler;
 	int err = 0;
+	int inton;
 
+	inton = is_int_on();
 	if (setjmp(jmploc.loc))
 		err = 1;
 	else {
@@ -203,6 +205,7 @@ setvarsafe(char *name, char *val, int fl
 		setvar(name, val, flags);
 	}
 	handler = savehandler;
+	SETINTON(inton);
 	return err;
 }
 

Modified: user/eri/pf45/head/bin/uuidgen/Makefile
==============================================================================
--- user/eri/pf45/head/bin/uuidgen/Makefile	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/bin/uuidgen/Makefile	Tue Dec  1 15:27:39 2009	(r199994)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
 PROG=	uuidgen
-WARNS?=	6
 
 .include <bsd.prog.mk>

Modified: user/eri/pf45/head/contrib/bind9/CHANGES
==============================================================================
--- user/eri/pf45/head/contrib/bind9/CHANGES	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/contrib/bind9/CHANGES	Tue Dec  1 15:27:39 2009	(r199994)
@@ -1,3 +1,9 @@
+	--- 9.6.1-P2 released ---
+
+2772.	[security]	When validating, track whether pending data was from
+			the additional section or not and only return it if
+			validates as secure. [RT #20438]
+
 	--- 9.6.1-P1 released ---
 
 2640.	[security]	A specially crafted update packet will cause named

Modified: user/eri/pf45/head/contrib/bind9/bin/dig/dighost.c
==============================================================================
--- user/eri/pf45/head/contrib/bind9/bin/dig/dighost.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/contrib/bind9/bin/dig/dighost.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -2604,10 +2604,12 @@ connect_done(isc_task_t *task, isc_event
 
 	if (sevent->result == ISC_R_CANCELED) {
 		debug("in cancel handler");
-		isc_socket_detach(&query->sock);
-		sockcount--;
-		INSIST(sockcount >= 0);
-		debug("sockcount=%d", sockcount);
+		if (query->sock != NULL) {
+			isc_socket_detach(&query->sock);
+			sockcount--;
+			INSIST(sockcount >= 0);
+			debug("sockcount=%d", sockcount);
+		}
 		query->waiting_connect = ISC_FALSE;
 		isc_event_free(&event);
 		l = query->lookup;

Modified: user/eri/pf45/head/contrib/bind9/bin/named/query.c
==============================================================================
--- user/eri/pf45/head/contrib/bind9/bin/named/query.c	Tue Dec  1 15:18:25 2009	(r199993)
+++ user/eri/pf45/head/contrib/bind9/bin/named/query.c	Tue Dec  1 15:27:39 2009	(r199994)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 

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

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 20:46:30 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB6451065693;
	Tue,  1 Dec 2009 20:46:30 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9ACAF8FC0C;
	Tue,  1 Dec 2009 20:46:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1KkUwN075578;
	Tue, 1 Dec 2009 20:46:30 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1KkU7Y075577;
	Tue, 1 Dec 2009 20:46:30 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912012046.nB1KkU7Y075577@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Tue, 1 Dec 2009 20:46:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199999 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 20:46:30 -0000

Author: dougb
Date: Tue Dec  1 20:46:30 2009
New Revision: 199999
URL: http://svn.freebsd.org/changeset/base/199999

Log:
  Instead of requiring -G for --packages[-only] don't do the parts of it
  that don't make sense (like 'make config', package fetching, etc.). This
  allows --packages[-only] and --delete-build-only to work together.
  
  As a result of the above change, update a couple of messages about
  dependencies being up to date to no longer refer to 'make config'.
  
  Begin removing debug stuff in preparation for release.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Tue Dec  1 19:14:57 2009	(r199998)
+++ user/dougb/portmaster/portmaster	Tue Dec  1 20:46:30 2009	(r199999)
@@ -309,7 +309,6 @@ usage () {
 	echo '--delete-build-only delete ports that are build-only dependencies'
 	echo '   after a successful run, only if installed this run'
 	echo ''
-	echo 'NOTE: The -P[P] options imply -G'
 	echo '-P|--packages use packages, but build port if not available'
 	echo '-PP|--packages-only fail if no package is available'
 	echo '--packages-build use packages for all build dependencies'
@@ -394,8 +393,6 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
 	export pd pdb distdir
 fi
 
-# XXX
-
 packages_init () {
 	local e1 e2
 
@@ -448,8 +445,6 @@ for var in "$@" ; do
 	esac
 done
 
-[ -n "$PM_PACKAGES" ] && { NO_RECURSIVE_CONFIG=Gopt; ARGS="-G $ARGS"; }
-
 set -- $newopts
 unset var newopts
 unset -f packages_init
@@ -1639,7 +1634,7 @@ update_port () {
 		echo ''
 	elif [ -n "$UPDATE_REQ_BYS" ]; then
 		return 0
-	elif [ -n "$CONFIG_ONLY" ]; then
+	elif [ -n "$CONFIG_ONLY" -a -z "$PM_PACKAGES" ]; then
 	echo "===>>> Continuing 'make config' dependency check for $portdir"
 	else
 		echo "===>>> Returning to dependency check for $portdir"
@@ -1665,15 +1660,13 @@ dependency_check () {
 	else
 		if [ -n "$SHOW_WORK" ]; then
 			echo ''
-		elif [ -n "$CONFIG_ONLY" ]; then
+		elif [ -n "$CONFIG_ONLY" -a -z "$PM_PACKAGES" ]; then
 			echo "===>>> Starting recursive 'make config' check"
 		else
 			echo "===>>> Starting dependency check"
 		fi
 	fi
 
-# XXXX
-
 	if [ "$PM_BUILD_ONLY_LIST" = pmp_doing_build_deps ]; then
 
 #echo '' ; echo "Debug> d_port_list: $d_port_list"
@@ -1818,7 +1811,7 @@ dependency_check () {
 
 	if [ -n "$SHOW_WORK" ]; then
 		safe_exit
-	elif [ -n "$CONFIG_ONLY" ]; then
+	elif [ -n "$CONFIG_ONLY" -a -z "$PM_PACKAGES" ]; then
 	echo "===>>> Recursive 'make config' check complete for $portdir"
 		case "$PM_DEPTH" in *\>\>*) echo "	$PM_DEPTH" ;; esac
 	else
@@ -2032,7 +2025,8 @@ all_config () {
 	if [ -n "$CONFIG_ONLY" ]; then
 		[ -n "$FETCH_ONLY" ] && export ALL_FETCH=all_fetch
 
-		echo "===>>> Checking ports for recursive 'make config'"
+		[ -z "$PM_PACKAGES" ] &&
+			echo "===>>> Checking ports for recursive 'make config'"
 		[ -n "$PM_VERBOSE" ] &&
 		    { echo '' ; echo "===>>> Root ports:"; }
 		all_config $roots
@@ -2048,7 +2042,7 @@ all_config () {
 
 		check_fetch_only
 		if [ -n "$NO_DEP_UPDATES" ]; then
-		echo "===>>> The 'make config' check found no ports to update"
+			echo "===>>> All ports are up to date"
 			safe_exit
 		fi
 
@@ -2259,7 +2253,6 @@ dofetch () {
 }
 
 	# Handle the problem of manual fetching
-# XXX Not for -P/-PP
 	[ -z "$PM_PACKAGES" ] && master_sites=`pm_make_b -V MASTER_SITES`
 
 	if [ -n "$master_sites" ]; then
@@ -2302,8 +2295,6 @@ dofetch () {
 fi
 
 if [ -n "$CONFIG_ONLY" ]; then
-
-# XXXX
 	if [ "$$" -eq "$PM_PARENT_PID" ]; then
 		# Keep in sync in multiport()
 		if [ -n "$PM_BUILD_ONLY_LIST" ]; then
@@ -2317,10 +2308,13 @@ if [ -n "$CONFIG_ONLY" ]; then
 		fi
 	fi
 
-	config_type=config-conditional
-	[ -n "$FORCE_CONFIG" ] && config_type=config
-	[ -n "$PM_SU_VERBOSE" ] && echo "===>>> Running 'make $config_type'"
-	pm_make_s $config_type
+	if [ -z "$PM_PACKAGES" ]; then
+		config_type=config-conditional
+		[ -n "$FORCE_CONFIG" ] && config_type=config
+		[ -n "$PM_SU_VERBOSE" ] &&
+			echo "===>>> Running 'make $config_type'"
+		pm_make_s $config_type
+	fi
 
 	CONFIG_SEEN_LIST="${CONFIG_SEEN_LIST}${portdir}:"
 
@@ -2371,7 +2365,6 @@ if [ -n "$CONFIG_ONLY" ]; then
 		unset URB_YES MASTER_RB_LIST ; URB_DONE_LIST=':'
 	fi
 
-# XXXX
 	if [ -n "$PM_BUILD_ONLY_LIST" ]; then
 		unset run_dl_g
 		PM_BUILD_ONLY_LIST=pm_bol
@@ -2414,7 +2407,7 @@ if [ -z "$NO_DEP_UPDATES" ]; then
 	fi
 	cd $pd/$portdir
 elif [ -z "$NO_RECURSIVE_CONFIG" -a "$$" -eq "$PM_PARENT_PID" ]; then
-	echo "===>>> The 'make config' check found no dependencies to update"
+	echo "===>>> All dependencies are up to date"
 	echo ''
 fi
 
@@ -2626,12 +2619,9 @@ if [ -z "$use_package" ]; then
 
 	eval pm_make $port_log_args || fail "make failed for $portdir"
 else
-	# XXX fetch
 	fetch_package $latest_pv || fail "Fetch for ${latest_pv}.tbz failed"
 fi
 
-# XXX Build or package?
-
 # Ignore if no old port exists
 if [ -n "$upg_port" ]; then
 	UPGRADE_PORT=$upg_port
@@ -2715,7 +2705,6 @@ if [ -z "$use_package" ]; then
 	eval pm_make_s -DNO_DEPENDS install $port_log_args ||
 		install_failed $new_port
 else
-	# XXX Install the package
 	echo "===>>> Installing package"
 	pkg_add --no-deps --force ${ppd}/${latest_pv}.tbz ||
 		install_failed ${latest_pv}.tbz

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 21:05:09 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 302B1106566B;
	Tue,  1 Dec 2009 21:05:09 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1FBEF8FC1C;
	Tue,  1 Dec 2009 21:05:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1L58fx076005;
	Tue, 1 Dec 2009 21:05:08 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1L58u0076003;
	Tue, 1 Dec 2009 21:05:08 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912012105.nB1L58u0076003@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Tue, 1 Dec 2009 21:05:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200000 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 21:05:09 -0000

Author: dougb
Date: Tue Dec  1 21:05:08 2009
New Revision: 200000
URL: http://svn.freebsd.org/changeset/base/200000

Log:
  Finish updating usage() for --always-fetch
  
  Continue removing debug stuff in preparation for release

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Tue Dec  1 20:46:30 2009	(r199999)
+++ user/dougb/portmaster/portmaster	Tue Dec  1 21:05:08 2009	(r200000)
@@ -241,9 +241,8 @@ usage () {
 	echo 'Usage:'
 	echo "Common flags: [--force-config] [-CGHKgntvw B|b f|i D|d]"
 	echo "    [[--packages|--packages-only] [-P|-PP] | [--packages-build]]"
-	echo "    [--packages-if-newer] [-m <arguments for make>]"
-	echo "    [--delete-build-only]"
-	echo "    [-x <glob pattern to exclude from building>]"
+	echo "    [--packages-if-newer] [--delete-build-only] [--always-fetch]"
+	echo "    [-m <arguments for make>] [-x <glob pattern to exclude from building>]"
 	echo "${0##*/} [Common flags] <full name of port directory in $pdb>"
 	echo "${0##*/} [Common flags] <full path to $pd/foo/bar>"
 	echo "${0##*/} [Common flags] <glob pattern of directories in $pdb>"
@@ -1668,9 +1667,6 @@ dependency_check () {
 	fi
 
 	if [ "$PM_BUILD_ONLY_LIST" = pmp_doing_build_deps ]; then
-
-#echo '' ; echo "Debug> d_port_list: $d_port_list"
-
 		local rundeps dep run_dl build_only_dl temp_bodlg
 
 		if [ -z "$RECURSE_THOROUGH" ]; then
@@ -1683,18 +1679,12 @@ dependency_check () {
 				esac
 			done
 
-#echo '' ; echo "Debug> build_only_dl: $build_only_dl"
-#echo '' ; echo "Debug> run_dl: $run_dl" ; echo ''
-
 			d_port_list="$build_only_dl $run_dl"
 		else
 			for dep in `pm_make run-depends-list | sort -u`; do
 				run_dl="$run_dl $dep"
 			done
 			build_only_dl=`pm_make build-depends-list | sort -u`
-
-#echo '' ; echo "Debug> build_only_dl: $build_only_dl"
-#echo '' ; echo "Debug> run_dl: $run_dl" ; echo ''
 		fi
 
 		run_dl_g="$run_dl_g $run_dl "
@@ -1714,9 +1704,6 @@ dependency_check () {
 		done
 
 		build_only_dl_g=" $temp_bodlg "
-
-#echo '' ; echo "Debug> build_only_dl_g: X${build_only_dl_g}X"
-#echo '' ; echo "Debug> run_dl_g: X${run_dl_g}X" ; echo ''
 	fi
 
 	local d_port origin iport conflicts glob confl_p udf
@@ -1903,7 +1890,6 @@ multiport () {
 		if [ -n "$PM_BUILD_ONLY_LIST" ]; then
 			unset run_dl_g
 			PM_BUILD_ONLY_LIST=pm_bol
-#echo '' ; echo "Debug> build_only_dl_g multiport: $build_only_dl_g" ; echo ''
 		fi
 	fi
 
@@ -2368,7 +2354,6 @@ if [ -n "$CONFIG_ONLY" ]; then
 	if [ -n "$PM_BUILD_ONLY_LIST" ]; then
 		unset run_dl_g
 		PM_BUILD_ONLY_LIST=pm_bol
-#echo '' ; echo "Debug> final build_only_dl_g: $build_only_dl_g" ; echo ''
 	fi
 
 	check_fetch_only
@@ -2385,11 +2370,7 @@ if [ -n "$PM_BUILD_ONLY_LIST" ]; then
 	case "$build_only_dl_g" in
 	*" $pd/$portdir "*)
 	[ -n "$PM_PACKAGES_BUILD" ] && PM_PACKAGES_BUILD=doing_build_only_dep
-	[ -n "$PM_DEL_BUILD_ONLY" ] && PM_DEL_BUILD_ONLY=doing_build_only_dep
-
-#echo '' ; echo "Debug> DOING BUILD ONLY DEP" ; echo ''
-	;;
-
+	[ -n "$PM_DEL_BUILD_ONLY" ] && PM_DEL_BUILD_ONLY=doing_build_only_dep ;;
 	*)	[ -n "$PM_PACKAGES_BUILD" ] && PM_PACKAGES_BUILD=pmp_build
 		[ -n "$PM_DEL_BUILD_ONLY" ] && PM_DEL_BUILD_ONLY=pm_dbo ;;
 	esac
@@ -2460,9 +2441,6 @@ fetch_package () {
 }
 	if [ -z "$PACKAGESITE" ]; then
 		release=`uname -r`
-		#release=7.0-RELEASE-p12
-		#release=8.0-RC1
-		#release=8.0-STABLE
 
 		case "$release" in
 		[678]\.[0-9]-STABLE)
@@ -2486,8 +2464,6 @@ fetch_package () {
 
 	sitepath="${sitepath%/}/${portdir%/*}/"
 
-#echo '' ; echo "Debug> sitepath: $sitepath" ; echo ''
-
 	[ -n "$PM_VERBOSE" ] && echo "===>>> Checking package repository"
 
 	case "$new_port" in
@@ -2518,8 +2494,6 @@ fetch_package () {
 	*%2[cC]*)	latest_pv=`echo $latest_pv | sed s#%2[cC]#,#` ;;
 	esac
 
-#echo '' ; echo "Debug> new_port: $new_port latest_pv: $latest_pv" ; echo ''
-
 notnewer () {
 	echo ''
 	echo "===>>> The newest available package ($latest_pv)"

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 22:09:33 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 59CDE106566C
	for <svn-src-user@freebsd.org>; Tue,  1 Dec 2009 22:09:33 +0000 (UTC)
	(envelope-from max@love2party.net)
Received: from moutng.kundenserver.de (moutng.kundenserver.de
	[212.227.126.171])
	by mx1.freebsd.org (Postfix) with ESMTP id 34CD78FC13
	for <svn-src-user@freebsd.org>; Tue,  1 Dec 2009 22:09:32 +0000 (UTC)
Received: from vampire.homelinux.org (dslb-088-067-244-160.pools.arcor-ip.net
	[88.67.244.160])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LsdeH-1OH5OG0TIP-011qUi; Tue, 01 Dec 2009 22:56:55 +0100
Received: (qmail 10083 invoked from network); 1 Dec 2009 21:56:52 -0000
Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.188)
	by mx.laiers.local with SMTP; 1 Dec 2009 21:56:52 -0000
From: Max Laier <max@love2party.net>
Organization: FreeBSD
To: Doug Barton <dougb@freebsd.org>
Date: Tue, 1 Dec 2009 22:56:50 +0100
User-Agent: KMail/1.12.3 (Linux/2.6.31-ARCH; KDE/4.3.3; x86_64; ; )
References: <200912012105.nB1L58u0076003@svn.freebsd.org>
In-Reply-To: <200912012105.nB1L58u0076003@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_jEZFLs3XxwJm+/8"
Message-Id: <200912012256.51488.max@love2party.net>
X-Provags-ID: V01U2FsdGVkX1/Zo7VPVS5K/p7tXDwWjqJ6Ullg4aQtdOthVE1
	2RHy2zZ4HjT1hLapnE+C8cDYp0EvcWfvQzKY2O0hVrTv4RZwDn
	NpqK5MK2nOYHf4F8nIcgw==
X-Content-Filtered-By: Mailman/MimeDel 2.1.5
Cc: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r200000 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 22:09:33 -0000

--Boundary-00=_jEZFLs3XxwJm+/8
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit

On Tuesday 01 December 2009 22:05:08 Doug Barton wrote:
> New Revision: 200000

Congrats Doug for breaking the 200k

In light of this - see attached ... that's steady development for you :-)

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--Boundary-00=_jEZFLs3XxwJm+/8--

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 22:12:04 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 45D161065672;
	Tue,  1 Dec 2009 22:12:04 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211])
	by mx1.freebsd.org (Postfix) with ESMTP id DDE338FC19;
	Tue,  1 Dec 2009 22:12:03 +0000 (UTC)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id EFBB11CE67; Tue,  1 Dec 2009 23:12:02 +0100 (CET)
Date: Tue, 1 Dec 2009 23:12:02 +0100
From: Ed Schouten <ed@80386.nl>
To: Max Laier <max@love2party.net>
Message-ID: <20091201221202.GJ64905@hoeg.nl>
References: <200912012105.nB1L58u0076003@svn.freebsd.org>
	<200912012256.51488.max@love2party.net>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="MaEJrd1bXRyf0xPJ"
Content-Disposition: inline
In-Reply-To: <200912012256.51488.max@love2party.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: Doug Barton <dougb@freebsd.org>, src-committers@freebsd.org,
	svn-src-user@freebsd.org
Subject: Re: svn commit: r200000 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 22:12:04 -0000


--MaEJrd1bXRyf0xPJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Max Laier <max@love2party.net> wrote:
> In light of this - see attached ... that's steady development for you :-)

So is BSD dying or not? ;-)

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--MaEJrd1bXRyf0xPJ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAksVlLIACgkQ52SDGA2eCwV0AQCfefjOsP6aF58o8NjthmUYIX5s
YssAnRW9Y4QneOCItEtWA20NTzCbEtGJ
=0siA
-----END PGP SIGNATURE-----

--MaEJrd1bXRyf0xPJ--

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 22:18:28 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1D9DB1065692;
	Tue,  1 Dec 2009 22:18:28 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D95E8FC14;
	Tue,  1 Dec 2009 22:18:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1MIRDH077952;
	Tue, 1 Dec 2009 22:18:27 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1MIRLo077950;
	Tue, 1 Dec 2009 22:18:27 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912012218.nB1MIRLo077950@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Tue, 1 Dec 2009 22:18:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200002 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 22:18:28 -0000

Author: dougb
Date: Tue Dec  1 22:18:27 2009
New Revision: 200002
URL: http://svn.freebsd.org/changeset/base/200002

Log:
  Handle the -P option in getopts() to accomodate including it together
  with other options (e.g., -Pav).
  
  On the other hand, add an explicit error for -PP<something else>

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Tue Dec  1 21:54:53 2009	(r200001)
+++ user/dougb/portmaster/portmaster	Tue Dec  1 22:18:27 2009	(r200002)
@@ -411,7 +411,9 @@ e2="The --packages-build option and the 
 
 for var in "$@" ; do
 	case "$var" in
-	-P|--packages)		packages_init first
+	-PP[A-Za-z0-9]*|*[A-Za-z0-9]PP*)
+				fail "The -PP option must stand alone" ;;
+	--packages)		packages_init first
 				PM_PACKAGES=first ; export PM_PACKAGES ;;
 	-PP|--packages-only)	packages_init only
 				PM_PACKAGES=only ; export PM_PACKAGES ;;
@@ -887,7 +889,7 @@ fi
 #=============== End code relevant only to --features ===============
 
 # Save switches for potential child processes
-while getopts 'BCDFGHKLRabde:fghilm:nop:r:stuvwx:' COMMAND_LINE_ARGUMENT ; do
+while getopts 'BCDFGHKLPRabde:fghilm:nop:r:stuvwx:' COMMAND_LINE_ARGUMENT ; do
 	case "${COMMAND_LINE_ARGUMENT}" in
 	B)	NO_BACKUP=Bopt; ARGS="-B $ARGS" ;;
 	C)	DONT_PRE_CLEAN=Copt; ARGS="-C $ARGS" ;;
@@ -897,6 +899,8 @@ while getopts 'BCDFGHKLRabde:fghilm:nop:
 	H)	HIDE_BUILD=Hopt; ARGS="-H $ARGS" ;;
 	K)	DONT_POST_CLEAN=Kopt; ARGS="-K $ARGS" ;;
 	L)	LIST_PLUS=Lopt ;;
+	P)	packages_init first
+		PM_PACKAGES=first ; export PM_PACKAGES ;;
 	R)	RESTART=Ropt ; ARGS="-R $ARGS" ;;
 	a)	UPDATE_ALL=aopt ;;
 	b)	BACKUP=bopt; ARGS="-b $ARGS" ;;

From owner-svn-src-user@FreeBSD.ORG  Tue Dec  1 22:41:38 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B4195106566B;
	Tue,  1 Dec 2009 22:41:38 +0000 (UTC) (envelope-from eri@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A15328FC12;
	Tue,  1 Dec 2009 22:41:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1Mfc6V078712;
	Tue, 1 Dec 2009 22:41:38 GMT (envelope-from eri@svn.freebsd.org)
Received: (from eri@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1Mfcf6078702;
	Tue, 1 Dec 2009 22:41:38 GMT (envelope-from eri@svn.freebsd.org)
Message-Id: <200912012241.nB1Mfcf6078702@svn.freebsd.org>
From: Ermal Luçi <eri@FreeBSD.org>
Date: Tue, 1 Dec 2009 22:41:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200006 - in user/eri/pf45/head: contrib/ntp/ntpd
	share/man/man9 sys/dev/hwpmc sys/dev/xen/netfront sys/kern
	usr.bin/netstat
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 22:41:38 -0000

Author: eri
Date: Tue Dec  1 22:41:38 2009
New Revision: 200006
URL: http://svn.freebsd.org/changeset/base/200006

Log:
  MFH

Modified:
  user/eri/pf45/head/contrib/ntp/ntpd/ntp_io.c
  user/eri/pf45/head/share/man/man9/ifnet.9
  user/eri/pf45/head/sys/dev/hwpmc/hwpmc_x86.c
  user/eri/pf45/head/sys/dev/xen/netfront/netfront.c
  user/eri/pf45/head/sys/kern/tty.c
  user/eri/pf45/head/usr.bin/netstat/if.c
  user/eri/pf45/head/usr.bin/netstat/main.c
  user/eri/pf45/head/usr.bin/netstat/netstat.1
  user/eri/pf45/head/usr.bin/netstat/netstat.h
Directory Properties:
  user/eri/pf45/head/   (props changed)

Modified: user/eri/pf45/head/contrib/ntp/ntpd/ntp_io.c
==============================================================================
--- user/eri/pf45/head/contrib/ntp/ntpd/ntp_io.c	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/contrib/ntp/ntpd/ntp_io.c	Tue Dec  1 22:41:38 2009	(r200006)
@@ -65,6 +65,12 @@
 #endif	/* IPV6 Multicast Support */
 #endif  /* IPv6 Support */
 
+#ifdef INCLUDE_IPV6_SUPPORT
+#include <netinet/in.h>
+#include <net/if_var.h>
+#include <netinet/in_var.h>
+#endif /* !INCLUDE_IPV6_SUPPORT */
+
 extern int listen_to_virtual_ips;
 extern const char *specific_interface;
 
@@ -1137,6 +1143,36 @@ set_wildcard_reuse(int family, int on)
 }
 #endif /* OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */
 
+#ifdef INCLUDE_IPV6_SUPPORT
+static isc_boolean_t
+is_anycast(struct sockaddr *sa, char *name)
+{
+#if defined(SIOCGIFAFLAG_IN6) && defined(IN6_IFF_ANYCAST)
+	struct in6_ifreq ifr6;
+	int fd;
+	u_int32_t flags6;
+
+	if (sa->sa_family != AF_INET6)
+		return ISC_FALSE;
+	if ((fd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
+		return ISC_FALSE;
+	memset(&ifr6, 0, sizeof(ifr6));
+	memcpy(&ifr6.ifr_addr, (struct sockaddr_in6 *)sa,
+	    sizeof(struct sockaddr_in6));
+	strlcpy(ifr6.ifr_name, name, IF_NAMESIZE);
+	if (ioctl(fd, SIOCGIFAFLAG_IN6, &ifr6) < 0) {
+		close(fd);
+		return ISC_FALSE;
+	}
+	close(fd);
+	flags6 = ifr6.ifr_ifru.ifru_flags6;
+	if ((flags6 & IN6_IFF_ANYCAST) != 0)
+		return ISC_TRUE;
+#endif /* !SIOCGIFAFLAG_IN6 || !IN6_IFF_ANYCAST */
+	return ISC_FALSE;
+}
+#endif /* !INCLUDE_IPV6_SUPPORT */
+
 /*
  * update_interface strategy
  *
@@ -1276,6 +1312,11 @@ update_interfaces(
 		if (is_wildcard_addr(&interface.sin))
 			continue;
 
+#ifdef INCLUDE_IPV6_SUPPORT
+		if (is_anycast((struct sockaddr *)&interface.sin, isc_if.name))
+			continue;
+#endif /* !INCLUDE_IPV6_SUPPORT */
+
 		/*
 		 * map to local *address* in order
 		 * to map all duplicate interfaces to an interface structure

Modified: user/eri/pf45/head/share/man/man9/ifnet.9
==============================================================================
--- user/eri/pf45/head/share/man/man9/ifnet.9	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/share/man/man9/ifnet.9	Tue Dec  1 22:41:38 2009	(r200006)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 14, 2007
+.Dd December 1, 2009
 .Os
 .Dt IFNET 9
 .Sh NAME
@@ -279,13 +279,6 @@ to refer to a particular interface by in
 .Xr link_addr 3 ) .
 (Initialized by
 .Fn if_alloc . )
-.It Va if_timer
-.Pq Vt short
-Number of seconds until the watchdog timer
-.Fn if_watchdog
-is called, or zero if the timer is disabled.
-(Set by driver,
-decremented by generic watchdog code.)
 .It Va if_flags
 .Pq Vt int
 Flags describing operational parameters of this interface (see below).
@@ -401,11 +394,6 @@ flags and flushing queues.
 See the description of
 .Fn ifioctl
 below for more information.
-.It Fn if_watchdog
-Routine called by the generic code when the watchdog timer,
-.Va if_timer ,
-expires.
-Usually this will reset the interface.
 .\" .It Fn if_poll_recv
 .\" .It Fn if_poll_xmit
 .\" .It Fn if_poll_slowinput
@@ -415,7 +403,7 @@ Usually this will reset the interface.
 .\" section, below.
 .It Fn if_init
 Initialize and bring up the hardware,
-e.g., reset the chip and the watchdog timer and enable the receiver unit.
+e.g., reset the chip and enable the receiver unit.
 Should mark the interface running,
 but not active
 .Dv ( IFF_RUNNING , ~IIF_OACTIVE ) .

Modified: user/eri/pf45/head/sys/dev/hwpmc/hwpmc_x86.c
==============================================================================
--- user/eri/pf45/head/sys/dev/hwpmc/hwpmc_x86.c	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/sys/dev/hwpmc/hwpmc_x86.c	Tue Dec  1 22:41:38 2009	(r200006)
@@ -101,7 +101,7 @@ pmc_save_user_callchain(uintptr_t *cc, i
 		if (copyin((void *) sp, &pc, sizeof(pc)) != 0)
 			return (n);
 	} else if (copyin((void *) r, &pc, sizeof(pc)) != 0 ||
-	    copyin((void *) fp, &fp, sizeof(fp) != 0))
+	    copyin((void *) fp, &fp, sizeof(fp)) != 0)
 		return (n);
 
 	for (; n < nframes;) {

Modified: user/eri/pf45/head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- user/eri/pf45/head/sys/dev/xen/netfront/netfront.c	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/sys/dev/xen/netfront/netfront.c	Tue Dec  1 22:41:38 2009	(r200006)
@@ -155,6 +155,9 @@ static void netif_disconnect_backend(str
 static int setup_device(device_t dev, struct netfront_info *info);
 static void end_access(int ref, void *page);
 
+static int  xn_ifmedia_upd(struct ifnet *ifp);
+static void xn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr);
+
 /* Xenolinux helper functions */
 int network_connect(struct netfront_info *);
 
@@ -240,7 +243,9 @@ struct netfront_info {
 	/* Receive-ring batched refills. */
 #define RX_MIN_TARGET 32
 #define RX_MAX_TARGET NET_RX_RING_SIZE
-	int rx_min_target, rx_max_target, rx_target;
+	int rx_min_target;
+	int rx_max_target;
+	int rx_target;
 
 	/*
 	 * {tx,rx}_skbs store outstanding skbuffs. The first entry in each
@@ -253,19 +258,20 @@ struct netfront_info {
 	grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1]; 
 
 #define TX_MAX_TARGET min(NET_RX_RING_SIZE, 256)
-	device_t xbdev;
-	int tx_ring_ref;
-	int rx_ring_ref;
-	uint8_t mac[ETHER_ADDR_LEN];
+	device_t		xbdev;
+	int			tx_ring_ref;
+	int			rx_ring_ref;
+	uint8_t			mac[ETHER_ADDR_LEN];
 	struct xn_chain_data	xn_cdata;	/* mbufs */
-	struct mbuf_head xn_rx_batch;	/* head of the batch queue */
+	struct mbuf_head	xn_rx_batch;	/* head of the batch queue */
 
 	int			xn_if_flags;
 	struct callout	        xn_stat_ch;
 
-	u_long rx_pfn_array[NET_RX_RING_SIZE];
-	multicall_entry_t rx_mcl[NET_RX_RING_SIZE+1];
-	mmu_update_t rx_mmu[NET_RX_RING_SIZE];
+	u_long			rx_pfn_array[NET_RX_RING_SIZE];
+	multicall_entry_t	rx_mcl[NET_RX_RING_SIZE+1];
+	mmu_update_t		rx_mmu[NET_RX_RING_SIZE];
+	struct ifmedia		sc_media;
 };
 
 #define rx_mbufs xn_cdata.xn_rx_chain
@@ -1622,6 +1628,7 @@ xn_ifinit_locked(struct netfront_info *s
 	
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+	if_link_state_change(ifp, LINK_STATE_UP);
 	
 	callout_reset(&sc->xn_stat_ch, hz, xn_tick, sc);
 
@@ -1761,7 +1768,7 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, 
 		/* FALLTHROUGH */
 	case SIOCSIFMEDIA:
 	case SIOCGIFMEDIA:
-		error = EINVAL;
+		error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
 		break;
 	default:
 		error = ether_ioctl(ifp, cmd, data);
@@ -1785,6 +1792,7 @@ xn_stop(struct netfront_info *sc)
 	xn_free_tx_ring(sc);
     
 	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+	if_link_state_change(ifp, LINK_STATE_DOWN);
 }
 
 /* START of Xenolinux helper functions adapted to FreeBSD */
@@ -1903,6 +1911,11 @@ create_netdev(device_t dev)
 	np->xbdev         = dev;
     
 	XN_LOCK_INIT(np, xennetif);
+
+	ifmedia_init(&np->sc_media, 0, xn_ifmedia_upd, xn_ifmedia_sts);
+	ifmedia_add(&np->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL);
+	ifmedia_set(&np->sc_media, IFM_ETHER|IFM_MANUAL);
+
 	np->rx_target     = RX_MIN_TARGET;
 	np->rx_min_target = RX_MIN_TARGET;
 	np->rx_max_target = RX_MAX_TARGET;
@@ -1987,7 +2000,8 @@ out:
  * acknowledgement.
  */
 #if 0
-static void netfront_closing(device_t dev)
+static void
+netfront_closing(device_t dev)
 {
 #if 0
 	struct netfront_info *info = dev->dev_driver_data;
@@ -2000,7 +2014,8 @@ static void netfront_closing(device_t de
 }
 #endif
 
-static int netfront_detach(device_t dev)
+static int
+netfront_detach(device_t dev)
 {
 	struct netfront_info *info = device_get_softc(dev);
 
@@ -2011,8 +2026,8 @@ static int netfront_detach(device_t dev)
 	return 0;
 }
 
-
-static void netif_free(struct netfront_info *info)
+static void
+netif_free(struct netfront_info *info)
 {
 	netif_disconnect_backend(info);
 #if 0
@@ -2020,7 +2035,8 @@ static void netif_free(struct netfront_i
 #endif
 }
 
-static void netif_disconnect_backend(struct netfront_info *info)
+static void
+netif_disconnect_backend(struct netfront_info *info)
 {
 	XN_RX_LOCK(info);
 	XN_TX_LOCK(info);
@@ -2042,12 +2058,26 @@ static void netif_disconnect_backend(str
 }
 
 
-static void end_access(int ref, void *page)
+static void
+end_access(int ref, void *page)
 {
 	if (ref != GRANT_INVALID_REF)
 		gnttab_end_foreign_access(ref, page);
 }
 
+static int
+xn_ifmedia_upd(struct ifnet *ifp)
+{
+	return (0);
+}
+
+static void
+xn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
+{
+	ifmr->ifm_status = IFM_AVALID|IFM_ACTIVE;
+	ifmr->ifm_active = IFM_ETHER|IFM_MANUAL;
+}
+
 /* ** Driver registration ** */
 static device_method_t netfront_methods[] = { 
 	/* Device interface */ 

Modified: user/eri/pf45/head/sys/kern/tty.c
==============================================================================
--- user/eri/pf45/head/sys/kern/tty.c	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/sys/kern/tty.c	Tue Dec  1 22:41:38 2009	(r200006)
@@ -102,10 +102,11 @@ static const char	*dev_console_filename;
 static void
 tty_watermarks(struct tty *tp)
 {
-	size_t bs;
+	size_t bs = 0;
 
 	/* Provide an input buffer for 0.2 seconds of data. */
-	bs = MIN(tp->t_termios.c_ispeed / 5, TTYBUF_MAX);
+	if (tp->t_termios.c_cflag & CREAD)
+		bs = MIN(tp->t_termios.c_ispeed / 5, TTYBUF_MAX);
 	ttyinq_setsize(&tp->t_inq, tp, bs);
 
 	/* Set low watermark at 10% (when 90% is available). */
@@ -890,6 +891,7 @@ ttydevsw_defparam(struct tty *tp, struct
 		t->c_ospeed = B50;
 	else if (t->c_ospeed > B115200)
 		t->c_ospeed = B115200;
+	t->c_cflag |= CREAD;
 
 	return (0);
 }

Modified: user/eri/pf45/head/usr.bin/netstat/if.c
==============================================================================
--- user/eri/pf45/head/usr.bin/netstat/if.c	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/usr.bin/netstat/if.c	Tue Dec  1 22:41:38 2009	(r200006)
@@ -200,7 +200,6 @@ intpr(int interval1, u_long ifnetaddr, v
 	u_long ierrors;
 	u_long idrops;
 	u_long collisions;
-	short timer;
 	int drops;
 	struct sockaddr *sa = NULL;
 	char name[IFNAMSIZ];
@@ -234,8 +233,6 @@ intpr(int interval1, u_long ifnetaddr, v
 		if (bflag)
 			printf(" %10.10s","Obytes");
 		printf(" %5s", "Coll");
-		if (tflag)
-			printf(" %s", "Time");
 		if (dflag)
 			printf(" %s", "Drop");
 		putchar('\n');
@@ -288,7 +285,6 @@ intpr(int interval1, u_long ifnetaddr, v
 		ierrors = ifnet.if_ierrors;
 		idrops = ifnet.if_iqdrops;
 		collisions = ifnet.if_collisions;
-		timer = ifnet.if_timer;
 		drops = ifnet.if_snd.ifq_drops;
 
 		if (ifaddraddr == 0) {
@@ -435,8 +431,6 @@ intpr(int interval1, u_long ifnetaddr, v
 			show_stat("lu", 10, obytes, link_layer|network_layer);
 
 		show_stat("NRSlu", 5, collisions, link_layer);
-		if (tflag)
-			show_stat("LSd", 4, timer, link_layer);
 		if (dflag)
 			show_stat("LSd", 4, drops, link_layer);
 		putchar('\n');

Modified: user/eri/pf45/head/usr.bin/netstat/main.c
==============================================================================
--- user/eri/pf45/head/usr.bin/netstat/main.c	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/usr.bin/netstat/main.c	Tue Dec  1 22:41:38 2009	(r200006)
@@ -339,7 +339,6 @@ int	numeric_port;	/* show ports numerica
 static int pflag;	/* show given protocol */
 int	rflag;		/* show routing tables (or routing stats) */
 int	sflag;		/* show protocol statistics */
-int	tflag;		/* show i/f watchdog timers */
 int	Wflag;		/* wide display */
 int	xflag;		/* extra information, includes all socket buffer info */
 int	zflag;		/* zero stats */
@@ -360,7 +359,7 @@ main(int argc, char *argv[])
 
 	af = AF_UNSPEC;
 
-	while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:rSstuWw:xz")) != -1)
+	while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:rSsuWw:xz")) != -1)
 		switch(ch) {
 		case 'A':
 			Aflag = 1;
@@ -455,9 +454,6 @@ main(int argc, char *argv[])
 		case 'S':
 			numeric_addr = 1;
 			break;
-		case 't':
-			tflag = 1;
-			break;
 		case 'u':
 			af = AF_UNIX;
 			break;
@@ -781,7 +777,7 @@ usage(void)
 	(void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
 "usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol]\n"
 "               [-M core] [-N system]",
-"       netstat -i | -I interface [-abdhntW] [-f address_family]\n"
+"       netstat -i | -I interface [-abdhnW] [-f address_family]\n"
 "               [-M core] [-N system]",
 "       netstat -w wait [-I interface] [-d] [-M core] [-N system]",
 "       netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n"

Modified: user/eri/pf45/head/usr.bin/netstat/netstat.1
==============================================================================
--- user/eri/pf45/head/usr.bin/netstat/netstat.1	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/usr.bin/netstat/netstat.1	Tue Dec  1 22:41:38 2009	(r200006)
@@ -92,7 +92,7 @@ is present, display socket buffer and tc
 .Bk -words
 .Nm
 .Fl i | I Ar interface
-.Op Fl abdhntW
+.Op Fl abdhnW
 .Op Fl f Ar address_family
 .Op Fl M Ar core
 .Op Fl N Ar system
@@ -123,9 +123,6 @@ If
 .Fl h
 is also present, print all counters in human readable form.
 If
-.Fl t
-is also present, show the contents of watchdog timers.
-If
 .Fl W
 is also present, print interface names using a wider field size.
 .It Xo

Modified: user/eri/pf45/head/usr.bin/netstat/netstat.h
==============================================================================
--- user/eri/pf45/head/usr.bin/netstat/netstat.h	Tue Dec  1 22:38:37 2009	(r200005)
+++ user/eri/pf45/head/usr.bin/netstat/netstat.h	Tue Dec  1 22:41:38 2009	(r200006)
@@ -49,7 +49,6 @@ extern int	numeric_addr;	/* show address
 extern int	numeric_port;	/* show ports numerically */
 extern int	rflag;	/* show routing tables (or routing stats) */
 extern int	sflag;	/* show protocol statistics */
-extern int	tflag;	/* show i/f watchdog timers */
 extern int	Wflag;	/* wide display */
 extern int	xflag;	/* extended display, includes all socket buffer info */
 extern int	zflag;	/* zero stats */

From owner-svn-src-user@FreeBSD.ORG  Thu Dec  3 00:27:17 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EBFA3106566C;
	Thu,  3 Dec 2009 00:27:16 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D8D678FC16;
	Thu,  3 Dec 2009 00:27:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB30RGqL093437;
	Thu, 3 Dec 2009 00:27:16 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB30RGoI093428;
	Thu, 3 Dec 2009 00:27:16 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200912030027.nB30RGoI093428@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Thu, 3 Dec 2009 00:27:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200049 - in user/kmacy/releng_8_fcs_buf_xen:
	cddl/lib/libzpool sys/cddl/contrib/opensolaris/uts/common/fs/zfs
	sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Dec 2009 00:27:17 -0000

Author: kmacy
Date: Thu Dec  3 00:27:16 2009
New Revision: 200049
URL: http://svn.freebsd.org/changeset/base/200049

Log:
  - Minimize ARC churn by moving functions interfacing with the buffer cache to
    a separate file
  
  - consolidate I/O cache synchronization in zio_create

Added:
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_bio.h   (contents, props changed)
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c   (contents, props changed)
Modified:
  user/kmacy/releng_8_fcs_buf_xen/cddl/lib/libzpool/Makefile
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c

Modified: user/kmacy/releng_8_fcs_buf_xen/cddl/lib/libzpool/Makefile
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/cddl/lib/libzpool/Makefile	Wed Dec  2 21:58:34 2009	(r200048)
+++ user/kmacy/releng_8_fcs_buf_xen/cddl/lib/libzpool/Makefile	Thu Dec  3 00:27:16 2009	(r200049)
@@ -23,7 +23,7 @@ ATOMIC_SRCS=	opensolaris_atomic.c
 
 LIB=		zpool
 
-ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c
+ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} vdev_file.c zfs_bio.c
 ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/}
 KERNEL_SRCS=	kernel.c taskq.c util.c
 LIST_SRCS=	list.c

Modified: user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Wed Dec  2 21:58:34 2009	(r200048)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu Dec  3 00:27:16 2009	(r200049)
@@ -122,12 +122,12 @@
 #include <sys/zio_checksum.h>
 #include <sys/zfs_context.h>
 #include <sys/arc.h>
+#include <sys/zfs_bio.h>
 #include <sys/refcount.h>
 #include <sys/vdev.h>
 #ifdef _KERNEL
 #include <sys/dnlc.h>
 #endif
-#include <sys/ktr.h>
 #include <sys/callb.h>
 #include <sys/kstat.h>
 #include <sys/sdt.h>
@@ -187,11 +187,6 @@ SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min,
 SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN,
     &zfs_mdcomp_disable, 0, "Disable metadata compression");
 
-static int zfs_page_cache_disable = 0;
-TUNABLE_INT("vfs.zfs.page_cache_disable", &zfs_page_cache_disable);
-SYSCTL_INT(_vfs_zfs, OID_AUTO, page_cache_disable, CTLFLAG_RDTUN,
-    &zfs_page_cache_disable, 0, "Disable backing ARC with page cache ");
-
 #ifdef ZIO_USE_UMA
 extern kmem_cache_t	*zio_buf_cache[];
 extern kmem_cache_t	*zio_data_buf_cache[];
@@ -263,8 +258,8 @@ static arc_state_t ARC_mfu_ghost;
 static arc_state_t ARC_l2c_only;
 
 typedef struct arc_stats {
-	kstat_named_t arcstat_hits;
 	kstat_named_t arcstat_page_cache_hits;
+	kstat_named_t arcstat_hits;
 	kstat_named_t arcstat_misses;
 	kstat_named_t arcstat_demand_data_hits;
 	kstat_named_t arcstat_demand_data_misses;
@@ -453,28 +448,33 @@ struct arc_write_callback {
 	arc_buf_t	*awcb_buf;
 };
 
+/*
+ * Keep initial ordering in-sync with zbio_buf_hdr
+ */
+
 struct arc_buf_hdr {
 	/* protected by hash lock */
 	dva_t			b_dva;
 	uint64_t		b_birth;
-	uint64_t		b_cksum0;
+	uint32_t		b_flags;
+	uint32_t		b_datacnt;
 
+	/* immutable */
+	arc_buf_contents_t	b_type;
+	uint64_t		b_size;
+	spa_t			*b_spa;
+
+	/* protected by hash lock */
 	kmutex_t		b_freeze_lock;
 	zio_cksum_t		*b_freeze_cksum;
 
 	arc_buf_hdr_t		*b_hash_next;
 	arc_buf_t		*b_buf;
-	uint32_t		b_flags;
-	uint32_t		b_datacnt;
+	uint64_t		b_cksum0;
 
 	arc_callback_t		*b_acb;
 	kcondvar_t		b_cv;
 
-	/* immutable */
-	arc_buf_contents_t	b_type;
-	uint64_t		b_size;
-	spa_t			*b_spa;
-
 	/* protected by arc state mutex */
 	arc_state_t		*b_state;
 	list_node_t		b_arc_node;
@@ -520,7 +520,6 @@ static void arc_evict_ghost(arc_state_t 
 #define	ARC_L2_EVICTED		(1 << 17)	/* evicted during I/O */
 #define	ARC_L2_WRITE_HEAD	(1 << 18)	/* head of write list */
 #define	ARC_STORED		(1 << 19)	/* has been store()d to */
-#define	ARC_BUF_CLONING		(1 << 21)	/* is being cloned */
 
 #define	HDR_IN_HASH_TABLE(hdr)	((hdr)->b_flags & ARC_IN_HASH_TABLE)
 #define	HDR_IO_IN_PROGRESS(hdr)	((hdr)->b_flags & ARC_IO_IN_PROGRESS)
@@ -642,9 +641,8 @@ struct l2arc_buf_hdr {
 typedef struct l2arc_data_free {
 	/* protected by l2arc_free_on_write_mtx */
 	arc_buf_t	*l2df_buf;
-	void		*l2df_data;
 	size_t		l2df_size;
-	void		(*l2df_func)(arc_buf_t *, void *, size_t);
+	void		(*l2df_func)(arc_buf_t *, size_t);
 	list_node_t	l2df_list_node;
 } l2arc_data_free_t;
 
@@ -1260,7 +1258,7 @@ arc_buf_clone(arc_buf_t *from)
 	buf->b_private = NULL;
 	buf->b_next = hdr->b_buf;
 	hdr->b_buf = buf;
-	hdr->b_flags |= ARC_BUF_CLONING;
+	hdr->b_flags |= ZBIO_BUF_CLONING;
 	arc_get_data_buf(buf);
 	bcopy(from->b_data, buf->b_data, size);
 	hdr->b_datacnt += 1;
@@ -1299,259 +1297,18 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta
 	    data, metadata, hits);
 }
 
-#ifdef _KERNEL
-void
-arc_binval(spa_t *spa, dva_t *dva, uint64_t size)
-{
-	uint64_t blkno, blkno_lookup;
-	struct vnode *vp;
-	struct bufobj *bo;
-	struct buf *bp;
-	vm_pindex_t start, end;
-	vm_object_t object;
-	vm_page_t m;
-	int i;
-
-	if (zfs_page_cache_disable)
-		return;
-
-	if (dva == NULL || spa == NULL || blkno == 0 || size == 0)
-		return;
-
-	blkno_lookup = blkno = dva->dva_word[1] & ~(1ULL<<63);
-	vp = spa_get_vnode(spa);
-	bo = &vp->v_bufobj;
-
-	BO_LOCK(bo);
-retry:
-	bp = gbincore(bo, blkno_lookup);
-	if (bp != NULL) {
-		BUF_LOCK(bp, LK_EXCLUSIVE | LK_INTERLOCK, BO_MTX(bo));
-		CTR3(KTR_SPARE2, "arc_binval() bp=%p blkno %ld npages %d",
-		   bp, blkno, bp->b_npages);
-		bremfree(bp);
-		KASSERT(bp->b_flags & B_VMIO, ("buf found, VMIO not set"));		
-		bp->b_flags |= B_INVAL;
-		bp->b_birth = 0;
-		brelse(bp);
-	} else if (blkno_lookup & 0x7) {
-		blkno_lookup &= ~0x7;
-		goto retry;
-	} else {
-		CTR2(KTR_SPARE2, "arc_binval() blkno %ld npages %d",
-		    blkno, OFF_TO_IDX(size));
-		BO_UNLOCK(bo);
-	}
-	start = OFF_TO_IDX((blkno_lookup << 9));
-	end = start + OFF_TO_IDX(size + PAGE_MASK);
-	object = vp->v_object;
-
-	VM_OBJECT_LOCK(object);
-	vm_page_cache_free(object, start, end);
-	vm_object_page_remove(object, start, end, FALSE);
-#ifdef INVARIANTS
-	for (i = 0; i < OFF_TO_IDX(size); i++) {
-		KASSERT(vm_page_lookup(object, start + i) == NULL,
-		    ("found page at %ld blkno %ld blkno_lookup %ld",
-			start + i, blkno, blkno_lookup));
-	}
-#endif	
-	VM_OBJECT_UNLOCK(object);
-}
-
-static void
-arc_pcache(struct vnode *vp, struct buf *bp, uint64_t blkno)
-{
-	vm_pindex_t start = OFF_TO_IDX((blkno << 9));
-	vm_object_t object = vp->v_object;
-	struct bufobj *bo = &vp->v_bufobj;
-	vm_page_t m;
-	int i;
-
-	BO_LOCK(bo);
-	bgetvp(vp, bp);
-	BO_UNLOCK(bo);
-
-	CTR3(KTR_SPARE2, "arc_pcache() bp=%p blkno %ld npages %d",
-		   bp, blkno, bp->b_npages);
-	VM_OBJECT_LOCK(object);
-	for (i = 0; i < bp->b_npages; i++) {
-		m = bp->b_pages[i];
-		vm_page_insert(m, object, start + i);
-	}
-	VM_OBJECT_UNLOCK(object);
-	bp->b_flags |= B_VMIO;
-}
-
-static void
-arc_bcache(arc_buf_t *buf)
-{	
-	uint64_t blkno = buf->b_hdr->b_dva.dva_word[1] & ~(1ULL<<63);
-	struct buf *newbp, *bp = buf->b_bp;
-	struct vnode *vp = spa_get_vnode(buf->b_hdr->b_spa);
-	struct bufobj *bo = &vp->v_bufobj;
-	arc_buf_hdr_t *hdr = buf->b_hdr;
-	int cachebuf;
-
-	if (zfs_page_cache_disable)
-		return;
-
-	if (blkno == 0 || hdr->b_birth == 0)
-		return;
-
-	newbp = buf->b_bp;
-	newbp->b_birth = hdr->b_birth;
-	newbp->b_blkno = newbp->b_lblkno = blkno;
-	newbp->b_offset = (blkno << 9);
-	cachebuf = ((hdr->b_datacnt == 1) &&
-	    !(hdr->b_flags & ARC_IO_ERROR) &&
-	    ((newbp->b_flags & (B_INVAL|B_CACHE)) == B_CACHE) &&
-	    (blkno & 0x7) == 0);
-
-	arc_binval(hdr->b_spa, &hdr->b_dva, hdr->b_size);
-	if (cachebuf) 
-		arc_pcache(vp, newbp, blkno);	
-}
-#else
-void
-arc_binval(spa_t *spa, dva_t *dva, uint64_t size)
-{
-}
-#endif
-
-
-static void
-arc_getblk(arc_buf_t *buf)
-{
-	uint64_t		size = buf->b_hdr->b_size;
-	arc_buf_contents_t	type = buf->b_hdr->b_type;
-	spa_t			*spa = buf->b_hdr->b_spa;
-	uint64_t blkno = buf->b_hdr->b_dva.dva_word[1] & ~(1ULL<<63);
-	void *data;
-	arc_buf_t *tbuf;
-	struct vnode *vp;
-	int i, flags = 0;
-#ifdef _KERNEL	
-	struct buf *newbp, *bp;
-	struct bufobj *bo;
-	vm_pindex_t start, end;
-	vm_object_t object;
-#endif
-	if (type == ARC_BUFC_METADATA) {
-		arc_space_consume(size);
-	} else {
-		ASSERT(type == ARC_BUFC_DATA);
-#ifdef _KERNEL
-		flags = GB_NODUMP;
-#endif		
-		atomic_add_64(&arc_size, size);
-	}
-
-#ifdef 	_KERNEL
-	vp = spa_get_vnode(spa);
-	bo = &vp->v_bufobj;
-	newbp = NULL;
-#endif
-	if (size < PAGE_SIZE) {
-		data = zio_buf_alloc(size);
-	}
-#ifdef _KERNEL
-	else if ((buf->b_hdr->b_flags & ARC_BUF_CLONING) ||
-	    BUF_EMPTY(buf->b_hdr) ||
-	    (blkno == 0)) {
-		newbp = geteblk(size, flags);
-		data = newbp->b_data;
-		buf->b_hdr->b_flags &= ~ARC_BUF_CLONING;
-	} else {
-		newbp = getblk(vp, blkno, size, 0, 0, flags | GB_LOCK_NOWAIT);
-		if (newbp == NULL)
-			newbp = geteblk(size, flags);
-		else {
-			vm_object_t object = vp->v_object;
-			vm_page_t m;
-
-			/*
-			 * Strip the buffers pages from the object
-			 */
-			VM_OBJECT_LOCK(object);
-			vm_page_lock_queues();
-			for (i = 0; i < newbp->b_npages; i++){
-				m = newbp->b_pages[i];
-				vm_page_remove(m);
-			}
-			vm_page_unlock_queues();
-			VM_OBJECT_UNLOCK(object);
-			brelvp(newbp);
-			newbp->b_flags &= ~B_VMIO;
-		}
-		data = newbp->b_data;
-	}
-
-	if (newbp != NULL) {
-		BUF_KERNPROC(newbp);
-
-		CTR4(KTR_SPARE2, "arc_getblk() bp=%p flags %X blkno %ld npages %d",
-		    newbp, newbp->b_flags, blkno, newbp->b_npages);
-#ifdef INVARIANTS
-		for (i = 0; i < newbp->b_npages; i++)
-			KASSERT(newbp->b_pages[i]->object == NULL,
-			    ("newbp page not removed"));
-#endif	
-	}
-	buf->b_bp = newbp;
-#endif	
-	buf->b_data = data;
-}
-
-static void
-arc_brelse(arc_buf_t *buf, void *data, size_t size)
-{
-	struct buf *bp = buf->b_bp;
-	arc_buf_hdr_t *hdr = buf->b_hdr;
-#ifdef INVARIANTS
-	int i;
-#endif
-	
-	if (bp == NULL) {
-		zio_buf_free(buf->b_data, size);
-		return;
-	}
-#ifdef _KERNEL
-#ifdef INVARIANTS
-	for (i = 0; i < bp->b_npages; i++)
-		KASSERT(bp->b_pages[i]->object == NULL,
-		    ("newbp page not removed"));
-#endif	
-	arc_bcache(buf);
-
-
-	if (bp->b_vp == NULL)
-		KASSERT((bp->b_flags & B_VMIO) == 0, ("no vp but VMIO set!"));
-	else {
-		KASSERT((bp->b_flags & B_VMIO), ("vp but VMIO not set!"));
-		CTR4(KTR_SPARE2, "arc_brelse() bp=%p flags %X"
-		    " size %ld blkno=%ld",
-		    bp, bp->b_flags, size, bp->b_blkno);
-	}
-
-	bp->b_flags |= B_ZFS;
-	brelse(bp);
-#endif
-}
-
 /*
  * Free the arc data buffer.  If it is an l2arc write in progress,
  * the buffer is placed on l2arc_free_on_write to be freed later.
  */
 static void
-arc_buf_data_free(arc_buf_hdr_t *hdr, void (*free_func)(arc_buf_t *, void *, size_t),
-    arc_buf_t *buf, void *data, size_t size)
+arc_buf_data_free(arc_buf_hdr_t *hdr, void (*free_func)(arc_buf_t *, size_t),
+    arc_buf_t *buf, size_t size)
 {
 	if (HDR_L2_WRITING(hdr)) {
 		l2arc_data_free_t *df;
 		df = kmem_alloc(sizeof (l2arc_data_free_t), KM_SLEEP);
 		df->l2df_buf = buf;
-		df->l2df_data = data;
 		df->l2df_size = size;
 		df->l2df_func = free_func;
 		mutex_enter(&l2arc_free_on_write_mtx);
@@ -1559,7 +1316,7 @@ arc_buf_data_free(arc_buf_hdr_t *hdr, vo
 		mutex_exit(&l2arc_free_on_write_mtx);
 		ARCSTAT_BUMP(arcstat_l2_free_on_write);
 	} else {
-		free_func(buf, data, size);
+		free_func(buf, size);
 	}
 }
 
@@ -1577,13 +1334,13 @@ arc_buf_destroy(arc_buf_t *buf, boolean_
 		arc_cksum_verify(buf);
 		if (!recycle) {
 			if (type == ARC_BUFC_METADATA) {
-				arc_buf_data_free(buf->b_hdr, arc_brelse,
-				    buf, buf->b_data, size);
+				arc_buf_data_free(buf->b_hdr, zbio_relse,
+				    buf, size);
 				arc_space_return(size);
 			} else {
 				ASSERT(type == ARC_BUFC_DATA);
-				arc_buf_data_free(buf->b_hdr, arc_brelse,
-				    buf, buf->b_data, size);
+				arc_buf_data_free(buf->b_hdr,
+				    zbio_relse, buf, size);
 				atomic_add_64(&arc_size, -size);
 			}
 		}
@@ -1802,12 +1559,14 @@ arc_evict(arc_state_t *state, spa_t *spa
 
 	evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost;
 
+#ifdef _KERNEL
 	/*
 	 * don't recycle page cache bufs
 	 *
 	 */
 	if (recycle && (bytes >= PAGE_SIZE))
 		recycle = FALSE;
+#endif
 	if (type == ARC_BUFC_METADATA) {
 		offset = 0;
 		list_count = ARC_BUFC_NUMMETADATALISTS;
@@ -1822,9 +1581,7 @@ arc_evict(arc_state_t *state, spa_t *spa
 		list_count = ARC_BUFC_NUMDATALISTS;
 		idx = evict_data_offset;
 	}
-	for (bytes_remaining = 0, i = 0; i < list_count; i++) 
-                bytes_remaining += evicted_state->arcs_lsize[i + offset]; 
-
+	bytes_remaining = evicted_state->arcs_lsize[type];
 	count = 0;
 	
 evict_start:
@@ -2422,7 +2179,7 @@ arc_reclaim_thread(void *dummy __unused)
 static void
 arc_adapt(int bytes, arc_state_t *state)
 {
-	int mult, divisor;
+	int mult;
 
 	if (state == arc_l2c_only)
 		return;
@@ -2437,15 +2194,13 @@ arc_adapt(int bytes, arc_state_t *state)
 	 *	  target size of the MRU list.
 	 */
 	if (state == arc_mru_ghost) {
-		divisor = MAX(arc_mru_ghost->arcs_size, 1);
 		mult = ((arc_mru_ghost->arcs_size >= arc_mfu_ghost->arcs_size) ?
 		    1 : (arc_mfu_ghost->arcs_size/arc_mru_ghost->arcs_size));
 
 		arc_p = MIN(arc_c, arc_p + bytes * mult);
 	} else if (state == arc_mfu_ghost) {
-		divisor = MAX(arc_mfu_ghost->arcs_size, 1);		
 		mult = ((arc_mfu_ghost->arcs_size >= arc_mru_ghost->arcs_size) ?
-		    1 : (arc_mru_ghost->arcs_size/divisor));
+		    1 : (arc_mru_ghost->arcs_size/arc_mfu_ghost->arcs_size));
 
 		arc_p = MAX(0, (int64_t)arc_p - bytes * mult);
 	}
@@ -2545,7 +2300,14 @@ arc_get_data_buf(arc_buf_t *buf)
 	 * just allocate a new buffer.
 	 */
 	if (!arc_evict_needed(type)) {
-		arc_getblk(buf);
+		if (type == ARC_BUFC_METADATA) {
+			zbio_getblk(buf);
+			arc_space_consume(size);
+		} else {
+			ASSERT(type == ARC_BUFC_DATA);
+			zbio_data_getblk(buf);
+			atomic_add_64(&arc_size, size);
+		}
 		goto out;
 	}
 
@@ -2569,10 +2331,18 @@ arc_get_data_buf(arc_buf_t *buf)
 		    mfu_space > arc_mfu->arcs_size) ? arc_mru : arc_mfu;
 	}
 	if ((buf->b_data = arc_evict(state, NULL, size, TRUE, type)) == NULL) {
-		arc_getblk(buf);
-		ASSERT(buf->b_data != NULL);
+		if (type == ARC_BUFC_METADATA) {
+			zbio_getblk(buf);
+			arc_space_consume(size);
+		} else {
+			ASSERT(type == ARC_BUFC_DATA);
+			zbio_data_getblk(buf);
+			atomic_add_64(&arc_size, size);
+		}
+		if (size < PAGE_SIZE)
+			ARCSTAT_BUMP(arcstat_recycle_miss);
 	}
-
+	ASSERT(buf->b_data != NULL);
 out:
 	/*
 	 * Update the state size.  Note that ghost states have a
@@ -2818,18 +2588,7 @@ arc_read_done(zio_t *zio)
 			buf_hash_remove(hdr);
 		freeable = refcount_is_zero(&hdr->b_refcnt);
 	}
-#ifdef _KERNEL
-	else if (buf->b_bp != NULL) {
-#ifdef INVARIANTS
-		int i;
-		for (i = 0; i < buf->b_bp->b_npages; i++)
-			KASSERT(buf->b_bp->b_pages[i]->object == NULL,
-			    ("bp page not removed"));
-#endif	
-		buf->b_bp->b_flags |= B_CACHE;
-		buf->b_bp->b_flags &= ~B_INVAL;
-	}
-#endif
+
 	/*
 	 * Broadcast before we drop the hash_lock to avoid the possibility
 	 * that the hdr (and hence the cv) might be freed before we get to
@@ -3535,12 +3294,6 @@ arc_write_done(zio_t *zio)
 			exists = buf_hash_insert(hdr, &hash_lock);
 			ASSERT3P(exists, ==, NULL);
 		}
-#ifdef _KERNEL
-		else if (buf->b_bp != NULL) {
-			buf->b_bp->b_flags |= B_CACHE;
-			buf->b_bp->b_flags &= ~B_INVAL;
-		}
-#endif
 		hdr->b_flags &= ~ARC_IO_IN_PROGRESS;
 		/* if it's not anon, we are doing a scrub */
 		if (hdr->b_state == arc_anon)
@@ -3832,7 +3585,6 @@ arc_tempreserve_space(uint64_t reserve, 
 static kmutex_t arc_lowmem_lock;
 #ifdef _KERNEL
 static eventhandler_tag arc_event_lowmem = NULL;
-static eventhandler_tag arc_event_shutdown = NULL;
 
 static void
 arc_lowmem(void *arg __unused, int howto __unused)
@@ -3846,44 +3598,6 @@ arc_lowmem(void *arg __unused, int howto
 		tsleep(&needfree, 0, "zfs:lowmem", hz / 5);
 	mutex_exit(&arc_lowmem_lock);
 }
-void
-arc_shutdown(void *arg __unused, int howto __unused)
-{
-	struct mount *mp, *tmpmp;
-	int error;
-
-	/*
-	 * unmount all ZFS file systems - freeing any buffers
-	 * then free all space allocator resources
-	 */
-	TAILQ_FOREACH_SAFE(mp, &mountlist, mnt_list, tmpmp) {
-		if (strcmp(mp->mnt_vfc->vfc_name, "zfs") == 0) {
-			error = dounmount(mp, MNT_FORCE, curthread);
-			if (error) {
-				TAILQ_REMOVE(&mountlist, mp, mnt_list);
-				printf("unmount of %s failed (",
-				    mp->mnt_stat.f_mntonname);
-				if (error == EBUSY)
-					printf("BUSY)\n");
-				else
-					printf("%d)\n", error);
-			}
-		}
-		
-	}
-	arc_flush(NULL);
-
-#ifdef NOTYET
-	/*
-	 * need corresponding includes
-	 */
-	zfsdev_fini();
-	zvol_fini();
-	zfs_fini();
-#endif	
-	spa_fini();
-}
-
 #endif
 
 void
@@ -4009,8 +3723,6 @@ arc_init(void)
 #ifdef _KERNEL
 	arc_event_lowmem = EVENTHANDLER_REGISTER(vm_lowmem, arc_lowmem, NULL,
 	    EVENTHANDLER_PRI_FIRST);
-	arc_event_shutdown = EVENTHANDLER_REGISTER(shutdown_pre_sync,
-	    arc_shutdown, NULL, EVENTHANDLER_PRI_FIRST);
 #endif
 
 	arc_dead = FALSE;
@@ -4105,8 +3817,6 @@ arc_fini(void)
 #ifdef _KERNEL
 	if (arc_event_lowmem != NULL)
 		EVENTHANDLER_DEREGISTER(vm_lowmem, arc_event_lowmem);
-	if (arc_event_shutdown != NULL)
-		EVENTHANDLER_DEREGISTER(shutdown_pre_sync, arc_event_shutdown);
 #endif
 }
 
@@ -4326,9 +4036,8 @@ l2arc_do_free_on_write()
 
 	for (df = list_tail(buflist); df; df = df_prev) {
 		df_prev = list_prev(buflist, df);
-		ASSERT(df->l2df_data != NULL);
 		ASSERT(df->l2df_func != NULL);
-		df->l2df_func(df->l2df_buf, df->l2df_data, df->l2df_size);
+		df->l2df_func(df->l2df_buf, df->l2df_size);
 		list_remove(buflist, df);
 		kmem_free(df, sizeof (l2arc_data_free_t));
 	}

Modified: user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h	Wed Dec  2 21:58:34 2009	(r200048)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h	Thu Dec  3 00:27:16 2009	(r200049)
@@ -52,7 +52,9 @@ struct arc_buf {
 	void			*b_data;
 	arc_evict_func_t	*b_efunc;
 	void			*b_private;
+#ifdef _KERNEL	
 	struct buf 		*b_bp;
+#endif
 };
 
 typedef enum arc_buf_contents {
@@ -83,6 +85,7 @@ int arc_released(arc_buf_t *buf);
 int arc_has_callback(arc_buf_t *buf);
 void arc_buf_freeze(arc_buf_t *buf);
 void arc_buf_thaw(arc_buf_t *buf);
+	
 #ifdef ZFS_DEBUG
 int arc_referenced(arc_buf_t *buf);
 #endif
@@ -112,7 +115,6 @@ int arc_tryread(spa_t *spa, blkptr_t *bp
 void arc_set_callback(arc_buf_t *buf, arc_evict_func_t *func, void *private);
 int arc_buf_evict(arc_buf_t *buf);
 
-void arc_binval(spa_t *spa, dva_t *dva, uint64_t size);
 void arc_flush(spa_t *spa);
 void arc_tempreserve_clear(uint64_t reserve);
 int arc_tempreserve_space(uint64_t reserve, uint64_t txg);

Added: user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_bio.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_bio.h	Thu Dec  3 00:27:16 2009	(r200049)
@@ -0,0 +1,60 @@
+/**************************************************************************
+
+Copyright (c) 2009, Kip Macy, BitGravity Inc.
+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. Neither the name of the BitGravity Corporation nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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$
+
+***************************************************************************/
+
+#ifndef	_SYS_ZFS_BIO_H
+#define	_SYS_ZFS_BIO_H
+
+#define	ZBIO_BUF_CLONING	(1 << 30)	/* is being cloned */
+
+void zbio_sync_cache(spa_t *spa, blkptr_t *bp, uint64_t txg, uint64_t size);
+void zbio_getblk(arc_buf_t *buf);
+void zbio_data_getblk(arc_buf_t *buf);
+void zbio_relse(arc_buf_t *buf, size_t size);
+
+typedef struct zbio_buf_hdr zbio_buf_hdr_t;
+struct zbio_buf_hdr {
+	/* protected by hash lock */
+	dva_t			b_dva;
+	uint64_t		b_birth;
+	uint32_t		b_flags;
+	uint32_t		b_datacnt;
+
+	/* immutable */
+	arc_buf_contents_t	b_type;
+	uint64_t		b_size;
+	spa_t			*b_spa;
+};
+
+#ifdef _KERNEL
+void zbio_init(void);
+void zbio_fini(void);
+#endif
+#endif

Added: user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c	Thu Dec  3 00:27:16 2009	(r200049)
@@ -0,0 +1,321 @@
+/**************************************************************************
+
+Copyright (c) 2009, Kip Macy, BitGravity Inc.
+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. Neither the name of the BitGravity Corporation nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.
+
+***************************************************************************/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/spa.h>
+#include <sys/zio.h>
+#include <sys/zio_checksum.h>
+#include <sys/zfs_context.h>
+#include <sys/arc.h>
+#include <sys/zfs_bio.h>
+#include <sys/refcount.h>
+#include <sys/vdev.h>
+#include <sys/callb.h>
+#include <sys/kstat.h>
+#include <sys/sdt.h>
+
+#include <vm/vm_pageout.h>
+
+#ifdef _KERNEL
+
+#define	BUF_EMPTY(buf)						\
+	((buf)->b_dva.dva_word[0] == 0 &&			\
+	(buf)->b_dva.dva_word[1] == 0 &&			\
+	(buf)->b_birth == 0)
+
+SYSCTL_DECL(_vfs_zfs);
+static int zfs_page_cache_disable = 1;
+TUNABLE_INT("vfs.zfs.page_cache_disable", &zfs_page_cache_disable);
+SYSCTL_INT(_vfs_zfs, OID_AUTO, page_cache_disable, CTLFLAG_RDTUN,
+    &zfs_page_cache_disable, 0, "Disable backing ARC with page cache ");
+
+static eventhandler_tag zbio_event_shutdown = NULL;
+
+void
+zbio_data_getblk(arc_buf_t *buf)
+{
+
+	zbio_getblk(buf);
+}
+
+void
+zbio_getblk(arc_buf_t *buf)
+{
+	zbio_buf_hdr_t		*hdr = (zbio_buf_hdr_t *)buf->b_hdr;
+	uint64_t		size = hdr->b_size;
+	arc_buf_contents_t	type = hdr->b_type;
+	spa_t			*spa = hdr->b_spa;
+	uint64_t blkno = hdr->b_dva.dva_word[1] & ~(1ULL<<63);
+	void *data;
+	arc_buf_t *tbuf;
+	struct vnode *vp;
+	int i, flags = 0;
+	struct buf *newbp;
+	struct bufobj *bo;
+	vm_pindex_t start, end;
+	vm_object_t object;
+
+	vp = spa_get_vnode(spa);
+	bo = &vp->v_bufobj;
+	newbp = NULL;
+	if ((size < PAGE_SIZE) || (hdr->b_flags & ZBIO_BUF_CLONING) ||
+	    zfs_page_cache_disable) {
+		data = zio_buf_alloc(size);
+		hdr->b_flags &= ~ZBIO_BUF_CLONING;
+	} else if (BUF_EMPTY(hdr)) {
+		newbp = geteblk(size, flags);
+		data = newbp->b_data;
+	} else {
+		newbp = getblk(vp, blkno, size, 0, 0, flags | GB_LOCK_NOWAIT);
+		if (newbp == NULL)
+			newbp = geteblk(size, flags);
+		else
+			brelvp(newbp);
+		data = newbp->b_data;
+	}
+
+	if (newbp != NULL) {
+		BUF_KERNPROC(newbp);
+		newbp->b_bufobj = bo;
+		CTR4(KTR_SPARE2, "arc_getblk() bp=%p flags %X "
+		    "blkno %ld npages %d",
+		    newbp, newbp->b_flags, blkno, newbp->b_npages);
+	}
+
+	buf->b_bp = newbp;
+	buf->b_data = data;
+}
+
+void
+zbio_relse(arc_buf_t *buf, size_t size)
+{
+	struct buf *bp = buf->b_bp;
+	void * data = buf->b_data;
+
+	if (bp == NULL) {
+		zio_buf_free(data, size);
+		return;
+	}
+
+	CTR4(KTR_SPARE2, "arc_brelse() bp=%p flags %X"
+	    " size %ld blkno=%ld",
+	    bp, bp->b_flags, size, bp->b_blkno);
+
+	bp->b_flags |= B_ZFS;
+	brelse(bp);
+}
+
+void
+zbio_sync_cache(spa_t *spa, blkptr_t *bp, uint64_t txg, uint64_t size)
+{
+#ifdef notyet
+	uint64_t blkno, blkno_lookup;
+	struct vnode *vp;
+	struct bufobj *bo;
+	struct buf *bp;
+	vm_pindex_t start, end;
+	vm_object_t object;
+	vm_page_t m;
+	int i;
+
+	if (zfs_page_cache_disable)
+		return;
+	blkno_lookup = blkno = dva->dva_word[1] & ~(1ULL<<63);
+	vp = spa_get_vnode(spa);
+	bo = &vp->v_bufobj;
+
+	if (dva == NULL || spa == NULL || blkno == 0 || size == 0) 
+		return;
+
+	start = OFF_TO_IDX((blkno_lookup << 9));
+	end = start + OFF_TO_IDX(size + PAGE_MASK);
+	object = vp->v_object;
+
+	VM_OBJECT_LOCK(object);
+	vm_page_cache_free(object, start, end);
+	vm_object_page_remove(object, start, end, FALSE);
+#ifdef INVARIANTS
+	for (i = 0; i < OFF_TO_IDX(size); i++) {
+		KASSERT(vm_page_lookup(object, start + i) == NULL,
+		    ("found page at %ld blkno %ld blkno_lookup %ld",
+			start + i, blkno, blkno_lookup));
+	}
+#endif	
+	VM_OBJECT_UNLOCK(object);
+#endif
+}
+
+#if 0
+static void
+arc_pcache(struct vnode *vp, struct buf *bp, uint64_t blkno)
+{
+	vm_pindex_t start = OFF_TO_IDX((blkno << 9));
+	vm_object_t object = vp->v_object;
+	struct bufobj *bo = &vp->v_bufobj;
+	vm_page_t m;
+	int i;
+
+	CTR3(KTR_SPARE2, "arc_pcache() bp=%p blkno %ld npages %d",
+		   bp, blkno, bp->b_npages);
+	VM_OBJECT_LOCK(object);
+	vm_page_lock_queues();
+	for (i = 0; i < bp->b_npages; i++) {
+		m = bp->b_pages[i];
+		m->valid = VM_PAGE_BITS_ALL;
+		vm_page_insert(m, object, start + i);
+		m->flags &= ~PG_UNMANAGED;
+		vm_page_enqueue(PQ_INACTIVE, m);
+		vdrop(vp);
+	}
+	vm_page_unlock_queues();
+	VM_OBJECT_UNLOCK(object);
+	bp->b_bufobj = bo;
+	bp->b_flags |= B_VMIO;
+}
+
+static void
+arc_bcache(arc_buf_t *buf)
+{	
+	uint64_t blkno = buf->b_hdr->b_dva.dva_word[1] & ~(1ULL<<63);
+	struct buf *bp;
+	struct vnode *vp = spa_get_vnode(buf->b_hdr->b_spa);
+	arc_buf_hdr_t *hdr = buf->b_hdr;
+	int cachebuf;
+
+	if (zfs_page_cache_disable)
+		return;
+
+	if (blkno == 0 || hdr->b_birth == 0)
+		return;
+
+	bp = buf->b_bp;
+	bp->b_birth = hdr->b_birth;
+	bp->b_blkno = bp->b_lblkno = blkno;
+	bp->b_offset = (blkno << 9);
+	cachebuf = ((hdr->b_datacnt == 1) &&
+	    !(hdr->b_flags & ARC_IO_ERROR) &&
+	    ((bp->b_flags & (B_INVAL|B_CACHE)) == B_CACHE) &&
+	    (blkno & 0x7) == 0);
+
+	arc_binval(hdr->b_spa, &hdr->b_dva, hdr->b_size);
+	if (cachebuf) 
+		arc_pcache(vp, bp, blkno);	
+}
+#endif
+
+static void
+zbio_shutdown(void *arg __unused, int howto __unused)
+{
+	struct mount *mp, *tmpmp;
+	int error;
+
+	/*
+	 * unmount all ZFS file systems - freeing any buffers
+	 * then free all space allocator resources
+	 */
+	TAILQ_FOREACH_SAFE(mp, &mountlist, mnt_list, tmpmp) {
+		if (strcmp(mp->mnt_vfc->vfc_name, "zfs") == 0) {
+			error = dounmount(mp, MNT_FORCE, curthread);
+			if (error) {
+				TAILQ_REMOVE(&mountlist, mp, mnt_list);
+				printf("unmount of %s failed (",
+				    mp->mnt_stat.f_mntonname);
+				if (error == EBUSY)
+					printf("BUSY)\n");
+				else
+					printf("%d)\n", error);
+			}
+		}
+		
+	}
+	arc_flush(NULL);
+
+#ifdef NOTYET
+	/*
+	 * need corresponding includes
+	 */
+	zfsdev_fini();
+	zvol_fini();
+	zfs_fini();
+#endif	
+	spa_fini();
+}
+
+void
+zbio_init(void)
+{
+
+	zbio_event_shutdown = EVENTHANDLER_REGISTER(shutdown_pre_sync,
+	    zbio_shutdown, NULL, EVENTHANDLER_PRI_FIRST);
+}
+
+void
+zbio_fini(void)
+{
+	if (zbio_event_shutdown != NULL)
+		EVENTHANDLER_DEREGISTER(shutdown_pre_sync, zbio_event_shutdown);
+}
+#else
+
+void
+zbio_getblk(arc_buf_t *buf)
+{
+	zbio_buf_hdr_t		*hdr = (zbio_buf_hdr_t *)buf->b_hdr;
+	uint64_t		size = hdr->b_size;
+

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

From owner-svn-src-user@FreeBSD.ORG  Thu Dec  3 02:19:13 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94C741065692;
	Thu,  3 Dec 2009 02:19:13 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 838B88FC1D;
	Thu,  3 Dec 2009 02:19:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB32JDRF037765;
	Thu, 3 Dec 2009 02:19:13 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB32JDH6037764;
	Thu, 3 Dec 2009 02:19:13 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200912030219.nB32JDH6037764@svn.freebsd.org>
From: Kip Macy <kmacy@FreeBSD.org>
Date: Thu, 3 Dec 2009 02:19:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200050 -
	user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Dec 2009 02:19:13 -0000

Author: kmacy
Date: Thu Dec  3 02:19:12 2009
New Revision: 200050
URL: http://svn.freebsd.org/changeset/base/200050

Log:
  - remove unused variables
  - break out zbio_getblk and zbio_data_getblk

Modified:
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c

Modified: user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c	Thu Dec  3 00:27:16 2009	(r200049)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_bio.c	Thu Dec  3 02:19:12 2009	(r200050)
@@ -59,29 +59,17 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, page_cach
 
 static eventhandler_tag zbio_event_shutdown = NULL;
 
-void
-zbio_data_getblk(arc_buf_t *buf)
-{
-
-	zbio_getblk(buf);
-}
-
-void
-zbio_getblk(arc_buf_t *buf)
+static void
+_zbio_getblk(arc_buf_t *buf, int flags)
 {
 	zbio_buf_hdr_t		*hdr = (zbio_buf_hdr_t *)buf->b_hdr;
 	uint64_t		size = hdr->b_size;
-	arc_buf_contents_t	type = hdr->b_type;
 	spa_t			*spa = hdr->b_spa;
 	uint64_t blkno = hdr->b_dva.dva_word[1] & ~(1ULL<<63);
 	void *data;
-	arc_buf_t *tbuf;
 	struct vnode *vp;
-	int i, flags = 0;
 	struct buf *newbp;
 	struct bufobj *bo;
-	vm_pindex_t start, end;
-	vm_object_t object;
 
 	vp = spa_get_vnode(spa);
 	bo = &vp->v_bufobj;
@@ -115,6 +103,20 @@ zbio_getblk(arc_buf_t *buf)
 }
 
 void
+zbio_getblk(arc_buf_t *buf)
+{
+
+	_zbio_getblk(buf, 0);
+}
+
+void
+zbio_data_getblk(arc_buf_t *buf)
+{
+
+	_zbio_getblk(buf, GB_NODUMP);
+}
+
+void
 zbio_relse(arc_buf_t *buf, size_t size)
 {
 	struct buf *bp = buf->b_bp;

From owner-svn-src-user@FreeBSD.ORG  Fri Dec  4 05:31:40 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 644E8106568B;
	Fri,  4 Dec 2009 05:31:40 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 54AC28FC18;
	Fri,  4 Dec 2009 05:31:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB45Ve5t043358;
	Fri, 4 Dec 2009 05:31:40 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB45VebL043356;
	Fri, 4 Dec 2009 05:31:40 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912040531.nB45VebL043356@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Fri, 4 Dec 2009 05:31:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200090 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Dec 2009 05:31:40 -0000

Author: dougb
Date: Fri Dec  4 05:31:40 2009
New Revision: 200090
URL: http://svn.freebsd.org/changeset/base/200090

Log:
  Don't create the list of valid distinfos when -P[P] and -a either

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Dec  4 03:34:12 2009	(r200089)
+++ user/dougb/portmaster/portmaster	Fri Dec  4 05:31:40 2009	(r200090)
@@ -2006,7 +2006,8 @@ all_config () {
 		CONFIG_SEEN_LIST="${CONFIG_SEEN_LIST}${origin}:"
 	done
 }
-	if [ -z "$DONT_SCRUB_DISTFILES" -a -z "$FETCH_ONLY" ]; then
+	if [ -z "$DONT_SCRUB_DISTFILES" -a -z "$FETCH_ONLY" \
+	    -a -z "$PM_PACKAGES" ]; then
 		(read_distinfos)&
 	fi
 	ports_by_category

From owner-svn-src-user@FreeBSD.ORG  Sat Dec  5 08:41:09 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F3C91065670;
	Sat,  5 Dec 2009 08:41:09 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 155D68FC14;
	Sat,  5 Dec 2009 08:41:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB58f8Hj079171;
	Sat, 5 Dec 2009 08:41:08 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB58f8AW079169;
	Sat, 5 Dec 2009 08:41:08 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912050841.nB58f8AW079169@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 5 Dec 2009 08:41:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200114 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Dec 2009 08:41:09 -0000

Author: dougb
Date: Sat Dec  5 08:41:08 2009
New Revision: 200114
URL: http://svn.freebsd.org/changeset/base/200114

Log:
  If we are using --packages{-only|-newer} then don't run build
  dependencies unless we are actually going to build the port.
  
  When doing the second-chance attempt at fetching a package
  directly (after the reading of the directory listing does
  not show anything useful) print a more helpful message if -v.
  
  No need to print stderr if the package fetch fails.
  
  Make the "checking package repository" message more clear/verbose

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Dec  5 08:32:12 2009	(r200113)
+++ user/dougb/portmaster/portmaster	Sat Dec  5 08:41:08 2009	(r200114)
@@ -2383,7 +2383,7 @@ fi
 
 if [ -z "$NO_DEP_UPDATES" ]; then
 	if [ -z "$RECURSE_THOROUGH" ]; then
-		if [ ! "$PM_PACKAGES" = only ]; then
+		if [ -z "$PM_PACKAGES" ]; then
 			echo "===>>> Starting check for build dependencies"
 			dependency_check build-depends-list
 		fi
@@ -2437,11 +2437,17 @@ fetch_package () {
 	fi
 
 	if [ -n "$do_fetch" ]; then
-		[ -n "$PM_VERBOSE" ] && echo "===>>> Starting package fetch"
+		if [ -n "$PM_VERBOSE" ]; then
+			if [ -n "$2" ]; then
+				echo "===>>> Trying to fetch $1 directly"
+			else
+				echo "===>>> Starting package fetch"
+			fi
+		fi
 
 		fetch $fetch_args -o $ppd ${sitepath}${1}.tbz 2>/dev/null || {
 			pm_unlink ${ppd}/${1}.tbz;
-			fetch $fetch_args -o $ppd ${sitepath}${1}.tbz; }
+			fetch $fetch_args -o $ppd ${sitepath}${1}.tbz 2>/dev/null; }
 	fi
 }
 	if [ -z "$PACKAGESITE" ]; then
@@ -2469,7 +2475,8 @@ fetch_package () {
 
 	sitepath="${sitepath%/}/${portdir%/*}/"
 
-	[ -n "$PM_VERBOSE" ] && echo "===>>> Checking package repository"
+	[ -n "$PM_VERBOSE" ] &&
+		echo "===>>> Checking package repository for latest available version"
 
 	case "$new_port" in
 	*\.*)	s=${new_port%%\.*} ;;
@@ -2479,7 +2486,7 @@ fetch_package () {
 	unset s
 
 	if [ -z "$latest_pv" ]; then
-		fetch_package $new_port
+		fetch_package $new_port try
 		if [ $? -eq 0 ]; then
 			latest_pv=$new_port
 		fi
@@ -2537,7 +2544,7 @@ notnewer () {
 			echo "       is newer than ports tree ($new_port)"; } ;;
 		=)	;;	# Should not be reached
 		*)	# Packages like autoconf-2.1* vs. 2.6* can be false neg.
-			fetch_package $new_port
+			fetch_package $new_port try
 			if [ $? -eq 0 ]; then
 				latest_pv=$new_port
 				use_package=up_auto
@@ -2571,6 +2578,13 @@ echo "===>>> There is no valid package t
 fi
 
 if [ -z "$use_package" ]; then
+	if [ -n "$PM_PACKAGES" ]; then
+		if [ -z "$RECURSE_THOROUGH" ]; then
+			echo "===>>> Starting check for build dependencies"
+			dependency_check build-depends-list
+		fi
+	fi
+
 	[ -z "$DONT_PRE_CLEAN" ] && { pm_make clean NOCLEANDEPENDS=ncd ||
 		fail 'make clean failed'; echo ''; }
 

From owner-svn-src-user@FreeBSD.ORG  Sat Dec  5 18:40:26 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 702311065670;
	Sat,  5 Dec 2009 18:40:26 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 46F738FC28;
	Sat,  5 Dec 2009 18:40:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5IeQof095507;
	Sat, 5 Dec 2009 18:40:26 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5IeQHI095505;
	Sat, 5 Dec 2009 18:40:26 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912051840.nB5IeQHI095505@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 5 Dec 2009 18:40:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200132 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Dec 2009 18:40:26 -0000

Author: dougb
Date: Sat Dec  5 18:40:26 2009
New Revision: 200132
URL: http://svn.freebsd.org/changeset/base/200132

Log:
  If we are using --packages and/or --packages-newer and we have to
  build anyway we must run the 'make config' code in addition to the
  build dep check since a) the user might actually want to change
  something, and b) if using -H and there are OPTIONS the build will hang.
  
  To facilitate this turn the actual code to do 'make config' into a function
  
  Testing if an existing package is actually readable is slightly more
  useful than just testing if it exists.
  
  If the package does exist, and we're not using --always-fetch then
  return 0, both to skip the rest of the function and to make good use
  of the return value in the 'second chance fetch' code.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Dec  5 18:17:15 2009	(r200131)
+++ user/dougb/portmaster/portmaster	Sat Dec  5 18:40:26 2009	(r200132)
@@ -1914,6 +1914,14 @@ multiport () {
 	safe_exit
 }
 
+make_config () {
+	config_type=config-conditional
+	[ -n "$FORCE_CONFIG" ] && config_type=config
+	[ -n "$PM_SU_VERBOSE" ] &&
+		echo "===>>> Running 'make $config_type'"
+	pm_make_s $config_type
+}
+
 #=============== End functions for main ===============
 
 # INIT Parent
@@ -2299,13 +2307,7 @@ if [ -n "$CONFIG_ONLY" ]; then
 		fi
 	fi
 
-	if [ -z "$PM_PACKAGES" ]; then
-		config_type=config-conditional
-		[ -n "$FORCE_CONFIG" ] && config_type=config
-		[ -n "$PM_SU_VERBOSE" ] &&
-			echo "===>>> Running 'make $config_type'"
-		pm_make_s $config_type
-	fi
+	[ -z "$PM_PACKAGES" ] && make_config
 
 	CONFIG_SEEN_LIST="${CONFIG_SEEN_LIST}${portdir}:"
 
@@ -2426,9 +2428,10 @@ fetch_package () {
 		export fetch_args; }
 
 	if [ -z "$PM_ALWAYS_FETCH" ]; then
-		if [ -e "${ppd}/${1}.tbz" ]; then
+		if [ -r "${ppd}/${1}.tbz" ]; then
 			[ -n "$PM_VERBOSE" ] &&
 				echo "===>>> Package exists, skipping fetch"
+			return 0
 		else
 			do_fetch=1
 		fi
@@ -2579,6 +2582,8 @@ fi
 
 if [ -z "$use_package" ]; then
 	if [ -n "$PM_PACKAGES" ]; then
+		make_config
+
 		if [ -z "$RECURSE_THOROUGH" ]; then
 			echo "===>>> Starting check for build dependencies"
 			dependency_check build-depends-list

From owner-svn-src-user@FreeBSD.ORG  Sat Dec  5 20:17:05 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24AD51065695;
	Sat,  5 Dec 2009 20:17:05 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1479B8FC18;
	Sat,  5 Dec 2009 20:17:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5KH49B098798;
	Sat, 5 Dec 2009 20:17:04 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5KH4x9098796;
	Sat, 5 Dec 2009 20:17:04 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912052017.nB5KH4x9098796@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 5 Dec 2009 20:17:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200159 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Dec 2009 20:17:05 -0000

Author: dougb
Date: Sat Dec  5 20:17:04 2009
New Revision: 200159
URL: http://svn.freebsd.org/changeset/base/200159

Log:
  If we're installing a package update the pkgdep versions to match
  what is installed.
  
  Make the message about updating entries for dependencies on the new port
  more informative.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Dec  5 20:16:28 2009	(r200158)
+++ user/dougb/portmaster/portmaster	Sat Dec  5 20:17:04 2009	(r200159)
@@ -2790,12 +2790,17 @@ if [ -n "$MAKE_PACKAGE" ]; then
 	echo "	===>>> Package saved to $packages/All" ; echo ''
 fi
 
-[ -z "$DONT_POST_CLEAN" -a -z "$use_package" ] && {
-	pm_make clean NOCLEANDEPENDS=ncd2 ; echo ''; }
+if [ -z "$use_package" ]; then
+	[ -z "$DONT_POST_CLEAN" ] && {
+		pm_make clean NOCLEANDEPENDS=ncd2 ; echo ''; }
+elif grep -q DEPORIGIN $pdb/$new_port/+CONTENTS; then
+echo "===>>> Updating dependencies for $new_port to match installed versions"
+	update_contents $pdb/$new_port/+CONTENTS
+fi
 
 check_dependency_files $portdir $new_port
 if [ -s "$grep_deps" ]; then
-	echo "===>>> Updating package dependency entry for each dependent port"
+echo "===>>> Updating dependency entry for $new_port in each dependent port"
 	[ -n "$PM_VERBOSE" ] && echo ''
 	while read d_port; do
 		[ -n "$PM_VERBOSE" ] && echo "===>>> $d_port"

From owner-svn-src-user@FreeBSD.ORG  Sat Dec  5 21:50:06 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5BA341065693;
	Sat,  5 Dec 2009 21:50:06 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B0C48FC16;
	Sat,  5 Dec 2009 21:50:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5Lo6Lg001218;
	Sat, 5 Dec 2009 21:50:06 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5Lo68l001216;
	Sat, 5 Dec 2009 21:50:06 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912052150.nB5Lo68l001216@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 5 Dec 2009 21:50:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r200168 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Dec 2009 21:50:06 -0000

Author: dougb
Date: Sat Dec  5 21:50:06 2009
New Revision: 200168
URL: http://svn.freebsd.org/changeset/base/200168

Log:
  Add the ability to specify a repository on the local file system.
  Fall back to fetching if the local package does not exist, or is
  not up to date.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Dec  5 20:52:11 2009	(r200167)
+++ user/dougb/portmaster/portmaster	Sat Dec  5 21:50:06 2009	(r200168)
@@ -242,6 +242,7 @@ usage () {
 	echo "Common flags: [--force-config] [-CGHKgntvw B|b f|i D|d]"
 	echo "    [[--packages|--packages-only] [-P|-PP] | [--packages-build]]"
 	echo "    [--packages-if-newer] [--delete-build-only] [--always-fetch]"
+	echo "    [--local-packagedir=<path>]"
 	echo "    [-m <arguments for make>] [-x <glob pattern to exclude from building>]"
 	echo "${0##*/} [Common flags] <full name of port directory in $pdb>"
 	echo "${0##*/} [Common flags] <full path to $pd/foo/bar>"
@@ -314,6 +315,8 @@ usage () {
 	echo '--packages-if-newer use package if newer than installed even'
 	echo '   if the package is not the latest according to the ports tree'
 	echo '--always-fetch fetch package even if it already exists locally'
+	echo '--local-packagedir=<path> where local packages can be found,'
+	echo '   will fall back to fetching if no local version exists'
 	echo ''
 	echo '-l list installed ports by category'
 	echo '-L list installed ports by category, and search for updates'
@@ -427,6 +430,8 @@ for var in "$@" ; do
 				export PM_PACKAGES_NEWER ;;
 	--always-fetch)		PM_ALWAYS_FETCH=pm_always_fetch
 				export PM_ALWAYS_FETCH ;;
+	--local-packagedir=*)	LOCAL_PACKAGEDIR=${var#--local-packagedir=}
+				export LOCAL_PACKAGEDIR ;;
 	-[A-Za-z0-9]*)		newopts="$newopts $var" ;;
 	--delete-build-only)	PM_DEL_BUILD_ONLY=pm_dbo
 				PM_BUILD_ONLY_LIST=pm_bol
@@ -2479,13 +2484,24 @@ fetch_package () {
 	sitepath="${sitepath%/}/${portdir%/*}/"
 
 	[ -n "$PM_VERBOSE" ] &&
-		echo "===>>> Checking package repository for latest available version"
+	echo "===>>> Checking package repository for latest available version"
 
-	case "$new_port" in
-	*\.*)	s=${new_port%%\.*} ;;
-	*)	s=`pm_make -V LATEST_LINK` ;;
-	esac
-	latest_pv=`fetch -q -o - ${sitepath} 2>/dev/null | grep "href=\"${s}"`
+	if [ -n "$LOCAL_PACKAGEDIR" ]; then
+		s=`pm_make -V LATEST_LINK`
+		if [ -r "${LOCAL_PACKAGEDIR}/Latest/${s}.tbz" ]; then
+			local_package=${LOCAL_PACKAGEDIR}/Latest/${s}.tbz
+			latest_pv=`readlink ${LOCAL_PACKAGEDIR}/Latest/${s}.tbz`
+			latest_pv=${latest_pv##*/}
+		fi
+	fi
+
+	if [ -z "$latest_pv" ]; then
+		case "$new_port" in
+		*\.*)	s=${new_port%%\.*} ;;
+		*)	s=`pm_make -V LATEST_LINK` ;;
+		esac
+		latest_pv=`fetch -q -o - ${sitepath} 2>/dev/null | grep "href=\"${s}"`
+	fi
 	unset s
 
 	if [ -z "$latest_pv" ]; then
@@ -2513,6 +2529,8 @@ notnewer () {
 	echo ''
 	echo "===>>> The newest available package ($latest_pv)"
 	echo "       is not newer than the installed version ($upg_port)"
+
+	unset local_package
 }
 
 	if [ "$latest_pv" = "$new_port" ]; then
@@ -2617,7 +2635,9 @@ if [ -z "$use_package" ]; then
 
 	eval pm_make $port_log_args || fail "make failed for $portdir"
 else
-	fetch_package $latest_pv || fail "Fetch for ${latest_pv}.tbz failed"
+	[ -z "$local_package" ] && {
+		fetch_package $latest_pv ||
+			fail "Fetch for ${latest_pv}.tbz failed"; }
 fi
 
 # Ignore if no old port exists
@@ -2703,6 +2723,8 @@ if [ -z "$use_package" ]; then
 	eval pm_make_s -DNO_DEPENDS install $port_log_args ||
 		install_failed $new_port
 else
+	[ -n "$local_package" ] && ppd=${local_package%/Latest*}/All
+
 	echo "===>>> Installing package"
 	pkg_add --no-deps --force ${ppd}/${latest_pv}.tbz ||
 		install_failed ${latest_pv}.tbz