From owner-svn-src-stable@FreeBSD.ORG Sun Jan 25 16:59:29 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87372106566C; Sun, 25 Jan 2009 16:59:29 +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 6BAC08FC0C; Sun, 25 Jan 2009 16:59:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PGxTGQ022817; Sun, 25 Jan 2009 16:59:29 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0PGxT8p022816; Sun, 25 Jan 2009 16:59:29 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901251659.n0PGxT8p022816@svn.freebsd.org> From: Ed Schouten Date: Sun, 25 Jan 2009 16:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187690 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 16:59:30 -0000 Author: ed Date: Sun Jan 25 16:59:29 2009 New Revision: 187690 URL: http://svn.freebsd.org/changeset/base/187690 Log: MFC r186747 to releng/7: Remove Giant locking from domains list. During boot, the domain list is locked with Giant. It is not possible to register any protocols after the system has booted, so the lock is only used to protect insertion of entries. There is already a mutex in uipc_domain.c called dom_mtx. Use this mutex to lock the list, instead of using Giant. It won't matter anything with respect to performance, but we'll never get rid of Giant if we don't remove from places where we don't need it. Approved by: rwatson MFC after: 3 weeks Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/uipc_domain.c Modified: stable/7/sys/kern/uipc_domain.c ============================================================================== --- stable/7/sys/kern/uipc_domain.c Sun Jan 25 16:52:41 2009 (r187689) +++ stable/7/sys/kern/uipc_domain.c Sun Jan 25 16:59:29 2009 (r187690) @@ -72,7 +72,7 @@ static void pfslowtimo(void *); struct domain *domains; /* registered protocol domains */ int domain_init_status = 0; -struct mtx dom_mtx; /* domain list lock */ +static struct mtx dom_mtx; /* domain list lock */ MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF); /* @@ -316,13 +316,13 @@ found: * Protect us against races when two protocol registrations for * the same protocol happen at the same time. */ - mtx_lock(&Giant); + mtx_lock(&dom_mtx); /* The new protocol must not yet exist. */ for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) { if ((pr->pr_type == npr->pr_type) && (pr->pr_protocol == npr->pr_protocol)) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EEXIST); /* XXX: Check only protocol? */ } /* While here, remember the first free spacer. */ @@ -332,7 +332,7 @@ found: /* If no free spacer is found we can't add the new protocol. */ if (fpr == NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (ENOMEM); } @@ -340,7 +340,7 @@ found: bcopy(npr, fpr, sizeof(*fpr)); /* Job is done, no more protection required. */ - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); /* Initialize and activate the protocol. */ protosw_init(fpr); @@ -376,13 +376,13 @@ found: dpr = NULL; /* Lock out everyone else while we are manipulating the protosw. */ - mtx_lock(&Giant); + mtx_lock(&dom_mtx); /* The protocol must exist and only once. */ for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) { if ((pr->pr_type == type) && (pr->pr_protocol == protocol)) { if (dpr != NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EMLINK); /* Should not happen! */ } else dpr = pr; @@ -391,7 +391,7 @@ found: /* Protocol does not exist. */ if (dpr == NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EPROTONOSUPPORT); } @@ -412,7 +412,7 @@ found: dpr->pr_usrreqs = &nousrreqs; /* Job is done, not more protection required. */ - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun Jan 25 19:35:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 546EA1065675; Sun, 25 Jan 2009 19:35:24 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4203B8FC12; Sun, 25 Jan 2009 19:35:24 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PJZOYj026093; Sun, 25 Jan 2009 19:35:24 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0PJZORx026092; Sun, 25 Jan 2009 19:35:24 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901251935.n0PJZORx026092@svn.freebsd.org> From: Antoine Brodin Date: Sun, 25 Jan 2009 19:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187697 - stable/7/sbin/atacontrol X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 19:35:25 -0000 Author: antoine Date: Sun Jan 25 19:35:23 2009 New Revision: 187697 URL: http://svn.freebsd.org/changeset/base/187697 Log: MFC r181349 to stable/7: Make atacontrol(8) rebuild work when /usr is not mounted or from /rescue PR: bin/125680 MFC after: 1 month Tested by: Stef Walter Modified: stable/7/sbin/atacontrol/ (props changed) stable/7/sbin/atacontrol/atacontrol.c Modified: stable/7/sbin/atacontrol/atacontrol.c ============================================================================== --- stable/7/sbin/atacontrol/atacontrol.c Sun Jan 25 19:25:41 2009 (r187696) +++ stable/7/sbin/atacontrol/atacontrol.c Sun Jan 25 19:35:23 2009 (r187697) @@ -37,6 +37,7 @@ #include #include #include +#include static const char * mode2str(int mode) @@ -517,12 +518,30 @@ main(int argc, char **argv) if (ioctl(fd, IOCATARAIDREBUILD, &array) < 0) warn("ioctl(IOCATARAIDREBUILD)"); else { - char buffer[128]; - sprintf(buffer, "/usr/bin/nice -n 20 /bin/dd " - "if=/dev/ar%d of=/dev/null bs=1m &", - array); - if (system(buffer)) - warn("background dd"); + char device[64]; + char *buffer; + ssize_t len; + int arfd; + + if (daemon(0, 1) == -1) + err(1, "daemon"); + nice(20); + snprintf(device, sizeof(device), "/dev/ar%d", + array); + if ((arfd = open(device, O_RDONLY)) == -1) + err(1, "open %s", device); + if ((buffer = malloc(1024 * 1024)) == NULL) + err(1, "malloc"); + while ((len = read(arfd, buffer, 1024 * 1024)) > 0) + ; + if (len == -1) + err(1, "read"); + else + fprintf(stderr, + "atacontrol: ar%d rebuild completed\n", + array); + free(buffer); + close(arfd); } exit(EX_OK); } From owner-svn-src-stable@FreeBSD.ORG Sun Jan 25 20:36:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DB491065674; Sun, 25 Jan 2009 20:36:48 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 0C7E88FC1A; Sun, 25 Jan 2009 20:36:48 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.fastmail.fm (Postfix) with ESMTP id 91FD42566A3; Sun, 25 Jan 2009 15:36:47 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sun, 25 Jan 2009 15:36:47 -0500 X-Sasl-enc: q/8yHabVJqd9h8aJkxs7lZncSjLGCy4IVeR8ks/HGkBz 1232915806 Received: from anglepoise.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 741D121008; Sun, 25 Jan 2009 15:36:46 -0500 (EST) Message-ID: <497CCD5C.7020805@incunabulum.net> Date: Sun, 25 Jan 2009 20:36:44 +0000 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.19 (X11/20090111) MIME-Version: 1.0 To: Antoine Brodin References: <200901251935.n0PJZORx026092@svn.freebsd.org> In-Reply-To: <200901251935.n0PJZORx026092@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r187697 - stable/7/sbin/atacontrol X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 20:36:49 -0000 Antoine Brodin wrote: > Author: antoine > Date: Sun Jan 25 19:35:23 2009 > New Revision: 187697 > URL: http://svn.freebsd.org/changeset/base/187697 > > Log: > MFC r181349 to stable/7: > Make atacontrol(8) rebuild work when /usr is not mounted or from /rescue > Thanks for this. I didn't realize that dd was in fact dd'ing to touch the blocks on the arX device. This will make a big difference for folk running 7.x. From owner-svn-src-stable@FreeBSD.ORG Mon Jan 26 08:41:59 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4411106566B; Mon, 26 Jan 2009 08:41:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 567EE8FC0C; Mon, 26 Jan 2009 08:41:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 47F2F28452; Mon, 26 Jan 2009 16:41:58 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id C1423EB63F7; Mon, 26 Jan 2009 16:41:57 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id tKdkoNPu+eko; Mon, 26 Jan 2009 16:41:53 +0800 (CST) Received: from charlie.delphij.net (c-67-188-86-134.hsd1.ca.comcast.net [67.188.86.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 859B3EB5C89; Mon, 26 Jan 2009 16:41:50 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=BarVXpILGLHMXCcf16Jh3ciiHqUtYAUZfqkU5/kdD8mXrgl6AzzTK4XviuKBhPMZC YWlHhiOZw4HJaR1l/kHnQ== Message-ID: <497D774B.7080705@delphij.net> Date: Mon, 26 Jan 2009 00:41:47 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.19 (X11/20090112) MIME-Version: 1.0 To: obrien@FreeBSD.ORG References: <200901120039.n0C0dMKX043214@svn.freebsd.org> <20090112083144.GA69408@dragon.NUXI.org> In-Reply-To: <20090112083144.GA69408@dragon.NUXI.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@FreeBSD.ORG, svn-src-stable@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r187069 - stable/7/sbin/fsck_ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 08:42:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, David, Just a ping on this. Please let me know if you think it's Ok to MFC the 'C' to 'D' change to avoid the upcoming conflict against your changeset. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkl9d0sACgkQi+vbBBjt66Cw6wCgkobs+oJrpI8lUUrXooKn6rom ek0AnjuZuhl9UyaJkyoYa1aPEGgBTVIe =m8Ws -----END PGP SIGNATURE----- From owner-svn-src-stable@FreeBSD.ORG Mon Jan 26 13:56:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12870106564A; Mon, 26 Jan 2009 13:56:24 +0000 (UTC) (envelope-from tabthorpe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36198FC1C; Mon, 26 Jan 2009 13:56:23 +0000 (UTC) (envelope-from tabthorpe@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QDuNUp051553; Mon, 26 Jan 2009 13:56:23 GMT (envelope-from tabthorpe@svn.freebsd.org) Received: (from tabthorpe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QDuNhs051552; Mon, 26 Jan 2009 13:56:23 GMT (envelope-from tabthorpe@svn.freebsd.org) Message-Id: <200901261356.n0QDuNhs051552@svn.freebsd.org> From: Thomas Abthorpe Date: Mon, 26 Jan 2009 13:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187710 - stable/7/share/man/man7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 13:56:24 -0000 Author: tabthorpe (ports committer) Date: Mon Jan 26 13:56:23 2009 New Revision: 187710 URL: http://svn.freebsd.org/changeset/base/187710 Log: MFC of r187573: Document targets run-depends-list and build-depends-list Approved by: keramida Modified: stable/7/share/man/man7/ports.7 Modified: stable/7/share/man/man7/ports.7 ============================================================================== --- stable/7/share/man/man7/ports.7 Mon Jan 26 13:53:39 2009 (r187709) +++ stable/7/share/man/man7/ports.7 Mon Jan 26 13:56:23 2009 (r187710) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2008 +.Dd January 21, 2009 .Dt PORTS 7 .Os .Sh NAME @@ -196,11 +196,14 @@ Fetch the distfiles of the port and all .It Cm fetch-recursive-list Show list of files that would be retrieved by .Cm fetch-recursive . +.It Cm run-depends-list , build-depends-list +Print a list of all the compile and run dependencies, and dependencies +of those dependencies, by port directory. .It Cm all-depends-list Print a list of all dependencies for the port. .It Cm pretty-print-run-depends-list , pretty-print-build-depends-list Print a list of all the compile and run dependencies, and dependencies -of those dependencies. +of those dependencies, by port name and version. .It Cm missing Print a list of missing dependencies to be installed for the port. .It Cm clean @@ -251,6 +254,8 @@ and Like .Cm package , but makes a package for each depending port as well. +.It Cm package-name +Prints the name with version of the port. .It Cm readmes Create a port's .Pa README.html . From owner-svn-src-stable@FreeBSD.ORG Mon Jan 26 13:57:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D4E1065679; Mon, 26 Jan 2009 13:57:05 +0000 (UTC) (envelope-from tabthorpe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 703068FC1F; Mon, 26 Jan 2009 13:57:05 +0000 (UTC) (envelope-from tabthorpe@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QDv5jK051603; Mon, 26 Jan 2009 13:57:05 GMT (envelope-from tabthorpe@svn.freebsd.org) Received: (from tabthorpe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QDv5LJ051602; Mon, 26 Jan 2009 13:57:05 GMT (envelope-from tabthorpe@svn.freebsd.org) Message-Id: <200901261357.n0QDv5LJ051602@svn.freebsd.org> From: Thomas Abthorpe Date: Mon, 26 Jan 2009 13:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187711 - stable/6/share/man/man7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 13:57:07 -0000 Author: tabthorpe (ports committer) Date: Mon Jan 26 13:57:05 2009 New Revision: 187711 URL: http://svn.freebsd.org/changeset/base/187711 Log: MFC of r187573: Document targets run-depends-list and build-depends-list Approved by: keramida Modified: stable/6/share/man/man7/ports.7 (contents, props changed) Modified: stable/6/share/man/man7/ports.7 ============================================================================== --- stable/6/share/man/man7/ports.7 Mon Jan 26 13:56:23 2009 (r187710) +++ stable/6/share/man/man7/ports.7 Mon Jan 26 13:57:05 2009 (r187711) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 21, 2008 +.Dd January 21, 2009 .Dt PORTS 7 .Os .Sh NAME @@ -196,9 +196,14 @@ Fetch the distfiles of the port and all .It Cm fetch-recursive-list Show list of files that would be retrieved by .Cm fetch-recursive . +.It Cm run-depends-list , build-depends-list +Print a list of all the compile and run dependencies, and dependencies +of those dependencies, by port directory. +.It Cm all-depends-list +Print a list of all dependencies for the port. .It Cm pretty-print-run-depends-list , pretty-print-build-depends-list Print a list of all the compile and run dependencies, and dependencies -of those dependencies. +of those dependencies, by port name and version. .It Cm missing Print a list of missing dependencies to be installed for the port. .It Cm clean @@ -249,6 +254,8 @@ and Like .Cm package , but makes a package for each depending port as well. +.It Cm package-name +Prints the name with version of the port. .It Cm readmes Create a port's .Pa README.html . From owner-svn-src-stable@FreeBSD.ORG Mon Jan 26 15:39:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BFE0106566B; Mon, 26 Jan 2009 15:39:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 785178FC19; Mon, 26 Jan 2009 15:39:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QFdgpY054497; Mon, 26 Jan 2009 15:39:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QFdg1G054496; Mon, 26 Jan 2009 15:39:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901261539.n0QFdg1G054496@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jan 2009 15:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187720 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 15:39:44 -0000 Author: jhb Date: Mon Jan 26 15:39:42 2009 New Revision: 187720 URL: http://svn.freebsd.org/changeset/base/187720 Log: MFC: Use the correct type for the timeout parameter to the 32-bit compat version aio_waitcomplete(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_aio.c Modified: stable/7/sys/kern/vfs_aio.c ============================================================================== --- stable/7/sys/kern/vfs_aio.c Mon Jan 26 15:32:39 2009 (r187719) +++ stable/7/sys/kern/vfs_aio.c Mon Jan 26 15:39:42 2009 (r187720) @@ -2824,7 +2824,7 @@ int freebsd32_aio_waitcomplete(struct thread *td, struct freebsd32_aio_waitcomplete_args *uap) { - struct timespec ts32; + struct timespec32 ts32; struct timespec ts, *tsp; int error; From owner-svn-src-stable@FreeBSD.ORG Mon Jan 26 16:44:22 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20E6D106564A; Mon, 26 Jan 2009 16:44:22 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id D771E8FC26; Mon, 26 Jan 2009 16:44:21 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n0QGhtA7002333; Mon, 26 Jan 2009 08:43:55 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n0QGhtwM002332; Mon, 26 Jan 2009 08:43:55 -0800 (PST) (envelope-from obrien) Date: Mon, 26 Jan 2009 08:43:55 -0800 From: "David O'Brien" To: d@delphij.net Message-ID: <20090126164355.GD87007@dragon.NUXI.org> References: <200901120039.n0C0dMKX043214@svn.freebsd.org> <20090112083144.GA69408@dragon.NUXI.org> <497D774B.7080705@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <497D774B.7080705@delphij.net> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-stable-7@FreeBSD.ORG, svn-src-stable@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r187069 - stable/7/sbin/fsck_ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.ORG List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 16:44:23 -0000 On Mon, Jan 26, 2009 at 12:41:47AM -0800, Xin LI wrote: > Just a ping on this. Please let me know if you think it's Ok to MFC the > 'C' to 'D' change to avoid the upcoming conflict against your changeset. Sounds OK to me. From owner-svn-src-stable@FreeBSD.ORG Mon Jan 26 20:24:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53FD6106567D; Mon, 26 Jan 2009 20:24:05 +0000 (UTC) (envelope-from dwhite@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A8408FC16; Mon, 26 Jan 2009 20:24:05 +0000 (UTC) (envelope-from dwhite@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QKO4cW062020; Mon, 26 Jan 2009 20:24:05 GMT (envelope-from dwhite@svn.freebsd.org) Received: (from dwhite@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QKO4vA062018; Mon, 26 Jan 2009 20:24:04 GMT (envelope-from dwhite@svn.freebsd.org) Message-Id: <200901262024.n0QKO4vA062018@svn.freebsd.org> From: Doug White Date: Mon, 26 Jan 2009 20:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187739 - stable/7/sys/net80211 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 20:24:06 -0000 Author: dwhite Date: Mon Jan 26 20:24:04 2009 New Revision: 187739 URL: http://svn.freebsd.org/changeset/base/187739 Log: Fix hostap power-save station support by always initializing the TIM bitmaps. Prior to this change, hostap would queue packets for power-saved stations but not indicate in the beacon that the station should wake up and poll for those queued packets. Reviewed by: sam Modified: stable/7/sys/net80211/ieee80211_freebsd.h stable/7/sys/net80211/ieee80211_power.c Modified: stable/7/sys/net80211/ieee80211_freebsd.h ============================================================================== --- stable/7/sys/net80211/ieee80211_freebsd.h Mon Jan 26 18:46:37 2009 (r187738) +++ stable/7/sys/net80211/ieee80211_freebsd.h Mon Jan 26 20:24:04 2009 (r187739) @@ -115,7 +115,7 @@ typedef struct mtx ieee80211_scan_lock_t #define _IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _m, _qlen, _age) do {\ (_m)->m_nextpkt = NULL; \ if ((_ni)->ni_savedq.ifq_tail != NULL) { \ - _age -= M_AGE_GET((_ni)->ni_savedq.ifq_tail); \ + _age -= M_AGE_GET((_ni)->ni_savedq.ifq_head); \ (_ni)->ni_savedq.ifq_tail->m_nextpkt = (_m); \ } else { \ (_ni)->ni_savedq.ifq_head = (_m); \ Modified: stable/7/sys/net80211/ieee80211_power.c ============================================================================== --- stable/7/sys/net80211/ieee80211_power.c Mon Jan 26 18:46:37 2009 (r187738) +++ stable/7/sys/net80211/ieee80211_power.c Mon Jan 26 20:24:04 2009 (r187739) @@ -48,29 +48,20 @@ static void ieee80211_set_tim(struct iee void ieee80211_power_attach(struct ieee80211com *ic) { - if (ic->ic_opmode == IEEE80211_M_HOSTAP || - ic->ic_opmode == IEEE80211_M_IBSS) { - /* NB: driver should override */ - ic->ic_set_tim = ieee80211_set_tim; - } + /* NB: driver should override */ + ic->ic_set_tim = ieee80211_set_tim; } void ieee80211_power_lateattach(struct ieee80211com *ic) { - /* - * Allocate these only if needed. Beware that we - * know adhoc mode doesn't support ATIM yet... - */ - if (ic->ic_opmode == IEEE80211_M_HOSTAP) { - ic->ic_tim_len = howmany(ic->ic_max_aid,8) * sizeof(uint8_t); - MALLOC(ic->ic_tim_bitmap, uint8_t *, ic->ic_tim_len, - M_DEVBUF, M_NOWAIT | M_ZERO); - if (ic->ic_tim_bitmap == NULL) { - printf("%s: no memory for TIM bitmap!\n", __func__); - /* XXX good enough to keep from crashing? */ - ic->ic_tim_len = 0; - } + ic->ic_tim_len = howmany(ic->ic_max_aid,8) * sizeof(uint8_t); + MALLOC(ic->ic_tim_bitmap, uint8_t *, ic->ic_tim_len, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (ic->ic_tim_bitmap == NULL) { + printf("%s: no memory for TIM bitmap!\n", __func__); + /* XXX good enough to keep from crashing? */ + ic->ic_tim_len = 0; } } From owner-svn-src-stable@FreeBSD.ORG Tue Jan 27 00:31:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEF101065675; Tue, 27 Jan 2009 00:31:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2FF28FC32; Tue, 27 Jan 2009 00:31:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R0VPwY067906; Tue, 27 Jan 2009 00:31:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R0VPOp067902; Tue, 27 Jan 2009 00:31:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200901270031.n0R0VPOp067902@svn.freebsd.org> From: Xin LI Date: Tue, 27 Jan 2009 00:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187749 - stable/7/sbin/fsck_ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 00:31:26 -0000 Author: delphij Date: Tue Jan 27 00:31:25 2009 New Revision: 187749 URL: http://svn.freebsd.org/changeset/base/187749 Log: MFC r187501 + r187748: Rename option 'C' to 'D' (damaged). Modified: stable/7/sbin/fsck_ffs/ (props changed) stable/7/sbin/fsck_ffs/fsck.h stable/7/sbin/fsck_ffs/fsck_ffs.8 stable/7/sbin/fsck_ffs/fsutil.c stable/7/sbin/fsck_ffs/main.c Modified: stable/7/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/7/sbin/fsck_ffs/fsck.h Tue Jan 27 00:29:19 2009 (r187748) +++ stable/7/sbin/fsck_ffs/fsck.h Tue Jan 27 00:31:25 2009 (r187749) @@ -270,7 +270,7 @@ char yflag; /* assume a yes response * int bkgrdflag; /* use a snapshot to run on an active system */ int bflag; /* location of alternate super block */ int debug; /* output debugging info */ -char catastrophicflag; /* run in catastrophic mode */ +char damagedflag; /* run in damaged mode */ int cvtlevel; /* convert to newer file system format */ int bkgrdcheck; /* determine if background check is possible */ int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */ Modified: stable/7/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- stable/7/sbin/fsck_ffs/fsck_ffs.8 Tue Jan 27 00:29:19 2009 (r187748) +++ stable/7/sbin/fsck_ffs/fsck_ffs.8 Tue Jan 27 00:31:25 2009 (r187749) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd January 20, 2009 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl BCFpfny +.Op Fl BDFpfny .Op Fl b Ar block .Op Fl c Ar level .Op Fl m Ar mode @@ -175,26 +175,6 @@ Use the block specified immediately afte the super block for the file system. An alternate super block is usually located at block 32 for UFS1, and block 160 for UFS2. -.It Fl C -Run -.Nm -in 'catastrophic recovery' mode, which will enable certain aggressive -operations that can make -.Nm -to survive with file systems that has very serious data damage, which -is an useful last resort when on disk data damage is very serious -and causes -.Nm -to crash otherwise. Be -.Em very careful -using this flag, it is dangerous if there are data transmission hazards -because a false positive cylinder group magic number mismatch could -cause -.Em irrevertible data loss! -.Pp -This option implies the -.Fl f -flag. .It Fl c Convert the file system to the specified level. Note that the level of a file system can only be raised. @@ -228,6 +208,26 @@ are being converted at once. The format of a file system can be determined from the first line of output from .Xr dumpfs 8 . +.It Fl D +Run +.Nm +in 'damaged recovery' mode, which will enable certain aggressive +operations that can make +.Nm +to survive with file systems that has very serious data damage, which +is an useful last resort when on disk data damage is very serious +and causes +.Nm +to crash otherwise. Be +.Em very careful +using this flag, it is dangerous if there are data transmission hazards +because a false positive cylinder group magic number mismatch could +cause +.Em irrevertible data loss! +.Pp +This option implies the +.Fl f +flag. .It Fl f Force .Nm Modified: stable/7/sbin/fsck_ffs/fsutil.c ============================================================================== --- stable/7/sbin/fsck_ffs/fsutil.c Tue Jan 27 00:29:19 2009 (r187748) +++ stable/7/sbin/fsck_ffs/fsutil.c Tue Jan 27 00:31:25 2009 (r187749) @@ -427,7 +427,7 @@ check_cgmagic(int cg, struct cg *cgp) if (!cg_chkmagic(cgp)) { pwarn("CG %d: BAD MAGIC NUMBER\n", cg); - if (catastrophicflag) { + if (damagedflag) { if (reply("CLEAR CG")) { memset(cgp, 0, (size_t)sblock.fs_cgsize); cgp->cg_initediblk = sblock.fs_ipg; @@ -442,7 +442,7 @@ check_cgmagic(int cg, struct cg *cgp) rerun = 1; } } else - printf("YOU MAY NEED TO RERUN FSCK WITH -C IF IT CRASHED.\n"); + printf("YOU MAY NEED TO RERUN FSCK WITH -D IF IT CRASHED.\n"); } } Modified: stable/7/sbin/fsck_ffs/main.c ============================================================================== --- stable/7/sbin/fsck_ffs/main.c Tue Jan 27 00:29:19 2009 (r187748) +++ stable/7/sbin/fsck_ffs/main.c Tue Jan 27 00:31:25 2009 (r187749) @@ -81,8 +81,8 @@ main(int argc, char *argv[]) sync(); skipclean = 1; - catastrophicflag = 0; - while ((ch = getopt(argc, argv, "b:Bc:CdfFm:npy")) != -1) { + damagedflag = 0; + while ((ch = getopt(argc, argv, "b:Bc:dDfFm:npy")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -106,8 +106,8 @@ main(int argc, char *argv[]) debug++; break; - case 'C': - catastrophicflag = 1; + case 'D': + damagedflag = 1; /* FALLTHROUGH */ case 'f': From owner-svn-src-stable@FreeBSD.ORG Tue Jan 27 16:25:46 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F23B9106564A; Tue, 27 Jan 2009 16:25:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEE4D8FC13; Tue, 27 Jan 2009 16:25:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RGPjOa090897; Tue, 27 Jan 2009 16:25:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RGPj6Z090896; Tue, 27 Jan 2009 16:25:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901271625.n0RGPj6Z090896@svn.freebsd.org> From: John Baldwin Date: Tue, 27 Jan 2009 16:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187776 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 16:25:47 -0000 Author: jhb Date: Tue Jan 27 16:25:45 2009 New Revision: 187776 URL: http://svn.freebsd.org/changeset/base/187776 Log: MFC: Add a comment explaining why the "bufwait" / "dirhash" LOR reported by WITNESS will not actually result in a deadlock. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/ufs/ufs/ufs_dirhash.c Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_dirhash.c Tue Jan 27 16:12:19 2009 (r187775) +++ stable/7/sys/ufs/ufs/ufs_dirhash.c Tue Jan 27 16:25:45 2009 (r187776) @@ -126,6 +126,18 @@ static struct mtx ufsdirhash_mtx; * free a dirhash structure that was recycled by ufsdirhash_recycle(). * * The dirhash lock may be held across io operations. + * + * WITNESS reports a lock order reversal between the "bufwait" lock + * and the "dirhash" lock. However, this specific reversal will not + * cause a deadlock. To get a deadlock, one would have to lock a + * buffer followed by the dirhash while a second thread locked a + * buffer while holding the dirhash lock. The second order can happen + * under a shared or exclusive vnode lock for the associated directory + * in lookup(). The first order, however, can only happen under an + * exclusive vnode lock (e.g. unlink(), rename(), etc.). Thus, for + * a thread to be doing a "bufwait" -> "dirhash" order, it has to hold + * an exclusive vnode lock. That exclusive vnode lock will prevent + * any other threads from doing a "dirhash" -> "bufwait" order. */ static void From owner-svn-src-stable@FreeBSD.ORG Wed Jan 28 05:07:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F2A71065673; Wed, 28 Jan 2009 05:07:17 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C94D8FC1B; Wed, 28 Jan 2009 05:07:17 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0S57HJ2007910; Wed, 28 Jan 2009 05:07:17 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0S57HhW007909; Wed, 28 Jan 2009 05:07:17 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200901280507.n0S57HhW007909@svn.freebsd.org> From: David Schultz Date: Wed, 28 Jan 2009 05:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187810 - in stable/7/lib/libc: . stdio string X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 05:07:18 -0000 Author: das Date: Wed Jan 28 05:07:16 2009 New Revision: 187810 URL: http://svn.freebsd.org/changeset/base/187810 Log: MFC r186887: Set the error indicator on an attempt to write to a read-only stream. PR: 127335 Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdio/wsetup.c stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) Modified: stable/7/lib/libc/stdio/wsetup.c ============================================================================== --- stable/7/lib/libc/stdio/wsetup.c Wed Jan 28 04:37:27 2009 (r187809) +++ stable/7/lib/libc/stdio/wsetup.c Wed Jan 28 05:07:16 2009 (r187810) @@ -60,6 +60,7 @@ __swsetup(fp) if ((fp->_flags & __SWR) == 0) { if ((fp->_flags & __SRW) == 0) { errno = EBADF; + fp->_flags |= __SERR; return (EOF); } if (fp->_flags & __SRD) { From owner-svn-src-stable@FreeBSD.ORG Wed Jan 28 05:18:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 936C11065672; Wed, 28 Jan 2009 05:18:21 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 815348FC1E; Wed, 28 Jan 2009 05:18:21 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0S5ILpJ008199; Wed, 28 Jan 2009 05:18:21 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0S5ILRZ008198; Wed, 28 Jan 2009 05:18:21 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200901280518.n0S5ILRZ008198@svn.freebsd.org> From: David Schultz Date: Wed, 28 Jan 2009 05:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187811 - in stable/7/lib/msun: . src X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 05:18:22 -0000 Author: das Date: Wed Jan 28 05:18:21 2009 New Revision: 187811 URL: http://svn.freebsd.org/changeset/base/187811 Log: MFC r186886: Fix the types of INFINITY and NAN, which were broken in r131851. They should both be floats, not doubles. PR: 127795 Modified: stable/7/lib/msun/ (props changed) stable/7/lib/msun/src/math.h Modified: stable/7/lib/msun/src/math.h ============================================================================== --- stable/7/lib/msun/src/math.h Wed Jan 28 05:07:16 2009 (r187810) +++ stable/7/lib/msun/src/math.h Wed Jan 28 05:18:21 2009 (r187811) @@ -55,8 +55,8 @@ extern const union __nan_un { #ifdef __MATH_BUILTIN_CONSTANTS #define HUGE_VALF __builtin_huge_valf() #define HUGE_VALL __builtin_huge_vall() -#define INFINITY __builtin_inf() -#define NAN __builtin_nan("") +#define INFINITY __builtin_inff() +#define NAN __builtin_nanf("") #else #define HUGE_VALF (float)HUGE_VAL #define HUGE_VALL (long double)HUGE_VAL From owner-svn-src-stable@FreeBSD.ORG Thu Jan 29 10:33:33 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C5C106564A; Thu, 29 Jan 2009 10:33:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0345C8FC20; Thu, 29 Jan 2009 10:33:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TAXW1C051298; Thu, 29 Jan 2009 10:33:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TAXWjC051297; Thu, 29 Jan 2009 10:33:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901291033.n0TAXWjC051297@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Jan 2009 10:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187882 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 10:33:33 -0000 Author: kib Date: Thu Jan 29 10:33:32 2009 New Revision: 187882 URL: http://svn.freebsd.org/changeset/base/187882 Log: MFC r186601: Clear the pointers to the file in the struct filedesc before file is closed in fdfree. Otherwise, sysctl_kern_proc_filedesc may dereference stale struct file * values. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_descrip.c Modified: stable/7/sys/kern/kern_descrip.c ============================================================================== --- stable/7/sys/kern/kern_descrip.c Thu Jan 29 09:32:56 2009 (r187881) +++ stable/7/sys/kern/kern_descrip.c Thu Jan 29 10:33:32 2009 (r187882) @@ -1733,14 +1733,16 @@ fdfree(struct thread *td) FILEDESC_XUNLOCK(fdp); if (i > 0) return; - /* - * We are the last reference to the structure, so we can - * safely assume it will not change out from under us. - */ + fpp = fdp->fd_ofiles; for (i = fdp->fd_lastfile; i-- >= 0; fpp++) { - if (*fpp) - (void) closef(*fpp, td); + if (*fpp) { + FILEDESC_XLOCK(fdp); + fp = *fpp; + *fpp = NULL; + FILEDESC_XUNLOCK(fdp); + (void) closef(fp, td); + } } FILEDESC_XLOCK(fdp); From owner-svn-src-stable@FreeBSD.ORG Thu Jan 29 10:40:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CCF4106564A; Thu, 29 Jan 2009 10:40:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4125C8FC0A; Thu, 29 Jan 2009 10:40:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TAelVA051462; Thu, 29 Jan 2009 10:40:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TAel2s051461; Thu, 29 Jan 2009 10:40:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901291040.n0TAel2s051461@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Jan 2009 10:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187883 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 10:40:49 -0000 Author: kib Date: Thu Jan 29 10:40:47 2009 New Revision: 187883 URL: http://svn.freebsd.org/changeset/base/187883 Log: MFC r186896: Do not call namei() while having another user-controlled vnode locked. Lookup could attempt to recursively lock that vnode. Do not call vn_start_write(V_WAIT) while vnode is locked, this may result in a deadlock with suspension. vfs_busy() the mountpoint before dropping vnode lock for vnode that was used to look up the mountpoint, to prevent unmount in between. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_extattr.c Modified: stable/7/sys/kern/vfs_extattr.c ============================================================================== --- stable/7/sys/kern/vfs_extattr.c Thu Jan 29 10:33:32 2009 (r187882) +++ stable/7/sys/kern/vfs_extattr.c Thu Jan 29 10:40:47 2009 (r187883) @@ -86,52 +86,65 @@ extattrctl(td, uap) AUDIT_ARG(text, attrname); vfslocked = fnvfslocked = 0; - /* - * uap->filename is not always defined. If it is, grab a vnode lock, - * which VFS_EXTATTRCTL() will later release. - */ + mp = NULL; filename_vp = NULL; if (uap->filename != NULL) { - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF | - AUDITVNODE2, UIO_USERSPACE, uap->filename, td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | AUDITVNODE2, + UIO_USERSPACE, uap->filename, td); error = namei(&nd); if (error) return (error); fnvfslocked = NDHASGIANT(&nd); filename_vp = nd.ni_vp; - NDFREE(&nd, NDF_NO_VP_RELE | NDF_NO_VP_UNLOCK); + NDFREE(&nd, NDF_NO_VP_RELE); } /* uap->path is always defined. */ - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->path, td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->path, td); error = namei(&nd); - if (error) { - if (filename_vp != NULL) - vput(filename_vp); + if (error) goto out; - } vfslocked = NDHASGIANT(&nd); mp = nd.ni_vp->v_mount; - error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); - NDFREE(&nd, 0); + error = vfs_busy(mp, 0, NULL, td); if (error) { - if (filename_vp != NULL) - vput(filename_vp); + NDFREE(&nd, 0); + mp = NULL; goto out; } + VOP_UNLOCK(nd.ni_vp, 0, td); + error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); + NDFREE(&nd, NDF_NO_VP_UNLOCK); + if (error) + goto out; + if (filename_vp != NULL) { + /* + * uap->filename is not always defined. If it is, + * grab a vnode lock, which VFS_EXTATTRCTL() will + * later release. + */ + error = vn_lock(filename_vp, LK_EXCLUSIVE, td); + if (error) { + vn_finished_write(mp_writable); + goto out; + } + } error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, uap->attrnamespace, uap->attrname != NULL ? attrname : NULL, td); vn_finished_write(mp_writable); +out: + if (mp != NULL) + vfs_unbusy(mp, td); + /* * VFS_EXTATTRCTL will have unlocked, but not de-ref'd, filename_vp, * so vrele it if it is defined. */ if (filename_vp != NULL) vrele(filename_vp); -out: VFS_UNLOCK_GIANT(fnvfslocked); VFS_UNLOCK_GIANT(vfslocked); return (error); From owner-svn-src-stable@FreeBSD.ORG Thu Jan 29 10:46:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2321E106564A; Thu, 29 Jan 2009 10:46:51 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 111718FC17; Thu, 29 Jan 2009 10:46:51 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TAkojk051699; Thu, 29 Jan 2009 10:46:50 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TAkoJX051693; Thu, 29 Jan 2009 10:46:50 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200901291046.n0TAkoJX051693@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 29 Jan 2009 10:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187884 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 10:46:51 -0000 Author: edwin Date: Thu Jan 29 10:46:50 2009 New Revision: 187884 URL: http://svn.freebsd.org/changeset/base/187884 Log: MFC of tzdata2009a - Asia/Katmandu -> Asia/Kathmandu - Fix historical references to DST in Switzerland - Correct rules for America/Resolute (Nunavut) - Cuba didn't have DST in 2005. Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/backward stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/northamerica stable/7/share/zoneinfo/zone.tab Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Thu Jan 29 10:40:47 2009 (r187883) +++ stable/7/share/zoneinfo/asia Thu Jan 29 10:46:50 2009 (r187884) @@ -1,4 +1,4 @@ -# @(#)asia 8.24 +# @(#)asia 8.25 #
 
 # This data is by no means authoritative; if you think you know better,
@@ -1474,7 +1474,7 @@ Zone	Asia/Choibalsan	7:38:00 -	LMT	1905 
 
 # Nepal
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Katmandu	5:41:16 -	LMT	1920
+Zone	Asia/Kathmandu	5:41:16 -	LMT	1920
 			5:30	-	IST	1986
 			5:45	-	NPT	# Nepal Time
 

Modified: stable/7/share/zoneinfo/backward
==============================================================================
--- stable/7/share/zoneinfo/backward	Thu Jan 29 10:40:47 2009	(r187883)
+++ stable/7/share/zoneinfo/backward	Thu Jan 29 10:46:50 2009	(r187884)
@@ -1,4 +1,4 @@
-# @(#)backward	8.6
+# @(#)backward	8.7
 
 # This file provides links between current names for time zones
 # and their old names.  Many names changed in late 1993.
@@ -24,6 +24,7 @@ Link	America/St_Thomas	America/Virgin
 Link	Asia/Ashgabat		Asia/Ashkhabad
 Link	Asia/Chongqing		Asia/Chungking
 Link	Asia/Dhaka		Asia/Dacca
+Link	Asia/Kathmandu		Asia/Katmandu
 Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Macau		Asia/Macao
 Link	Asia/Jerusalem		Asia/Tel_Aviv

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Thu Jan 29 10:40:47 2009	(r187883)
+++ stable/7/share/zoneinfo/europe	Thu Jan 29 10:46:50 2009	(r187884)
@@ -1,4 +1,4 @@
-# @(#)europe	8.18
+# @(#)europe	8.20
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -2313,11 +2313,64 @@ Zone Europe/Stockholm	1:12:12 -	LMT	1879
 # mean time in preference to apparent time -- Geneva from 1780 ....
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # From Whitman (who writes ``Midnight?''):
-Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
-Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
+# Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
+# Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
 # From Shanks & Pottenger:
-Rule	Swiss	1941	1942	-	May	Sun>=1	2:00	1:00	S
-Rule	Swiss	1941	1942	-	Oct	Sun>=1	0:00	0	-
+# Rule	Swiss	1941	1942	-	May	Sun>=1	2:00	1:00	S
+# Rule	Swiss	1941	1942	-	Oct	Sun>=1	0:00	0	-
+
+# From Alois Treindl (2008-12-17):
+# I have researched the DST usage in Switzerland during the 1940ies.
+#
+# As I wrote in an earlier message, I suspected the current tzdata values
+# to be wrong. This is now verified.
+#
+# I have found copies of the original ruling by the Swiss Federal
+# government, in 'Eidgen[o]ssische Gesetzessammlung 1941 and 1942' (Swiss
+# federal law collection)...
+#
+# DST began on Monday 5 May 1941, 1:00 am by shifting the clocks to 2:00 am
+# DST ended on Monday 6 Oct 1941, 2:00 am by shifting the clocks to 1:00 am.
+#
+# DST began on Monday, 4 May 1942 at 01:00 am
+# DST ended on Monday, 5 Oct 1942 at 02:00 am
+#
+# There was no DST in 1940, I have checked the law collection carefully.
+# It is also indicated by the fact that the 1942 entry in the law
+# collection points back to 1941 as a reference, but no reference to any
+# other years are made.
+#
+# Newspaper articles I have read in the archives on 6 May 1941 reported
+# about the introduction of DST (Sommerzeit in German) during the previous
+# night as an absolute novelty, because this was the first time that such
+# a thing had happened in Switzerland.
+#
+# I have also checked 1916, because one book source (Gabriel, Traite de
+# l'heure dans le monde) claims that Switzerland had DST in 1916. This is
+# false, no official document could be found. Probably Gabriel got misled
+# by references to Germany, which introduced DST in 1916 for the first time.
+#
+# The tzdata rules for Switzerland must be changed to:
+# Rule  Swiss   1941    1942    -       May     Mon>=1  1:00    1:00    S
+# Rule  Swiss   1941    1942    -       Oct     Mon>=1  2:00    0       -
+#
+# The 1940 rules must be deleted.
+#
+# One further detail for Switzerland, which is probably out of scope for
+# most users of tzdata:
+# The zone file
+# Zone    Europe/Zurich   0:34:08 -       LMT     1848 Sep 12
+#                          0:29:44 -       BMT     1894 Jun #Bern Mean Time
+#                          1:00    Swiss   CE%sT   1981
+#                          1:00    EU      CE%sT
+# describes all of Switzerland correctly, with the exception of
+# the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not
+# follow Bern Mean Time but kept its own local mean time.
+# To represent this, an extra zone would be needed.
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Swiss	1941	1942	-	May	Mon>=1	1:00	1:00	S
+Rule	Swiss	1941	1942	-	Oct	Mon>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Zurich	0:34:08 -	LMT	1848 Sep 12
 			0:29:44	-	BMT	1894 Jun # Bern Mean Time

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Thu Jan 29 10:40:47 2009	(r187883)
+++ stable/7/share/zoneinfo/northamerica	Thu Jan 29 10:46:50 2009	(r187884)
@@ -1,4 +1,4 @@
-# @(#)northamerica	8.24
+# @(#)northamerica	8.26
 # 
 
 # also includes Central America and the Caribbean
@@ -1742,9 +1742,13 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # The individual that answered the phone confirmed that the clocks did not
 # move at the end of daylight saving on October 29/2006.  He also told me that
 # the clocks did not move this past weekend (March 11/2007)....
-#
-# America/Resolute should use the "Canada" Rule up to October 29/2006.
-# After that it should be fixed on Eastern Standard Time until further notice.
+
+# From Chris Walton (2008-11-13):
+# ...the residents of Resolute believe that they are changing "time zones"
+# twice a year.  In winter months, local time is qualified with "Eastern
+# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
+# months, local time is qualified with "Central Time" which is really
+# "Central Daylight Time (UTC-5)"...
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1772,11 +1776,14 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
+Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	-	EST
+			-5:00	Resolute	%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
@@ -2280,7 +2287,7 @@ Rule	Cuba	1996	only	-	Oct	 6	0:00s	0	S
 Rule	Cuba	1997	only	-	Oct	12	0:00s	0	S
 Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
 Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
-Rule	Cuba	2000	2006	-	Apr	Sun>=1	0:00s	1:00	D
+Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1:00	D
 Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	max	-	Mar	Sun>=15	0:00s	1:00	D

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Thu Jan 29 10:40:47 2009	(r187883)
+++ stable/7/share/zoneinfo/zone.tab	Thu Jan 29 10:46:50 2009	(r187884)
@@ -1,4 +1,4 @@
-# @(#)zone.tab	8.21
+# @(#)zone.tab	8.26
 #
 # TZ zone descriptions
 #
@@ -116,7 +116,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -292,7 +292,7 @@ NG	+0627+00324	Africa/Lagos
 NI	+1209-08617	America/Managua
 NL	+5222+00454	Europe/Amsterdam
 NO	+5955+01045	Europe/Oslo
-NP	+2743+08519	Asia/Katmandu
+NP	+2743+08519	Asia/Kathmandu
 NR	-0031+16655	Pacific/Nauru
 NU	-1901-16955	Pacific/Niue
 NZ	-3652+17446	Pacific/Auckland	most locations

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 10:47:02 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 838B31065741;
	Thu, 29 Jan 2009 10:47:02 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 712E58FC0C;
	Thu, 29 Jan 2009 10:47:02 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TAl2mZ051743;
	Thu, 29 Jan 2009 10:47:02 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TAl2RP051742;
	Thu, 29 Jan 2009 10:47:02 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200901291047.n0TAl2RP051742@svn.freebsd.org>
From: Edwin Groothuis 
Date: Thu, 29 Jan 2009 10:47:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187885 - stable/6/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 10:47:03 -0000

Author: edwin
Date: Thu Jan 29 10:47:01 2009
New Revision: 187885
URL: http://svn.freebsd.org/changeset/base/187885

Log:
  MFC of tzdata2009a
  
  - Asia/Katmandu -> Asia/Kathmandu
  - Fix historical references to DST in Switzerland
  - Correct rules for America/Resolute (Nunavut)
  - Cuba didn't have DST in 2005.

Modified:
  stable/6/share/zoneinfo/   (props changed)
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/backward
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/northamerica
  stable/6/share/zoneinfo/zone.tab

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Thu Jan 29 10:46:50 2009	(r187884)
+++ stable/6/share/zoneinfo/asia	Thu Jan 29 10:47:01 2009	(r187885)
@@ -1,4 +1,4 @@
-# @(#)asia	8.24
+# @(#)asia	8.25
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -1474,7 +1474,7 @@ Zone	Asia/Choibalsan	7:38:00 -	LMT	1905 
 
 # Nepal
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Katmandu	5:41:16 -	LMT	1920
+Zone	Asia/Kathmandu	5:41:16 -	LMT	1920
 			5:30	-	IST	1986
 			5:45	-	NPT	# Nepal Time
 

Modified: stable/6/share/zoneinfo/backward
==============================================================================
--- stable/6/share/zoneinfo/backward	Thu Jan 29 10:46:50 2009	(r187884)
+++ stable/6/share/zoneinfo/backward	Thu Jan 29 10:47:01 2009	(r187885)
@@ -1,4 +1,4 @@
-# @(#)backward	8.6
+# @(#)backward	8.7
 
 # This file provides links between current names for time zones
 # and their old names.  Many names changed in late 1993.
@@ -24,6 +24,7 @@ Link	America/St_Thomas	America/Virgin
 Link	Asia/Ashgabat		Asia/Ashkhabad
 Link	Asia/Chongqing		Asia/Chungking
 Link	Asia/Dhaka		Asia/Dacca
+Link	Asia/Kathmandu		Asia/Katmandu
 Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Macau		Asia/Macao
 Link	Asia/Jerusalem		Asia/Tel_Aviv

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Thu Jan 29 10:46:50 2009	(r187884)
+++ stable/6/share/zoneinfo/europe	Thu Jan 29 10:47:01 2009	(r187885)
@@ -1,4 +1,4 @@
-# @(#)europe	8.18
+# @(#)europe	8.20
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -2313,11 +2313,64 @@ Zone Europe/Stockholm	1:12:12 -	LMT	1879
 # mean time in preference to apparent time -- Geneva from 1780 ....
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # From Whitman (who writes ``Midnight?''):
-Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
-Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
+# Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
+# Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
 # From Shanks & Pottenger:
-Rule	Swiss	1941	1942	-	May	Sun>=1	2:00	1:00	S
-Rule	Swiss	1941	1942	-	Oct	Sun>=1	0:00	0	-
+# Rule	Swiss	1941	1942	-	May	Sun>=1	2:00	1:00	S
+# Rule	Swiss	1941	1942	-	Oct	Sun>=1	0:00	0	-
+
+# From Alois Treindl (2008-12-17):
+# I have researched the DST usage in Switzerland during the 1940ies.
+#
+# As I wrote in an earlier message, I suspected the current tzdata values
+# to be wrong. This is now verified.
+#
+# I have found copies of the original ruling by the Swiss Federal
+# government, in 'Eidgen[o]ssische Gesetzessammlung 1941 and 1942' (Swiss
+# federal law collection)...
+#
+# DST began on Monday 5 May 1941, 1:00 am by shifting the clocks to 2:00 am
+# DST ended on Monday 6 Oct 1941, 2:00 am by shifting the clocks to 1:00 am.
+#
+# DST began on Monday, 4 May 1942 at 01:00 am
+# DST ended on Monday, 5 Oct 1942 at 02:00 am
+#
+# There was no DST in 1940, I have checked the law collection carefully.
+# It is also indicated by the fact that the 1942 entry in the law
+# collection points back to 1941 as a reference, but no reference to any
+# other years are made.
+#
+# Newspaper articles I have read in the archives on 6 May 1941 reported
+# about the introduction of DST (Sommerzeit in German) during the previous
+# night as an absolute novelty, because this was the first time that such
+# a thing had happened in Switzerland.
+#
+# I have also checked 1916, because one book source (Gabriel, Traite de
+# l'heure dans le monde) claims that Switzerland had DST in 1916. This is
+# false, no official document could be found. Probably Gabriel got misled
+# by references to Germany, which introduced DST in 1916 for the first time.
+#
+# The tzdata rules for Switzerland must be changed to:
+# Rule  Swiss   1941    1942    -       May     Mon>=1  1:00    1:00    S
+# Rule  Swiss   1941    1942    -       Oct     Mon>=1  2:00    0       -
+#
+# The 1940 rules must be deleted.
+#
+# One further detail for Switzerland, which is probably out of scope for
+# most users of tzdata:
+# The zone file
+# Zone    Europe/Zurich   0:34:08 -       LMT     1848 Sep 12
+#                          0:29:44 -       BMT     1894 Jun #Bern Mean Time
+#                          1:00    Swiss   CE%sT   1981
+#                          1:00    EU      CE%sT
+# describes all of Switzerland correctly, with the exception of
+# the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not
+# follow Bern Mean Time but kept its own local mean time.
+# To represent this, an extra zone would be needed.
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Swiss	1941	1942	-	May	Mon>=1	1:00	1:00	S
+Rule	Swiss	1941	1942	-	Oct	Mon>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Zurich	0:34:08 -	LMT	1848 Sep 12
 			0:29:44	-	BMT	1894 Jun # Bern Mean Time

Modified: stable/6/share/zoneinfo/northamerica
==============================================================================
--- stable/6/share/zoneinfo/northamerica	Thu Jan 29 10:46:50 2009	(r187884)
+++ stable/6/share/zoneinfo/northamerica	Thu Jan 29 10:47:01 2009	(r187885)
@@ -1,4 +1,4 @@
-# @(#)northamerica	8.24
+# @(#)northamerica	8.26
 # 
 
 # also includes Central America and the Caribbean
@@ -1742,9 +1742,13 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # The individual that answered the phone confirmed that the clocks did not
 # move at the end of daylight saving on October 29/2006.  He also told me that
 # the clocks did not move this past weekend (March 11/2007)....
-#
-# America/Resolute should use the "Canada" Rule up to October 29/2006.
-# After that it should be fixed on Eastern Standard Time until further notice.
+
+# From Chris Walton (2008-11-13):
+# ...the residents of Resolute believe that they are changing "time zones"
+# twice a year.  In winter months, local time is qualified with "Eastern
+# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
+# months, local time is qualified with "Central Time" which is really
+# "Central Daylight Time (UTC-5)"...
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1772,11 +1776,14 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
+Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	-	EST
+			-5:00	Resolute	%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
@@ -2280,7 +2287,7 @@ Rule	Cuba	1996	only	-	Oct	 6	0:00s	0	S
 Rule	Cuba	1997	only	-	Oct	12	0:00s	0	S
 Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
 Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
-Rule	Cuba	2000	2006	-	Apr	Sun>=1	0:00s	1:00	D
+Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1:00	D
 Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	max	-	Mar	Sun>=15	0:00s	1:00	D

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Thu Jan 29 10:46:50 2009	(r187884)
+++ stable/6/share/zoneinfo/zone.tab	Thu Jan 29 10:47:01 2009	(r187885)
@@ -1,4 +1,4 @@
-# @(#)zone.tab	8.21
+# @(#)zone.tab	8.26
 #
 # TZ zone descriptions
 #
@@ -116,7 +116,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -292,7 +292,7 @@ NG	+0627+00324	Africa/Lagos
 NI	+1209-08617	America/Managua
 NL	+5222+00454	Europe/Amsterdam
 NO	+5955+01045	Europe/Oslo
-NP	+2743+08519	Asia/Katmandu
+NP	+2743+08519	Asia/Kathmandu
 NR	-0031+16655	Pacific/Nauru
 NU	-1901-16955	Pacific/Niue
 NZ	-3652+17446	Pacific/Auckland	most locations

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 10:49:22 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3182B1065672;
	Thu, 29 Jan 2009 10:49:22 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F3238FC22;
	Thu, 29 Jan 2009 10:49:22 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TAnMeT051828;
	Thu, 29 Jan 2009 10:49:22 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TAnMVk051827;
	Thu, 29 Jan 2009 10:49:22 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291049.n0TAnMVk051827@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 10:49:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187886 - in stable/7/sys: . contrib/pf dev/cxgb ufs/ufs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 10:49:23 -0000

Author: kib
Date: Thu Jan 29 10:49:21 2009
New Revision: 187886
URL: http://svn.freebsd.org/changeset/base/187886

Log:
  MFC r186898:
  Lock the uepm_lock around the autostart of extattrs.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/ufs/ufs/ufs_extattr.c

Modified: stable/7/sys/ufs/ufs/ufs_extattr.c
==============================================================================
--- stable/7/sys/ufs/ufs/ufs_extattr.c	Thu Jan 29 10:47:01 2009	(r187885)
+++ stable/7/sys/ufs/ufs/ufs_extattr.c	Thu Jan 29 10:49:21 2009	(r187886)
@@ -93,6 +93,10 @@ static int	ufs_extattr_set(struct vnode 
 		    struct thread *td);
 static int	ufs_extattr_rm(struct vnode *vp, int attrnamespace,
 		    const char *name, struct ucred *cred, struct thread *td);
+static int	ufs_extattr_autostart_locked(struct mount *mp,
+		    struct thread *td);
+static int	ufs_extattr_start_locked(struct ufsmount *ump,
+		    struct thread *td);
 
 /*
  * Per-FS attribute lock protecting attribute operations.
@@ -208,24 +212,22 @@ ufs_extattr_start(struct mount *mp, stru
 	ump = VFSTOUFS(mp);
 
 	ufs_extattr_uepm_lock(ump, td);
+	error = ufs_extattr_start_locked(ump, td);
+	ufs_extattr_uepm_unlock(ump, td);
+	return (error);
+}
 
-	if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) {
-		error = EOPNOTSUPP;
-		goto unlock;
-	}
-	if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED) {
-		error = EBUSY;
-		goto unlock;
-	}
+static int
+ufs_extattr_start_locked(struct ufsmount *ump, struct thread *td)
+{
+	if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED))
+		return (EOPNOTSUPP);
+	if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)
+		return (EBUSY);
 
 	ump->um_extattr.uepm_flags |= UFS_EXTATTR_UEPM_STARTED;
-
 	ump->um_extattr.uepm_ucred = crhold(td->td_ucred);
-
-unlock:
-	ufs_extattr_uepm_unlock(ump, td);
-
-	return (error);
+	return (0);
 }
 
 #ifdef UFS_EXTATTR_AUTOSTART
@@ -448,6 +450,19 @@ ufs_extattr_iterate_directory(struct ufs
 int
 ufs_extattr_autostart(struct mount *mp, struct thread *td)
 {
+	struct ufsmount *ump;
+	int error;
+
+	ump = VFSTOUFS(mp);
+	ufs_extattr_uepm_lock(ump, td);
+	error = ufs_extattr_autostart_locked(mp, td);
+	ufs_extattr_uepm_unlock(ump, td);
+	return (error);
+}
+
+static int
+ufs_extattr_autostart_locked(struct mount *mp, struct thread *td)
+{
 	struct vnode *rvp, *attr_dvp, *attr_system_dvp, *attr_user_dvp;
 	struct ufsmount *ump = VFSTOUFS(mp);
 	int error;
@@ -491,7 +506,7 @@ ufs_extattr_autostart(struct mount *mp, 
 		goto return_vput_attr_dvp;
 	}
 
-	error = ufs_extattr_start(mp, td);
+	error = ufs_extattr_start_locked(ump, td);
 	if (error) {
 		printf("ufs_extattr_autostart: ufs_extattr_start failed (%d)\n",
 		    error);

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 11:03:57 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F97D106566B;
	Thu, 29 Jan 2009 11:03:57 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 63ABD8FC18;
	Thu, 29 Jan 2009 11:03:57 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TB3v8a052244;
	Thu, 29 Jan 2009 11:03:57 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TB3vNO052243;
	Thu, 29 Jan 2009 11:03:57 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291103.n0TB3vNO052243@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 11:03:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187887 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb fs/pseudofs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 11:03:58 -0000

Author: kib
Date: Thu Jan 29 11:03:57 2009
New Revision: 187887
URL: http://svn.freebsd.org/changeset/base/187887

Log:
  MFC r186560:
  After the pfs_vncache_mutex is dropped, another thread may attempt to
  do pfs_vncache_alloc() for the same pfs_node and pid. In this case, we
  could end up with two vnodes for the pair. Recheck the cache under the
  locked pfs_vncache_mutex after all sleeping operations are done.
  
  Do not call free() on the struct pfs_vdata after insmntque() failure,
  because vp->v_data points to the structure, and pseudofs_reclaim()
  frees it by the call to pfs_vncache_free().
  
  MFC r186981 (by marcus):
  vput the vnode.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/fs/pseudofs/pseudofs_vncache.c

Modified: stable/7/sys/fs/pseudofs/pseudofs_vncache.c
==============================================================================
--- stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Thu Jan 29 10:49:21 2009	(r187886)
+++ stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Thu Jan 29 11:03:57 2009	(r187887)
@@ -111,7 +111,7 @@ int
 pfs_vncache_alloc(struct mount *mp, struct vnode **vpp,
 		  struct pfs_node *pn, pid_t pid)
 {
-	struct pfs_vdata *pvd;
+	struct pfs_vdata *pvd, *pvd2;
 	struct vnode *vp;
 	int error;
 
@@ -146,19 +146,11 @@ retry:
 		}
 	}
 	mtx_unlock(&pfs_vncache_mutex);
-	++pfs_vncache_misses;
 
 	/* nope, get a new one */
 	MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, M_WAITOK);
-	mtx_lock(&pfs_vncache_mutex);
-	if (++pfs_vncache_entries > pfs_vncache_maxentries)
-		pfs_vncache_maxentries = pfs_vncache_entries;
-	mtx_unlock(&pfs_vncache_mutex);
 	error = getnewvnode("pseudofs", mp, &pfs_vnodeops, vpp);
 	if (error) {
-		mtx_lock(&pfs_vncache_mutex);
-		--pfs_vncache_entries;
-		mtx_unlock(&pfs_vncache_mutex);
 		FREE(pvd, M_PFSVNCACHE);
 		return (error);
 	}
@@ -200,14 +192,36 @@ retry:
 	vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread);
 	error = insmntque(*vpp, mp);
 	if (error != 0) {
-		mtx_lock(&pfs_vncache_mutex);
-		--pfs_vncache_entries;
-		mtx_unlock(&pfs_vncache_mutex);
-		FREE(pvd, M_PFSVNCACHE);
 		*vpp = NULLVP;
 		return (error);
 	}
+retry2:
 	mtx_lock(&pfs_vncache_mutex);
+	/*
+	 * Other thread may race with us, creating the entry we are
+	 * going to insert into the cache. Recheck after
+	 * pfs_vncache_mutex is reacquired.
+	 */
+	for (pvd2 = pfs_vncache; pvd2; pvd2 = pvd2->pvd_next) {
+		if (pvd2->pvd_pn == pn && pvd2->pvd_pid == pid &&
+		    pvd2->pvd_vnode->v_mount == mp) {
+			vp = pvd2->pvd_vnode;
+			VI_LOCK(vp);
+			mtx_unlock(&pfs_vncache_mutex);
+			if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread) == 0) {
+				++pfs_vncache_hits;
+				vgone(*vpp);
+				vput(*vpp);
+				*vpp = vp;
+				cache_purge(vp);
+				return (0);
+			}
+			goto retry2;
+		}
+	}
+	++pfs_vncache_misses;
+	if (++pfs_vncache_entries > pfs_vncache_maxentries)
+		pfs_vncache_maxentries = pfs_vncache_entries;
 	pvd->pvd_prev = NULL;
 	pvd->pvd_next = pfs_vncache;
 	if (pvd->pvd_next)

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 11:08:56 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AFB56106564A;
	Thu, 29 Jan 2009 11:08:56 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8370B8FC18;
	Thu, 29 Jan 2009 11:08:56 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TB8uY1052374;
	Thu, 29 Jan 2009 11:08:56 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TB8uXD052373;
	Thu, 29 Jan 2009 11:08:56 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291108.n0TB8uXD052373@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 11:08:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187888 - in stable/7/sys: . contrib/pf dev/cxgb
	fs/pseudofs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 11:08:57 -0000

Author: kib
Date: Thu Jan 29 11:08:56 2009
New Revision: 187888
URL: http://svn.freebsd.org/changeset/base/187888

Log:
  MFC r186561:
  Drop the pseudofs vnode lock around call to pfs_read handler.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/fs/pseudofs/pseudofs_vnops.c

Modified: stable/7/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- stable/7/sys/fs/pseudofs/pseudofs_vnops.c	Thu Jan 29 11:03:57 2009	(r187887)
+++ stable/7/sys/fs/pseudofs/pseudofs_vnops.c	Thu Jan 29 11:08:56 2009	(r187888)
@@ -476,7 +476,7 @@ pfs_read(struct vop_read_args *va)
 	struct uio *uio = va->a_uio;
 	struct proc *proc;
 	struct sbuf *sb = NULL;
-	int error;
+	int error, locked;
 	unsigned int buflen, offset, resid;
 
 	PFS_TRACE(("%s", pn->pn_name));
@@ -502,13 +502,15 @@ pfs_read(struct vop_read_args *va)
 		PROC_UNLOCK(proc);
 	}
 
+	vhold(vn);
+	locked = VOP_ISLOCKED(vn, curthread);
+	VOP_UNLOCK(vn, 0, curthread);
+
 	if (pn->pn_flags & PFS_RAWRD) {
 		PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid));
 		error = pn_fill(curthread, proc, pn, NULL, uio);
 		PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid));
-		if (proc != NULL)
-			PRELE(proc);
-		PFS_RETURN (error);
+		goto ret;
 	}
 
 	/* beaucoup sanity checks so we don't ask for bogus allocation */
@@ -518,34 +520,35 @@ pfs_read(struct vop_read_args *va)
 	    (buflen = offset + resid + 1) < offset || buflen > INT_MAX) {
 		if (proc != NULL)
 			PRELE(proc);
-		PFS_RETURN (EINVAL);
+		error = EINVAL;
+		goto ret;
 	}
 	if (buflen > MAXPHYS + 1) {
-		if (proc != NULL)
-			PRELE(proc);
-		PFS_RETURN (EIO);
+		error = EIO;
+		goto ret;
 	}
 
 	sb = sbuf_new(sb, NULL, buflen, 0);
 	if (sb == NULL) {
-		if (proc != NULL)
-			PRELE(proc);
-		PFS_RETURN (EIO);
+		error = EIO;
+		goto ret;
 	}
 
 	error = pn_fill(curthread, proc, pn, sb, uio);
 
-	if (proc != NULL)
-		PRELE(proc);
-
 	if (error) {
 		sbuf_delete(sb);
-		PFS_RETURN (error);
+		goto ret;
 	}
 
 	sbuf_finish(sb);
 	error = uiomove_frombuf(sbuf_data(sb), sbuf_len(sb), uio);
 	sbuf_delete(sb);
+ret:
+	vn_lock(vn, locked | LK_RETRY, curthread);
+	vdrop(vn);
+	if (proc != NULL)
+		PRELE(proc);
 	PFS_RETURN (error);
 }
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 11:13:03 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BFBD0106576C;
	Thu, 29 Jan 2009 11:13:03 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 92BB78FC12;
	Thu, 29 Jan 2009 11:13:03 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TBD3NG052509;
	Thu, 29 Jan 2009 11:13:03 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TBD32e052506;
	Thu, 29 Jan 2009 11:13:03 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291113.n0TBD32e052506@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 11:13:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187889 - in stable/7/sys: . compat/linprocfs
	contrib/pf dev/cxgb fs/procfs kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 11:13:04 -0000

Author: kib
Date: Thu Jan 29 11:13:03 2009
New Revision: 187889
URL: http://svn.freebsd.org/changeset/base/187889

Log:
  MFC r186563:
  vm_map_lock_read() does not increment map->timestamp, so we should
  compare map->timestamp with saved timestamp after map read lock is
  reacquired, not with saved timestamp + 1. The only consequence of the +1
  was unconditional lookup of the next map entry, though.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/compat/linprocfs/linprocfs.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/fs/procfs/procfs_map.c
  stable/7/sys/kern/kern_proc.c

Modified: stable/7/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- stable/7/sys/compat/linprocfs/linprocfs.c	Thu Jan 29 11:08:56 2009	(r187888)
+++ stable/7/sys/compat/linprocfs/linprocfs.c	Thu Jan 29 11:13:03 2009	(r187889)
@@ -976,7 +976,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
 			error = 0;
 			break;
 		}
-		if (last_timestamp + 1 != map->timestamp) {
+		if (last_timestamp != map->timestamp) {
 			/*
 			 * Look again for the entry because the map was
 			 * modified while it was unlocked.  Specifically,

Modified: stable/7/sys/fs/procfs/procfs_map.c
==============================================================================
--- stable/7/sys/fs/procfs/procfs_map.c	Thu Jan 29 11:08:56 2009	(r187888)
+++ stable/7/sys/fs/procfs/procfs_map.c	Thu Jan 29 11:13:03 2009	(r187889)
@@ -231,7 +231,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
 			error = 0;
 			break;
 		}
-		if (last_timestamp + 1 != map->timestamp) {
+		if (last_timestamp != map->timestamp) {
 			/*
 			 * Look again for the entry because the map was
 			 * modified while it was unlocked.  Specifically,

Modified: stable/7/sys/kern/kern_proc.c
==============================================================================
--- stable/7/sys/kern/kern_proc.c	Thu Jan 29 11:08:56 2009	(r187888)
+++ stable/7/sys/kern/kern_proc.c	Thu Jan 29 11:13:03 2009	(r187889)
@@ -1502,7 +1502,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A
 		vm_map_lock_read(map);
 		if (error)
 			break;
-		if (last_timestamp + 1 != map->timestamp) {
+		if (last_timestamp != map->timestamp) {
 			vm_map_lookup_entry(map, addr - 1, &tmp_entry);
 			entry = tmp_entry;
 		}
@@ -1679,7 +1679,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR
 		vm_map_lock_read(map);
 		if (error)
 			break;
-		if (last_timestamp + 1 != map->timestamp) {
+		if (last_timestamp != map->timestamp) {
 			vm_map_lookup_entry(map, addr - 1, &tmp_entry);
 			entry = tmp_entry;
 		}

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 11:17:11 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 90123106566C;
	Thu, 29 Jan 2009 11:17:11 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E0258FC18;
	Thu, 29 Jan 2009 11:17:11 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TBHBsU052643;
	Thu, 29 Jan 2009 11:17:11 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TBHB8n052642;
	Thu, 29 Jan 2009 11:17:11 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291117.n0TBHB8n052642@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 11:17:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187890 - in stable/7/sys: . contrib/pf dev/cxgb
	fs/pseudofs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 11:17:12 -0000

Author: kib
Date: Thu Jan 29 11:17:11 2009
New Revision: 187890
URL: http://svn.freebsd.org/changeset/base/187890

Log:
  MFC r186565:
  When the insmntque() in the pfs_vncache_alloc() fails, vop_reclaim calls
  pfs_vncache_free() that removes pvd from the list, while it is not yet
  put on the list.
  
  Prevent the invalid removal from the list by clearing pvd_next and
  pvd_prev for the newly allocated pvd, and only move pfs_vncache list
  head when the pvd was at the head.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/fs/pseudofs/pseudofs_vncache.c

Modified: stable/7/sys/fs/pseudofs/pseudofs_vncache.c
==============================================================================
--- stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Thu Jan 29 11:13:03 2009	(r187889)
+++ stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Thu Jan 29 11:17:11 2009	(r187890)
@@ -149,6 +149,7 @@ retry:
 
 	/* nope, get a new one */
 	MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, M_WAITOK);
+	pvd->pvd_next = pvd->pvd_prev = NULL;
 	error = getnewvnode("pseudofs", mp, &pfs_vnodeops, vpp);
 	if (error) {
 		FREE(pvd, M_PFSVNCACHE);
@@ -246,7 +247,7 @@ pfs_vncache_free(struct vnode *vp)
 		pvd->pvd_next->pvd_prev = pvd->pvd_prev;
 	if (pvd->pvd_prev)
 		pvd->pvd_prev->pvd_next = pvd->pvd_next;
-	else
+	else if (pfs_vncache == pvd)
 		pfs_vncache = pvd->pvd_next;
 	--pfs_vncache_entries;
 	mtx_unlock(&pfs_vncache_mutex);

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 11:21:15 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D31141065670;
	Thu, 29 Jan 2009 11:21:15 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C011D8FC0A;
	Thu, 29 Jan 2009 11:21:15 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TBLFPP052767;
	Thu, 29 Jan 2009 11:21:15 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TBLFUX052766;
	Thu, 29 Jan 2009 11:21:15 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291121.n0TBLFUX052766@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 11:21:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187891 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb ufs/ffs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 11:21:16 -0000

Author: kib
Date: Thu Jan 29 11:21:15 2009
New Revision: 187891
URL: http://svn.freebsd.org/changeset/base/187891

Log:
  MFC r183067:
  The struct inode *ip supplied to softdep_freefile is not neccessary the
  inode having number ino. In r170991, the ip was marked IN_MODIFIED, that
  is not quite correct.
  
  Mark only the right inode modified by checking inode number.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/ufs/ffs/ffs_softdep.c

Modified: stable/7/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_softdep.c	Thu Jan 29 11:17:11 2009	(r187890)
+++ stable/7/sys/ufs/ffs/ffs_softdep.c	Thu Jan 29 11:21:15 2009	(r187891)
@@ -2606,7 +2606,8 @@ softdep_freefile(pvp, ino, mode)
 	}
 	WORKLIST_INSERT(&inodedep->id_inowait, &freefile->fx_list);
 	FREE_LOCK(&lk);
-	ip->i_flag |= IN_MODIFIED;
+	if (ip->i_number == ino)
+		ip->i_flag |= IN_MODIFIED;
 }
 
 /*

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 11:38:28 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E520A1065676;
	Thu, 29 Jan 2009 11:38:28 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D1AC08FC1C;
	Thu, 29 Jan 2009 11:38:28 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TBcSv0053120;
	Thu, 29 Jan 2009 11:38:28 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TBcSO9053117;
	Thu, 29 Jan 2009 11:38:28 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200901291138.n0TBcSO9053117@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 29 Jan 2009 11:38:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187892 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb gnu/fs/ext2fs kern sys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 11:38:29 -0000

Author: kib
Date: Thu Jan 29 11:38:28 2009
New Revision: 187892
URL: http://svn.freebsd.org/changeset/base/187892

Log:
  MFC r183071:
  Garbage-collect vn_write_suspend_wait().

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/gnu/fs/ext2fs/ext2_inode.c
  stable/7/sys/kern/vfs_vnops.c
  stable/7/sys/sys/vnode.h

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_inode.c
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_inode.c	Thu Jan 29 11:21:15 2009	(r187891)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_inode.c	Thu Jan 29 11:38:28 2009	(r187892)
@@ -481,7 +481,6 @@ ext2_inactive(ap)
 	if (ip->i_mode == 0)
 		goto out;
 	if (ip->i_nlink <= 0) {
-		(void) vn_write_suspend_wait(vp, NULL, V_WAIT);
 		error = ext2_truncate(vp, (off_t)0, 0, NOCRED, td);
 		ip->i_rdev = 0;
 		mode = ip->i_mode;
@@ -489,15 +488,8 @@ ext2_inactive(ap)
 		ip->i_flag |= IN_CHANGE | IN_UPDATE;
 		ext2_vfree(vp, ip->i_number, mode);
 	}
-	if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) {
-		if ((ip->i_flag & (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) == 0 &&
-		    vn_write_suspend_wait(vp, NULL, V_NOWAIT)) {
-			ip->i_flag &= ~IN_ACCESS;
-		} else {
-			(void) vn_write_suspend_wait(vp, NULL, V_WAIT);
-			ext2_update(vp, 0);
-		}
-	}
+	if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE))
+		ext2_update(vp, 0);
 out:
 	/*
 	 * If we are done with the inode, reclaim it

Modified: stable/7/sys/kern/vfs_vnops.c
==============================================================================
--- stable/7/sys/kern/vfs_vnops.c	Thu Jan 29 11:21:15 2009	(r187891)
+++ stable/7/sys/kern/vfs_vnops.c	Thu Jan 29 11:38:28 2009	(r187892)
@@ -943,56 +943,6 @@ unlock:
  * time, these operations are halted until the suspension is over.
  */
 int
-vn_write_suspend_wait(vp, mp, flags)
-	struct vnode *vp;
-	struct mount *mp;
-	int flags;
-{
-	int error;
-
-	if (vp != NULL) {
-		if ((error = VOP_GETWRITEMOUNT(vp, &mp)) != 0) {
-			if (error != EOPNOTSUPP)
-				return (error);
-			return (0);
-		}
-	}
-	/*
-	 * If we are not suspended or have not yet reached suspended
-	 * mode, then let the operation proceed.
-	 */
-	if (mp == NULL)
-		return (0);
-	MNT_ILOCK(mp);
-	if (vp == NULL)
-		MNT_REF(mp);
-	if ((mp->mnt_kern_flag & MNTK_SUSPENDED) == 0) {
-		MNT_REL(mp);
-		MNT_IUNLOCK(mp);
-		return (0);
-	}
-	if (flags & V_NOWAIT) {
-		MNT_REL(mp);
-		MNT_IUNLOCK(mp);
-		return (EWOULDBLOCK);
-	}
-	/*
-	 * Wait for the suspension to finish.
-	 */
-	error = msleep(&mp->mnt_flag, MNT_MTX(mp),
-	    (PUSER - 1) | (flags & PCATCH) | PDROP, "suspfs", 0);
-	vfs_rel(mp);
-	return (error);
-}
-
-/*
- * Secondary suspension. Used by operations such as vop_inactive
- * routines that are needed by the higher level functions. These
- * are allowed to proceed until all the higher level functions have
- * completed (indicated by mnt_writeopcount dropping to zero). At that
- * time, these operations are halted until the suspension is over.
- */
-int
 vn_start_secondary_write(vp, mpp, flags)
 	struct vnode *vp;
 	struct mount **mpp;

Modified: stable/7/sys/sys/vnode.h
==============================================================================
--- stable/7/sys/sys/vnode.h	Thu Jan 29 11:21:15 2009	(r187891)
+++ stable/7/sys/sys/vnode.h	Thu Jan 29 11:38:28 2009	(r187892)
@@ -625,8 +625,6 @@ int	vn_stat(struct vnode *vp, struct sta
 int	vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
 int	vn_start_secondary_write(struct vnode *vp, struct mount **mpp,
 	    int flags);
-int	vn_write_suspend_wait(struct vnode *vp, struct mount *mp,
-	    int flags);
 int	vn_writechk(struct vnode *vp);
 int	vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace,
 	    const char *attrname, int *buflen, char *buf, struct thread *td);

From owner-svn-src-stable@FreeBSD.ORG  Thu Jan 29 18:33:47 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0C49210656FC;
	Thu, 29 Jan 2009 18:33:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5759C8FC2B;
	Thu, 29 Jan 2009 18:33:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TIXk0d060768;
	Thu, 29 Jan 2009 18:33:46 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TIXkIb060767;
	Thu, 29 Jan 2009 18:33:46 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200901291833.n0TIXkIb060767@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 29 Jan 2009 18:33:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187896 - stable/7/tools/sched
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 29 Jan 2009 18:33:47 -0000

Author: jhb
Date: Thu Jan 29 18:33:46 2009
New Revision: 187896
URL: http://svn.freebsd.org/changeset/base/187896

Log:
  Merge all the changes in HEAD prior to the generic tracing changes.

Modified:
  stable/7/tools/sched/   (props changed)
  stable/7/tools/sched/schedgraph.py

Modified: stable/7/tools/sched/schedgraph.py
==============================================================================
--- stable/7/tools/sched/schedgraph.py	Thu Jan 29 16:51:09 2009	(r187895)
+++ stable/7/tools/sched/schedgraph.py	Thu Jan 29 18:33:46 2009	(r187896)
@@ -31,10 +31,18 @@ import re
 from Tkinter import *
 
 # To use:
-# - Install the ports/x11-toolkits/py-tkinter package.
-# - Add KTR_SCHED to KTR_COMPILE and KTR_MASK in your KERNCONF
-# - It is encouraged to increase KTR_ENTRIES size to 32768 to gather
-#    enough information for analysis.
+# - Install the ports/x11-toolkits/py-tkinter package; e.g.
+#	portinstall x11-toolkits/py-tkinter package
+# - Add KTR_SCHED to KTR_COMPILE and KTR_MASK in your KERNCONF; e.g.
+#	options 	KTR
+#	options 	KTR_ENTRIES=32768
+#	options 	KTR_COMPILE=(KTR_SCHED)
+#	options 	KTR_MASK=(KTR_SCHED)
+# - It is encouraged to increase KTR_ENTRIES size to gather enough
+#    information for analysis; e.g.
+#	options 	KTR_ENTRIES=262144
+#   as 32768 entries may only correspond to a second or two of profiling
+#   data depending on your workload.
 # - Rebuild kernel with proper changes to KERNCONF and boot new kernel.
 # - Run your workload to be profiled.
 # - While the workload is continuing (i.e. before it finishes), disable
@@ -52,6 +60,11 @@ from Tkinter import *
 # 2)  Add bounding box style zoom.
 # 3)  Click to center.
 # 4)  Implement some sorting mechanism.
+# 5)  Widget to display variable-range data (e.g. q length)
+# 6)  Reorder rows, hide rows, etc.
+# 7)  "Vertical rule" to help relate data in different rows
+# 8)  Mouse-over popup of full thread/event/row lable (currently truncated)
+# 9)  More visible anchors for popup event windows
 #
 # BUGS: 1) Only 8 CPUs are supported, more CPUs require more choices of
 #          colours to represent them ;-)
@@ -62,6 +75,7 @@ from Tkinter import *
 ticksps = None
 status = None
 configtypes = []
+lineno = -1
 
 def ticks2sec(ticks):
 	us = ticksps / 1000000
@@ -334,6 +348,7 @@ class Event:
 		self.item = None
 		self.dispcnt = 0
 		self.linked = None
+		self.recno = lineno
 		if (last):
 			source.lastevent(self)
 		else:
@@ -355,9 +370,11 @@ class Event:
 
 	def labels(self):
 		return [("Source:", self.source.name, 0),
-				("Event:", self.name, 0),
-				("CPU:", self.cpu, 0),
-				("Timestamp:", self.timestamp, 0)] + self.entries
+			("Event:", self.name, 0),
+			("CPU:", self.cpu, 0),
+			("Timestamp:", self.timestamp, 0),
+			("Record: ", self.recno, 0)
+		] + self.entries
 	def mouseenter(self, canvas, item):
 		self.displayref(canvas)
 		self.status()
@@ -452,11 +469,12 @@ class StateEvent(Event):
 
 	def labels(self):
 		return [("Source:", self.source.name, 0),
-				("Event:", self.name, 0),
-				("Timestamp:", self.timestamp, 0),
-				("CPU:", self.cpu, 0),
-				("Duration:", ticks2sec(self.duration), 0)] \
-				 + self.entries
+			("Event:", self.name, 0),
+			("Timestamp:", self.timestamp, 0),
+			("CPU:", self.cpu, 0),
+			("Record:", self.recno, 0),
+			("Duration:", ticks2sec(self.duration), 0)
+		] + self.entries
 
 class Count(Event):
 	name = "Count"
@@ -515,7 +533,7 @@ class Yielding(StateEvent):
 	enabled = 1
 	def __init__(self, thread, cpu, timestamp, prio):
 		StateEvent.__init__(self, thread, cpu, timestamp)
-		self.skipnext = 1
+		self.skipnext = 0
 		self.prio = prio
 		self.textadd(("prio:", self.prio, 0))
 
@@ -630,6 +648,18 @@ class Runq(StateEvent):
 
 configtypes.append(Runq)
 
+class Sched_exit_thread(StateEvent):
+	name = "exit_thread"
+	color = "grey"
+	enabled = 0
+	def __init__(self, thread, cpu, timestamp, prio):
+		StateEvent.__init__(self, thread, cpu, timestamp)
+		self.name = "sched_exit_thread"
+		self.prio = prio
+		self.textadd(("prio:", self.prio, 0))
+
+configtypes.append(Sched_exit_thread)
+
 class Sched_exit(StateEvent):
 	name = "exit"
 	color = "grey"
@@ -642,6 +672,86 @@ class Sched_exit(StateEvent):
 
 configtypes.append(Sched_exit)
 
+# Events for running callout routines
+
+class CalloutIdle(StateEvent):
+	name = "callwheel idle"
+	color = "grey"
+	enabled = 0
+	def __init__(self, wheel, cpu, timestamp):
+		StateEvent.__init__(self, wheel, cpu, timestamp)
+
+configtypes.append(CalloutIdle)
+
+class CalloutRunning(StateEvent):
+	name = "callout running"
+	color = "green"
+	enabled = 1
+	def __init__(self, wheel, cpu, timestamp, func, arg):
+		StateEvent.__init__(self, wheel, cpu, timestamp)
+		self.textadd(("function:", func, 0))
+		self.textadd(("argument:", arg, 0))
+		self.arg = arg
+		self.func = func
+
+	def stattxt(self):
+		statstr = StateEvent.stattxt(self)
+		statstr += " executing %s(%s)" % (self.func, self.arg)
+		return (statstr)
+
+configtypes.append(CalloutRunning)
+
+# Events on locks
+#
+# XXX: No support for upgrade/downgrade currently or differentiating
+# between read/write in general.
+#
+# XXX: Point events for recursion perhaps?
+
+class LockAcquire(StateEvent):
+	name = "lock acquire"
+	color = "blue"
+	enabled = 1
+	def __init__(self, lock, cpu, timestamp, file, line):
+		StateEvent.__init__(self, lock, cpu, timestamp)
+		self.textadd(("file:", file, 0))
+		self.textadd(("line:", line, 0))
+
+configtypes.append(LockAcquire)
+
+class LockContest(StateEvent):
+	name = "lock contest"
+	color = "purple"
+	enabled = 1
+	def __init__(self, lock, cpu, timestamp, file, line):
+		StateEvent.__init__(self, lock, cpu, timestamp)
+		self.textadd(("file:", file, 0))
+		self.textadd(("line:", line, 0))
+
+configtypes.append(LockContest)
+
+class LockFailedTry(PointEvent):
+	name = "failed lock try"
+	color = "red"
+	enabled = 1
+	def __init__(self, lock, cpu, timestamp, file, line):
+		PointEvent.__init__(self, lock, cpu, timestamp)
+		self.textadd(("file:", file, 0))
+		self.textadd(("line:", line, 0))
+
+configtypes.append(LockFailedTry)
+
+class LockRelease(StateEvent):
+	name = "lock release"
+	color = "grey"
+	enabled = 0
+	def __init__(self, lock, cpu, timestamp, file, line):
+		StateEvent.__init__(self, lock, cpu, timestamp)
+		self.textadd(("file:", file, 0))
+		self.textadd(("line:", line, 0))
+
+configtypes.append(LockRelease)
+
 class Padevent(StateEvent):
 	def __init__(self, thread, cpu, timestamp, last=0):
 		StateEvent.__init__(self, thread, cpu, timestamp, last)
@@ -709,24 +819,36 @@ class Wokeup(PointEvent):
 
 configtypes.append(Wokeup)
 
+(DEFAULT, LOAD, COUNT, CALLWHEEL, LOCK, THREAD) = range(6)
+
 class EventSource:
-	def __init__(self, name):
+	def __init__(self, name, group=DEFAULT, order=0):
 		self.name = name
 		self.events = []
 		self.cpu = 0
 		self.cpux = 0
+		self.group = group
+		self.order = order
 
+	def __cmp__(self, other):
+		if (self.group == other.group):
+			return cmp(self.order, other.order)
+		return cmp(self.group, other.group)
+
+	# It is much faster to append items to a list then to insert them
+	# at the beginning.  As a result, we add events in reverse order
+	# and then swap the list during fixup.
 	def fixup(self):
-		pass
+		self.events.reverse()
 
 	def event(self, event):
-		self.events.insert(0, event)
+		self.events.append(event)
 
 	def remove(self, event):
 		self.events.remove(event)
 
 	def lastevent(self, event):
-		self.events.append(event)
+		self.events.insert(0, event)
 
 	def draw(self, canvas, ypos):
 		xpos = 10
@@ -789,7 +911,7 @@ class EventSource:
 class Thread(EventSource):
 	names = {}
 	def __init__(self, td, pcomm):
-		EventSource.__init__(self, pcomm)
+		EventSource.__init__(self, pcomm, THREAD)
 		self.str = td
 		try:
 			cnt = Thread.names[pcomm]
@@ -799,6 +921,7 @@ class Thread(EventSource):
 		Thread.names[pcomm] = cnt + 1
 
 	def fixup(self):
+		EventSource.fixup(self)
 		cnt = Thread.names[self.name]
 		if (cnt == 0):
 			return
@@ -809,10 +932,33 @@ class Thread(EventSource):
 	def ysize(self):
 		return (10)
 
+class Callwheel(EventSource):
+	count = 0
+	def __init__(self, cpu):
+		EventSource.__init__(self, "Callwheel", CALLWHEEL, cpu)
+		self.wheel = cpu
+		Callwheel.count += 1
+
+	def fixup(self):
+		EventSource.fixup(self)
+		if (Callwheel.count == 1):
+			return
+		self.name += " (CPU %d)" % (self.wheel)
+
+	def ysize(self):
+		return (10)
+
+class Lock(EventSource):
+	def __init__(self, lock):
+		EventSource.__init__(self, lock, LOCK)
+
+	def ysize(self):
+		return (10)
+
 class Counter(EventSource):
 	max = 0
 	def __init__(self, name):
-		EventSource.__init__(self, name)
+		EventSource.__init__(self, name, COUNT)
 
 	def event(self, event):
 		EventSource.event(self, event)
@@ -824,23 +970,29 @@ class Counter(EventSource):
 		if (count > Counter.max):
 			Counter.max = count
 
+	def ymax(self):
+		return (Counter.max)
+
 	def ysize(self):
 		return (80)
 
 	def yscale(self):
 		return (self.ysize() / Counter.max)
 
+class CPULoad(Counter):
+	def __init__(self, cpu):
+		Counter.__init__(self, "cpu" + str(cpu) + " load")
+		self.group = LOAD
+		self.order = cpu
 
 class KTRFile:
 	def __init__(self, file):
-		self.timestamp_first = {}
-		self.timestamp_last = {}
-		self.timestamp_adjust = {}
 		self.timestamp_f = None
 		self.timestamp_l = None
-		self.lineno = -1
 		self.threads = []
 		self.sources = []
+		self.locks = {}
+		self.callwheels = {}
 		self.ticks = {}
 		self.load = {}
 		self.crit = {}
@@ -862,10 +1014,12 @@ class KTRFile:
 			print "Can't open", file
 			sys.exit(1)
 
-		ktrhdr = "\s+\d+\s+(\d+)\s+(\d+)\s+"
+		ktrhdr = "\s*\d+\s+(\d+)\s+(\d+)\s+"
 		tdname = "(\S+)\(([^)]*)\)"
 		crittdname = "(\S+)\s+\(\d+,\s+([^)]*)\)"
 
+# XXX doesn't handle:
+#   371   0      61628682318 mi_switch: 0xc075c070(swapper) prio 180 inhibit 2 wmesg ATA request done lock (null)
 		ktrstr = "mi_switch: " + tdname
 		ktrstr += " prio (\d+) inhibit (\d+) wmesg (\S+) lock (\S+)"
 		switchout_re = re.compile(ktrhdr + ktrstr)
@@ -890,6 +1044,9 @@ class KTRFile:
 		sched_rem_re = re.compile(ktrhdr + ktrstr)
 
 		ktrstr = "sched_exit_thread: " + tdname + " prio (\d+)"
+		sched_exit_thread_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "sched_exit: " + tdname + " prio (\d+)"
 		sched_exit_re = re.compile(ktrhdr + ktrstr)
 
 		ktrstr = "statclock: " + tdname + " prio (\d+)"
@@ -901,12 +1058,54 @@ class KTRFile:
 		sched_prio_re = re.compile(ktrhdr + ktrstr)
 
 		cpuload_re = re.compile(ktrhdr + "load: (\d+)")
+		cpuload2_re = re.compile(ktrhdr + "cpu (\d+) load: (\d+)")
 		loadglobal_re = re.compile(ktrhdr + "global load: (\d+)")
 
 		ktrstr = "critical_\S+ by thread " + crittdname + " to (\d+)"
 		critsec_re = re.compile(ktrhdr + ktrstr)
 
+		ktrstr = "callout 0x[a-f\d]+ "
+		ktrstr += "func (0x[a-f\d]+) arg (0x[a-f\d]+)"
+		callout_start_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "callout mpsafe 0x[a-f\d]+ "
+		ktrstr += "func (0x[a-f\d]+) arg (0x[a-f\d]+)"
+		callout_mpsafe_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "callout mtx 0x[a-f\d]+ "
+		ktrstr += "func (0x[a-f\d]+) arg (0x[a-f\d]+)"
+		callout_mtx_re = re.compile(ktrhdr + ktrstr)
+		
+		ktrstr = "callout 0x[a-f\d]+ finished"
+		callout_stop_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "TRY_([RSWX]?LOCK) \(.*\) (.*) r = ([0-9]+)"
+		ktrstr += " at (?:\.\./)*(.*):([0-9]+)"
+		lock_try_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "([RSWX]?UNLOCK) \(.*\) (.*) r = ([0-9]+)"
+		ktrstr += " at (?:\.\./)*(.*):([0-9]+)"
+		lock_release_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "([RSWX]?LOCK) \(.*\) (.*) r = ([0-9]+)"
+		ktrstr += " at (?:\.\./)*(.*):([0-9]+)"
+		lock_acquire_re = re.compile(ktrhdr + ktrstr)
+
+		ktrstr = "_mtx_lock_sleep: (.*) contested \(lock=0x?[0-9a-f]*\)"
+		ktrstr += " at (?:\.\./)*(.*):([0-9]+)"
+		mtx_contested_re = re.compile(ktrhdr + ktrstr)
+
+		# XXX: Spin lock traces don't have lock name or file/line
+
+		ktrstr = "_rw_wlock_hard: (.*) contested \(lock=0x?[0-9a-f]*\)"
+		ktrstr += " at (?:\.\./)*(.*):([0-9]+)"
+		rw_contested_re = re.compile(ktrhdr + ktrstr)
+
+		# XXX: Read lock traces for rwlocks contesting don't have
+		# lock name or file/line		
+		
 		parsers = [[cpuload_re, self.cpuload],
+			   [cpuload2_re, self.cpuload2],
 			   [loadglobal_re, self.loadglobal],
 			   [switchin_re, self.switchin],
 			   [switchout_re, self.switchout],
@@ -915,93 +1114,42 @@ class KTRFile:
 			   [sched_prio_re, self.sched_prio],
 			   [preempted_re, self.preempted],
 			   [sched_rem_re, self.sched_rem],
+			   [sched_exit_thread_re, self.sched_exit_thread],
 			   [sched_exit_re, self.sched_exit],
 			   [sched_clock_re, self.sched_clock],
 			   [critsec_re, self.critsec],
+			   [callout_start_re, self.callout_start],
+			   [callout_mpsafe_re, self.callout_start],
+			   [callout_mtx_re, self.callout_start],
+			   [callout_stop_re, self.callout_stop],
+			   [lock_try_re, self.lock_try],
+			   [lock_release_re, self.lock_release],
+			   [lock_acquire_re, self.lock_acquire],
+			   [mtx_contested_re, self.lock_contest],
+			   [rw_contested_re, self.lock_contest],
 			   [idled_re, self.idled]]
 
-		lines = ifp.readlines()
-		self.synchstamp(lines)
-		for line in lines:
-			self.lineno += 1
-			if ((self.lineno % 1024) == 0):
-				status.startup("Parsing line " +
-				    str(self.lineno))
+		global lineno
+		lineno = 0
+		for line in ifp.readlines():
+			lineno += 1
+			if ((lineno % 1024) == 0):
+				status.startup("Parsing line " + str(lineno))
 			for p in parsers:
 				m = p[0].match(line)
 				if (m != None):
 					p[1](*m.groups())
 					break
-			# if (m == None):
-			# 	print line,
-
-	def synchstamp(self, lines):
-		status.startup("Rationalizing Timestamps")
-		tstamp_re = re.compile("\s+\d+\s+(\d+)\s+(\d+)\s+.*")
-		for line in lines:
-			m = tstamp_re.match(line)
-			if (m != None):
-				self.addstamp(*m.groups())
-		self.pickstamp()
-		self.monostamp(lines)
-
-
-	def monostamp(self, lines):
-		laststamp = None
-		tstamp_re = re.compile("\s+\d+\s+(\d+)\s+(\d+)\s+.*")
-		for line in lines:
-			m = tstamp_re.match(line)
 			if (m == None):
-				continue
-			(cpu, timestamp) = m.groups()
-			timestamp = int(timestamp)
-			cpu = int(cpu)
-			timestamp -= self.timestamp_adjust[cpu]
-			if (laststamp != None and timestamp > laststamp):
-				self.timestamp_adjust[cpu] += timestamp - laststamp
-			laststamp = timestamp
-
-	def addstamp(self, cpu, timestamp):
-		timestamp = int(timestamp)
-		cpu = int(cpu)
-		try:
-			if (timestamp > self.timestamp_first[cpu]):
-				return
-		except:
-			self.timestamp_first[cpu] = timestamp
-		self.timestamp_last[cpu] = timestamp
-
-	def pickstamp(self):
-		base = self.timestamp_last[0]
-		for i in range(0, len(self.timestamp_last)):
-			if (self.timestamp_last[i] < base):
-				base = self.timestamp_last[i]
-
-		print "Adjusting to base stamp", base
-		for i in range(0, len(self.timestamp_last)):
-			self.timestamp_adjust[i] = self.timestamp_last[i] - base;
-			print "CPU ", i, "adjust by ", self.timestamp_adjust[i]
-
-		self.timestamp_f = 0
-		for i in range(0, len(self.timestamp_first)):
-			first = self.timestamp_first[i] - self.timestamp_adjust[i]
-			if (first > self.timestamp_f):
-				self.timestamp_f = first
-
-		self.timestamp_l = 0
-		for i in range(0, len(self.timestamp_last)):
-			last = self.timestamp_last[i] - self.timestamp_adjust[i]
-			if (last > self.timestamp_l):
-				self.timestamp_l = last
-
+				print line,
 
 	def checkstamp(self, cpu, timestamp):
-		cpu = int(cpu)
 		timestamp = int(timestamp)
-		if (timestamp > self.timestamp_first[cpu]):
-			print "Bad timestamp on line ", self.lineno
+		if (self.timestamp_f == None):
+			self.timestamp_f = timestamp;
+		if (self.timestamp_l != None and timestamp > self.timestamp_l):
 			return (0)
-		timestamp -= self.timestamp_adjust[cpu]
+		self.timestamp_l = timestamp;
 		return (timestamp)
 
 	def timespan(self):
@@ -1077,6 +1225,13 @@ class KTRFile:
 		KsegrpRunq(thread, cpu, timestamp, prio,
 		    self.findtd(bytd, bypcomm))
 
+	def sched_exit_thread(self, cpu, timestamp, td, pcomm, prio):
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		thread = self.findtd(td, pcomm)
+		Sched_exit_thread(thread, cpu, timestamp, prio)
+
 	def sched_exit(self, cpu, timestamp, td, pcomm, prio):
 		timestamp = self.checkstamp(cpu, timestamp)
 		if (timestamp == 0):
@@ -1117,9 +1272,22 @@ class KTRFile:
 		try:
 			load = self.load[cpu]
 		except:
-			load = Counter("cpu" + str(cpu) + " load")
+			load = CPULoad(cpu)
+			self.load[cpu] = load
+			self.sources.append(load)
+		Count(load, cpu, timestamp, count)
+
+	def cpuload2(self, cpu, timestamp, ncpu, count):
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		cpu = int(ncpu)
+		try:
+			load = self.load[cpu]
+		except:
+			load = CPULoad(cpu)
 			self.load[cpu] = load
-			self.sources.insert(0, load)
+			self.sources.append(load)
 		Count(load, cpu, timestamp, count)
 
 	def loadglobal(self, cpu, timestamp, count):
@@ -1132,7 +1300,7 @@ class KTRFile:
 		except:
 			load = Counter("CPU load")
 			self.load[cpu] = load
-			self.sources.insert(0, load)
+			self.sources.append(load)
 		Count(load, cpu, timestamp, count)
 
 	def critsec(self, cpu, timestamp, td, pcomm, to):
@@ -1145,9 +1313,77 @@ class KTRFile:
 		except:
 			crit = Counter("Critical Section")
 			self.crit[cpu] = crit
-			self.sources.insert(0, crit)
+			self.sources.append(crit)
 		Count(crit, cpu, timestamp, to)
 
+	def callout_start(self, cpu, timestamp, func, arg):
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		wheel = self.findwheel(cpu)
+		CalloutRunning(wheel, cpu, timestamp, func, arg)
+
+	def callout_stop(self, cpu, timestamp):
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		wheel = self.findwheel(cpu)
+		CalloutIdle(wheel, cpu, timestamp)
+
+	def lock_try(self, cpu, timestamp, op, name, result, file, line):
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		lock = self.findlock(name)
+		if (int(result) == 0):
+			LockFailedTry(lock, cpu, timestamp, file, line)
+		else:
+			LockAcquire(lock, cpu, timestamp, file, line)
+
+	def lock_acquire(self, cpu, timestamp, op, name, recurse, file, line):
+		if (int(recurse) != 0):
+			return
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		lock = self.findlock(name)
+		LockAcquire(lock, cpu, timestamp, file, line)
+		
+	def lock_release(self, cpu, timestamp, op, name, recurse, file, line):
+		if (int(recurse) != 0):
+			return
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		lock = self.findlock(name)
+		LockRelease(lock, cpu, timestamp, file, line)
+
+	def lock_contest(self, cpu, timestamp, name, file, line):
+		timestamp = self.checkstamp(cpu, timestamp)
+		if (timestamp == 0):
+			return
+		lock = self.findlock(name)
+		LockContest(lock, cpu, timestamp, file, line)
+
+	def findlock(self, name):
+		try:
+			lock = self.locks[name]
+		except:
+			lock = Lock(name)
+			self.locks[name] = lock
+			self.sources.append(lock)
+		return (lock)
+
+	def findwheel(self, cpu):
+		cpu = int(cpu)
+		try:
+			wheel = self.callwheels[cpu]
+		except:
+			wheel = Callwheel(cpu)
+			self.callwheels[cpu] = wheel
+			self.sources.append(wheel)
+		return (wheel)
+
 	def findtd(self, td, pcomm):
 		for thread in self.threads:
 			if (thread.str == td and thread.name == pcomm):
@@ -1162,12 +1398,14 @@ class KTRFile:
 			Padevent(source, -1, self.timestamp_l)
 			Padevent(source, -1, self.timestamp_f, last=1)
 			source.fixup()
+		self.sources.sort()
 
 class SchedDisplay(Canvas):
 	def __init__(self, master):
 		self.ratio = 1
 		self.ktrfile = None
 		self.sources = None
+		self.parent = master
 		self.bdheight = 10 
 		self.events = {}
 
@@ -1178,6 +1416,11 @@ class SchedDisplay(Canvas):
 		self.ktrfile = ktrfile
 		self.sources = ktrfile.sources
 
+		# Compute a ratio to ensure that the file's timespan fits into
+		# 2^31.  Although python may handle larger values for X
+		# values, the Tk internals do not.
+		self.ratio = (ktrfile.timespan() - 1) / 2**31 + 1
+
 	def draw(self):
 		ypos = 0
 		xsize = self.xsize()
@@ -1199,6 +1442,8 @@ class SchedDisplay(Canvas):
 		self.tag_bind("event", "", self.mouseenter)
 		self.tag_bind("event", "", self.mouseexit)
 		self.tag_bind("event", "", self.mousepress)
+		self.bind("", self.wheelup)
+		self.bind("", self.wheeldown)
 
 	def mouseenter(self, event):
 		item, = self.find_withtag(CURRENT)
@@ -1215,6 +1460,12 @@ class SchedDisplay(Canvas):
 		event = self.events[item]
 		event.mousepress(self, item)
 
+	def wheeldown(self, event):
+		self.parent.display_yview("scroll", 1, "units")
+
+	def wheelup(self, event):
+		self.parent.display_yview("scroll", -1, "units")
+
 	def drawnames(self, canvas):
 		status.startup("Drawing names")
 		ypos = 0
@@ -1296,7 +1547,7 @@ class SchedGraph(Frame):
 		self.menu = GraphMenu(self)
 		self.display = SchedDisplay(self)
 		self.names = Canvas(self,
-		    width=100, height=self.display["height"],
+		    width=120, height=self.display["height"],
 		    bg='grey', scrollregion=(0, 0, 50, 100))
 		self.scale = Scaler(self, self.display)
 		status = self.status = Status(self)

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 05:41:41 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E293D10656C0;
	Fri, 30 Jan 2009 05:41:41 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id BF90E8FC20;
	Fri, 30 Jan 2009 05:41:41 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n0U5ffWG092371;
	Thu, 29 Jan 2009 21:41:41 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n0U5ffmA092370;
	Thu, 29 Jan 2009 21:41:41 -0800 (PST) (envelope-from obrien)
Date: Thu, 29 Jan 2009 21:41:41 -0800
From: "David O'Brien" 
To: Maxim Sobolev 
Message-ID: <20090130054141.GA92346@dragon.NUXI.org>
References: <200901191538.n0JFcQla014202@svn.freebsd.org>
	<20090119165430.GA18775@dragon.NUXI.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20090119165430.GA18775@dragon.NUXI.org>
X-Operating-System: FreeBSD 8.0-CURRENT
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org
Subject: Re: svn commit: r187435 - stable/6/sys/amd64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 05:41:42 -0000

On Mon, Jan 19, 2009 at 08:54:30AM -0800, David O'Brien (@FreeBSD) wrote:
> On Mon, Jan 19, 2009 at 03:38:26PM +0000, Maxim Sobolev wrote:
> > Author: sobomax
> > Date: Mon Jan 19 15:38:26 2009
> > New Revision: 187435
> > URL: http://svn.freebsd.org/changeset/base/187435
> > 
> > Log:
> >   MFC: take NTFS out to match i386 GENERIC.
> > 
> > Modified:
> >   stable/6/sys/amd64/conf/GENERIC
> ..
> > Modified: stable/6/sys/amd64/conf/GENERIC
> > -options 	NTFS			# NT File System
> 
> Seriously - this is the type of change that could easily piss off our
> users.  Please back it out.  At this point for 6.x this is really a
> POLA issue.

I guess requests to treat RELENG_6 with the stability of change users
expect is going to be ignored?
  
-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 11:11:01 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1F3E5106566B;
	Fri, 30 Jan 2009 11:11:01 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from sippysoft.com (gk1.360sip.com [72.236.70.240])
	by mx1.freebsd.org (Postfix) with ESMTP id BD9778FC08;
	Fri, 30 Jan 2009 11:11:00 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net
	[70.71.171.106]) (authenticated bits=0)
	by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0UBAwV6006757
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 30 Jan 2009 03:10:59 -0800 (PST)
	(envelope-from sobomax@FreeBSD.org)
Message-ID: <4982E025.1080500@FreeBSD.org>
Date: Fri, 30 Jan 2009 03:10:29 -0800
From: Maxim Sobolev 
Organization: Sippy Software, Inc.
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: obrien@FreeBSD.org
References: <200901191538.n0JFcQla014202@svn.freebsd.org>
	<20090119165430.GA18775@dragon.NUXI.org>
	<20090130054141.GA92346@dragon.NUXI.org>
In-Reply-To: <20090130054141.GA92346@dragon.NUXI.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org
Subject: Re: svn commit: r187435 - stable/6/sys/amd64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 11:11:01 -0000

David O'Brien wrote:
> On Mon, Jan 19, 2009 at 08:54:30AM -0800, David O'Brien (@FreeBSD) wrote:
>> On Mon, Jan 19, 2009 at 03:38:26PM +0000, Maxim Sobolev wrote:
>>> Author: sobomax
>>> Date: Mon Jan 19 15:38:26 2009
>>> New Revision: 187435
>>> URL: http://svn.freebsd.org/changeset/base/187435
>>>
>>> Log:
>>>   MFC: take NTFS out to match i386 GENERIC.
>>>
>>> Modified:
>>>   stable/6/sys/amd64/conf/GENERIC
>> ..
>>> Modified: stable/6/sys/amd64/conf/GENERIC
>>> -options 	NTFS			# NT File System
>> Seriously - this is the type of change that could easily piss off our
>> users.  Please back it out.  At this point for 6.x this is really a
>> POLA issue.
> 
> I guess requests to treat RELENG_6 with the stability of change users
> expect is going to be ignored?

I guess you should learn how to use search features in your MTA:

Maxim Sobolev wrote:
 > Author: sobomax
 > Date: Mon Jan 19 17:17:32 2009
 > New Revision: 187441
 > URL: http://svn.freebsd.org/changeset/base/187441
 >
 > Log:
 >   Put NTFS back, it's probably not worth to touch 6-STABLE now when 
it's in
 >   the maintenance mode and AFAIK no more releases are planned from this
 >   branch.
 >
 > Modified:
 >   stable/6/sys/amd64/conf/GENERIC
 >
 > Modified: stable/6/sys/amd64/conf/GENERIC
 > 
==============================================================================
 > --- stable/6/sys/amd64/conf/GENERIC	Mon Jan 19 17:14:03 2009	(r187440)
 > +++ stable/6/sys/amd64/conf/GENERIC	Mon Jan 19 17:17:32 2009	(r187441)
 > @@ -40,6 +40,7 @@ options 	NFSCLIENT		# Network Filesystem
 >  options 	NFSSERVER		# Network Filesystem Server
 >  options 	NFSLOCKD		# Network Lock Manager
 >  options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
 > +options 	NTFS			# NT File System
 >  options 	MSDOSFS			# MSDOS Filesystem
 >  options 	CD9660			# ISO 9660 Filesystem
 >  options 	PROCFS			# Process filesystem (requires PSEUDOFS)
 >


-Maxim

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 11:12:38 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 38B74106566C;
	Fri, 30 Jan 2009 11:12:38 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from sippysoft.com (gk1.360sip.com [72.236.70.240])
	by mx1.freebsd.org (Postfix) with ESMTP id D63488FC14;
	Fri, 30 Jan 2009 11:12:37 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net
	[70.71.171.106]) (authenticated bits=0)
	by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0UBCaXO006882
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 30 Jan 2009 03:12:36 -0800 (PST)
	(envelope-from sobomax@FreeBSD.org)
Message-ID: <4982E086.5090106@FreeBSD.org>
Date: Fri, 30 Jan 2009 03:12:06 -0800
From: Maxim Sobolev 
Organization: Sippy Software, Inc.
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: Maxim Sobolev 
References: <200901191538.n0JFcQla014202@svn.freebsd.org>
	<20090119165430.GA18775@dragon.NUXI.org>
	<20090130054141.GA92346@dragon.NUXI.org>
	<4982E025.1080500@FreeBSD.org>
In-Reply-To: <4982E025.1080500@FreeBSD.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org,
	obrien@FreeBSD.org
Subject: Re: svn commit: r187435 - stable/6/sys/amd64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 11:12:38 -0000

Maxim Sobolev wrote:
> in your MTA:

MUA I mean.

-Maxim

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 16:28:32 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 96910106564A;
	Fri, 30 Jan 2009 16:28:32 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76FD38FC26;
	Fri, 30 Jan 2009 16:28:32 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0UGSW89096946;
	Fri, 30 Jan 2009 16:28:32 GMT
	(envelope-from keramida@svn.freebsd.org)
Received: (from keramida@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0UGSWqb096945;
	Fri, 30 Jan 2009 16:28:32 GMT
	(envelope-from keramida@svn.freebsd.org)
Message-Id: <200901301628.n0UGSWqb096945@svn.freebsd.org>
From: Giorgos Keramidas 
Date: Fri, 30 Jan 2009 16:28:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187923 - stable/7/bin/dd
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 16:28:35 -0000

Author: keramida (doc committer)
Date: Fri Jan 30 16:28:32 2009
New Revision: 187923
URL: http://svn.freebsd.org/changeset/base/187923

Log:
  MFC 187922,187609 from /head
  
    Add an example of using bs=2048 to duplicate data CD-ROMs.
  
    This should be a bit useful for users who look at the manpage and
    then try to copy data CD-ROM disks using dd.  A lot of us know
    that bs=2048 is required, but it still manages to cause a bit of
    grief to those who haven't heard about it.
  
    PR:             bin/130857
    Submitted by:   Tri Brotoharsono < mail at tribrotoharsono.net >

Modified:
  stable/7/bin/dd/   (props changed)
  stable/7/bin/dd/dd.1

Modified: stable/7/bin/dd/dd.1
==============================================================================
--- stable/7/bin/dd/dd.1	Fri Jan 30 16:23:57 2009	(r187922)
+++ stable/7/bin/dd/dd.1	Fri Jan 30 16:28:32 2009	(r187923)
@@ -32,7 +32,7 @@
 .\"     @(#)dd.1	8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd August 15, 2004
+.Dd January 23, 2009
 .Dt DD 1
 .Os
 .Sh NAME
@@ -392,6 +392,11 @@ Remove parity bit from a file:
 Check for (even) parity errors on a file:
 .Pp
 .Dl "dd if=file conv=pareven | cmp -x - file"
+.Pp
+To create an image of a Mode-1 CD-ROM, which is a commonly used format
+for data CD-ROM disks, use a block size of 2048 bytes:
+.Pp
+.Dl "dd if=/dev/acd0 of=filename.iso bs=2048"
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 16:32:27 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BEC1A10656C8;
	Fri, 30 Jan 2009 16:32:26 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 97A6D8FC08;
	Fri, 30 Jan 2009 16:32:26 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0UGWQTN097101;
	Fri, 30 Jan 2009 16:32:26 GMT
	(envelope-from keramida@svn.freebsd.org)
Received: (from keramida@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0UGWQHj097100;
	Fri, 30 Jan 2009 16:32:26 GMT
	(envelope-from keramida@svn.freebsd.org)
Message-Id: <200901301632.n0UGWQHj097100@svn.freebsd.org>
From: Giorgos Keramidas 
Date: Fri, 30 Jan 2009 16:32:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187924 - stable/6/bin/dd
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 16:32:55 -0000

Author: keramida (doc committer)
Date: Fri Jan 30 16:32:26 2009
New Revision: 187924
URL: http://svn.freebsd.org/changeset/base/187924

Log:
  MFC 187922,187609 from /head
  
    Add an example of using bs=2048 to duplicate data CD-ROMs.
  
    This should be a bit useful for users who look at the manpage and
    then try to copy data CD-ROM disks using dd.  A lot of us know
    that bs=2048 is required, but it still manages to cause a bit of
    grief to those who haven't heard about it.
  
    PR:             bin/130857
    Submitted by:   Tri Brotoharsono < mail at tribrotoharsono.net >

Modified:
  stable/6/bin/dd/   (props changed)
  stable/6/bin/dd/dd.1

Modified: stable/6/bin/dd/dd.1
==============================================================================
--- stable/6/bin/dd/dd.1	Fri Jan 30 16:28:32 2009	(r187923)
+++ stable/6/bin/dd/dd.1	Fri Jan 30 16:32:26 2009	(r187924)
@@ -32,7 +32,7 @@
 .\"     @(#)dd.1	8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd August 15, 2004
+.Dd January 23, 2009
 .Dt DD 1
 .Os
 .Sh NAME
@@ -392,6 +392,11 @@ Remove parity bit from a file:
 Check for (even) parity errors on a file:
 .Pp
 .Dl "dd if=file conv=pareven | cmp -x - file"
+.Pp
+To create an image of a Mode-1 CD-ROM, which is a commonly used format
+for data CD-ROM disks, use a block size of 2048 bytes:
+.Pp
+.Dl "dd if=/dev/acd0 of=filename.iso bs=2048"
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 17:26:16 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04458106567C;
	Fri, 30 Jan 2009 17:26:16 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E57BA8FC1A;
	Fri, 30 Jan 2009 17:26:15 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0UHQFKM098285;
	Fri, 30 Jan 2009 17:26:15 GMT
	(envelope-from keramida@svn.freebsd.org)
Received: (from keramida@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0UHQFqE098284;
	Fri, 30 Jan 2009 17:26:15 GMT
	(envelope-from keramida@svn.freebsd.org)
Message-Id: <200901301726.n0UHQFqE098284@svn.freebsd.org>
From: Giorgos Keramidas 
Date: Fri, 30 Jan 2009 17:26:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187925 - in stable/7/tools/regression/usr.bin: . tr
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 17:26:16 -0000

Author: keramida (doc committer)
Date: Fri Jan 30 17:26:15 2009
New Revision: 187925
URL: http://svn.freebsd.org/changeset/base/187925

Log:
  MFC 175288 and 180208 from /head
  
  : r175288 | keramida | 2008-01-13 10:33:20 +0200 (Sun, 13 Jan 2008) | 4 lines
  :
  : Add a new set of regression tests, for the tr(1) utility.
  :
  : Approved by:    das, dds
  
  : r180208 | peter | 2008-07-03 06:50:17 +0300 (Thu, 03 Jul 2008) | 3 lines
  :
  : Set magic fbsd:nokeywords property that allows files to bypass
  : keyword expansion. (file-specific replacement for CVSROOT/exclude)

Added:
  stable/7/tools/regression/usr.bin/tr/   (props changed)
     - copied from r175288, head/tools/regression/usr.bin/tr/
Modified:
  stable/7/tools/regression/usr.bin/   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.00.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.01.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.02.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.03.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.04.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.05.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.06.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.07.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.08.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.09.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.0a.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.0b.out   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress.in   (props changed)
  stable/7/tools/regression/usr.bin/tr/regress2.in   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 17:29:26 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C677E106566B;
	Fri, 30 Jan 2009 17:29:26 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B3BC08FC1C;
	Fri, 30 Jan 2009 17:29:26 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0UHTQ1A098444;
	Fri, 30 Jan 2009 17:29:26 GMT
	(envelope-from keramida@svn.freebsd.org)
Received: (from keramida@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0UHTQn2098443;
	Fri, 30 Jan 2009 17:29:26 GMT
	(envelope-from keramida@svn.freebsd.org)
Message-Id: <200901301729.n0UHTQn2098443@svn.freebsd.org>
From: Giorgos Keramidas 
Date: Fri, 30 Jan 2009 17:29:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187926 - in stable/6/tools/regression/usr.bin: . tr
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 17:29:27 -0000

Author: keramida (doc committer)
Date: Fri Jan 30 17:29:26 2009
New Revision: 187926
URL: http://svn.freebsd.org/changeset/base/187926

Log:
  MFC 175288 and 180208 from /head
  
  : r175288 | keramida | 2008-01-13 10:33:20 +0200 (Sun, 13 Jan 2008) | 4 lines
  :
  : Add a new set of regression tests, for the tr(1) utility.
  :
  : Approved by:    das, dds
  
  : r180208 | peter | 2008-07-03 06:50:17 +0300 (Thu, 03 Jul 2008) | 3 lines
  :
  : Set magic fbsd:nokeywords property that allows files to bypass
  : keyword expansion. (file-specific replacement for CVSROOT/exclude)

Added:
  stable/6/tools/regression/usr.bin/tr/   (props changed)
     - copied from r175288, head/tools/regression/usr.bin/tr/
Modified:
  stable/6/tools/regression/usr.bin/   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.00.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.01.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.02.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.03.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.04.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.05.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.06.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.07.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.08.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.09.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.0a.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.0b.out   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress.in   (props changed)
  stable/6/tools/regression/usr.bin/tr/regress2.in   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Fri Jan 30 18:01:23 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87512106566B;
	Fri, 30 Jan 2009 18:01:23 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 646A48FC1D;
	Fri, 30 Jan 2009 18:01:23 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n0UI1M6l010269;
	Fri, 30 Jan 2009 10:01:23 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n0UI1MGh010268;
	Fri, 30 Jan 2009 10:01:22 -0800 (PST) (envelope-from obrien)
Date: Fri, 30 Jan 2009 10:01:22 -0800
From: "David O'Brien" 
To: Maxim Sobolev 
Message-ID: <20090130180122.GC9615@dragon.NUXI.org>
References: <200901191538.n0JFcQla014202@svn.freebsd.org>
	<20090119165430.GA18775@dragon.NUXI.org>
	<20090130054141.GA92346@dragon.NUXI.org>
	<4982E025.1080500@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4982E025.1080500@FreeBSD.org>
X-Operating-System: FreeBSD 8.0-CURRENT
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org
Subject: Re: svn commit: r187435 - stable/6/sys/amd64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 30 Jan 2009 18:01:24 -0000

On Fri, Jan 30, 2009 at 03:10:29AM -0800, Maxim Sobolev wrote:
> David O'Brien wrote:
>> On Mon, Jan 19, 2009 at 08:54:30AM -0800, David O'Brien (@FreeBSD) wrote:
>>> On Mon, Jan 19, 2009 at 03:38:26PM +0000, Maxim Sobolev wrote:
>>>> Author: sobomax
>>>> Date: Mon Jan 19 15:38:26 2009
>>>> New Revision: 187435
>>>> URL: http://svn.freebsd.org/changeset/base/187435
>>>> 
>>>> Log:
>>>>   MFC: take NTFS out to match i386 GENERIC.
>>>> 
>>>> Modified:
>>>>   stable/6/sys/amd64/conf/GENERIC
>>> ..
>>>> Modified: stable/6/sys/amd64/conf/GENERIC
>>>> -options 	NTFS			# NT File System
>>> Seriously - this is the type of change that could easily piss off our
>>> users.  Please back it out.  At this point for 6.x this is really a
>>> POLA issue.
>> I guess requests to treat RELENG_6 with the stability of change users
>> expect is going to be ignored?
> 
> I guess you should learn how to use search features in your MTA:

Actually I checked using 'cvs log' at work and didn't see your
rev 1.439.2.23.  Sorry I missed it.

thanks,

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 05:22:12 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 39D0F1065670;
	Sat, 31 Jan 2009 05:22:12 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2669A8FC14;
	Sat, 31 Jan 2009 05:22:12 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0V5MCOi012914;
	Sat, 31 Jan 2009 05:22:12 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0V5MCcO012913;
	Sat, 31 Jan 2009 05:22:12 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <200901310522.n0V5MCcO012913@svn.freebsd.org>
From: Weongyo Jeong 
Date: Sat, 31 Jan 2009 05:22:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187941 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/if_ndis
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 05:22:13 -0000

Author: weongyo
Date: Sat Jan 31 05:22:11 2009
New Revision: 187941
URL: http://svn.freebsd.org/changeset/base/187941

Log:
  MFC r186919:
    fix a typo to set the 48Mbps data rate.
  
    PR:		kern/130189
    Submitted by:	Paul B. Mahol 
    Reviewed by:	sam
    MFC after:	3 weeks

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/if_ndis/if_ndis.c

Modified: stable/7/sys/dev/if_ndis/if_ndis.c
==============================================================================
--- stable/7/sys/dev/if_ndis/if_ndis.c	Sat Jan 31 05:17:28 2009	(r187940)
+++ stable/7/sys/dev/if_ndis/if_ndis.c	Sat Jan 31 05:22:11 2009	(r187941)
@@ -867,13 +867,13 @@ nonettypes:
 			    IEEE80211_RATE_BASIC|22);
 		}
 		if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) {
-			TESTSETRATE(IEEE80211_MODE_11G, 47);
+			TESTSETRATE(IEEE80211_MODE_11G, 48);
 			TESTSETRATE(IEEE80211_MODE_11G, 72);
 			TESTSETRATE(IEEE80211_MODE_11G, 96);
 			TESTSETRATE(IEEE80211_MODE_11G, 108);
 		}
 		if (isset(ic->ic_modecaps, IEEE80211_MODE_11A)) {
-			TESTSETRATE(IEEE80211_MODE_11A, 47);
+			TESTSETRATE(IEEE80211_MODE_11A, 48);
 			TESTSETRATE(IEEE80211_MODE_11A, 72);
 			TESTSETRATE(IEEE80211_MODE_11A, 96);
 			TESTSETRATE(IEEE80211_MODE_11A, 108);

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 05:25:14 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 793E31065673;
	Sat, 31 Jan 2009 05:25:14 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 66B5E8FC12;
	Sat, 31 Jan 2009 05:25:14 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0V5PEix013031;
	Sat, 31 Jan 2009 05:25:14 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0V5PErg013030;
	Sat, 31 Jan 2009 05:25:14 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <200901310525.n0V5PErg013030@svn.freebsd.org>
From: Weongyo Jeong 
Date: Sat, 31 Jan 2009 05:25:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187942 - in stable/6/sys: . dev/if_ndis
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 05:25:15 -0000

Author: weongyo
Date: Sat Jan 31 05:25:14 2009
New Revision: 187942
URL: http://svn.freebsd.org/changeset/base/187942

Log:
  MFC r186919:
    fix a typo to set the 48Mbps data rate.
  
    PR:		kern/130189
    Submitted by:	Paul B. Mahol 
    Reviewed by:	sam

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/dev/if_ndis/if_ndis.c

Modified: stable/6/sys/dev/if_ndis/if_ndis.c
==============================================================================
--- stable/6/sys/dev/if_ndis/if_ndis.c	Sat Jan 31 05:22:11 2009	(r187941)
+++ stable/6/sys/dev/if_ndis/if_ndis.c	Sat Jan 31 05:25:14 2009	(r187942)
@@ -789,13 +789,13 @@ nonettypes:
 			    IEEE80211_RATE_BASIC|22);
 		}
 		if (ic->ic_modecaps & (1<ic_modecaps & (1<
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C32A110656C9;
	Sat, 31 Jan 2009 12:26:06 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B016F8FC18;
	Sat, 31 Jan 2009 12:26:06 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VCQ6jg024319;
	Sat, 31 Jan 2009 12:26:06 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VCQ6nZ024318;
	Sat, 31 Jan 2009 12:26:06 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200901311226.n0VCQ6nZ024318@svn.freebsd.org>
From: Alexander Motin 
Date: Sat, 31 Jan 2009 12:26:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187950 - in stable/7/sys: . contrib/pf dev/acpica
	dev/ath/ath_hal dev/cxgb
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 12:26:07 -0000

Author: mav
Date: Sat Jan 31 12:26:06 2009
New Revision: 187950
URL: http://svn.freebsd.org/changeset/base/187950

Log:
  MFC rev. 187368
  
    Convert battery capacity/rate from mA to mW only when summary is requested.
    Unconditional conversion causes incorrect rate units reported by acpiconf.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/acpica/acpi_battery.c
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/acpica/acpi_battery.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_battery.c	Sat Jan 31 12:24:53 2009	(r187949)
+++ stable/7/sys/dev/acpica/acpi_battery.c	Sat Jan 31 12:26:06 2009	(r187950)
@@ -197,7 +197,7 @@ acpi_battery_get_battinfo(device_t dev, 
 	 * is 0 (due to some error reading the battery), skip this
 	 * conversion.
 	 */
-	if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0) {
+	if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0 && dev == NULL) {
 	    bst[i].rate = (bst[i].rate * bif->dvol) / 1000;
 	    bst[i].cap = (bst[i].cap * bif->dvol) / 1000;
 	    bif->lfcap = (bif->lfcap * bif->dvol) / 1000;

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 12:29:13 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4870E1065670;
	Sat, 31 Jan 2009 12:29:13 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 352A08FC19;
	Sat, 31 Jan 2009 12:29:13 +0000 (UTC)
	(envelope-from keramida@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VCTDcg024413;
	Sat, 31 Jan 2009 12:29:13 GMT
	(envelope-from keramida@svn.freebsd.org)
Received: (from keramida@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VCTDpk024412;
	Sat, 31 Jan 2009 12:29:13 GMT
	(envelope-from keramida@svn.freebsd.org)
Message-Id: <200901311229.n0VCTDpk024412@svn.freebsd.org>
From: Giorgos Keramidas 
Date: Sat, 31 Jan 2009 12:29:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187951 - stable/6/share/man/man7
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 12:29:14 -0000

Author: keramida (doc committer)
Date: Sat Jan 31 12:29:12 2009
New Revision: 187951
URL: http://svn.freebsd.org/changeset/base/187951

Log:
  MFC 166076 from /head
  
  : bms | 2007-01-18 00:23:28 +0200
  :
  : Document the loader tunables which control hard process memory limits.
  :
  : Reviewed by:    ru
  : PR:             docs/118545

Modified:
  stable/6/share/man/man7/   (props changed)
  stable/6/share/man/man7/ports.7   (props changed)
  stable/6/share/man/man7/tuning.7

Modified: stable/6/share/man/man7/tuning.7
==============================================================================
--- stable/6/share/man/man7/tuning.7	Sat Jan 31 12:26:06 2009	(r187950)
+++ stable/6/share/man/man7/tuning.7	Sat Jan 31 12:29:12 2009	(r187951)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 25, 2002
+.Dd January 17, 2007
 .Dt TUNING 7
 .Os
 .Sh NAME
@@ -743,6 +743,26 @@ option
 .Cd maxusers
 instead.
 .Pp
+The
+.Va kern.dfldsiz
+and
+.Va kern.dflssiz
+tunables set the default soft limits for process data and stack size
+respectively.
+Processes may increase these up to the hard limits by calling
+.Xr setrlimit 2 .
+The
+.Va kern.maxdsiz ,
+.Va kern.maxssiz ,
+and
+.Va kern.maxtsiz
+tunables set the hard limits for process data, stack, and text size
+respectively; processes may not exceed these limits.
+The
+.Va kern.sgrowsiz
+tunable controls how much the stack segment will grow when a process
+needs to allocate more stack.
+.Pp
 .Va kern.ipc.nmbclusters
 may be adjusted to increase the number of network mbufs the system is
 willing to allocate.

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 12:32:18 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BCBCE1065674;
	Sat, 31 Jan 2009 12:32:18 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A8BEF8FC25;
	Sat, 31 Jan 2009 12:32:18 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VCWIgO024542;
	Sat, 31 Jan 2009 12:32:18 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VCWIM6024541;
	Sat, 31 Jan 2009 12:32:18 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200901311232.n0VCWIM6024541@svn.freebsd.org>
From: Alexander Motin 
Date: Sat, 31 Jan 2009 12:32:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187952 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 12:32:20 -0000

Author: mav
Date: Sat Jan 31 12:32:18 2009
New Revision: 187952
URL: http://svn.freebsd.org/changeset/base/187952

Log:
  MFC rev. 187409
  
    Teach m_copyback() to use trailing space of the last mbuf in chain.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/uipc_mbuf.c

Modified: stable/7/sys/kern/uipc_mbuf.c
==============================================================================
--- stable/7/sys/kern/uipc_mbuf.c	Sat Jan 31 12:29:12 2009	(r187951)
+++ stable/7/sys/kern/uipc_mbuf.c	Sat Jan 31 12:32:18 2009	(r187952)
@@ -1267,6 +1267,10 @@ m_copyback(struct mbuf *m0, int off, int
 		m = m->m_next;
 	}
 	while (len > 0) {
+		if (m->m_next == NULL && (len > m->m_len - off)) {
+			m->m_len += min(len - (m->m_len - off),
+			    M_TRAILINGSPACE(m));
+		}
 		mlen = min (m->m_len - off, len);
 		bcopy(cp, off + mtod(m, caddr_t), (u_int)mlen);
 		cp += mlen;

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 12:41:44 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 849D8106564A;
	Sat, 31 Jan 2009 12:41:44 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 705C88FC23;
	Sat, 31 Jan 2009 12:41:44 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VCfiWj024832;
	Sat, 31 Jan 2009 12:41:44 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VCfii8024829;
	Sat, 31 Jan 2009 12:41:44 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200901311241.n0VCfii8024829@svn.freebsd.org>
From: Alexander Motin 
Date: Sat, 31 Jan 2009 12:41:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187953 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb netgraph
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 12:41:45 -0000

Author: mav
Date: Sat Jan 31 12:41:44 2009
New Revision: 187953
URL: http://svn.freebsd.org/changeset/base/187953

Log:
  MFC rev. 187405
  
  Use m_unshare()+m_copyback() instead of m_freem()+m_devget() to keep
  original mbuf chain headers. It can be less efficient in some cases, but it
  looks better then mess of copying headers into the nonempty chain.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/netgraph/ng_deflate.c
  stable/7/sys/netgraph/ng_mppc.c
  stable/7/sys/netgraph/ng_pred1.c

Modified: stable/7/sys/netgraph/ng_deflate.c
==============================================================================
--- stable/7/sys/netgraph/ng_deflate.c	Sat Jan 31 12:32:18 2009	(r187952)
+++ stable/7/sys/netgraph/ng_deflate.c	Sat Jan 31 12:41:44 2009	(r187953)
@@ -459,6 +459,13 @@ ng_deflate_compress(node_p node, struct 
 		return (ENOMEM);
 	}
 
+	/* We must own the mbuf chain exclusively to modify it. */
+	m = m_unshare(m, M_DONTWAIT);
+	if (m == NULL) {
+		priv->stats.Errors++;
+		return (ENOMEM);
+	}
+
 	/* Work with contiguous regions of memory. */
 	m_copydata(m, 0, inlen, (caddr_t)priv->inbuf);
 	outlen = DEFLATE_BUF_SIZE;
@@ -497,19 +504,19 @@ ng_deflate_compress(node_p node, struct 
 		priv->stats.FramesUncomp++;
 		priv->stats.OutOctets+=inlen;
 	} else {
-		NG_FREE_M(m);
-
 		/* Install header. */
 		((u_int16_t *)priv->outbuf)[0] = htons(PROT_COMPD);
 		((u_int16_t *)priv->outbuf)[1] = htons(priv->seqnum);
 
 		/* Return packet in an mbuf. */
-		*resultp = m_devget((caddr_t)priv->outbuf, outlen, 0, NULL,
-		    NULL);
-		if (*resultp == NULL) {
+		m_copyback(m, 0, outlen, (caddr_t)priv->outbuf);
+		if (m->m_pkthdr.len < outlen) {
+			m_freem(m);
 			priv->stats.Errors++;
 			return (ENOMEM);
-		};
+		} else if (outlen < m->m_pkthdr.len)
+			m_adj(m, outlen - m->m_pkthdr.len);
+		*resultp = m;
 		priv->stats.FramesComp++;
 		priv->stats.OutOctets+=outlen;
 	}
@@ -546,6 +553,13 @@ ng_deflate_decompress(node_p node, struc
 		return (ENOMEM);
 	}
 
+	/* We must own the mbuf chain exclusively to modify it. */
+	m = m_unshare(m, M_DONTWAIT);
+	if (m == NULL) {
+		priv->stats.Errors++;
+		return (ENOMEM);
+	}
+
 	/* Work with contiguous regions of memory. */
 	m_copydata(m, 0, inlen, (caddr_t)priv->inbuf);
 
@@ -610,25 +624,24 @@ ng_deflate_decompress(node_p node, struc
 		/* Calculate resulting size. */
 		outlen -= priv->cx.avail_out;
 
-		NG_FREE_M(m);
-
 		/* Decompress protocol. */
 		if ((priv->outbuf[1] & 0x01) != 0) {
 			priv->outbuf[0] = 0;
 			/* Return packet in an mbuf. */
-			*resultp = m_devget((caddr_t)priv->outbuf, outlen, 0,
-			    NULL, NULL);
+			m_copyback(m, 0, outlen, (caddr_t)priv->outbuf);
 		} else {
 			outlen--;
 			/* Return packet in an mbuf. */
-			*resultp = m_devget((caddr_t)(priv->outbuf + 1),
-			    outlen, 0, NULL, NULL);
+			m_copyback(m, 0, outlen, (caddr_t)(priv->outbuf + 1));
 		}
-		if (*resultp == NULL) {
+		if (m->m_pkthdr.len < outlen) {
+			m_freem(m);
 			priv->stats.Errors++;
 			priv->seqnum = 0;
 			return (ENOMEM);
-		};
+		} else if (outlen < m->m_pkthdr.len)
+			m_adj(m, outlen - m->m_pkthdr.len);
+		*resultp = m;
 		priv->stats.FramesPlain++;
 		priv->stats.OutOctets+=outlen;
 

Modified: stable/7/sys/netgraph/ng_mppc.c
==============================================================================
--- stable/7/sys/netgraph/ng_mppc.c	Sat Jan 31 12:32:18 2009	(r187952)
+++ stable/7/sys/netgraph/ng_mppc.c	Sat Jan 31 12:41:44 2009	(r187953)
@@ -470,6 +470,11 @@ ng_mppc_compress(node_p node, struct mbu
 	u_int16_t header;
 	struct mbuf *m = *datap;
 
+	/* We must own the mbuf chain exclusively to modify it. */
+	m = m_unshare(m, M_DONTWAIT);
+	if (m == NULL)
+		return (ENOMEM);
+
 	/* Initialize */
 	header = d->cc;
 
@@ -529,8 +534,12 @@ err1:
 				header |= MPPC_FLAG_RESTART;  
 				
 			/* Replace m by the compresed one. */
-			m_freem(m);
-			m = m_devget((caddr_t)outbuf, outlen, 0, NULL, NULL);
+			m_copyback(m, 0, outlen, (caddr_t)outbuf);
+			if (m->m_pkthdr.len < outlen) {
+				m_freem(m);
+				m = NULL;
+			} else if (outlen < m->m_pkthdr.len)
+				m_adj(m, outlen - m->m_pkthdr.len);
 		}
 		d->flushed = (rtn & MPPC_EXPANDED) != 0
 		    || (flags & MPPC_SAVE_HISTORY) == 0;
@@ -538,7 +547,7 @@ err1:
 		free(inbuf, M_NETGRAPH_MPPC);
 		free(outbuf, M_NETGRAPH_MPPC);
 
-		/* Check m_devget() result. */
+		/* Check mbuf chain reload result. */
 		if (m == NULL) {
 			if (!d->flushed) {
 				MPPC_InitCompressionHistory(d->history);
@@ -557,18 +566,6 @@ err1:
 		/* Set header bits */
 		header |= MPPC_FLAG_ENCRYPTED;
 
-		/* We must own the mbuf chain exclusively to modify it. */
-		m = m_unshare(m, M_DONTWAIT);
-		if (m == NULL) {
-			if (!d->flushed) {
-#ifdef NETGRAPH_MPPC_COMPRESSION
-				MPPC_InitCompressionHistory(d->history);
-#endif
-				d->flushed = 1;
-			}
-			return (ENOMEM);
-		}
-
 		/* Update key if it's time */
 		if ((d->cfg.bits & MPPE_STATELESS) != 0
 		    || (d->cc & MPPE_UPDATE_MASK) == MPPE_UPDATE_FLAG) {
@@ -615,6 +612,11 @@ ng_mppc_decompress(node_p node, struct m
 	u_int numLost;
 	struct mbuf *m = *datap;
 
+	/* We must own the mbuf chain exclusively to modify it. */
+	m = m_unshare(m, M_DONTWAIT);
+	if (m == NULL)
+		return (ENOMEM);
+
 	/* Pull off header */
 	if (m->m_pkthdr.len < MPPC_HDRLEN) {
 		m_freem(m);
@@ -694,11 +696,6 @@ ng_mppc_decompress(node_p node, struct m
 			    d->cfg.startkey, d->key, &d->rc4);
 		}
 
-		/* We must own the mbuf chain exclusively to modify it. */
-		m = m_unshare(m, M_DONTWAIT);
-		if (m == NULL)
-			return (ENOMEM);
-
 		/* Decrypt packet */
 		m1 = m;
 		while (m1 != NULL) {
@@ -786,8 +783,12 @@ failed:
 		free(buf, M_NETGRAPH_MPPC);
 		len = decomplen - destCnt;
 	
-		m_freem(m);
-		m = m_devget((caddr_t)decompbuf, len, 0, NULL, NULL);
+		m_copyback(m, 0, len, (caddr_t)decompbuf);
+		if (m->m_pkthdr.len < len) {
+			m_freem(m);
+			m = NULL;
+		} else if (len < m->m_pkthdr.len)
+			m_adj(m, len - m->m_pkthdr.len);
 		free(decompbuf, M_NETGRAPH_MPPC);
 	}
 #endif

Modified: stable/7/sys/netgraph/ng_pred1.c
==============================================================================
--- stable/7/sys/netgraph/ng_pred1.c	Sat Jan 31 12:32:18 2009	(r187952)
+++ stable/7/sys/netgraph/ng_pred1.c	Sat Jan 31 12:41:44 2009	(r187953)
@@ -400,11 +400,16 @@ ng_pred1_compress(node_p node, struct mb
 		return (ENOMEM);
 	}
 
+	/* We must own the mbuf chain exclusively to modify it. */
+	m = m_unshare(m, M_DONTWAIT);
+	if (m == NULL) {
+		priv->stats.Errors++;
+		return (ENOMEM);
+	}
+
 	/* Work with contiguous regions of memory. */
 	m_copydata(m, 0, inlen, (caddr_t)(priv->inbuf + 2));
 
-	NG_FREE_M(m);
-
 	lenn = htons(inlen & 0x7FFF);
 
 	/* Compute FCS. */
@@ -437,12 +442,14 @@ ng_pred1_compress(node_p node, struct mb
 	outlen += 2;
 
 	/* Return packet in an mbuf. */
-	*resultp = m_devget((caddr_t)out, outlen, 0, NULL, NULL);
-	if (*resultp == NULL) {
-	    priv->stats.Errors++;
-	    return (ENOMEM);
-	};
-
+	m_copyback(m, 0, outlen, (caddr_t)out);
+	if (m->m_pkthdr.len < outlen) {
+		m_freem(m);
+		priv->stats.Errors++;
+		return (ENOMEM);
+	} else if (outlen < m->m_pkthdr.len)
+		m_adj(m, outlen - m->m_pkthdr.len);
+	*resultp = m;
 	priv->stats.OutOctets += outlen;
 
 	return (0);
@@ -471,6 +478,13 @@ ng_pred1_decompress(node_p node, struct 
 		return (ENOMEM);
 	}
 
+	/* We must own the mbuf chain exclusively to modify it. */
+	m = m_unshare(m, M_DONTWAIT);
+	if (m == NULL) {
+		priv->stats.Errors++;
+		return (ENOMEM);
+	}
+
 	/* Work with contiguous regions of memory. */
 	m_copydata(m, 0, inlen, (caddr_t)priv->inbuf);
 
@@ -485,13 +499,12 @@ ng_pred1_decompress(node_p node, struct 
 
 	/* Is data compressed or not really? */
 	if (cf) {
-		NG_FREE_M(m);
-
 		priv->stats.FramesComp++;
 		len1 = Pred1Decompress(node, priv->inbuf + 2, priv->outbuf,
 		    inlen - 4, PRED1_BUF_SIZE);
 		if (len != len1) {
 			/* Error is detected. Send reset request */
+			m_freem(m);
 			priv->stats.Errors++;
 			log(LOG_NOTICE, "ng_pred1: Comp length error (%d) "
 			    "--> len (%d)\n", len, len1);
@@ -510,17 +523,21 @@ ng_pred1_decompress(node_p node, struct 
 		fcs = Crc16(fcs, priv->inbuf + inlen - 2, 2);
 
 		if (fcs != PPP_GOODFCS) {
+			m_freem(m);
 			priv->stats.Errors++;
 	    		log(LOG_NOTICE, "ng_pred1: Pred1: Bad CRC-16\n");
 			return (EIO);
 		}
 
 		/* Return packet in an mbuf. */
-		*resultp = m_devget((caddr_t)priv->outbuf, len, 0, NULL, NULL);
-		if (*resultp == NULL) {
+		m_copyback(m, 0, len, (caddr_t)priv->outbuf);
+		if (m->m_pkthdr.len < len) {
+			m_freem(m);
 			priv->stats.Errors++;
 			return (ENOMEM);
-		};
+		} else if (len < m->m_pkthdr.len)
+			m_adj(m, len - m->m_pkthdr.len);
+		*resultp = m;
 
 	} else {
 		priv->stats.FramesUncomp++;

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 12:44:20 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5BE7C106567A;
	Sat, 31 Jan 2009 12:44:20 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 483D08FC2C;
	Sat, 31 Jan 2009 12:44:20 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VCiKVc024953;
	Sat, 31 Jan 2009 12:44:20 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VCiKO1024952;
	Sat, 31 Jan 2009 12:44:20 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200901311244.n0VCiKO1024952@svn.freebsd.org>
From: Alexander Motin 
Date: Sat, 31 Jan 2009 12:44:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187954 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb netgraph
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 12:44:21 -0000

Author: mav
Date: Sat Jan 31 12:44:20 2009
New Revision: 187954
URL: http://svn.freebsd.org/changeset/base/187954

Log:
  MFC rev. 187410
  
  If source mbuf chain consists of only one mbuf, use it directly as source
  buffer to avoid extra copying.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/netgraph/ng_mppc.c

Modified: stable/7/sys/netgraph/ng_mppc.c
==============================================================================
--- stable/7/sys/netgraph/ng_mppc.c	Sat Jan 31 12:41:44 2009	(r187953)
+++ stable/7/sys/netgraph/ng_mppc.c	Sat Jan 31 12:44:20 2009	(r187954)
@@ -489,22 +489,29 @@ ng_mppc_compress(node_p node, struct mbu
 	if ((d->cfg.bits & MPPC_BIT) != 0) {
 		u_short flags = MPPC_MANDATORY_COMPRESS_FLAGS;
 		u_char *inbuf, *outbuf;
-		int outlen, inlen;
+		int outlen, inlen, ina;
 		u_char *source, *dest;
 		u_long sourceCnt, destCnt;
 		int rtn;
 
 		/* Work with contiguous regions of memory. */
 		inlen = m->m_pkthdr.len;
-		inbuf = malloc(inlen, M_NETGRAPH_MPPC, M_NOWAIT);
-		if (inbuf == NULL)
-			goto err1;
-		m_copydata(m, 0, inlen, (caddr_t)inbuf);
+		if (m->m_next == NULL) {
+			inbuf = mtod(m, u_char *);
+			ina = 0;
+		} else {
+			inbuf = malloc(inlen, M_NETGRAPH_MPPC, M_NOWAIT);
+			if (inbuf == NULL)
+				goto err1;
+			m_copydata(m, 0, inlen, (caddr_t)inbuf);
+			ina = 1;
+		}
 
 		outlen = MPPC_MAX_BLOWUP(inlen);
 		outbuf = malloc(outlen, M_NETGRAPH_MPPC, M_NOWAIT);
 		if (outbuf == NULL) {
-			free(inbuf, M_NETGRAPH_MPPC);
+			if (ina)
+				free(inbuf, M_NETGRAPH_MPPC);
 err1:
 			m_freem(m);
 			MPPC_InitCompressionHistory(d->history);
@@ -544,7 +551,8 @@ err1:
 		d->flushed = (rtn & MPPC_EXPANDED) != 0
 		    || (flags & MPPC_SAVE_HISTORY) == 0;
 
-		free(inbuf, M_NETGRAPH_MPPC);
+		if (ina)
+			free(inbuf, M_NETGRAPH_MPPC);
 		free(outbuf, M_NETGRAPH_MPPC);
 
 		/* Check mbuf chain reload result. */
@@ -731,36 +739,43 @@ failed:
 	/* Decompress packet */
 	if ((header & MPPC_FLAG_COMPRESSED) != 0) {
 		int flags = MPPC_MANDATORY_DECOMPRESS_FLAGS;
-		u_char *decompbuf, *source, *dest;
+		u_char *inbuf, *outbuf;
+		int inlen, outlen, ina;
+		u_char *source, *dest;
 		u_long sourceCnt, destCnt;
-		int decomplen, rtn;
-		u_char *buf;
-		int len;
+		int rtn;
 
 		/* Copy payload into a contiguous region of memory. */
-		len = m->m_pkthdr.len;
-		buf = malloc(len, M_NETGRAPH_MPPC, M_NOWAIT);
-		if (buf == NULL) {
-			m_freem(m);
-			return (ENOMEM);
+		inlen = m->m_pkthdr.len;
+		if (m->m_next == NULL) {
+                	inbuf = mtod(m, u_char *);
+			ina = 0;
+		} else {
+		        inbuf = malloc(inlen, M_NETGRAPH_MPPC, M_NOWAIT);
+			if (inbuf == NULL) {
+				m_freem(m);
+				return (ENOMEM);
+			}
+			m_copydata(m, 0, inlen, (caddr_t)inbuf);
+			ina = 1;
 		}
-		m_copydata(m, 0, len, (caddr_t)buf);
 
 		/* Allocate a buffer for decompressed data */
-		decompbuf = malloc(MPPC_DECOMP_BUFSIZE + MPPC_DECOMP_SAFETY,
+		outbuf = malloc(MPPC_DECOMP_BUFSIZE + MPPC_DECOMP_SAFETY,
 		    M_NETGRAPH_MPPC, M_NOWAIT);
-		if (decompbuf == NULL) {
+		if (outbuf == NULL) {
 			m_freem(m);
-			free(buf, M_NETGRAPH_MPPC);
+			if (ina)
+				free(inbuf, M_NETGRAPH_MPPC);
 			return (ENOMEM);
 		}
-		decomplen = MPPC_DECOMP_BUFSIZE;
+		outlen = MPPC_DECOMP_BUFSIZE;
 
 		/* Prepare to decompress */
-		source = buf;
-		sourceCnt = len;
-		dest = decompbuf;
-		destCnt = decomplen;
+		source = inbuf;
+		sourceCnt = inlen;
+		dest = outbuf;
+		destCnt = outlen;
 		if ((header & MPPC_FLAG_RESTART) != 0)
 			flags |= MPPC_RESTART_HISTORY;
 
@@ -774,22 +789,24 @@ failed:
 		    || (rtn & MPPC_DECOMP_OK) != MPPC_DECOMP_OK) {
 			log(LOG_ERR, "%s: decomp returned 0x%x",
 			    __func__, rtn);
-			free(buf, M_NETGRAPH_MPPC);
-			free(decompbuf, M_NETGRAPH_MPPC);
+			if (ina)
+				free(inbuf, M_NETGRAPH_MPPC);
+			free(outbuf, M_NETGRAPH_MPPC);
 			goto failed;
 		}
 
 		/* Replace compressed data with decompressed data */
-		free(buf, M_NETGRAPH_MPPC);
-		len = decomplen - destCnt;
+		if (ina)
+			free(inbuf, M_NETGRAPH_MPPC);
+		outlen -= destCnt;
 	
-		m_copyback(m, 0, len, (caddr_t)decompbuf);
-		if (m->m_pkthdr.len < len) {
+		m_copyback(m, 0, outlen, (caddr_t)outbuf);
+		if (m->m_pkthdr.len < outlen) {
 			m_freem(m);
 			m = NULL;
-		} else if (len < m->m_pkthdr.len)
-			m_adj(m, len - m->m_pkthdr.len);
-		free(decompbuf, M_NETGRAPH_MPPC);
+		} else if (outlen < m->m_pkthdr.len)
+			m_adj(m, outlen - m->m_pkthdr.len);
+		free(outbuf, M_NETGRAPH_MPPC);
 	}
 #endif
 

From owner-svn-src-stable@FreeBSD.ORG  Sat Jan 31 12:48:09 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B246D1065680;
	Sat, 31 Jan 2009 12:48:09 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 857CC8FC08;
	Sat, 31 Jan 2009 12:48:09 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VCm9SV025086;
	Sat, 31 Jan 2009 12:48:09 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VCm90N025084;
	Sat, 31 Jan 2009 12:48:09 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200901311248.n0VCm90N025084@svn.freebsd.org>
From: Alexander Motin 
Date: Sat, 31 Jan 2009 12:48:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r187955 - stable/7/sys/netgraph
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 31 Jan 2009 12:48:10 -0000

Author: mav
Date: Sat Jan 31 12:48:09 2009
New Revision: 187955
URL: http://svn.freebsd.org/changeset/base/187955

Log:
  MFC rev. 187495
  
  Check for infinite recursion possible on some broken PPTP/L2TP/... VPN setups.
  Mark packets with mbuf_tag on first interface passage and drop on second.
  
  PR:		ports/129625, ports/125303

Modified:
  stable/7/sys/netgraph/ng_iface.c
  stable/7/sys/netgraph/ng_iface.h

Modified: stable/7/sys/netgraph/ng_iface.c
==============================================================================
--- stable/7/sys/netgraph/ng_iface.c	Sat Jan 31 12:44:20 2009	(r187954)
+++ stable/7/sys/netgraph/ng_iface.c	Sat Jan 31 12:48:09 2009	(r187955)
@@ -353,6 +353,7 @@ static int
 ng_iface_output(struct ifnet *ifp, struct mbuf *m,
 		struct sockaddr *dst, struct rtentry *rt0)
 {
+	struct m_tag *mtag;
 	uint32_t af;
 	int error;
 
@@ -363,6 +364,23 @@ ng_iface_output(struct ifnet *ifp, struc
 		return (ENETDOWN);
 	}
 
+	/* Protect from deadly infinite recursion. */
+	while ((mtag = m_tag_locate(m, MTAG_NGIF, MTAG_NGIF_CALLED, NULL))) {
+		if (*(struct ifnet **)(mtag + 1) == ifp) {
+			log(LOG_NOTICE, "Loop detected on %s\n", ifp->if_xname);
+			m_freem(m);
+			return (EDEADLK);
+		}
+	}
+	mtag = m_tag_alloc(MTAG_NGIF, MTAG_NGIF_CALLED, sizeof(struct ifnet *),
+	    M_NOWAIT);
+	if (mtag == NULL) {
+		m_freem(m);
+		return (ENOMEM);
+	}
+	*(struct ifnet **)(mtag + 1) = ifp;
+	m_tag_prepend(m, mtag);
+
 	/* BPF writes need to be handled specially. */
 	if (dst->sa_family == AF_UNSPEC) {
 		bcopy(dst->sa_data, &af, sizeof(af));

Modified: stable/7/sys/netgraph/ng_iface.h
==============================================================================
--- stable/7/sys/netgraph/ng_iface.h	Sat Jan 31 12:44:20 2009	(r187954)
+++ stable/7/sys/netgraph/ng_iface.h	Sat Jan 31 12:48:09 2009	(r187955)
@@ -72,4 +72,7 @@ enum {
 	NGM_IFACE_GET_IFINDEX,
 };
 
+#define	MTAG_NGIF			NGM_IFACE_COOKIE
+#define	MTAG_NGIF_CALLED		0 | MTAG_PERSISTENT
+
 #endif /* _NETGRAPH_NG_IFACE_H_ */