From owner-svn-src-stable@FreeBSD.ORG Sun Apr 21 12:17:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6485DF1; Sun, 21 Apr 2013 12:17:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCF811AD; Sun, 21 Apr 2013 12:17:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3LCGxYr082440; Sun, 21 Apr 2013 12:16:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3LCGxYo082438; Sun, 21 Apr 2013 12:16:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304211216.r3LCGxYo082438@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 21 Apr 2013 12:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249723 - in stable/9/sys/dev: ata pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 21 Apr 2013 12:17:00 -0000 Author: kib Date: Sun Apr 21 12:16:59 2013 New Revision: 249723 URL: http://svnweb.freebsd.org/changeset/base/249723 Log: MFC r249476: Esnure that PCI bus BUS_GET_DMA_TAG() method sees the actual PCI device which makes the request for dma tag, instead of some descendant of the PCI device, by creating a pass-through trampoline for vga_pci and ata_pci buses. Modified: stable/9/sys/dev/ata/ata-pci.c stable/9/sys/dev/pci/vga_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/ata-pci.c ============================================================================== --- stable/9/sys/dev/ata/ata-pci.c Sun Apr 21 11:12:44 2013 (r249722) +++ stable/9/sys/dev/ata/ata-pci.c Sun Apr 21 12:16:59 2013 (r249723) @@ -572,6 +572,13 @@ ata_pci_child_location_str(device_t dev, return (0); } +static bus_dma_tag_t +ata_pci_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + static device_method_t ata_pci_methods[] = { /* device interface */ DEVMETHOD(device_probe, ata_pci_probe), @@ -594,6 +601,7 @@ static device_method_t ata_pci_methods[] DEVMETHOD(pci_write_config, ata_pci_write_config), DEVMETHOD(bus_print_child, ata_pci_print_child), DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), + DEVMETHOD(bus_get_dma_tag, ata_pci_get_dma_tag), DEVMETHOD_END }; Modified: stable/9/sys/dev/pci/vga_pci.c ============================================================================== --- stable/9/sys/dev/pci/vga_pci.c Sun Apr 21 11:12:44 2013 (r249722) +++ stable/9/sys/dev/pci/vga_pci.c Sun Apr 21 12:16:59 2013 (r249723) @@ -393,6 +393,13 @@ vga_pci_msix_count(device_t dev, device_ return (pci_msix_count(dev)); } +static bus_dma_tag_t +vga_pci_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + static device_method_t vga_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, vga_pci_probe), @@ -410,6 +417,7 @@ static device_method_t vga_pci_methods[] DEVMETHOD(bus_release_resource, vga_pci_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_dma_tag, vga_pci_get_dma_tag), /* PCI interface */ DEVMETHOD(pci_read_config, vga_pci_read_config), From owner-svn-src-stable@FreeBSD.ORG Sun Apr 21 14:33:03 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 131F54D5 for ; Sun, 21 Apr 2013 14:33:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E3DC9153D for ; Sun, 21 Apr 2013 14:33:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3LEX2nR045086 for ; Sun, 21 Apr 2013 14:33:02 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3LEX24j045081 for svn-src-stable@freebsd.org; Sun, 21 Apr 2013 14:33:02 GMT (envelope-from bdrewery) Received: (qmail 29060 invoked from network); 21 Apr 2013 09:33:01 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 21 Apr 2013 09:33:01 -0500 Message-ID: <5173F89A.70107@FreeBSD.org> Date: Sun, 21 Apr 2013 09:32:58 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Brooks Davis Subject: Re: svn commit: r248352 - in stable/9: etc share/mk References: <201303152132.r2FLWfwx076672@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.1 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2ENLHVGGMDSUNKJWSXAPC" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 21 Apr 2013 14:33:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ENLHVGGMDSUNKJWSXAPC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 3/17/2013 9:10 AM, Dmitry Morozovsky wrote: > On Fri, 15 Mar 2013, Brooks Davis wrote: >=20 >> Author: brooks >> Date: Fri Mar 15 21:32:40 2013 >> New Revision: 248352 >> URL: http://svnweb.freebsd.org/changeset/base/248352 >> >> Log: >> MFC r245752,246913,247162 >> =20 >> Replace all known uses of ln in the build process with appropriate >> install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK >> variables. >=20 > It seems this merge breaks ``make distribution'' and hence mergemaster = if your=20 > base system is not updated yet (for example, while updating jail): >=20 > root@castor:/FreeBSD/rinet/src.9.newcarp# uname -a > FreeBSD castor.rinet.ru 9.1-STABLE FreeBSD 9.1-STABLE #0 r245742: Mon J= an 21=20 > 21:29:07 MSK 2013 marck@castor.rinet.ru:/usr/obj/usr/src/sys/CASTOR= amd64 >=20 > root@castor:/FreeBSD/rinet/src.9.newcarp# make hierarchy DESTDIR=3D/tmp= /xxx > cd /FreeBSD/rinet/src.9.newcarp/etc;=20 > /usr/obj/FreeBSD/rinet/src.9.newcarp/make.amd64/make LOCAL_MTREE=3D dis= trib-dirs > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.root.dist -p /= tmp/xxx/ > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.var.dist -p /t= mp/xxx/var > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.usr.dist -p /t= mp/xxx/usr > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.include.dist -= p /tmp/xxx/usr/include > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BIND.chroot.dist -= p /tmp/xxx/var/named > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.groff.dist -p = /tmp/xxx/usr > mtree -deU -f /FreeBSD/rinet/src.9.newcarp/etc/mtree/BSD.sendmail.dist = -p /tmp/xxx/ > install -l s usr/src/sys /tmp/xxx/sys > install: illegal option -- l > usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode] > [-o owner] file1 file2 > install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode] > [-o owner] file1 ... fileN directory > install -d [-v] [-g group] [-m mode] [-o owner] directory ... > *** [distrib-dirs] Error code 64 >=20 > Stop in /FreeBSD/rinet/src.9.newcarp/etc. >=20 > [snip] >=20 I also ran into something similar today upgrading from 9.1-R to HEAD. I had INSTALL=3Dinstall -C in my make.conf, causing: > /usr/obj/usr/src/tmp/legacy/usr/libexec/catman.local -> /usr/obj/usr/sr= c/tmp/legacy/usr/libexec/makewhatis.local > install: illegal option -- l >=20 > usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode] > [-o owner] file1 file2 > install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode] > [-o owner] file1 ... fileN directory > install -d [-v] [-g group] [-m mode] [-o owner] directory ... > *** [_installlinks] Error code 64 After updating my make.conf to INSTALL+=3D -C I was able to finish buildw= orld. I suggest updating the examples to not encourage overriding INSTALL like this: http://people.freebsd.org/~bdrewery/INSTALL-buildworld-install-l.txt This may warrant an UPDATING entry as well. Thoughts? --=20 Regards, Bryan Drewery ------enig2ENLHVGGMDSUNKJWSXAPC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRc/ibAAoJEG54KsA8mwz5EOwQAKmhpCKDe+uZQyKMv3xOSwJM ZIl6HbHdPvUpX5BlfGd1yS0pKiwSzFjVIxs04Oz4KWSC8GvLEVMX2t49zEbzRPpY UNJgu1KZyYk084GHnGofGl53aWzOBHvY3BGmX6u1VLxrZRH+m7YhVkxVCWBlG25E 6ldBeOuKYLI1tljJkj0dCuY7uUZUHUDTDKk6V7k8HYKdNZRjzDqA4AbDxYxhKdO3 Qm7EzvzpQBOfm2Yfaw8+4dvOjFqAR8uLpErS0xbc2ZNC/tRpCTsiXfMKc2XRY0v6 CJJUj9WE57F78N3u2MJb/6Gr9rqbcLomVDd+VkU4d7Er5DZfs22RtRIzRbWnMOIG 3QZCa6hfE7uc1IprDVmZ7tpL8SlNRHkBnIWLIOb92PDw1haJwZ84njr/CQzhRWVX 5chiY+EbCsT5foxbzTM7XMeWDdNf46v8xJivIA6V3R31TyzgU92RWkDFWVE2bEOs 2vz0/xnjmfqjo8ryXcPXXZs87IItjuBAwVTH/uaCIdnVAdRLbFCftktp+zduB7Ql 4hFne4++GMnS6CtkeDg/vDcDwExASnGoVQMXc8VdWk0xdrkWO0jOujsTiltCI9LW MLpTytDup7Rbpq87xFNP6hANMJLiBFggP9hrU0vBPTBMxtmadldmt1tzzIa1qYuE kPxX6xmiyrYuqWZgtcaj =7VVR -----END PGP SIGNATURE----- ------enig2ENLHVGGMDSUNKJWSXAPC-- From owner-svn-src-stable@FreeBSD.ORG Sun Apr 21 17:14:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1EB79FE2; Sun, 21 Apr 2013 17:14:51 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 110AE1A9D; Sun, 21 Apr 2013 17:14:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3LHEoUY075716; Sun, 21 Apr 2013 17:14:50 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3LHEo0R075715; Sun, 21 Apr 2013 17:14:50 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304211714.r3LHEo0R075715@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 21 Apr 2013 17:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249734 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 21 Apr 2013 17:14:51 -0000 Author: trociny Date: Sun Apr 21 17:14:50 2013 New Revision: 249734 URL: http://svnweb.freebsd.org/changeset/base/249734 Log: MFC r249238, r249239: r249238: Use 4-byte padding for core dump notes on both 32 and 64bit archs. Although native word padding (i.e. 8-byte on 64bit arch) looks to be in agreement with standards, other parts of our code and other OSes use 4-byte alignment. This is not expected to change alignment for currently generated core dump notes, as the notes look to consist of structures with sizes multiple of 8 on 64-bit archs. But there are plans to add additional notes, where 4-byte vs 8-byte alignment makes difference. Discussed with: kib Reviewed by: kib r249239: Fill p_flags and p_align fields of the core dump note segement. Reviewed by: kib Modified: stable/9/sys/kern/imgact_elf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/imgact_elf.c ============================================================================== --- stable/9/sys/kern/imgact_elf.c Sun Apr 21 17:13:58 2013 (r249733) +++ stable/9/sys/kern/imgact_elf.c Sun Apr 21 17:14:50 2013 (r249734) @@ -1515,8 +1515,8 @@ __elfN(puthdr)(struct thread *td, void * phdr->p_paddr = 0; phdr->p_filesz = notesz; phdr->p_memsz = 0; - phdr->p_flags = 0; - phdr->p_align = 0; + phdr->p_flags = PF_R; + phdr->p_align = sizeof(Elf32_Size); phdr++; /* All the writable segments from the program. */ @@ -1540,10 +1540,10 @@ __elfN(putnote)(void *dst, size_t *off, *off += sizeof note; if (dst != NULL) bcopy(name, (char *)dst + *off, note.n_namesz); - *off += roundup2(note.n_namesz, sizeof(Elf_Size)); + *off += roundup2(note.n_namesz, sizeof(Elf32_Size)); if (dst != NULL) bcopy(desc, (char *)dst + *off, note.n_descsz); - *off += roundup2(note.n_descsz, sizeof(Elf_Size)); + *off += roundup2(note.n_descsz, sizeof(Elf32_Size)); } static boolean_t From owner-svn-src-stable@FreeBSD.ORG Mon Apr 22 06:47:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E53BDD17; Mon, 22 Apr 2013 06:47:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D68DE1389; Mon, 22 Apr 2013 06:47:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3M6l5qE031649; Mon, 22 Apr 2013 06:47:05 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3M6l5T7031648; Mon, 22 Apr 2013 06:47:05 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304220647.r3M6l5T7031648@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 22 Apr 2013 06:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249760 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Apr 2013 06:47:06 -0000 Author: ae Date: Mon Apr 22 06:47:05 2013 New Revision: 249760 URL: http://svnweb.freebsd.org/changeset/base/249760 Log: MFC r249398: Free memory after deleting an address policy entry. Modified: stable/9/sys/netinet6/in6_src.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6_src.c ============================================================================== --- stable/9/sys/netinet6/in6_src.c Mon Apr 22 06:30:29 2013 (r249759) +++ stable/9/sys/netinet6/in6_src.c Mon Apr 22 06:47:05 2013 (r249760) @@ -1099,6 +1099,7 @@ delete_addrsel_policyent(struct in6_addr TAILQ_REMOVE(&V_addrsel_policytab, pol, ape_entry); ADDRSEL_UNLOCK(); ADDRSEL_XUNLOCK(); + free(pol, M_IFADDR); return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 22 06:47:28 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 016B4E7C; Mon, 22 Apr 2013 06:47:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E86A3138D; Mon, 22 Apr 2013 06:47:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3M6lRdN031730; Mon, 22 Apr 2013 06:47:27 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3M6lRve031729; Mon, 22 Apr 2013 06:47:27 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304220647.r3M6lRve031729@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 22 Apr 2013 06:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249761 - stable/8/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Apr 2013 06:47:28 -0000 Author: ae Date: Mon Apr 22 06:47:27 2013 New Revision: 249761 URL: http://svnweb.freebsd.org/changeset/base/249761 Log: MFC r249398: Free memory after deleting an address policy entry. Modified: stable/8/sys/netinet6/in6_src.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/netinet6/in6_src.c ============================================================================== --- stable/8/sys/netinet6/in6_src.c Mon Apr 22 06:47:05 2013 (r249760) +++ stable/8/sys/netinet6/in6_src.c Mon Apr 22 06:47:27 2013 (r249761) @@ -1098,6 +1098,7 @@ delete_addrsel_policyent(struct in6_addr TAILQ_REMOVE(&V_addrsel_policytab, pol, ape_entry); ADDRSEL_UNLOCK(); ADDRSEL_XUNLOCK(); + free(pol, M_IFADDR); return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 22 23:59:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3ADF8594; Mon, 22 Apr 2013 23:59:02 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2B4E01E37; Mon, 22 Apr 2013 23:59:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3MNx1pj059688; Mon, 22 Apr 2013 23:59:01 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3MNx1OT059665; Mon, 22 Apr 2013 23:59:01 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201304222359.r3MNx1OT059665@svn.freebsd.org> From: Kirk McKusick Date: Mon, 22 Apr 2013 23:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249782 - stable/9/sys/ufs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Apr 2013 23:59:02 -0000 Author: mckusick Date: Mon Apr 22 23:59:00 2013 New Revision: 249782 URL: http://svnweb.freebsd.org/changeset/base/249782 Log: MFC of 242520: When a file is first being written, the dynamic block reallocation (implemented by ffs_reallocblks_ufs[12]) relocates the file's blocks so as to cluster them together into a contiguous set of blocks on the disk. When the cluster crosses the boundary into the first indirect block, the first indirect block is initially allocated in a position immediately following the last direct block. Block reallocation would usually destroy locality by moving the indirect block out of the way to keep the data blocks contiguous. This change compensates for this problem by noting that the first indirect block should be left immediately following the last direct block. It then tries to start a new cluster of contiguous blocks (referenced by the indirect block) immediately following the indirect block. We should also do this for other indirect block boundaries, but it is only important for the first one. Suggested by: Bruce Evans MFC of 248623: The purpose of this change to the FFS layout policy is to reduce the running time for a full fsck. It also reduces the random access time for large files and speeds the traversal time for directory tree walks. The key idea is to reserve a small area in each cylinder group immediately following the inode blocks for the use of metadata, specifically indirect blocks and directory contents. The new policy is to preferentially place metadata in the metadata area and everything else in the blocks that follow the metadata area. The size of this area can be set when creating a filesystem using newfs(8) or changed in an existing filesystem using tunefs(8). Both utilities use the `-k held-for-metadata-blocks' option to specify the amount of space to be held for metadata blocks in each cylinder group. By default, newfs(8) sets this area to half of minfree (typically 4% of the data area). This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm Modified: stable/9/sys/ufs/ffs/ffs_alloc.c stable/9/sys/ufs/ffs/ffs_balloc.c stable/9/sys/ufs/ffs/fs.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_alloc.c Mon Apr 22 21:19:44 2013 (r249781) +++ stable/9/sys/ufs/ffs/ffs_alloc.c Mon Apr 22 23:59:00 2013 (r249782) @@ -535,6 +535,18 @@ ffs_reallocblks_ufs1(ap) panic("ffs_reallocblks: non-physical cluster %d", i); #endif /* + * If the cluster crosses the boundary for the first indirect + * block, leave space for the indirect block. Indirect blocks + * are initially laid out in a position after the last direct + * block. Block reallocation would usually destroy locality by + * moving the indirect block out of the way to make room for + * data blocks if we didn't compensate here. We should also do + * this for other indirect block boundaries, but it is only + * important for the first one. + */ + if (start_lbn < NDADDR && end_lbn >= NDADDR) + return (ENOSPC); + /* * If the latest allocation is in a new cylinder group, assume that * the filesystem has decided to move and do not force it back to * the previous cylinder group. @@ -743,6 +755,18 @@ ffs_reallocblks_ufs2(ap) panic("ffs_reallocblks: non-physical cluster %d", i); #endif /* + * If the cluster crosses the boundary for the first indirect + * block, do not move anything in it. Indirect blocks are + * usually initially laid out in a position between the data + * blocks. Block reallocation would usually destroy locality by + * moving the indirect block out of the way to make room for + * data blocks if we didn't compensate here. We should also do + * this for other indirect block boundaries, but it is only + * important for the first one. + */ + if (start_lbn < NDADDR && end_lbn >= NDADDR) + return (ENOSPC); + /* * If the latest allocation is in a new cylinder group, assume that * the filesystem has decided to move and do not force it back to * the previous cylinder group. @@ -1054,7 +1078,7 @@ ffs_dirpref(pip) struct inode *pip; { struct fs *fs; - u_int cg, prefcg, dirsize, cgsize; + int cg, prefcg, dirsize, cgsize; u_int avgifree, avgbfree, avgndir, curdirsize; u_int minifree, minbfree, maxndir; u_int mincg, minndir; @@ -1122,6 +1146,22 @@ ffs_dirpref(pip) * Limit number of dirs in one cg and reserve space for * regular files, but only if we have no deficit in * inodes or space. + * + * We are trying to find a suitable cylinder group nearby + * our preferred cylinder group to place a new directory. + * We scan from our preferred cylinder group forward looking + * for a cylinder group that meets our criterion. If we get + * to the final cylinder group and do not find anything, + * we start scanning backwards from our preferred cylinder + * group. The ideal would be to alternate looking forward + * and backward, but that is just too complex to code for + * the gain it would get. The most likely place where the + * backward scan would take effect is when we start near + * the end of the filesystem and do not find anything from + * where we are to the end. In that case, scanning backward + * will likely find us a suitable cylinder group much closer + * to our desired location than if we were to start scanning + * forward from the beginning of the filesystem. */ prefcg = ino_to_cg(fs, pip->i_number); for (cg = prefcg; cg < fs->fs_ncg; cg++) @@ -1131,7 +1171,7 @@ ffs_dirpref(pip) if (fs->fs_contigdirs[cg] < maxcontigdirs) return ((ino_t)(fs->fs_ipg * cg)); } - for (cg = 0; cg < prefcg; cg++) + for (cg = prefcg - 1; cg >= 0; cg--) if (fs->fs_cs(fs, cg).cs_ndir < maxndir && fs->fs_cs(fs, cg).cs_nifree >= minifree && fs->fs_cs(fs, cg).cs_nbfree >= minbfree) { @@ -1144,7 +1184,7 @@ ffs_dirpref(pip) for (cg = prefcg; cg < fs->fs_ncg; cg++) if (fs->fs_cs(fs, cg).cs_nifree >= avgifree) return ((ino_t)(fs->fs_ipg * cg)); - for (cg = 0; cg < prefcg; cg++) + for (cg = prefcg - 1; cg >= 0; cg--) if (fs->fs_cs(fs, cg).cs_nifree >= avgifree) break; return ((ino_t)(fs->fs_ipg * cg)); @@ -1157,9 +1197,15 @@ ffs_dirpref(pip) * * If no blocks have been allocated in the first section, the policy is to * request a block in the same cylinder group as the inode that describes - * the file. If no blocks have been allocated in any other section, the - * policy is to place the section in a cylinder group with a greater than - * average number of free blocks. An appropriate cylinder group is found + * the file. The first indirect is allocated immediately following the last + * direct block and the data blocks for the first indirect immediately + * follow it. + * + * If no blocks have been allocated in any other section, the indirect + * block(s) are allocated in the same cylinder group as its inode in an + * area reserved immediately following the inode blocks. The policy for + * the data blocks is to place them in a cylinder group with a greater than + * average number of free blocks. An appropriate cylinder group is found * by using a rotor that sweeps the cylinder groups. When a new group of * blocks is needed, the sweep begins in the cylinder group following the * cylinder group from which the previous allocation was made. The sweep @@ -1182,23 +1228,78 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap) ufs1_daddr_t *bap; { struct fs *fs; - u_int cg; + u_int cg, inocg; u_int avgbfree, startcg; + ufs2_daddr_t pref; + KASSERT(indx <= 0 || bap != NULL, ("need non-NULL bap")); mtx_assert(UFS_MTX(ip->i_ump), MA_OWNED); fs = ip->i_fs; + /* + * Allocation of indirect blocks is indicated by passing negative + * values in indx: -1 for single indirect, -2 for double indirect, + * -3 for triple indirect. As noted below, we attempt to allocate + * the first indirect inline with the file data. For all later + * indirect blocks, the data is often allocated in other cylinder + * groups. However to speed random file access and to speed up + * fsck, the filesystem reserves the first fs_metaspace blocks + * (typically half of fs_minfree) of the data area of each cylinder + * group to hold these later indirect blocks. + */ + inocg = ino_to_cg(fs, ip->i_number); + if (indx < 0) { + /* + * Our preference for indirect blocks is the zone at the + * beginning of the inode's cylinder group data area that + * we try to reserve for indirect blocks. + */ + pref = cgmeta(fs, inocg); + /* + * If we are allocating the first indirect block, try to + * place it immediately following the last direct block. + */ + if (indx == -1 && lbn < NDADDR + NINDIR(fs) && + ip->i_din1->di_db[NDADDR - 1] != 0) + pref = ip->i_din1->di_db[NDADDR - 1] + fs->fs_frag; + return (pref); + } + /* + * If we are allocating the first data block in the first indirect + * block and the indirect has been allocated in the data block area, + * try to place it immediately following the indirect block. + */ + if (lbn == NDADDR) { + pref = ip->i_din1->di_ib[0]; + if (pref != 0 && pref >= cgdata(fs, inocg) && + pref < cgbase(fs, inocg + 1)) + return (pref + fs->fs_frag); + } + /* + * If we are at the beginning of a file, or we have already allocated + * the maximum number of blocks per cylinder group, or we do not + * have a block allocated immediately preceeding us, then we need + * to decide where to start allocating new blocks. + */ if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) { - if (lbn < NDADDR + NINDIR(fs)) { - cg = ino_to_cg(fs, ip->i_number); - return (cgbase(fs, cg) + fs->fs_frag); - } + /* + * If we are allocating a directory data block, we want + * to place it in the metadata area. + */ + if ((ip->i_mode & IFMT) == IFDIR) + return (cgmeta(fs, inocg)); + /* + * Until we fill all the direct and all the first indirect's + * blocks, we try to allocate in the data area of the inode's + * cylinder group. + */ + if (lbn < NDADDR + NINDIR(fs)) + return (cgdata(fs, inocg)); /* * Find a cylinder with greater than average number of * unused data blocks. */ if (indx == 0 || bap[indx - 1] == 0) - startcg = - ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; + startcg = inocg + lbn / fs->fs_maxbpg; else startcg = dtog(fs, bap[indx - 1]) + 1; startcg %= fs->fs_ncg; @@ -1206,17 +1307,17 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap) for (cg = startcg; cg < fs->fs_ncg; cg++) if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) { fs->fs_cgrotor = cg; - return (cgbase(fs, cg) + fs->fs_frag); + return (cgdata(fs, cg)); } for (cg = 0; cg <= startcg; cg++) if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) { fs->fs_cgrotor = cg; - return (cgbase(fs, cg) + fs->fs_frag); + return (cgdata(fs, cg)); } return (0); } /* - * We just always try to lay things out contiguously. + * Otherwise, we just always try to lay things out contiguously. */ return (bap[indx - 1] + fs->fs_frag); } @@ -1232,23 +1333,78 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap) ufs2_daddr_t *bap; { struct fs *fs; - u_int cg; + u_int cg, inocg; u_int avgbfree, startcg; + ufs2_daddr_t pref; + KASSERT(indx <= 0 || bap != NULL, ("need non-NULL bap")); mtx_assert(UFS_MTX(ip->i_ump), MA_OWNED); fs = ip->i_fs; + /* + * Allocation of indirect blocks is indicated by passing negative + * values in indx: -1 for single indirect, -2 for double indirect, + * -3 for triple indirect. As noted below, we attempt to allocate + * the first indirect inline with the file data. For all later + * indirect blocks, the data is often allocated in other cylinder + * groups. However to speed random file access and to speed up + * fsck, the filesystem reserves the first fs_metaspace blocks + * (typically half of fs_minfree) of the data area of each cylinder + * group to hold these later indirect blocks. + */ + inocg = ino_to_cg(fs, ip->i_number); + if (indx < 0) { + /* + * Our preference for indirect blocks is the zone at the + * beginning of the inode's cylinder group data area that + * we try to reserve for indirect blocks. + */ + pref = cgmeta(fs, inocg); + /* + * If we are allocating the first indirect block, try to + * place it immediately following the last direct block. + */ + if (indx == -1 && lbn < NDADDR + NINDIR(fs) && + ip->i_din2->di_db[NDADDR - 1] != 0) + pref = ip->i_din2->di_db[NDADDR - 1] + fs->fs_frag; + return (pref); + } + /* + * If we are allocating the first data block in the first indirect + * block and the indirect has been allocated in the data block area, + * try to place it immediately following the indirect block. + */ + if (lbn == NDADDR) { + pref = ip->i_din2->di_ib[0]; + if (pref != 0 && pref >= cgdata(fs, inocg) && + pref < cgbase(fs, inocg + 1)) + return (pref + fs->fs_frag); + } + /* + * If we are at the beginning of a file, or we have already allocated + * the maximum number of blocks per cylinder group, or we do not + * have a block allocated immediately preceeding us, then we need + * to decide where to start allocating new blocks. + */ if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) { - if (lbn < NDADDR + NINDIR(fs)) { - cg = ino_to_cg(fs, ip->i_number); - return (cgbase(fs, cg) + fs->fs_frag); - } + /* + * If we are allocating a directory data block, we want + * to place it in the metadata area. + */ + if ((ip->i_mode & IFMT) == IFDIR) + return (cgmeta(fs, inocg)); + /* + * Until we fill all the direct and all the first indirect's + * blocks, we try to allocate in the data area of the inode's + * cylinder group. + */ + if (lbn < NDADDR + NINDIR(fs)) + return (cgdata(fs, inocg)); /* * Find a cylinder with greater than average number of * unused data blocks. */ if (indx == 0 || bap[indx - 1] == 0) - startcg = - ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; + startcg = inocg + lbn / fs->fs_maxbpg; else startcg = dtog(fs, bap[indx - 1]) + 1; startcg %= fs->fs_ncg; @@ -1256,17 +1412,17 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap) for (cg = startcg; cg < fs->fs_ncg; cg++) if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) { fs->fs_cgrotor = cg; - return (cgbase(fs, cg) + fs->fs_frag); + return (cgdata(fs, cg)); } for (cg = 0; cg <= startcg; cg++) if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) { fs->fs_cgrotor = cg; - return (cgbase(fs, cg) + fs->fs_frag); + return (cgdata(fs, cg)); } return (0); } /* - * We just always try to lay things out contiguously. + * Otherwise, we just always try to lay things out contiguously. */ return (bap[indx - 1] + fs->fs_frag); } @@ -1543,31 +1699,37 @@ ffs_alloccgblk(ip, bp, bpref, size) ufs1_daddr_t bno; ufs2_daddr_t blkno; u_int8_t *blksfree; - int i; + int i, cgbpref; fs = ip->i_fs; ump = ip->i_ump; mtx_assert(UFS_MTX(ump), MA_OWNED); cgp = (struct cg *)bp->b_data; blksfree = cg_blksfree(cgp); - if (bpref == 0 || dtog(fs, bpref) != cgp->cg_cgx) { + if (bpref == 0) { bpref = cgp->cg_rotor; - } else { - bpref = blknum(fs, bpref); - bno = dtogd(fs, bpref); - /* - * if the requested block is available, use it - */ - if (ffs_isblock(fs, blksfree, fragstoblks(fs, bno))) - goto gotit; + } else if ((cgbpref = dtog(fs, bpref)) != cgp->cg_cgx) { + /* map bpref to correct zone in this cg */ + if (bpref < cgdata(fs, cgbpref)) + bpref = cgmeta(fs, cgp->cg_cgx); + else + bpref = cgdata(fs, cgp->cg_cgx); } /* + * if the requested block is available, use it + */ + bno = dtogd(fs, blknum(fs, bpref)); + if (ffs_isblock(fs, blksfree, fragstoblks(fs, bno))) + goto gotit; + /* * Take the next available block in this cylinder group. */ bno = ffs_mapsearch(fs, cgp, bpref, (int)fs->fs_frag); if (bno < 0) return (0); - cgp->cg_rotor = bno; + /* Update cg_rotor only if allocated from the data zone */ + if (bno >= dtogd(fs, cgdata(fs, cgp->cg_cgx))) + cgp->cg_rotor = bno; gotit: blkno = fragstoblks(fs, bno); ffs_clrblock(fs, blksfree, (long)blkno); @@ -1674,9 +1836,10 @@ ffs_clusteralloc(ip, cg, bpref, len, unu * be recalled to try an allocation in the next cylinder group. */ if (dtog(fs, bpref) != cg) - bpref = 0; + bpref = cgdata(fs, cg); else - bpref = fragstoblks(fs, dtogd(fs, blknum(fs, bpref))); + bpref = blknum(fs, bpref); + bpref = fragstoblks(fs, dtogd(fs, bpref)); mapp = &cg_clustersfree(cgp)[bpref / NBBY]; map = *mapp++; bit = 1 << (bpref % NBBY); Modified: stable/9/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_balloc.c Mon Apr 22 21:19:44 2013 (r249781) +++ stable/9/sys/ufs/ffs/ffs_balloc.c Mon Apr 22 23:59:00 2013 (r249782) @@ -245,12 +245,14 @@ ffs_balloc_ufs1(struct vnode *vp, off_t lbns_remfree = lbns; if (nb == 0) { UFS_LOCK(ump); - pref = ffs_blkpref_ufs1(ip, lbn, 0, (ufs1_daddr_t *)0); + pref = ffs_blkpref_ufs1(ip, lbn, -indirs[0].in_off - 1, + (ufs1_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred, &newb)) != 0) { curthread_pflags_restore(saved_inbdflush); return (error); } + pref = newb + fs->fs_frag; nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; @@ -297,7 +299,8 @@ retry: } UFS_LOCK(ump); if (pref == 0) - pref = ffs_blkpref_ufs1(ip, lbn, 0, (ufs1_daddr_t *)0); + pref = ffs_blkpref_ufs1(ip, lbn, i - num - 1, + (ufs1_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, &newb)) != 0) { brelse(bp); @@ -315,6 +318,7 @@ retry: } goto fail; } + pref = newb + fs->fs_frag; nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[i].in_lbn; @@ -363,7 +367,9 @@ retry: */ if (nb == 0) { UFS_LOCK(ump); - pref = ffs_blkpref_ufs1(ip, lbn, indirs[i].in_off, &bap[0]); + if (pref == 0) + pref = ffs_blkpref_ufs1(ip, lbn, indirs[i].in_off, + &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, &newb); if (error) { @@ -783,12 +789,14 @@ ffs_balloc_ufs2(struct vnode *vp, off_t lbns_remfree = lbns; if (nb == 0) { UFS_LOCK(ump); - pref = ffs_blkpref_ufs2(ip, lbn, 0, (ufs2_daddr_t *)0); + pref = ffs_blkpref_ufs2(ip, lbn, -indirs[0].in_off - 1, + (ufs2_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred, &newb)) != 0) { curthread_pflags_restore(saved_inbdflush); return (error); } + pref = newb + fs->fs_frag; nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; @@ -835,7 +843,8 @@ retry: } UFS_LOCK(ump); if (pref == 0) - pref = ffs_blkpref_ufs2(ip, lbn, 0, (ufs2_daddr_t *)0); + pref = ffs_blkpref_ufs2(ip, lbn, i - num - 1, + (ufs2_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, &newb)) != 0) { brelse(bp); @@ -853,6 +862,7 @@ retry: } goto fail; } + pref = newb + fs->fs_frag; nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[i].in_lbn; @@ -901,7 +911,9 @@ retry: */ if (nb == 0) { UFS_LOCK(ump); - pref = ffs_blkpref_ufs2(ip, lbn, indirs[i].in_off, &bap[0]); + if (pref == 0) + pref = ffs_blkpref_ufs2(ip, lbn, indirs[i].in_off, + &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, &newb); if (error) { Modified: stable/9/sys/ufs/ffs/fs.h ============================================================================== --- stable/9/sys/ufs/ffs/fs.h Mon Apr 22 21:19:44 2013 (r249781) +++ stable/9/sys/ufs/ffs/fs.h Mon Apr 22 23:59:00 2013 (r249782) @@ -333,7 +333,8 @@ struct fs { int32_t fs_maxbsize; /* maximum blocking factor permitted */ int64_t fs_unrefs; /* number of unreferenced inodes */ int64_t fs_providersize; /* size of underlying GEOM provider */ - int64_t fs_sparecon64[15]; /* old rotation block list head */ + int64_t fs_metaspace; /* size of area reserved for metadata */ + int64_t fs_sparecon64[14]; /* old rotation block list head */ int64_t fs_sblockloc; /* byte offset of standard superblock */ struct csum_total fs_cstotal; /* (u) cylinder summary information */ ufs_time_t fs_time; /* last time written */ @@ -525,6 +526,8 @@ struct cg { * They calc filesystem addresses of cylinder group data structures. */ #define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c)) +#define cgdata(fs, c) (cgdmin(fs, c) + (fs)->fs_metaspace) /* data zone */ +#define cgmeta(fs, c) (cgdmin(fs, c)) /* meta data */ #define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */ #define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */ #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 23 01:09:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 22AB887B; Tue, 23 Apr 2013 01:09:24 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1423B10C2; Tue, 23 Apr 2013 01:09:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3N19NbY082536; Tue, 23 Apr 2013 01:09:23 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3N19MMv082525; Tue, 23 Apr 2013 01:09:22 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201304230109.r3N19MMv082525@svn.freebsd.org> From: Kirk McKusick Date: Tue, 23 Apr 2013 01:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249785 - in stable/9/sbin: dumpfs newfs tunefs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Apr 2013 01:09:24 -0000 Author: mckusick Date: Tue Apr 23 01:09:22 2013 New Revision: 249785 URL: http://svnweb.freebsd.org/changeset/base/249785 Log: MFC of 248623: The purpose of this change to the FFS layout policy is to reduce the running time for a full fsck. It also reduces the random access time for large files and speeds the traversal time for directory tree walks. The key idea is to reserve a small area in each cylinder group immediately following the inode blocks for the use of metadata, specifically indirect blocks and directory contents. The new policy is to preferentially place metadata in the metadata area and everything else in the blocks that follow the metadata area. The size of this area can be set when creating a filesystem using newfs(8) or changed in an existing filesystem using tunefs(8). Both utilities use the `-k held-for-metadata-blocks' option to specify the amount of space to be held for metadata blocks in each cylinder group. By default, newfs(8) sets this area to half of minfree (typically 4% of the data area). This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm Modified: stable/9/sbin/dumpfs/dumpfs.c stable/9/sbin/newfs/mkfs.c stable/9/sbin/newfs/newfs.8 stable/9/sbin/newfs/newfs.c stable/9/sbin/newfs/newfs.h stable/9/sbin/tunefs/tunefs.8 stable/9/sbin/tunefs/tunefs.c Directory Properties: stable/9/sbin/dumpfs/ (props changed) stable/9/sbin/newfs/ (props changed) stable/9/sbin/tunefs/ (props changed) Modified: stable/9/sbin/dumpfs/dumpfs.c ============================================================================== --- stable/9/sbin/dumpfs/dumpfs.c Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/dumpfs/dumpfs.c Tue Apr 23 01:09:22 2013 (r249785) @@ -241,8 +241,8 @@ dumpfs(const char *name) afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); printf("cgrotor\t%d\tfmod\t%d\tronly\t%d\tclean\t%d\n", afs.fs_cgrotor, afs.fs_fmod, afs.fs_ronly, afs.fs_clean); - printf("avgfpdir %d\tavgfilesize %d\n", - afs.fs_avgfpdir, afs.fs_avgfilesize); + printf("metaspace %jd\tavgfpdir %d\tavgfilesize %d\n", + afs.fs_metaspace, afs.fs_avgfpdir, afs.fs_avgfilesize); printf("flags\t"); if (afs.fs_old_flags & FS_FLAGS_UPDATED) fsflags = afs.fs_flags; Modified: stable/9/sbin/newfs/mkfs.c ============================================================================== --- stable/9/sbin/newfs/mkfs.c Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/newfs/mkfs.c Tue Apr 23 01:09:22 2013 (r249785) @@ -444,6 +444,12 @@ restart: if (sblock.fs_sbsize > SBLOCKSIZE) sblock.fs_sbsize = SBLOCKSIZE; sblock.fs_minfree = minfree; + if (metaspace > 0 && metaspace < sblock.fs_fpg / 2) + sblock.fs_metaspace = blknum(&sblock, metaspace); + else if (metaspace != -1) + /* reserve half of minfree for metadata blocks */ + sblock.fs_metaspace = blknum(&sblock, + (sblock.fs_fpg * minfree) / 200); if (maxbpg == 0) sblock.fs_maxbpg = MAXBLKPG(sblock.fs_bsize); else Modified: stable/9/sbin/newfs/newfs.8 ============================================================================== --- stable/9/sbin/newfs/newfs.8 Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/newfs/newfs.8 Tue Apr 23 01:09:22 2013 (r249785) @@ -50,6 +50,7 @@ .Op Fl g Ar avgfilesize .Op Fl h Ar avgfpdir .Op Fl i Ar bytes +.Op Fl k Ar held-for-metadata-blocks .Op Fl m Ar free-space .Op Fl o Ar optimization .Op Fl p Ar partition @@ -163,6 +164,17 @@ This flag is implemented by running the .Xr tunefs 8 utility found in the user's .Dv $PATH . +.It Fl k Ar held-for-metadata-blocks +Set the amount of space to be held for metadata blocks in each cylinder group. +When set, the file system preference routines will try to save +the specified amount of space immediately following the inode blocks +in each cylinder group for use by metadata blocks. +Clustering the metadata blocks speeds up random file access +and decreases the running time of +.Xr fsck 8 . +By default +.Xr newfs 8 +sets it to half of the space reserved to minfree. .It Fl l Enable multilabel MAC on the new file system. .It Fl m Ar free-space Modified: stable/9/sbin/newfs/newfs.c ============================================================================== --- stable/9/sbin/newfs/newfs.c Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/newfs/newfs.c Tue Apr 23 01:09:22 2013 (r249785) @@ -102,6 +102,7 @@ int bsize = 0; /* block size */ int maxbsize = 0; /* maximum clustering */ int maxblkspercg = MAXBLKSPERCG; /* maximum blocks per cylinder group */ int minfree = MINFREE; /* free space threshold */ +int metaspace; /* space held for metadata blocks */ int opt = DEFAULTOPT; /* optimization preference (space or time) */ int density; /* number of bytes per inode */ int maxcontig = 0; /* max contiguous blocks to allocate */ @@ -141,7 +142,7 @@ main(int argc, char *argv[]) part_name = 'c'; reserved = 0; while ((ch = getopt(argc, argv, - "EJL:NO:RS:T:UXa:b:c:d:e:f:g:h:i:jlm:no:p:r:s:t")) != -1) + "EJL:NO:RS:T:UXa:b:c:d:e:f:g:h:i:jk:lm:no:p:r:s:t")) != -1) switch (ch) { case 'E': Eflag = 1; @@ -248,6 +249,13 @@ main(int argc, char *argv[]) case 'l': lflag = 1; break; + case 'k': + if ((metaspace = atoi(optarg)) < 0) + errx(1, "%s: bad metadata space %%", optarg); + if (metaspace == 0) + /* force to stay zero in mkfs */ + metaspace = -1; + break; case 'm': if ((minfree = atoi(optarg)) < 0 || minfree > 99) errx(1, "%s: bad free space %%", optarg); @@ -501,6 +509,7 @@ usage() fprintf(stderr, "\t-h average files per directory\n"); fprintf(stderr, "\t-i number of bytes per inode\n"); fprintf(stderr, "\t-j enable soft updates journaling\n"); + fprintf(stderr, "\t-k space to hold for metadata blocks\n"); fprintf(stderr, "\t-l enable multilabel MAC\n"); fprintf(stderr, "\t-n do not create .snap directory\n"); fprintf(stderr, "\t-m minimum free space %%\n"); Modified: stable/9/sbin/newfs/newfs.h ============================================================================== --- stable/9/sbin/newfs/newfs.h Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/newfs/newfs.h Tue Apr 23 01:09:22 2013 (r249785) @@ -95,6 +95,7 @@ extern int bsize; /* block size */ extern int maxbsize; /* maximum clustering */ extern int maxblkspercg; /* maximum blocks per cylinder group */ extern int minfree; /* free space threshold */ +extern int metaspace; /* space held for metadata blocks */ extern int opt; /* optimization preference (space or time) */ extern int density; /* number of bytes per inode */ extern int maxcontig; /* max contiguous blocks to allocate */ Modified: stable/9/sbin/tunefs/tunefs.8 ============================================================================== --- stable/9/sbin/tunefs/tunefs.8 Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/tunefs/tunefs.8 Tue Apr 23 01:09:22 2013 (r249785) @@ -42,6 +42,7 @@ .Op Fl f Ar avgfilesize .Op Fl j Cm enable | disable .Op Fl J Cm enable | disable +.Op Fl k Ar held-for-metadata-blocks .Op Fl L Ar volname .Op Fl l Cm enable | disable .Op Fl m Ar minfree @@ -96,6 +97,19 @@ Specify the expected average file size. Turn on/off soft updates journaling. .It Fl J Cm enable | disable Turn on/off gjournal flag. +.It Fl k Ar held-for-metadata-blocks +Set the amount of space to be held for metadata blocks. +When set, the file system preference routines will try to save +the specified amount of space immediately following the inode blocks +in each cylinder group for use by metadata blocks. +Clustering the metadata blocks speeds up random file access +and decreases the running time of +.Xr fsck 8 . +While this option can be set at any time, +it is most effective if set before any data is loaded into the file system. +By default +.Xr newfs 8 +sets it to half of the space reserved to minfree. .It Fl L Ar volname Add/modify an optional file system volume label. .It Fl l Cm enable | disable Modified: stable/9/sbin/tunefs/tunefs.c ============================================================================== --- stable/9/sbin/tunefs/tunefs.c Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/tunefs/tunefs.c Tue Apr 23 01:09:22 2013 (r249785) @@ -87,10 +87,9 @@ main(int argc, char *argv[]) const char *special, *on; const char *name; int active; - int Aflag, aflag, eflag, evalue, fflag, fvalue, jflag, Jflag, Lflag; - int lflag, mflag, mvalue, Nflag, nflag, oflag, ovalue, pflag, sflag; - int tflag; - int svalue, Svalue; + int Aflag, aflag, eflag, evalue, fflag, fvalue, jflag, Jflag, kflag; + int kvalue, Lflag, lflag, mflag, mvalue, Nflag, nflag, oflag, ovalue; + int pflag, sflag, svalue, Svalue, tflag; int ch, found_arg, i; const char *chg[2]; struct ufs_args args; @@ -98,13 +97,13 @@ main(int argc, char *argv[]) if (argc < 3) usage(); - Aflag = aflag = eflag = fflag = jflag = Jflag = Lflag = lflag = 0; - mflag = Nflag = nflag = oflag = pflag = sflag = tflag = 0; + Aflag = aflag = eflag = fflag = jflag = Jflag = kflag = Lflag = 0; + lflag = mflag = Nflag = nflag = oflag = pflag = sflag = tflag = 0; avalue = jvalue = Jvalue = Lvalue = lvalue = Nvalue = nvalue = NULL; evalue = fvalue = mvalue = ovalue = svalue = Svalue = 0; active = 0; found_arg = 0; /* At least one arg is required. */ - while ((ch = getopt(argc, argv, "Aa:e:f:j:J:L:l:m:N:n:o:ps:S:t:")) + while ((ch = getopt(argc, argv, "Aa:e:f:j:J:k:L:l:m:N:n:o:ps:S:t:")) != -1) switch (ch) { @@ -169,6 +168,14 @@ main(int argc, char *argv[]) Jflag = 1; break; + case 'k': + found_arg = 1; + name = "space to hold for metadata blocks"; + kvalue = atoi(optarg); + if (mvalue < 0) + errx(10, "bad %s (%s)", name, optarg); + kflag = 1; + break; case 'L': found_arg = 1; @@ -402,6 +409,22 @@ main(int argc, char *argv[]) } } } + if (kflag) { + name = "space to hold for metadata blocks"; + if (sblock.fs_metaspace == kvalue) + warnx("%s remains unchanged as %d", name, kvalue); + else { + kvalue = blknum(&sblock, kvalue); + if (kvalue > sblock.fs_fpg / 2) { + kvalue = blknum(&sblock, sblock.fs_fpg / 2); + warnx("%s cannot exceed half the file system " + "space", name); + } + warnx("%s changes from %jd to %d", + name, sblock.fs_metaspace, kvalue); + sblock.fs_metaspace = kvalue; + } + } if (lflag) { name = "multilabel"; if (strcmp(lvalue, "enable") == 0) { @@ -1065,7 +1088,7 @@ usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n", "usage: tunefs [-A] [-a enable | disable] [-e maxbpg] [-f avgfilesize]", -" [-J enable | disable] [-j enable | disable]", +" [-J enable | disable] [-j enable | disable] [-k metaspace]", " [-L volname] [-l enable | disable] [-m minfree]", " [-N enable | disable] [-n enable | disable]", " [-o space | time] [-p] [-s avgfpdir] [-t enable | disable]", @@ -1098,6 +1121,8 @@ printfs(void) sblock.fs_avgfpdir); warnx("minimum percentage of free space: (-m) %d%%", sblock.fs_minfree); + warnx("space to hold for metadata blocks: (-k) %jd", + sblock.fs_metaspace); warnx("optimization preference: (-o) %s", sblock.fs_optim == FS_OPTSPACE ? "space" : "time"); if (sblock.fs_minfree >= MINFREE && From owner-svn-src-stable@FreeBSD.ORG Tue Apr 23 01:19:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0BA5DA98 for ; Tue, 23 Apr 2013 01:19:01 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) by mx1.freebsd.org (Postfix) with ESMTP id 87208110B for ; Tue, 23 Apr 2013 01:19:00 +0000 (UTC) Received: by mail-la0-f48.google.com with SMTP id eo20so71377lab.35 for ; Mon, 22 Apr 2013 18:18:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=gGgRtXjEuiLG3UfWntAhhH4yKrPLSs2GsacNvlTB0/c=; b=O44ZgNc4CIZFDbj+2L11JpWgoeJWtHFSbzQ0fFNZrBgfI6bSXMI7QJdcuaxCsUihzI Iw1eSwaMhDuNebPU1Db4FtxlSjKUWwl1kmUaq93VUaW8HFv4xlUW3o0E3tsMm1uxNXuC Jl2gE/RNGutvuSWP5PejW2Fwnn4ZkM1GtCkWoCCrtw43+V2XC6YfcK+6ByGBgHONU+tD P/8XMz9nyZqKizCf9OkM7KCTP6xpMJU8WkMa/H8FpuFgKY4puzweb4rGT6EjsXzH0o7t HUirC/SCC/RjnkjAi/RgPWp5sU9JEUbUU7O73IzhS/RXEGcrKuaAUklj1FRueyO8+5cb VE1g== X-Received: by 10.152.5.134 with SMTP id s6mr14694392las.24.1366679939322; Mon, 22 Apr 2013 18:18:59 -0700 (PDT) Received: from [192.168.1.2] ([89.169.163.3]) by mx.google.com with ESMTPS id wc5sm7736076lbb.13.2013.04.22.18.18.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 18:18:58 -0700 (PDT) Message-ID: <5175E17F.3080500@freebsd.org> Date: Tue, 23 Apr 2013 05:18:55 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Kirk McKusick Subject: Re: svn commit: r249785 - in stable/9/sbin: dumpfs newfs tunefs References: <201304230109.r3N19MMv082525@svn.freebsd.org> In-Reply-To: <201304230109.r3N19MMv082525@svn.freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnE2ClOU/jVe5qCH3z3nLYYcDUVOgKUi2R5i2M98wUe9YIXYFp367CpCN7VoattNw+jOfVm Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Apr 2013 01:19:01 -0000 The bug eye-catched: On 23.04.2013 5:09, Kirk McKusick wrote: > + case 'k': > + found_arg = 1; > + name = "space to hold for metadata blocks"; > + kvalue = atoi(optarg); > + if (mvalue < 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ should be kvalue > + errx(10, "bad %s (%s)", name, optarg); > + kflag = 1; > + break; -- bitcoin:13fGiNutKNHcVSsgtGQ7bQ5kgUKgEQHn7N From owner-svn-src-stable@FreeBSD.ORG Tue Apr 23 02:36:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AB585DFC for ; Tue, 23 Apr 2013 02:36:02 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm1.bullet.mail.bf1.yahoo.com (nm1.bullet.mail.bf1.yahoo.com [98.139.212.160]) by mx1.freebsd.org (Postfix) with SMTP id 4036D133B for ; Tue, 23 Apr 2013 02:36:02 +0000 (UTC) Received: from [98.139.212.151] by nm1.bullet.mail.bf1.yahoo.com with NNFMP; 23 Apr 2013 02:36:00 -0000 Received: from [98.139.213.7] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 23 Apr 2013 02:36:00 -0000 Received: from [127.0.0.1] by smtp107.mail.bf1.yahoo.com with NNFMP; 23 Apr 2013 02:36:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1366684559; bh=nIwBmLXl+F90tSSpq9/vqWAH4ns+j9YBki6DOrHIywM=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=L0/dhrdxlOcPWH9bHgTyDnoPqbHbXQ6sSND3gE5NDvyrWk1lq64rvbG73Jlhq3X896AMvFX7MByI4o8mjdMc0B64L7O6IQtFvzFDNBB95YuSkshEzF6gw3iMBHqmhwwC88GJLGTN/5ltUySgWEyPkNofVEgQUcDQhaTRyibgqNg= X-Yahoo-Newman-Id: 896183.72541.bm@smtp107.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sKgMqYwVM1nMnuVjetmxSKl4KeS1G7i49IY8hI3HDFJl7I5 FSeYLtWM96UyzJFsLU8PhiXQWSYvdBsABv76ZZnTiqCBWHtvEg1y8_0OcHCw PG_bMp7eD.xJrf6MMYr4EqULRSJ_LkbiW.iy4.hl8flbCPV2cf7dNTXM3Sxw hXxfZtaKBroy0MVw3X1E6nyC4rBydnEnAOadh6dcbPBKyqA61WWfF_dp3Ad9 mGa2Eg0eJptESRqifHXyxx0xlcb31HeTzueo4XIn0KK74_Uif9K47g0MmYxW s5Oa8gRpYthT1Vk_diJo0x6PsOY3u5IERN35nzx1fwgZVgvJHsT7f3VUlUB0 yTHElBaqZG2G9VXkBobPbyXWr5jhiogczazpYpAOKQQ.OgrFvyBMBPmXIy1x iS7C8ptKoFa1uo0rKMri0ZRcR5UsPQ1PZW4Gqu5dOZm29hQn8fGABfoJp0GW KvaXVbzuYdaJj6DOnWY7cimo- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from [192.168.254.206] (scott4long@168.103.85.57 with ) by smtp107.mail.bf1.yahoo.com with SMTP; 22 Apr 2013 19:35:59 -0700 PDT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi From: Scott Long In-Reply-To: <201304180944.r3I9i05t093967@svn.freebsd.org> Date: Mon, 22 Apr 2013 20:35:57 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201304180944.r3I9i05t093967@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1503) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Apr 2013 02:36:02 -0000 What problem does this solve, other than to unintentionally break the = MPT driver? This needs to be backed out of HEAD and stable/9 until a = better analysis is done. Scott On Apr 18, 2013, at 3:44 AM, Alexander Motin wrote: > Author: mav > Date: Thu Apr 18 09:44:00 2013 > New Revision: 249611 > URL: http://svnweb.freebsd.org/changeset/base/249611 >=20 > Log: > MFC r248872, r249048: > Make pre-shutdown flush and spindown routines to not use = xpt_polled_action(), > but execute the commands in regular way. There is no any reason to = cook CPU > while the system is still fully operational. After this change = polling in > CAM is used only for kernel dumping. >=20 > Modified: > stable/9/sys/cam/ata/ata_da.c > stable/9/sys/cam/scsi/scsi_da.c > Directory Properties: > stable/9/sys/ (props changed) >=20 > Modified: stable/9/sys/cam/ata/ata_da.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:40:34 2013 = (r249610) > +++ stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:44:00 2013 = (r249611) > @@ -1825,11 +1825,10 @@ adaflush(void) > { > struct cam_periph *periph; > struct ada_softc *softc; > + union ccb *ccb; > int error; >=20 > CAM_PERIPH_FOREACH(periph, &adadriver) { > - union ccb ccb; > - > /* If we paniced with lock held - not recurse here. */ > if (cam_periph_owned(periph)) > continue; > @@ -1845,10 +1844,8 @@ adaflush(void) > continue; > } >=20 > - xpt_setup_ccb(&ccb.ccb_h, periph->path, = CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state =3D ADA_CCB_DUMP; > - cam_fill_ataio(&ccb.ataio, > + ccb =3D cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + cam_fill_ataio(&ccb->ataio, > 0, > adadone, > CAM_DIR_NONE, > @@ -1856,20 +1853,17 @@ adaflush(void) > NULL, > 0, > ada_default_timeout*1000); > - > if (softc->flags & ADA_FLAG_CAN_48BIT) > - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, = 0, 0); > + ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, = 0, 0); > else > - ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, = 0); > - xpt_polled_action(&ccb); > + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, = 0); >=20 > - error =3D cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) !=3D 0) > - cam_release_devq(ccb.ccb_h.path, = /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, = /*getcount_only*/0); > + error =3D cam_periph_runccb(ccb, adaerror, = /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, > + softc->disk->d_devstat); > if (error !=3D 0) > xpt_print(periph->path, "Synchronize cache = failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } > @@ -1879,11 +1873,10 @@ adaspindown(uint8_t cmd, int flags) > { > struct cam_periph *periph; > struct ada_softc *softc; > + union ccb *ccb; > int error; >=20 > CAM_PERIPH_FOREACH(periph, &adadriver) { > - union ccb ccb; > - > /* If we paniced with lock held - not recurse here. */ > if (cam_periph_owned(periph)) > continue; > @@ -1900,10 +1893,8 @@ adaspindown(uint8_t cmd, int flags) > if (bootverbose) > xpt_print(periph->path, "spin-down\n"); >=20 > - xpt_setup_ccb(&ccb.ccb_h, periph->path, = CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state =3D ADA_CCB_DUMP; > - cam_fill_ataio(&ccb.ataio, > + ccb =3D cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + cam_fill_ataio(&ccb->ataio, > 0, > adadone, > CAM_DIR_NONE | flags, > @@ -1911,17 +1902,14 @@ adaspindown(uint8_t cmd, int flags) > NULL, > 0, > ada_default_timeout*1000); > + ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, 0); >=20 > - ata_28bit_cmd(&ccb.ataio, cmd, 0, 0, 0); > - xpt_polled_action(&ccb); > - > - error =3D cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) !=3D 0) > - cam_release_devq(ccb.ccb_h.path, = /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, = /*getcount_only*/0); > + error =3D cam_periph_runccb(ccb, adaerror, = /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, > + softc->disk->d_devstat); > if (error !=3D 0) > xpt_print(periph->path, "Spin-down disk = failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } >=20 > Modified: stable/9/sys/cam/scsi/scsi_da.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:40:34 2013 = (r249610) > +++ stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:44:00 2013 = (r249611) > @@ -2834,11 +2834,10 @@ dashutdown(void * arg, int howto) > { > struct cam_periph *periph; > struct da_softc *softc; > + union ccb *ccb; > int error; >=20 > CAM_PERIPH_FOREACH(periph, &dadriver) { > - union ccb ccb; > - > cam_periph_lock(periph); > softc =3D (struct da_softc *)periph->softc; >=20 > @@ -2852,10 +2851,8 @@ dashutdown(void * arg, int howto) > continue; > } >=20 > - xpt_setup_ccb(&ccb.ccb_h, periph->path, = CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state =3D DA_CCB_DUMP; > - scsi_synchronize_cache(&ccb.csio, > + ccb =3D cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + scsi_synchronize_cache(&ccb->csio, > /*retries*/0, > /*cbfcnp*/dadone, > MSG_SIMPLE_Q_TAG, > @@ -2864,15 +2861,12 @@ dashutdown(void * arg, int howto) > SSD_FULL_SIZE, > 60 * 60 * 1000); >=20 > - xpt_polled_action(&ccb); > - > - error =3D cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, = NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) !=3D 0) > - cam_release_devq(ccb.ccb_h.path, = /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, = /*getcount_only*/0); > + error =3D cam_periph_runccb(ccb, daerror, = /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY | = SF_QUIET_IR, > + softc->disk->d_devstat); > if (error !=3D 0) > xpt_print(periph->path, "Synchronize cache = failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 23 06:28:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 864DDB77; Tue, 23 Apr 2013 06:28:51 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 774041AEA; Tue, 23 Apr 2013 06:28:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3N6SpMi084632; Tue, 23 Apr 2013 06:28:51 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3N6SnxW084618; Tue, 23 Apr 2013 06:28:49 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201304230628.r3N6SnxW084618@svn.freebsd.org> From: Kirk McKusick Date: Tue, 23 Apr 2013 06:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249788 - in stable/9/sbin: fsck_ffs fsdb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Apr 2013 06:28:51 -0000 Author: mckusick Date: Tue Apr 23 06:28:49 2013 New Revision: 249788 URL: http://svnweb.freebsd.org/changeset/base/249788 Log: Merge checked by: Glen Barber (gjb@) MFC of 247212: When running with the -d option, instrument fsck_ffs to track the number, data type, and running time of its I/O operations. No functional changes. MFC of 247234: Catch up with internal API changes for initbarea() and getdatablk() of fsck_ffs introduced with r247212. Submitted by: David Wolfskill MFC of 248625: Speed up fsck by caching the cylinder group maps in pass1 so that they do not need to be read again in pass5. As this nearly doubles the memory requirement for fsck, the cache is thrown away if other memory needs in fsck would otherwise fail. Thus, the memory footprint of fsck remains unchanged in memory constrained environments. This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm MFC of 248639: Fix the build after addition of cylinder group cacheing (r248625) Reported by: Glen Barber (gjb@) Pointy hat to: Kirk McKusick (mckusick@) MFC of 248673: Minor formatting fix for printf() to fix clang builds. Submitted by: db Reviewed by: gjb MFC of 248680: Resolve clang compile errors on amd64/i386 for certain by casting. compile tested with clang on i386, amd64 compile tested with gcc on i386, amd64, sparc64 Submitted by: delphij MFC of 248691: Note that output is in seconds, not msec. KNF indentation. No functional change. No change to printf strings. No change to casting of printf arguments. Reported by: Bruce Evans Modified: stable/9/sbin/fsck_ffs/dir.c stable/9/sbin/fsck_ffs/ea.c stable/9/sbin/fsck_ffs/fsck.h stable/9/sbin/fsck_ffs/fsutil.c stable/9/sbin/fsck_ffs/inode.c stable/9/sbin/fsck_ffs/main.c stable/9/sbin/fsck_ffs/pass1.c stable/9/sbin/fsck_ffs/pass5.c stable/9/sbin/fsck_ffs/setup.c stable/9/sbin/fsck_ffs/suj.c stable/9/sbin/fsdb/fsdb.c stable/9/sbin/fsdb/fsdbutil.c Directory Properties: stable/9/sbin/fsck_ffs/ (props changed) stable/9/sbin/fsdb/ (props changed) Modified: stable/9/sbin/fsck_ffs/dir.c ============================================================================== --- stable/9/sbin/fsck_ffs/dir.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/dir.c Tue Apr 23 06:28:49 2013 (r249788) @@ -708,6 +708,6 @@ getdirblk(ufs2_daddr_t blkno, long size) if (pdirbp != 0) pdirbp->b_flags &= ~B_INUSE; - pdirbp = getdatablk(blkno, size); + pdirbp = getdatablk(blkno, size, BT_DIRDATA); return (pdirbp); } Modified: stable/9/sbin/fsck_ffs/ea.c ============================================================================== --- stable/9/sbin/fsck_ffs/ea.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/ea.c Tue Apr 23 06:28:49 2013 (r249788) @@ -73,7 +73,7 @@ eascan(struct inodesc *idesc, struct ufs else blksiz = sblock.fs_bsize; printf("blksiz = %ju\n", (intmax_t)blksiz); - bp = getdatablk(dp->di_extb[0], blksiz); + bp = getdatablk(dp->di_extb[0], blksiz, BT_EXTATTR); cp = (u_char *)bp->b_un.b_buf; for (n = 0; n < blksiz; n++) { printf("%02x", cp[n]); Modified: stable/9/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/9/sbin/fsck_ffs/fsck.h Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/fsck.h Tue Apr 23 06:28:49 2013 (r249788) @@ -138,6 +138,7 @@ struct bufarea { int b_size; int b_errs; int b_flags; + int b_type; union { char *b_buf; /* buffer space */ ufs1_daddr_t *b_indir1; /* UFS1 indirect block */ @@ -165,9 +166,38 @@ struct bufarea { * Buffer flags */ #define B_INUSE 0x00000001 /* Buffer is in use */ +/* + * Type of data in buffer + */ +#define BT_UNKNOWN 0 /* Buffer holds a superblock */ +#define BT_SUPERBLK 1 /* Buffer holds a superblock */ +#define BT_CYLGRP 2 /* Buffer holds a cylinder group map */ +#define BT_LEVEL1 3 /* Buffer holds single level indirect */ +#define BT_LEVEL2 4 /* Buffer holds double level indirect */ +#define BT_LEVEL3 5 /* Buffer holds triple level indirect */ +#define BT_EXTATTR 6 /* Buffer holds external attribute data */ +#define BT_INODES 7 /* Buffer holds external attribute data */ +#define BT_DIRDATA 8 /* Buffer holds directory data */ +#define BT_DATA 9 /* Buffer holds user data */ +#define BT_NUMBUFTYPES 10 +#define BT_NAMES { \ + "unknown", \ + "Superblock", \ + "Cylinder Group", \ + "Single Level Indirect", \ + "Double Level Indirect", \ + "Triple Level Indirect", \ + "External Attribute", \ + "Inode Block", \ + "Directory Contents", \ + "User Data" } +long readcnt[BT_NUMBUFTYPES]; +long totalreadcnt[BT_NUMBUFTYPES]; +struct timespec readtime[BT_NUMBUFTYPES]; +struct timespec totalreadtime[BT_NUMBUFTYPES]; +struct timespec startprog; struct bufarea sblk; /* file system superblock */ -struct bufarea cgblk; /* cylinder group blocks */ struct bufarea *pdirbp; /* current directory contents */ struct bufarea *pbp; /* current inode block */ @@ -177,16 +207,15 @@ struct bufarea *pbp; /* current inode b else \ (bp)->b_dirty = 1; \ } while (0) -#define initbarea(bp) do { \ +#define initbarea(bp, type) do { \ (bp)->b_dirty = 0; \ (bp)->b_bno = (ufs2_daddr_t)-1; \ (bp)->b_flags = 0; \ + (bp)->b_type = type; \ } while (0) #define sbdirty() dirty(&sblk) -#define cgdirty() dirty(&cgblk) #define sblock (*sblk.b_un.b_fs) -#define cgrp (*cgblk.b_un.b_cg) enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE}; ino_t cursnapshot; @@ -329,6 +358,37 @@ struct ufs2_dinode ufs2_zino; #define EEXIT 8 /* Standard error exit. */ +int flushentry(void); +/* + * Wrapper for malloc() that flushes the cylinder group cache to try + * to get space. + */ +static inline void* +Malloc(int size) +{ + void *retval; + + while ((retval = malloc(size)) == NULL) + if (flushentry() == 0) + break; + return (retval); +} + +/* + * Wrapper for calloc() that flushes the cylinder group cache to try + * to get space. + */ +static inline void* +Calloc(int cnt, int size) +{ + void *retval; + + while ((retval = calloc(cnt, size)) == NULL) + if (flushentry() == 0) + break; + return (retval); +} + struct fstab; @@ -346,7 +406,7 @@ void cacheino(union dinode *dp, ino_t i void catch(int); void catchquit(int); int changeino(ino_t dir, const char *name, ino_t newnum); -int check_cgmagic(int cg, struct cg *cgp); +int check_cgmagic(int cg, struct bufarea *cgbp); int chkrange(ufs2_daddr_t blk, int cnt); void ckfini(int markclean); int ckinode(union dinode *dp, struct inodesc *); @@ -357,6 +417,7 @@ int dirscan(struct inodesc *); int dofix(struct inodesc *, const char *msg); int eascan(struct inodesc *, struct ufs2_dinode *dp); void fileerror(ino_t cwd, ino_t ino, const char *errmesg); +void finalIOstats(void); int findino(struct inodesc *); int findname(struct inodesc *); void flush(int fd, struct bufarea *bp); @@ -365,7 +426,8 @@ void freeino(ino_t ino); void freeinodebuf(void); int ftypeok(union dinode *dp); void getblk(struct bufarea *bp, ufs2_daddr_t blk, long size); -struct bufarea *getdatablk(ufs2_daddr_t blkno, long size); +struct bufarea *cgget(int cg); +struct bufarea *getdatablk(ufs2_daddr_t blkno, long size, int type); struct inoinfo *getinoinfo(ino_t inumber); union dinode *getnextinode(ino_t inumber, int rebuildcg); void getpathname(char *namebuf, ino_t curdir, ino_t ino); @@ -375,6 +437,7 @@ void alarmhandler(int sig); void inocleanup(void); void inodirty(void); struct inostat *inoinfo(ino_t inum); +void IOstats(char *what); int linkup(ino_t orphan, ino_t parentdir, char *name); int makeentry(ino_t parent, ino_t ino, const char *name); void panic(const char *fmt, ...) __printflike(1, 2); Modified: stable/9/sbin/fsck_ffs/fsutil.c ============================================================================== --- stable/9/sbin/fsck_ffs/fsutil.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/fsutil.c Tue Apr 23 06:28:49 2013 (r249788) @@ -56,19 +56,24 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "fsck.h" static void slowio_start(void); static void slowio_end(void); +static void printIOstats(void); -long diskreads, totalreads; /* Disk cache statistics */ +static long diskreads, totaldiskreads, totalreads; /* Disk cache statistics */ +static struct timespec startpass, finishpass; struct timeval slowio_starttime; int slowio_delay_usec = 10000; /* Initial IO delay for background fsck */ int slowio_pollcnt; +static struct bufarea cgblk; /* backup buffer for cylinder group blocks */ static TAILQ_HEAD(buflist, bufarea) bufhead; /* head of buffer cache list */ static int numbufs; /* size of buffer cache */ +static char *buftype[BT_NUMBUFTYPES] = BT_NAMES; int ftypeok(union dinode *dp) @@ -158,18 +163,18 @@ bufinit(void) char *bufp; pbp = pdirbp = (struct bufarea *)0; - bufp = malloc((unsigned int)sblock.fs_bsize); + bufp = Malloc((unsigned int)sblock.fs_bsize); if (bufp == 0) errx(EEXIT, "cannot allocate buffer pool"); cgblk.b_un.b_buf = bufp; - initbarea(&cgblk); + initbarea(&cgblk, BT_CYLGRP); TAILQ_INIT(&bufhead); bufcnt = MAXBUFS; if (bufcnt < MINBUFS) bufcnt = MINBUFS; for (i = 0; i < bufcnt; i++) { - bp = (struct bufarea *)malloc(sizeof(struct bufarea)); - bufp = malloc((unsigned int)sblock.fs_bsize); + bp = (struct bufarea *)Malloc(sizeof(struct bufarea)); + bufp = Malloc((unsigned int)sblock.fs_bsize); if (bp == NULL || bufp == NULL) { if (i >= MINBUFS) break; @@ -177,16 +182,72 @@ bufinit(void) } bp->b_un.b_buf = bufp; TAILQ_INSERT_HEAD(&bufhead, bp, b_list); - initbarea(bp); + initbarea(bp, BT_UNKNOWN); } numbufs = i; /* save number of buffers */ + for (i = 0; i < BT_NUMBUFTYPES; i++) { + readtime[i].tv_sec = totalreadtime[i].tv_sec = 0; + readtime[i].tv_nsec = totalreadtime[i].tv_nsec = 0; + readcnt[i] = totalreadcnt[i] = 0; + } +} + +/* + * Manage cylinder group buffers. + */ +static struct bufarea *cgbufs; /* header for cylinder group cache */ +static int flushtries; /* number of tries to reclaim memory */ + +struct bufarea * +cgget(int cg) +{ + struct bufarea *cgbp; + struct cg *cgp; + + if (cgbufs == NULL) { + cgbufs = Calloc(sblock.fs_ncg, sizeof(struct bufarea)); + if (cgbufs == NULL) + errx(EEXIT, "cannot allocate cylinder group buffers"); + } + cgbp = &cgbufs[cg]; + if (cgbp->b_un.b_cg != NULL) + return (cgbp); + cgp = NULL; + if (flushtries == 0) + cgp = malloc((unsigned int)sblock.fs_cgsize); + if (cgp == NULL) { + getblk(&cgblk, cgtod(&sblock, cg), sblock.fs_cgsize); + return (&cgblk); + } + cgbp->b_un.b_cg = cgp; + initbarea(cgbp, BT_CYLGRP); + getblk(cgbp, cgtod(&sblock, cg), sblock.fs_cgsize); + return (cgbp); +} + +/* + * Attempt to flush a cylinder group cache entry. + * Return whether the flush was successful. + */ +int +flushentry(void) +{ + struct bufarea *cgbp; + + cgbp = &cgbufs[flushtries++]; + if (cgbp->b_un.b_cg == NULL) + return (0); + flush(fswritefd, cgbp); + free(cgbp->b_un.b_buf); + cgbp->b_un.b_buf = NULL; + return (1); } /* * Manage a cache of directory blocks. */ struct bufarea * -getdatablk(ufs2_daddr_t blkno, long size) +getdatablk(ufs2_daddr_t blkno, long size, int type) { struct bufarea *bp; @@ -198,26 +259,62 @@ getdatablk(ufs2_daddr_t blkno, long size break; if (bp == NULL) errx(EEXIT, "deadlocked buffer pool"); + bp->b_type = type; getblk(bp, blkno, size); /* fall through */ foundit: + if (debug && bp->b_type != type) + printf("Buffer type changed from %s to %s\n", + buftype[bp->b_type], buftype[type]); TAILQ_REMOVE(&bufhead, bp, b_list); TAILQ_INSERT_HEAD(&bufhead, bp, b_list); bp->b_flags |= B_INUSE; return (bp); } +/* + * Timespec operations (from ). + */ +#define timespecsub(vvp, uvp) \ + do { \ + (vvp)->tv_sec -= (uvp)->tv_sec; \ + (vvp)->tv_nsec -= (uvp)->tv_nsec; \ + if ((vvp)->tv_nsec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_nsec += 1000000000; \ + } \ + } while (0) +#define timespecadd(vvp, uvp) \ + do { \ + (vvp)->tv_sec += (uvp)->tv_sec; \ + (vvp)->tv_nsec += (uvp)->tv_nsec; \ + if ((vvp)->tv_nsec >= 1000000000) { \ + (vvp)->tv_sec++; \ + (vvp)->tv_nsec -= 1000000000; \ + } \ + } while (0) + void getblk(struct bufarea *bp, ufs2_daddr_t blk, long size) { ufs2_daddr_t dblk; + struct timespec start, finish; - totalreads++; dblk = fsbtodb(&sblock, blk); - if (bp->b_bno != dblk) { + if (bp->b_bno == dblk) { + totalreads++; + } else { flush(fswritefd, bp); - diskreads++; + if (debug) { + readcnt[bp->b_type]++; + clock_gettime(CLOCK_REALTIME_PRECISE, &start); + } bp->b_errs = blread(fsreadfd, bp->b_un.b_buf, dblk, size); + if (debug) { + clock_gettime(CLOCK_REALTIME_PRECISE, &finish); + timespecsub(&finish, &start); + timespecadd(&readtime[bp->b_type], &finish); + } bp->b_bno = dblk; bp->b_size = size; } @@ -291,8 +388,8 @@ ckfini(int markclean) } if (debug && totalreads > 0) printf("cache with %d buffers missed %ld of %ld (%d%%)\n", - numbufs, diskreads, totalreads, - (int)(diskreads * 100 / totalreads)); + numbufs, totaldiskreads, totalreads, + (int)(totaldiskreads * 100 / totalreads)); if (fswritefd < 0) { (void)close(fsreadfd); return; @@ -317,6 +414,13 @@ ckfini(int markclean) } if (numbufs != cnt) errx(EEXIT, "panic: lost %d buffers", numbufs - cnt); + for (cnt = 0; cnt < sblock.fs_ncg; cnt++) { + if (cgbufs[cnt].b_un.b_cg == NULL) + continue; + flush(fswritefd, &cgbufs[cnt]); + free(cgbufs[cnt].b_un.b_cg); + } + free(cgbufs); pbp = pdirbp = (struct bufarea *)0; if (cursnapshot == 0 && sblock.fs_clean != markclean) { if ((sblock.fs_clean = markclean) != 0) { @@ -346,6 +450,84 @@ ckfini(int markclean) (void)close(fswritefd); } +/* + * Print out I/O statistics. + */ +void +IOstats(char *what) +{ + int i; + + if (debug == 0) + return; + if (diskreads == 0) { + printf("%s: no I/O\n\n", what); + return; + } + if (startpass.tv_sec == 0) + startpass = startprog; + printf("%s: I/O statistics\n", what); + printIOstats(); + totaldiskreads += diskreads; + diskreads = 0; + for (i = 0; i < BT_NUMBUFTYPES; i++) { + timespecadd(&totalreadtime[i], &readtime[i]); + totalreadcnt[i] += readcnt[i]; + readtime[i].tv_sec = readtime[i].tv_nsec = 0; + readcnt[i] = 0; + } + clock_gettime(CLOCK_REALTIME_PRECISE, &startpass); +} + +void +finalIOstats(void) +{ + int i; + + if (debug == 0) + return; + printf("Final I/O statistics\n"); + totaldiskreads += diskreads; + diskreads = totaldiskreads; + startpass = startprog; + for (i = 0; i < BT_NUMBUFTYPES; i++) { + timespecadd(&totalreadtime[i], &readtime[i]); + totalreadcnt[i] += readcnt[i]; + readtime[i] = totalreadtime[i]; + readcnt[i] = totalreadcnt[i]; + } + printIOstats(); +} + +static void printIOstats(void) +{ + long long msec, totalmsec; + int i; + + clock_gettime(CLOCK_REALTIME_PRECISE, &finishpass); + timespecsub(&finishpass, &startpass); + printf("Running time: %jd.%03ld sec\n", + (intmax_t)finishpass.tv_sec, finishpass.tv_nsec / 1000000); + printf("buffer reads by type:\n"); + for (totalmsec = 0, i = 0; i < BT_NUMBUFTYPES; i++) + totalmsec += readtime[i].tv_sec * 1000 + + readtime[i].tv_nsec / 1000000; + if (totalmsec == 0) + totalmsec = 1; + for (i = 0; i < BT_NUMBUFTYPES; i++) { + if (readcnt[i] == 0) + continue; + msec = + readtime[i].tv_sec * 1000 + readtime[i].tv_nsec / 1000000; + printf("%21s:%8ld %2ld.%ld%% %4jd.%03ld sec %2lld.%lld%%\n", + buftype[i], readcnt[i], readcnt[i] * 100 / diskreads, + (readcnt[i] * 1000 / diskreads) % 10, + (intmax_t)readtime[i].tv_sec, readtime[i].tv_nsec / 1000000, + msec * 100 / totalmsec, (msec * 1000 / totalmsec) % 10); + } + printf("\n"); +} + int blread(int fd, char *buf, ufs2_daddr_t blk, long size) { @@ -357,6 +539,8 @@ blread(int fd, char *buf, ufs2_daddr_t b offset *= dev_bsize; if (bkgrdflag) slowio_start(); + totalreads++; + diskreads++; if (lseek(fd, offset, 0) < 0) rwerror("SEEK BLK", blk); else if (read(fd, buf, (int)size) == size) { @@ -438,8 +622,9 @@ blerase(int fd, ufs2_daddr_t blk, long s * test fails, offer an option to rebuild the whole cylinder group. */ int -check_cgmagic(int cg, struct cg *cgp) +check_cgmagic(int cg, struct bufarea *cgbp) { + struct cg *cgp = cgbp->b_un.b_cg; /* * Extended cylinder group checks. @@ -499,7 +684,7 @@ check_cgmagic(int cg, struct cg *cgp) cgp->cg_nextfreeoff = cgp->cg_clusteroff + howmany(fragstoblks(&sblock, sblock.fs_fpg), CHAR_BIT); } - cgdirty(); + dirty(cgbp); return (0); } @@ -510,7 +695,8 @@ ufs2_daddr_t allocblk(long frags) { int i, j, k, cg, baseblk; - struct cg *cgp = &cgrp; + struct bufarea *cgbp; + struct cg *cgp; if (frags <= 0 || frags > sblock.fs_frag) return (0); @@ -526,8 +712,9 @@ allocblk(long frags) continue; } cg = dtog(&sblock, i + j); - getblk(&cgblk, cgtod(&sblock, cg), sblock.fs_cgsize); - if (!check_cgmagic(cg, cgp)) + cgbp = cgget(cg); + cgp = cgbp->b_un.b_cg; + if (!check_cgmagic(cg, cgbp)) return (0); baseblk = dtogd(&sblock, i + j); for (k = 0; k < frags; k++) { @@ -539,7 +726,7 @@ allocblk(long frags) cgp->cg_cs.cs_nbfree--; else cgp->cg_cs.cs_nffree -= frags; - cgdirty(); + dirty(cgbp); return (i + j); } } Modified: stable/9/sbin/fsck_ffs/inode.c ============================================================================== --- stable/9/sbin/fsck_ffs/inode.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/inode.c Tue Apr 23 06:28:49 2013 (r249788) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); static ino_t startinum; -static int iblock(struct inodesc *, long ilevel, off_t isize); +static int iblock(struct inodesc *, long ilevel, off_t isize, int type); int ckinode(union dinode *dp, struct inodesc *idesc) @@ -121,7 +121,7 @@ ckinode(union dinode *dp, struct inodesc sizepb *= NINDIR(&sblock); if (DIP(&dino, di_ib[i])) { idesc->id_blkno = DIP(&dino, di_ib[i]); - ret = iblock(idesc, i + 1, remsize); + ret = iblock(idesc, i + 1, remsize, BT_LEVEL1 + i); if (ret & STOP) return (ret); } else { @@ -151,7 +151,7 @@ ckinode(union dinode *dp, struct inodesc } static int -iblock(struct inodesc *idesc, long ilevel, off_t isize) +iblock(struct inodesc *idesc, long ilevel, off_t isize, int type) { struct bufarea *bp; int i, n, (*func)(struct inodesc *), nif; @@ -168,7 +168,7 @@ iblock(struct inodesc *idesc, long ileve func = dirscan; if (chkrange(idesc->id_blkno, idesc->id_numfrags)) return (SKIP); - bp = getdatablk(idesc->id_blkno, sblock.fs_bsize); + bp = getdatablk(idesc->id_blkno, sblock.fs_bsize, type); ilevel--; for (sizepb = sblock.fs_bsize, i = 0; i < ilevel; i++) sizepb *= NINDIR(&sblock); @@ -199,7 +199,7 @@ iblock(struct inodesc *idesc, long ileve if (ilevel == 0) n = (*func)(idesc); else - n = iblock(idesc, ilevel, isize); + n = iblock(idesc, ilevel, isize, type); if (n & STOP) { bp->b_flags &= ~B_INUSE; return (n); @@ -291,7 +291,7 @@ ginode(ino_t inumber) iblk = ino_to_fsba(&sblock, inumber); if (pbp != 0) pbp->b_flags &= ~B_INUSE; - pbp = getdatablk(iblk, sblock.fs_bsize); + pbp = getdatablk(iblk, sblock.fs_bsize, BT_INODES); startinum = (inumber / INOPB(&sblock)) * INOPB(&sblock); } if (sblock.fs_magic == FS_UFS1_MAGIC) @@ -305,8 +305,8 @@ ginode(ino_t inumber) * over all the inodes in numerical order. */ static ino_t nextino, lastinum, lastvalidinum; -static long readcnt, readpercg, fullcnt, inobufsize, partialcnt, partialsize; -static caddr_t inodebuf; +static long readcount, readpercg, fullcnt, inobufsize, partialcnt, partialsize; +static struct bufarea inobuf; union dinode * getnextinode(ino_t inumber, int rebuildcg) @@ -314,16 +314,16 @@ getnextinode(ino_t inumber, int rebuildc int j; long size; mode_t mode; - ufs2_daddr_t ndb, dblk; + ufs2_daddr_t ndb, blk; union dinode *dp; static caddr_t nextinop; if (inumber != nextino++ || inumber > lastvalidinum) errx(EEXIT, "bad inode number %d to nextinode", inumber); if (inumber >= lastinum) { - readcnt++; - dblk = fsbtodb(&sblock, ino_to_fsba(&sblock, lastinum)); - if (readcnt % readpercg == 0) { + readcount++; + blk = ino_to_fsba(&sblock, lastinum); + if (readcount % readpercg == 0) { size = partialsize; lastinum += partialcnt; } else { @@ -331,14 +331,14 @@ getnextinode(ino_t inumber, int rebuildc lastinum += fullcnt; } /* - * If blread returns an error, it will already have zeroed + * If getblk encounters an error, it will already have zeroed * out the buffer, so we do not need to do so here. */ - (void)blread(fsreadfd, inodebuf, dblk, size); - nextinop = inodebuf; + getblk(&inobuf, blk, size); + nextinop = inobuf.b_un.b_buf; } dp = (union dinode *)nextinop; - if (rebuildcg && nextinop == inodebuf) { + if (rebuildcg && nextinop == inobuf.b_un.b_buf) { /* * Try to determine if we have reached the end of the * allocated inodes. @@ -403,8 +403,8 @@ setinodebuf(ino_t inum) startinum = 0; nextino = inum; lastinum = inum; - readcnt = 0; - if (inodebuf != NULL) + readcount = 0; + if (inobuf.b_un.b_buf != NULL) return; inobufsize = blkroundup(&sblock, INOBUFSIZE); fullcnt = inobufsize / ((sblock.fs_magic == FS_UFS1_MAGIC) ? @@ -419,7 +419,8 @@ setinodebuf(ino_t inum) partialcnt = fullcnt; partialsize = inobufsize; } - if ((inodebuf = malloc((unsigned)inobufsize)) == NULL) + initbarea(&inobuf, BT_INODES); + if ((inobuf.b_un.b_buf = Malloc((unsigned)inobufsize)) == NULL) errx(EEXIT, "cannot allocate space for inode buffer"); } @@ -427,9 +428,9 @@ void freeinodebuf(void) { - if (inodebuf != NULL) - free((char *)inodebuf); - inodebuf = NULL; + if (inobuf.b_un.b_buf != NULL) + free((char *)inobuf.b_un.b_buf); + inobuf.b_un.b_buf = NULL; } /* @@ -450,7 +451,7 @@ cacheino(union dinode *dp, ino_t inumber else blks = howmany(DIP(dp, di_size), sblock.fs_bsize); inp = (struct inoinfo *) - malloc(sizeof(*inp) + (blks - 1) * sizeof(ufs2_daddr_t)); + Malloc(sizeof(*inp) + (blks - 1) * sizeof(ufs2_daddr_t)); if (inp == NULL) errx(EEXIT, "cannot increase directory list"); inpp = &inphead[inumber % dirhash]; @@ -653,7 +654,8 @@ allocino(ino_t request, int type) { ino_t ino; union dinode *dp; - struct cg *cgp = &cgrp; + struct bufarea *cgbp; + struct cg *cgp; int cg; if (request == 0) @@ -666,8 +668,9 @@ allocino(ino_t request, int type) if (ino == maxino) return (0); cg = ino_to_cg(&sblock, ino); - getblk(&cgblk, cgtod(&sblock, cg), sblock.fs_cgsize); - if (!check_cgmagic(cg, cgp)) + cgbp = cgget(cg); + cgp = cgbp->b_un.b_cg; + if (!check_cgmagic(cg, cgbp)) return (0); setbit(cg_inosused(cgp), ino % sblock.fs_ipg); cgp->cg_cs.cs_nifree--; @@ -683,7 +686,7 @@ allocino(ino_t request, int type) default: return (0); } - cgdirty(); + dirty(cgbp); dp = ginode(ino); DIP_SET(dp, di_db[0], allocblk((long)1)); if (DIP(dp, di_db[0]) == 0) { Modified: stable/9/sbin/fsck_ffs/main.c ============================================================================== --- stable/9/sbin/fsck_ffs/main.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/main.c Tue Apr 23 06:28:49 2013 (r249788) @@ -426,7 +426,9 @@ checkfilesys(char *filesys) printf("** Root file system\n"); printf("** Phase 1 - Check Blocks and Sizes\n"); } + clock_gettime(CLOCK_REALTIME_PRECISE, &startprog); pass1(); + IOstats("Pass1"); /* * 1b: locate first references to duplicates, if any @@ -439,6 +441,7 @@ checkfilesys(char *filesys) usedsoftdep ? "softupdates" : ""); printf("** Phase 1b - Rescan For More DUPS\n"); pass1b(); + IOstats("Pass1b"); } /* @@ -447,6 +450,7 @@ checkfilesys(char *filesys) if (preen == 0) printf("** Phase 2 - Check Pathnames\n"); pass2(); + IOstats("Pass2"); /* * 3: scan inodes looking for disconnected directories @@ -454,6 +458,7 @@ checkfilesys(char *filesys) if (preen == 0) printf("** Phase 3 - Check Connectivity\n"); pass3(); + IOstats("Pass3"); /* * 4: scan inodes looking for disconnected files; check reference counts @@ -461,6 +466,7 @@ checkfilesys(char *filesys) if (preen == 0) printf("** Phase 4 - Check Reference Counts\n"); pass4(); + IOstats("Pass4"); /* * 5: check and repair resource counts in cylinder groups @@ -468,6 +474,7 @@ checkfilesys(char *filesys) if (preen == 0) printf("** Phase 5 - Check Cyl groups\n"); pass5(); + IOstats("Pass5"); /* * print out summary statistics @@ -521,6 +528,7 @@ checkfilesys(char *filesys) } if (rerun) resolved = 0; + finalIOstats(); /* * Check to see if the file system is mounted read-write. Modified: stable/9/sbin/fsck_ffs/pass1.c ============================================================================== --- stable/9/sbin/fsck_ffs/pass1.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/pass1.c Tue Apr 23 06:28:49 2013 (r249788) @@ -61,6 +61,8 @@ pass1(void) { struct inostat *info; struct inodesc idesc; + struct bufarea *cgbp; + struct cg *cgp; ino_t inumber, inosused, mininos; ufs2_daddr_t i, cgd; u_int8_t *cp; @@ -92,12 +94,13 @@ pass1(void) for (c = 0; c < sblock.fs_ncg; c++) { inumber = c * sblock.fs_ipg; setinodebuf(inumber); - getblk(&cgblk, cgtod(&sblock, c), sblock.fs_cgsize); + cgbp = cgget(c); + cgp = cgbp->b_un.b_cg; rebuildcg = 0; - if (!check_cgmagic(c, &cgrp)) + if (!check_cgmagic(c, cgbp)) rebuildcg = 1; if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) { - inosused = cgrp.cg_initediblk; + inosused = cgp->cg_initediblk; if (inosused > sblock.fs_ipg) { pfatal("%s (%d > %d) %s %d\nReset to %d\n", "Too many initialized inodes", inosused, @@ -127,7 +130,7 @@ pass1(void) * read only those inodes in from disk. */ if ((preen || inoopt) && usedsoftdep && !rebuildcg) { - cp = &cg_inosused(&cgrp)[(inosused - 1) / CHAR_BIT]; + cp = &cg_inosused(cgp)[(inosused - 1) / CHAR_BIT]; for ( ; inosused > 0; inosused -= CHAR_BIT, cp--) { if (*cp == 0) continue; @@ -149,7 +152,7 @@ pass1(void) inostathead[c].il_stat = 0; continue; } - info = calloc((unsigned)inosused, sizeof(struct inostat)); + info = Calloc((unsigned)inosused, sizeof(struct inostat)); if (info == NULL) errx(EEXIT, "cannot alloc %u bytes for inoinfo", (unsigned)(sizeof(struct inostat) * inosused)); @@ -169,7 +172,7 @@ pass1(void) * valid number for this cylinder group. */ if (checkinode(inumber, &idesc, rebuildcg) == 0 && - i > cgrp.cg_initediblk) + i > cgp->cg_initediblk) break; } /* @@ -181,16 +184,16 @@ pass1(void) mininos = roundup(inosused + INOPB(&sblock), INOPB(&sblock)); if (inoopt && !preen && !rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC && - cgrp.cg_initediblk > 2 * INOPB(&sblock) && - mininos < cgrp.cg_initediblk) { - i = cgrp.cg_initediblk; + cgp->cg_initediblk > 2 * INOPB(&sblock) && + mininos < cgp->cg_initediblk) { + i = cgp->cg_initediblk; if (mininos < 2 * INOPB(&sblock)) - cgrp.cg_initediblk = 2 * INOPB(&sblock); + cgp->cg_initediblk = 2 * INOPB(&sblock); else - cgrp.cg_initediblk = mininos; + cgp->cg_initediblk = mininos; pwarn("CYLINDER GROUP %d: RESET FROM %ju TO %d %s\n", - c, i, cgrp.cg_initediblk, "VALID INODES"); - cgdirty(); + c, i, cgp->cg_initediblk, "VALID INODES"); + dirty(cgbp); } if (inosused < sblock.fs_ipg) continue; @@ -199,11 +202,11 @@ pass1(void) inosused = 0; else inosused = lastino - (c * sblock.fs_ipg); - if (rebuildcg && inosused > cgrp.cg_initediblk && + if (rebuildcg && inosused > cgp->cg_initediblk && sblock.fs_magic == FS_UFS2_MAGIC) { - cgrp.cg_initediblk = roundup(inosused, INOPB(&sblock)); + cgp->cg_initediblk = roundup(inosused, INOPB(&sblock)); pwarn("CYLINDER GROUP %d: FOUND %d VALID INODES\n", c, - cgrp.cg_initediblk); + cgp->cg_initediblk); } /* * If we were not able to determine in advance which inodes @@ -219,7 +222,7 @@ pass1(void) inostathead[c].il_stat = 0; continue; } - info = calloc((unsigned)inosused, sizeof(struct inostat)); + info = Calloc((unsigned)inosused, sizeof(struct inostat)); if (info == NULL) errx(EEXIT, "cannot alloc %u bytes for inoinfo", (unsigned)(sizeof(struct inostat) * inosused)); @@ -482,7 +485,7 @@ pass1check(struct inodesc *idesc) } return (STOP); } - new = (struct dups *)malloc(sizeof(struct dups)); + new = (struct dups *)Malloc(sizeof(struct dups)); if (new == NULL) { pfatal("DUP TABLE OVERFLOW."); if (reply("CONTINUE") == 0) { Modified: stable/9/sbin/fsck_ffs/pass5.c ============================================================================== --- stable/9/sbin/fsck_ffs/pass5.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/pass5.c Tue Apr 23 06:28:49 2013 (r249788) @@ -59,14 +59,14 @@ pass5(void) int c, i, j, blk, frags, basesize, mapsize; int inomapsize, blkmapsize; struct fs *fs = &sblock; - struct cg *cg = &cgrp; ufs2_daddr_t d, dbase, dmax, start; int rewritecg = 0; struct csum *cs; struct csum_total cstotal; struct inodesc idesc[3]; char buf[MAXBSIZE]; - struct cg *newcg = (struct cg *)buf; + struct cg *cg, *newcg = (struct cg *)buf; + struct bufarea *cgbp; inoinfo(WINO)->ino_state = USTATE; memset(newcg, 0, (size_t)fs->fs_cgsize); @@ -162,7 +162,8 @@ pass5(void) c * 100 / sblock.fs_ncg); got_sigalarm = 0; } - getblk(&cgblk, cgtod(fs, c), fs->fs_cgsize); + cgbp = cgget(c); + cg = cgbp->b_un.b_cg; if (!cg_chkmagic(cg)) pfatal("CG %d: BAD MAGIC NUMBER\n", c); newcg->cg_time = cg->cg_time; @@ -324,14 +325,14 @@ pass5(void) } if (rewritecg) { memmove(cg, newcg, (size_t)fs->fs_cgsize); - cgdirty(); + dirty(cgbp); continue; } if (cursnapshot == 0 && memcmp(newcg, cg, basesize) != 0 && dofix(&idesc[2], "SUMMARY INFORMATION BAD")) { memmove(cg, newcg, (size_t)basesize); - cgdirty(); + dirty(cgbp); } if (bkgrdflag != 0 || usedsoftdep || debug) update_maps(cg, newcg, bkgrdflag); @@ -340,7 +341,7 @@ pass5(void) dofix(&idesc[1], "BLK(S) MISSING IN BIT MAPS")) { memmove(cg_inosused(cg), cg_inosused(newcg), (size_t)mapsize); - cgdirty(); + dirty(cgbp); } } if (cursnapshot == 0 && Modified: stable/9/sbin/fsck_ffs/setup.c ============================================================================== --- stable/9/sbin/fsck_ffs/setup.c Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/setup.c Tue Apr 23 06:28:49 2013 (r249788) @@ -240,7 +240,7 @@ setup(char *dev) * read in the summary info. */ asked = 0; - sblock.fs_csp = calloc(1, sblock.fs_cssize); + sblock.fs_csp = Calloc(1, sblock.fs_cssize); if (sblock.fs_csp == NULL) { printf("cannot alloc %u bytes for cg summary info\n", (unsigned)sblock.fs_cssize); @@ -249,6 +249,7 @@ setup(char *dev) for (i = 0, j = 0; i < sblock.fs_cssize; i += sblock.fs_bsize, j++) { size = sblock.fs_cssize - i < sblock.fs_bsize ? sblock.fs_cssize - i : sblock.fs_bsize; + readcnt[sblk.b_type]++; if (blread(fsreadfd, (char *)sblock.fs_csp + i, fsbtodb(&sblock, sblock.fs_csaddr + j * sblock.fs_frag), size) != 0 && !asked) { @@ -264,13 +265,13 @@ setup(char *dev) * allocate and initialize the necessary maps */ bmapsize = roundup(howmany(maxfsblock, CHAR_BIT), sizeof(short)); - blockmap = calloc((unsigned)bmapsize, sizeof (char)); + blockmap = Calloc((unsigned)bmapsize, sizeof (char)); if (blockmap == NULL) { printf("cannot alloc %u bytes for blockmap\n", (unsigned)bmapsize); goto badsb; } - inostathead = calloc((unsigned)(sblock.fs_ncg), + inostathead = Calloc((unsigned)(sblock.fs_ncg), sizeof(struct inostatlist)); if (inostathead == NULL) { printf("cannot alloc %u bytes for inostathead\n", @@ -281,9 +282,9 @@ setup(char *dev) dirhash = numdirs; inplast = 0; listmax = numdirs + 10; - inpsort = (struct inoinfo **)calloc((unsigned)listmax, + inpsort = (struct inoinfo **)Calloc((unsigned)listmax, sizeof(struct inoinfo *)); - inphead = (struct inoinfo **)calloc((unsigned)numdirs, + inphead = (struct inoinfo **)Calloc((unsigned)numdirs, sizeof(struct inoinfo *)); if (inpsort == NULL || inphead == NULL) { printf("cannot alloc %ju bytes for inphead\n", @@ -322,6 +323,7 @@ readsb(int listerr) if (bflag) { super = bflag; + readcnt[sblk.b_type]++; if ((blread(fsreadfd, (char *)&sblock, super, (long)SBLOCKSIZE))) return (0); if (sblock.fs_magic == FS_BAD_MAGIC) { @@ -337,6 +339,7 @@ readsb(int listerr) } else { for (i = 0; sblock_try[i] != -1; i++) { super = sblock_try[i] / dev_bsize; + readcnt[sblk.b_type]++; if ((blread(fsreadfd, (char *)&sblock, super, (long)SBLOCKSIZE))) return (0); @@ -439,10 +442,10 @@ sblock_init(void) fswritefd = -1; fsmodified = 0; lfdir = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Apr 23 07:09:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 232746A5; Tue, 23 Apr 2013 07:09:21 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx1.freebsd.org (Postfix) with ESMTP id 5C8D31C20; Tue, 23 Apr 2013 07:09:19 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id d17so90268eek.26 for ; Tue, 23 Apr 2013 00:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=0uppvLtrGWrwssiS87K25MWNwuBSHWi31pTGBM1ySTw=; b=EDLD/8n6VU/qnTi+fvK2TT+1PGdpU53iNZlT8s+9PyWNUXFqyLqsybTqJwvnuPHIKB 7IJ+xJISYhppor5JuDQ8HrVp3wLKisX0k6LL6K+Zp4TdWgYlzoCbS/ykekQCWtilXl6O ALm6MQZEA6PMKcG68uvd+6iSke22hMeYayramFgQp8jsErVPiGjD21QD/zaPzdym0ZSC YMIbKNSIEM0SH135MwfmUybiR27BTyuPFPtUqeqceDQISq5qln7PSnWKDJnsKGouV2v7 /zJ4/UhrUrQlWppI/fxC7rbbdC41KniohuucgFdHoKtF3E+pNpkGjSMJEfMt2P4R4liu Wz2Q== X-Received: by 10.15.95.74 with SMTP id bc50mr23279475eeb.36.1366700570894; Tue, 23 Apr 2013 00:02:50 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id j43sm10325915eep.4.2013.04.23.00.02.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 00:02:49 -0700 (PDT) Sender: Alexander Motin Message-ID: <51763216.5000101@FreeBSD.org> Date: Tue, 23 Apr 2013 10:02:46 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5 MIME-Version: 1.0 To: Scott Long Subject: Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi References: <201304180944.r3I9i05t093967@svn.freebsd.org> In-Reply-To: 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, Peter Wemm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Apr 2013 07:09:21 -0000 On 23.04.2013 05:35, Scott Long wrote: > What problem does this solve, other than to unintentionally break the MPT driver? This needs to be backed out of HEAD and stable/9 until a better analysis is done. It depends on definition of "problem". I don't think that polling in a tight loop is a right way to do anything while system is operational. Search through the sources shows that the only two drivers doing nasty things on shutdown_post_sync are mpt and hptmv. While hptmv really shuts worker thread down there, mpt just disables interrupts breaking normal operation. That situation looks quite dirty to me. From one side if controller really needs shutdown (to flush some caches, etc), then it should not receive any (or reject all) commands after that point (either polled or not). If it doesn't need shutdown, then what for are these shaman dances? Instead of revert, I propose this trivial non-invasive patch to fix the problem by moving hptmv and mpt shutdown a bit later in shutdown order: http://people.freebsd.org/~mav/post_sync.patch > On Apr 18, 2013, at 3:44 AM, Alexander Motin wrote: > >> Author: mav >> Date: Thu Apr 18 09:44:00 2013 >> New Revision: 249611 >> URL: http://svnweb.freebsd.org/changeset/base/249611 >> >> Log: >> MFC r248872, r249048: >> Make pre-shutdown flush and spindown routines to not use xpt_polled_action(), >> but execute the commands in regular way. There is no any reason to cook CPU >> while the system is still fully operational. After this change polling in >> CAM is used only for kernel dumping. >> >> Modified: >> stable/9/sys/cam/ata/ata_da.c >> stable/9/sys/cam/scsi/scsi_da.c >> Directory Properties: >> stable/9/sys/ (props changed) >> >> Modified: stable/9/sys/cam/ata/ata_da.c >> ============================================================================== >> --- stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:40:34 2013 (r249610) >> +++ stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:44:00 2013 (r249611) >> @@ -1825,11 +1825,10 @@ adaflush(void) >> { >> struct cam_periph *periph; >> struct ada_softc *softc; >> + union ccb *ccb; >> int error; >> >> CAM_PERIPH_FOREACH(periph, &adadriver) { >> - union ccb ccb; >> - >> /* If we paniced with lock held - not recurse here. */ >> if (cam_periph_owned(periph)) >> continue; >> @@ -1845,10 +1844,8 @@ adaflush(void) >> continue; >> } >> >> - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); >> - >> - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; >> - cam_fill_ataio(&ccb.ataio, >> + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); >> + cam_fill_ataio(&ccb->ataio, >> 0, >> adadone, >> CAM_DIR_NONE, >> @@ -1856,20 +1853,17 @@ adaflush(void) >> NULL, >> 0, >> ada_default_timeout*1000); >> - >> if (softc->flags & ADA_FLAG_CAN_48BIT) >> - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); >> + ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); >> else >> - ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); >> - xpt_polled_action(&ccb); >> + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); >> >> - error = cam_periph_error(&ccb, >> - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); >> - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) >> - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, >> - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); >> + error = cam_periph_runccb(ccb, adaerror, /*cam_flags*/0, >> + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, >> + softc->disk->d_devstat); >> if (error != 0) >> xpt_print(periph->path, "Synchronize cache failed\n"); >> + xpt_release_ccb(ccb); >> cam_periph_unlock(periph); >> } >> } >> @@ -1879,11 +1873,10 @@ adaspindown(uint8_t cmd, int flags) >> { >> struct cam_periph *periph; >> struct ada_softc *softc; >> + union ccb *ccb; >> int error; >> >> CAM_PERIPH_FOREACH(periph, &adadriver) { >> - union ccb ccb; >> - >> /* If we paniced with lock held - not recurse here. */ >> if (cam_periph_owned(periph)) >> continue; >> @@ -1900,10 +1893,8 @@ adaspindown(uint8_t cmd, int flags) >> if (bootverbose) >> xpt_print(periph->path, "spin-down\n"); >> >> - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); >> - >> - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; >> - cam_fill_ataio(&ccb.ataio, >> + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); >> + cam_fill_ataio(&ccb->ataio, >> 0, >> adadone, >> CAM_DIR_NONE | flags, >> @@ -1911,17 +1902,14 @@ adaspindown(uint8_t cmd, int flags) >> NULL, >> 0, >> ada_default_timeout*1000); >> + ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, 0); >> >> - ata_28bit_cmd(&ccb.ataio, cmd, 0, 0, 0); >> - xpt_polled_action(&ccb); >> - >> - error = cam_periph_error(&ccb, >> - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); >> - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) >> - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, >> - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); >> + error = cam_periph_runccb(ccb, adaerror, /*cam_flags*/0, >> + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, >> + softc->disk->d_devstat); >> if (error != 0) >> xpt_print(periph->path, "Spin-down disk failed\n"); >> + xpt_release_ccb(ccb); >> cam_periph_unlock(periph); >> } >> } >> >> Modified: stable/9/sys/cam/scsi/scsi_da.c >> ============================================================================== >> --- stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:40:34 2013 (r249610) >> +++ stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:44:00 2013 (r249611) >> @@ -2834,11 +2834,10 @@ dashutdown(void * arg, int howto) >> { >> struct cam_periph *periph; >> struct da_softc *softc; >> + union ccb *ccb; >> int error; >> >> CAM_PERIPH_FOREACH(periph, &dadriver) { >> - union ccb ccb; >> - >> cam_periph_lock(periph); >> softc = (struct da_softc *)periph->softc; >> >> @@ -2852,10 +2851,8 @@ dashutdown(void * arg, int howto) >> continue; >> } >> >> - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); >> - >> - ccb.ccb_h.ccb_state = DA_CCB_DUMP; >> - scsi_synchronize_cache(&ccb.csio, >> + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); >> + scsi_synchronize_cache(&ccb->csio, >> /*retries*/0, >> /*cbfcnp*/dadone, >> MSG_SIMPLE_Q_TAG, >> @@ -2864,15 +2861,12 @@ dashutdown(void * arg, int howto) >> SSD_FULL_SIZE, >> 60 * 60 * 1000); >> >> - xpt_polled_action(&ccb); >> - >> - error = cam_periph_error(&ccb, >> - 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, NULL); >> - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) >> - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, >> - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); >> + error = cam_periph_runccb(ccb, daerror, /*cam_flags*/0, >> + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, >> + softc->disk->d_devstat); >> if (error != 0) >> xpt_print(periph->path, "Synchronize cache failed\n"); >> + xpt_release_ccb(ccb); >> cam_periph_unlock(periph); >> } >> } > -- Alexander Motin From owner-svn-src-stable@FreeBSD.ORG Tue Apr 23 22:45:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 95573625; Tue, 23 Apr 2013 22:45:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8D81322; Tue, 23 Apr 2013 22:45:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3NMj4fi031272; Tue, 23 Apr 2013 22:45:04 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3NMj4eh031271; Tue, 23 Apr 2013 22:45:04 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201304232245.r3NMj4eh031271@svn.freebsd.org> From: Devin Teske Date: Tue, 23 Apr 2013 22:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249822 - stable/9/usr.sbin/sysinstall X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Apr 2013 22:45:04 -0000 Author: dteske Date: Tue Apr 23 22:45:03 2013 New Revision: 249822 URL: http://svnweb.freebsd.org/changeset/base/249822 Log: Update error messages when processing the INDEX file to display the given path rather than a static string. This makes the error messages consistent with the rest of the functions which already do the same thing (assumed to be an oversight or r47055, 13+ years ago). A direct commit to stable/9. Reviewed by: eadler MFC after: 3 days Modified: stable/9/usr.sbin/sysinstall/index.c Modified: stable/9/usr.sbin/sysinstall/index.c ============================================================================== --- stable/9/usr.sbin/sysinstall/index.c Tue Apr 23 19:42:45 2013 (r249821) +++ stable/9/usr.sbin/sysinstall/index.c Tue Apr 23 22:45:03 2013 (r249822) @@ -865,11 +865,11 @@ index_initialize(char *path) msgNotify("Attempting to fetch %s file from selected media.", path); fp = DEVICE_GET(mediaDevice, path, TRUE); if (!fp) { - msgConfirm("Unable to get packages/INDEX file from selected media.\n\n" + msgConfirm("Unable to get %s file from selected media.\n\n" "This may be because the packages collection is not available\n" "on the distribution media you've chosen, most likely an FTP site\n" "without the packages collection mirrored. Please verify that\n" - "your media, or your path to the media, is correct and try again."); + "your media, or your path to the media, is correct and try again.", path); DEVICE_SHUTDOWN(mediaDevice); restorescr(w); return DITEM_FAILURE; @@ -878,8 +878,9 @@ index_initialize(char *path) msgNotify("Located INDEX, now reading package data from it..."); index_init(&Top, &Plist); if (index_read(fp, &Top)) { - msgConfirm("I/O or format error on packages/INDEX file.\n" - "Please verify media (or path to media) and try again."); + msgConfirm("I/O or format error on %s file.\n" + "Please verify media (or path to media) and try again.", + path); fclose(fp); restorescr(w); return DITEM_FAILURE; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 04:21:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1FDD96E5; Wed, 24 Apr 2013 04:21:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 107FC1DFA; Wed, 24 Apr 2013 04:21:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3O4LKo0051172; Wed, 24 Apr 2013 04:21:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3O4LJE4051165; Wed, 24 Apr 2013 04:21:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304240421.r3O4LJE4051165@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Apr 2013 04:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249828 - in stable/9/games/fortune: datfiles fortune unstr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 04:21:21 -0000 Author: eadler Date: Wed Apr 24 04:21:19 2013 New Revision: 249828 URL: http://svnweb.freebsd.org/changeset/base/249828 Log: Merge unmerged commits to fortune(1) Modified: stable/9/games/fortune/datfiles/fortunes stable/9/games/fortune/datfiles/freebsd-tips stable/9/games/fortune/fortune/fortune.c stable/9/games/fortune/unstr/unstr.c Directory Properties: stable/9/games/fortune/ (props changed) stable/9/games/fortune/fortune/ (props changed) Modified: stable/9/games/fortune/datfiles/fortunes ============================================================================== --- stable/9/games/fortune/datfiles/fortunes Wed Apr 24 03:15:55 2013 (r249827) +++ stable/9/games/fortune/datfiles/fortunes Wed Apr 24 04:21:19 2013 (r249828) @@ -901,7 +901,7 @@ to add. This will take at least two wee "Even that is too much to expect," insisted the manager, "I will be satisfied if you simply tell me when the program is complete." The programmer agreed to this. - Several years slated, the manager retired. On the way to his + Several years later, the manager retired. On the way to his retirement lunch, he discovered the programmer asleep at his terminal. He had been programming all night. -- Geoffrey James, "The Tao of Programming" @@ -7947,7 +7947,7 @@ the same mistake twice without getting n A well-known friend is a treasure. % A well-used door needs no oil on its hinges. -A swift-flowing steam does no grow stagnant. +A swift-flowing stream does not grow stagnant. Neither sound nor thoughts can travel through a vacuum. Software rots if not used. Modified: stable/9/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/9/games/fortune/datfiles/freebsd-tips Wed Apr 24 03:15:55 2013 (r249827) +++ stable/9/games/fortune/datfiles/freebsd-tips Wed Apr 24 04:21:19 2013 (r249828) @@ -373,16 +373,6 @@ modes. % You can disable tcsh's terminal beep if you `set nobeep'. % -You can get a good generic server install by using the -instant-server port/package. If you have ports installed, you can -install it by doing - - # cd /usr/ports/misc/instant-server - # make install && make clean - -as root. This will install a collection of packages that is appropriate for -running a "generic" server. -% You can install extra packages for FreeBSD by using the ports system. If you have installed it, you can download, compile, and install software by just typing Modified: stable/9/games/fortune/fortune/fortune.c ============================================================================== --- stable/9/games/fortune/fortune/fortune.c Wed Apr 24 03:15:55 2013 (r249827) +++ stable/9/games/fortune/fortune/fortune.c Wed Apr 24 04:21:19 2013 (r249828) @@ -682,7 +682,7 @@ all_forts(FILEDESC *fp, char *offensive) obscene->fd = fd; obscene->inf = NULL; obscene->path = offensive; - if ((sp = rindex(offensive, '/')) == NULL) + if ((sp = strrchr(offensive, '/')) == NULL) obscene->name = offensive; else obscene->name = ++sp; @@ -783,7 +783,7 @@ is_fortfile(const char *file, char **dat } } - if ((sp = rindex(file, '/')) == NULL) + if ((sp = strrchr(file, '/')) == NULL) sp = file; else sp++; @@ -795,7 +795,7 @@ is_fortfile(const char *file, char **dat DPRINTF(2, (stderr, "FALSE (check fortunes only)\n")); return (FALSE); } - if ((sp = rindex(sp, '.')) != NULL) { + if ((sp = strrchr(sp, '.')) != NULL) { sp++; for (i = 0; suflist[i] != NULL; i++) if (strcmp(sp, suflist[i]) == 0) { Modified: stable/9/games/fortune/unstr/unstr.c ============================================================================== --- stable/9/games/fortune/unstr/unstr.c Wed Apr 24 03:15:55 2013 (r249827) +++ stable/9/games/fortune/unstr/unstr.c Wed Apr 24 04:21:19 2013 (r249828) @@ -67,13 +67,13 @@ __FBSDID("$FreeBSD$"); #include "strfile.h" -char *Infile, /* name of input file */ - Datafile[MAXPATHLEN], /* name of data file */ - Delimch; /* delimiter character */ +static char *Infile, /* name of input file */ + Datafile[MAXPATHLEN], /* name of data file */ + Delimch; /* delimiter character */ -FILE *Inf, *Dataf; +static FILE *Inf, *Dataf; -void order_unstr(STRFILE *); +static void order_unstr(STRFILE *); /* ARGSUSED */ int @@ -107,7 +107,7 @@ main(int argc, char *argv[]) exit(0); } -void +static void order_unstr(STRFILE *tbl) { uint32_t i; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 04:21:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D2B296E6; Wed, 24 Apr 2013 04:21:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B40281DFB; Wed, 24 Apr 2013 04:21:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3O4LP0W051223; Wed, 24 Apr 2013 04:21:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3O4LODw051211; Wed, 24 Apr 2013 04:21:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304240421.r3O4LODw051211@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Apr 2013 04:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249829 - in stable/8/games/fortune: datfiles fortune strfile unstr X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 04:21:25 -0000 Author: eadler Date: Wed Apr 24 04:21:23 2013 New Revision: 249829 URL: http://svnweb.freebsd.org/changeset/base/249829 Log: Merge unmerged commits to fortune(1) Modified: stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/freebsd-tips stable/8/games/fortune/fortune/Makefile stable/8/games/fortune/fortune/fortune.6 stable/8/games/fortune/fortune/fortune.c stable/8/games/fortune/fortune/pathnames.h stable/8/games/fortune/strfile/Makefile stable/8/games/fortune/strfile/strfile.8 stable/8/games/fortune/strfile/strfile.c stable/8/games/fortune/strfile/strfile.h stable/8/games/fortune/unstr/Makefile stable/8/games/fortune/unstr/unstr.c Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Wed Apr 24 04:21:19 2013 (r249828) +++ stable/8/games/fortune/datfiles/fortunes Wed Apr 24 04:21:23 2013 (r249829) @@ -901,7 +901,7 @@ to add. This will take at least two wee "Even that is too much to expect," insisted the manager, "I will be satisfied if you simply tell me when the program is complete." The programmer agreed to this. - Several years slated, the manager retired. On the way to his + Several years later, the manager retired. On the way to his retirement lunch, he discovered the programmer asleep at his terminal. He had been programming all night. -- Geoffrey James, "The Tao of Programming" @@ -1528,6 +1528,13 @@ friends and family, and then justify thi for doing it." -- Bruce Feirstein, "Nice Guys Sleep Alone" % + As we know, there are known knowns. There are things we know we +know. We also know there are known unknowns. That is to say, we know +there're some things we do not know. But there're also unknown unknowns; +the ones we don't know we don't know." + -- Defense Secretary Donald Rumsfeld, + about the invasion to Iraq. +% At a recent meeting in Snowmass, Colorado, a participant from Los Angeles fainted from hyperoxygenation, and we had to hold his head under the exhaust of a bus until he revived. @@ -7947,7 +7954,7 @@ the same mistake twice without getting n A well-known friend is a treasure. % A well-used door needs no oil on its hinges. -A swift-flowing steam does no grow stagnant. +A swift-flowing stream does not grow stagnant. Neither sound nor thoughts can travel through a vacuum. Software rots if not used. @@ -32844,6 +32851,12 @@ Mistakeholder, n.: % Mistakes are often the stepping stones to utter failure. % +Mistakeholder, n.: + A person who depends on accidental features or + implementation errors and so now has a vested + interest in keeping things from being fixed. + -- Chip Morningstar +% Mistrust first impulses; they are always right. % MIT: @@ -45636,6 +45649,13 @@ constitutions, displaying the utmost imp overturning everything. -- Plato, "Republic", 370 B.C. % +The investment community feels very putupon. They feel there is no +reason why they shouldn't earn $1 million to $200 million a year, +and they don't want to be held responsible for the global financial +meltdown. + -- Daniel Fass, chairman of Obama's + financial-industry fundraising party +% The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. % @@ -59051,3 +59071,19 @@ since I first call'd my brother's father Zymurgy's Law of Volunteer Labor: People are always available for work in the past tense. % +This email and any files transmitted with it are confidential and +intended solely for the use of the individual or entity to which they +are addressed. If you are not the intended recipient of this +transmission, please delete it immediately. + +Obviously, I am the idiot who sent it to you by mistake. Furthermore, +there is no way I can force you to delete it. Worse, by the time you +have reached this disclaimer you have already read the document. +Telling you to forget it would seem absurd. In any event, I have no +legal right to force you to take any action upon this email anyway. + +This entire disclaimer is just a waste of everyone's time and +bandwidth. Therefore, let us just forget the whole thing and enjoy a +cold beer instead. + -- found on the dovecot mailinglist +% Modified: stable/8/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/8/games/fortune/datfiles/freebsd-tips Wed Apr 24 04:21:19 2013 (r249828) +++ stable/8/games/fortune/datfiles/freebsd-tips Wed Apr 24 04:21:23 2013 (r249829) @@ -373,16 +373,6 @@ modes. % You can disable tcsh's terminal beep if you `set nobeep'. % -You can get a good generic server install by using the -instant-server port/package. If you have ports installed, you can -install it by doing - - # cd /usr/ports/misc/instant-server - # make install && make clean - -as root. This will install a collection of packages that is appropriate for -running a "generic" server. -% You can install extra packages for FreeBSD by using the ports system. If you have installed it, you can download, compile, and install software by just typing Modified: stable/8/games/fortune/fortune/Makefile ============================================================================== --- stable/8/games/fortune/fortune/Makefile Wed Apr 24 04:21:19 2013 (r249828) +++ stable/8/games/fortune/fortune/Makefile Wed Apr 24 04:21:23 2013 (r249829) @@ -3,7 +3,6 @@ PROG= fortune MAN= fortune.6 -WARNS?= 2 CFLAGS+=-DDEBUG -I${.CURDIR}/../strfile .include Modified: stable/8/games/fortune/fortune/fortune.6 ============================================================================== --- stable/8/games/fortune/fortune/fortune.6 Wed Apr 24 04:21:19 2013 (r249828) +++ stable/8/games/fortune/fortune/fortune.6 Wed Apr 24 04:21:23 2013 (r249829) @@ -12,11 +12,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -174,6 +170,9 @@ looks for data files. If not set it will default to .Pa /usr/games/fortune . If none of the directories specified exist, it will print a warning and exit. +.It Ev FORTUNE_SAVESTATE +If set, fortune will save some state about what fortune +it was up to on disk. .El .Sh FILES .Bl -tag -width ".Pa /usr/share/games/fortune/*" Modified: stable/8/games/fortune/fortune/fortune.c ============================================================================== --- stable/8/games/fortune/fortune/fortune.c Wed Apr 24 04:21:19 2013 (r249828) +++ stable/8/games/fortune/fortune/fortune.c Wed Apr 24 04:21:23 2013 (r249829) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -48,49 +44,50 @@ static const char sccsid[] = "@(#)fortun #include __FBSDID("$FreeBSD$"); -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include "strfile.h" -# include "pathnames.h" - -# define TRUE 1 -# define FALSE 0 -# define bool short - -# define MINW 6 /* minimum wait if desired */ -# define CPERS 20 /* # of chars for each sec */ -# define SLEN 160 /* # of chars in short fortune */ - -# define POS_UNKNOWN ((uint32_t) -1) /* pos for file unknown */ -# define NO_PROB (-1) /* no prob specified for file */ - -# ifdef DEBUG -# define DPRINTF(l,x) { if (Debug >= l) fprintf x; } -# undef NDEBUG -# else -# define DPRINTF(l,x) -# define NDEBUG 1 -# endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "strfile.h" +#include "pathnames.h" + +#define TRUE true +#define FALSE false + +#define MINW 6 /* minimum wait if desired */ +#define CPERS 20 /* # of chars for each sec */ +#define SLEN 160 /* # of chars in short fortune */ + +#define POS_UNKNOWN ((uint32_t) -1) /* pos for file unknown */ +#define NO_PROB (-1) /* no prob specified for file */ + +#ifdef DEBUG +#define DPRINTF(l,x) { if (Debug >= l) fprintf x; } +#undef NDEBUG +#else +#define DPRINTF(l,x) +#define NDEBUG 1 +#endif typedef struct fd { int percent; int fd, datfd; uint32_t pos; FILE *inf; - char *name; - char *path; + const char *name; + const char *path; char *datfile, *posfile; bool read_tbl; bool was_pos_file; @@ -100,89 +97,87 @@ typedef struct fd { struct fd *next, *prev; } FILEDESC; -bool Found_one; /* did we find a match? */ -bool Find_files = FALSE; /* just find a list of proper fortune files */ -bool Fortunes_only = FALSE; /* check only "fortunes" files */ -bool Wait = FALSE; /* wait desired after fortune */ -bool Short_only = FALSE; /* short fortune desired */ -bool Long_only = FALSE; /* long fortune desired */ -bool Offend = FALSE; /* offensive fortunes only */ -bool All_forts = FALSE; /* any fortune allowed */ -bool Equal_probs = FALSE; /* scatter un-allocted prob equally */ -bool Match = FALSE; /* dump fortunes matching a pattern */ +static bool Found_one; /* did we find a match? */ +static bool Find_files = FALSE; /* just find a list of proper fortune files */ +static bool Fortunes_only = FALSE; /* check only "fortunes" files */ +static bool Wait = FALSE; /* wait desired after fortune */ +static bool Short_only = FALSE; /* short fortune desired */ +static bool Long_only = FALSE; /* long fortune desired */ +static bool Offend = FALSE; /* offensive fortunes only */ +static bool All_forts = FALSE; /* any fortune allowed */ +static bool Equal_probs = FALSE; /* scatter un-allocted prob equally */ +static bool Match = FALSE; /* dump fortunes matching a pattern */ +static bool WriteToDisk = false; /* use files on disk to save state */ #ifdef DEBUG -bool Debug = FALSE; /* print debug messages */ +static int Debug = 0; /* print debug messages */ #endif -char *Fortbuf = NULL; /* fortune buffer for -m */ +static char *Fortbuf = NULL; /* fortune buffer for -m */ -int Fort_len = 0; +static int Fort_len = 0; -off_t Seekpts[2]; /* seek pointers to fortunes */ +static off_t Seekpts[2]; /* seek pointers to fortunes */ -FILEDESC *File_list = NULL, /* Head of file list */ +static FILEDESC *File_list = NULL, /* Head of file list */ *File_tail = NULL; /* Tail of file list */ -FILEDESC *Fortfile; /* Fortune file to use */ +static FILEDESC *Fortfile; /* Fortune file to use */ -STRFILE Noprob_tbl; /* sum of data for all no prob files */ +static STRFILE Noprob_tbl; /* sum of data for all no prob files */ -char *Fortune_path; -char **Fortune_path_arr; +static const char *Fortune_path; +static char **Fortune_path_arr; -int add_dir(FILEDESC *); -int add_file __P((int, - char *, char *, FILEDESC **, FILEDESC **, FILEDESC *)); -void all_forts(FILEDESC *, char *); -char *copy(char *, u_int); -void display(FILEDESC *); -void do_free(void *); -void *do_malloc(u_int); -int form_file_list(char **, int); -int fortlen(void); -void get_fort(void); -void get_pos(FILEDESC *); -void get_tbl(FILEDESC *); -void getargs(int, char *[]); -void getpath(void); -void init_prob(void); -int is_dir(char *); -int is_fortfile(char *, char **, char **, int); -int is_off_name(char *); -int max(int, int); -FILEDESC * - new_fp(void); -char *off_name(char *); -void open_dat(FILEDESC *); -void open_fp(FILEDESC *); -FILEDESC * - pick_child(FILEDESC *); -void print_file_list(void); -void print_list(FILEDESC *, int); -void sum_noprobs(FILEDESC *); -void sum_tbl(STRFILE *, STRFILE *); -void usage(void); -void zero_tbl(STRFILE *); - -char *conv_pat(char *); -int find_matches(void); -void matches_in_list(FILEDESC *); -int maxlen_in_list(FILEDESC *); +static int add_dir(FILEDESC *); +static int add_file(int, const char *, const char *, FILEDESC **, + FILEDESC **, FILEDESC *); +static void all_forts(FILEDESC *, char *); +static char *copy(const char *, u_int); +static void display(FILEDESC *); +static void do_free(void *); +static void *do_malloc(u_int); +static int form_file_list(char **, int); +static int fortlen(void); +static void get_fort(void); +static void get_pos(FILEDESC *); +static void get_tbl(FILEDESC *); +static void getargs(int, char *[]); +static void getpath(void); +static void init_prob(void); +static int is_dir(const char *); +static int is_fortfile(const char *, char **, char **, int); +static int is_off_name(const char *); +static int max(int, int); +static FILEDESC *new_fp(void); +static char *off_name(const char *); +static void open_dat(FILEDESC *); +static void open_fp(FILEDESC *); +static FILEDESC *pick_child(FILEDESC *); +static void print_file_list(void); +static void print_list(FILEDESC *, int); +static void sum_noprobs(FILEDESC *); +static void sum_tbl(STRFILE *, STRFILE *); +static void usage(void); +static void zero_tbl(STRFILE *); + +static char *conv_pat(char *); +static int find_matches(void); +static void matches_in_list(FILEDESC *); +static int maxlen_in_list(FILEDESC *); static regex_t Re_pat; int -main(ac, av) -int ac; -char *av[]; +main(int argc, char *argv[]) { -#ifdef OK_TO_WRITE_DISK int fd; -#endif /* OK_TO_WRITE_DISK */ + + if (getenv("FORTUNE_SAVESTATE") != NULL) + WriteToDisk = true; (void) setlocale(LC_ALL, ""); getpath(); - getargs(ac, av); + getargs(argc, argv); if (Match) exit(find_matches() != 0); @@ -195,45 +190,40 @@ char *av[]; display(Fortfile); -#ifdef OK_TO_WRITE_DISK - if ((fd = creat(Fortfile->posfile, 0666)) < 0) { - perror(Fortfile->posfile); - exit(1); + if (WriteToDisk) { + if ((fd = creat(Fortfile->posfile, 0666)) < 0) { + perror(Fortfile->posfile); + exit(1); + } + /* + * if we can, we exclusive lock, but since it isn't very + * important, we just punt if we don't have easy locking + * available. + */ + flock(fd, LOCK_EX); + write(fd, (char *) &Fortfile->pos, sizeof Fortfile->pos); + if (!Fortfile->was_pos_file) + chmod(Fortfile->path, 0666); + flock(fd, LOCK_UN); } -#ifdef LOCK_EX - /* - * if we can, we exclusive lock, but since it isn't very - * important, we just punt if we don't have easy locking - * available. - */ - (void) flock(fd, LOCK_EX); -#endif /* LOCK_EX */ - write(fd, (char *) &Fortfile->pos, sizeof Fortfile->pos); - if (!Fortfile->was_pos_file) - (void) chmod(Fortfile->path, 0666); -#ifdef LOCK_EX - (void) flock(fd, LOCK_UN); -#endif /* LOCK_EX */ -#endif /* OK_TO_WRITE_DISK */ if (Wait) { if (Fort_len == 0) (void) fortlen(); sleep((unsigned int) max(Fort_len / CPERS, MINW)); } + exit(0); - /* NOTREACHED */ } -void -display(fp) -FILEDESC *fp; +static void +display(FILEDESC *fp) { char *p; unsigned char ch; char line[BUFSIZ]; open_fp(fp); - (void) fseeko(fp->inf, Seekpts[0], 0); + fseeko(fp->inf, Seekpts[0], SEEK_SET); for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL && !STR_ENDSTRING(line, fp->tbl); Fort_len++) { if (fp->tbl.str_flags & STR_ROTATED) @@ -258,8 +248,8 @@ FILEDESC *fp; * fortlen: * Return the length of the fortune. */ -int -fortlen() +static int +fortlen(void) { int nchar; char line[BUFSIZ]; @@ -268,34 +258,31 @@ fortlen() nchar = (int)(Seekpts[1] - Seekpts[0]); else { open_fp(Fortfile); - (void) fseeko(Fortfile->inf, Seekpts[0], 0); + fseeko(Fortfile->inf, Seekpts[0], SEEK_SET); nchar = 0; while (fgets(line, sizeof line, Fortfile->inf) != NULL && !STR_ENDSTRING(line, Fortfile->tbl)) nchar += strlen(line); } Fort_len = nchar; - return nchar; + + return (nchar); } /* * This routine evaluates the arguments on the command line */ -void -getargs(argc, argv) -int argc; -char **argv; +static void +getargs(int argc, char *argv[]) { int ignore_case; char *pat; - extern char *optarg; - extern int optind; int ch; ignore_case = FALSE; pat = NULL; -# ifdef DEBUG +#ifdef DEBUG while ((ch = getopt(argc, argv, "aDefilm:osw")) != -1) #else while ((ch = getopt(argc, argv, "aefilm:osw")) != -1) @@ -304,11 +291,11 @@ char **argv; case 'a': /* any fortune */ All_forts++; break; -# ifdef DEBUG +#ifdef DEBUG case 'D': Debug++; break; -# endif /* DEBUG */ +#endif /* DEBUG */ case 'e': Equal_probs++; /* scatter un-allocted prob equally */ break; @@ -362,7 +349,7 @@ char **argv; error = regcomp(&Re_pat, pat, REG_BASIC); if (error) { fprintf(stderr, "regcomp(%s) fails\n", pat); - exit (1); + exit(1); } } } @@ -371,10 +358,8 @@ char **argv; * form_file_list: * Form the file list from the file specifications. */ -int -form_file_list(files, file_cnt) -char **files; -int file_cnt; +static int +form_file_list(char **files, int file_cnt) { int i, percent; char *sp; @@ -386,7 +371,7 @@ int file_cnt; pstr = Fortune_path_arr; i = 0; while (*pstr) { - i += add_file(NO_PROB, *pstr++, NULL, + i += add_file(NO_PROB, *pstr++, NULL, &File_list, &File_tail, NULL); } Fortunes_only = FALSE; @@ -394,7 +379,7 @@ int file_cnt; fprintf(stderr, "No fortunes found in %s.\n", Fortune_path); } - return i != 0; + return (i != 0); } else { pstr = Fortune_path_arr; i = 0; @@ -406,7 +391,7 @@ int file_cnt; fprintf(stderr, "No fortunes found in %s.\n", Fortune_path); } - return i != 0; + return (i != 0); } } for (i = 0; i < file_cnt; i++) { @@ -419,11 +404,11 @@ int file_cnt; percent = percent * 10 + *sp - '0'; if (percent > 100) { fprintf(stderr, "percentages must be <= 100\n"); - return FALSE; + return (FALSE); } if (*sp == '.') { fprintf(stderr, "percentages must be integers\n"); - return FALSE; + return (FALSE); } /* * If the number isn't followed by a '%', then @@ -437,7 +422,7 @@ int file_cnt; else if (*++sp == '\0') { if (++i >= file_cnt) { fprintf(stderr, "percentages must precede files\n"); - return FALSE; + return (FALSE); } sp = files[i]; } @@ -446,53 +431,53 @@ int file_cnt; pstr = Fortune_path_arr; i = 0; while (*pstr) { - i += add_file(NO_PROB, *pstr++, NULL, + i += add_file(NO_PROB, *pstr++, NULL, &File_list, &File_tail, NULL); } if (!i) { fprintf(stderr, "No fortunes found in %s.\n", Fortune_path); - return FALSE; + return (FALSE); } - } else if (!add_file(percent, sp, NULL, &File_list, + } else if (!add_file(percent, sp, NULL, &File_list, &File_tail, NULL)) { - return FALSE; + return (FALSE); } } - return TRUE; + + return (TRUE); } /* * add_file: * Add a file to the file list. */ -int -add_file(percent, file, dir, head, tail, parent) -int percent; -char *file; -char *dir; -FILEDESC **head, **tail; -FILEDESC *parent; +static int +add_file(int percent, const char *file, const char *dir, FILEDESC **head, + FILEDESC **tail, FILEDESC *parent) { FILEDESC *fp; int fd; - char *path, *offensive; + const char *path; + char *tpath, *offensive; bool was_malloc; bool isdir; if (dir == NULL) { path = file; + tpath = NULL; was_malloc = FALSE; } else { - path = do_malloc((unsigned int) (strlen(dir) + strlen(file) + 2)); - (void) strcat(strcat(strcpy(path, dir), "/"), file); + tpath = do_malloc((unsigned int)(strlen(dir) + strlen(file) + 2)); + strcat(strcat(strcpy(tpath, dir), "/"), file); + path = tpath; was_malloc = TRUE; } if ((isdir = is_dir(path)) && parent != NULL) { if (was_malloc) - free(path); - return FALSE; /* don't recurse */ + free(tpath); + return (FALSE); /* don't recurse */ } offensive = NULL; if (!isdir && parent == NULL && (All_forts || Offend) && @@ -500,7 +485,7 @@ FILEDESC *parent; offensive = off_name(path); if (Offend) { if (was_malloc) - free(path); + free(tpath); path = offensive; offensive = NULL; was_malloc = TRUE; @@ -511,7 +496,7 @@ FILEDESC *parent; DPRINTF(1, (stderr, "adding file \"%s\"\n", path)); over: - if ((fd = open(path, 0)) < 0) { + if ((fd = open(path, O_RDONLY)) < 0) { /* * This is a sneak. If the user said -a, and if the * file we're given isn't a file, we check to see if @@ -522,7 +507,7 @@ over: */ if (All_forts && offensive != NULL) { if (was_malloc) - free(path); + free(tpath); path = offensive; offensive = NULL; was_malloc = TRUE; @@ -535,22 +520,22 @@ over: char **pstr = Fortune_path_arr; while (*pstr) { - i += add_file(percent, file, *pstr++, + i += add_file(percent, file, *pstr++, head, tail, parent); } if (!i) { fprintf(stderr, "No '%s' found in %s.\n", file, Fortune_path); } - return i != 0; + return (i != 0); } /* if (parent == NULL) perror(path); */ if (was_malloc) - free(path); - return FALSE; + free(tpath); + return (FALSE); } DPRINTF(2, (stderr, "path = \"%s\"\n", path)); @@ -571,12 +556,12 @@ over: "fortune:%s not a fortune file or directory\n", path); if (was_malloc) - free(path); + free(tpath); do_free(fp->datfile); do_free(fp->posfile); - free((char *) fp); + free(fp); do_free(offensive); - return FALSE; + return (FALSE); } /* * If the user said -a, we need to make this node a pointer to @@ -598,23 +583,22 @@ over: fp->next = *head; *head = fp; } -#ifdef OK_TO_WRITE_DISK - fp->was_pos_file = (access(fp->posfile, W_OK) >= 0); -#endif /* OK_TO_WRITE_DISK */ + if (WriteToDisk) + fp->was_pos_file = (access(fp->posfile, W_OK) >= 0); - return TRUE; + return (TRUE); } /* * new_fp: * Return a pointer to an initialized new FILEDESC. */ -FILEDESC * -new_fp() +static FILEDESC * +new_fp(void) { FILEDESC *fp; - fp = (FILEDESC *) do_malloc(sizeof *fp); + fp = do_malloc(sizeof(*fp)); fp->datfd = -1; fp->pos = POS_UNKNOWN; fp->inf = NULL; @@ -627,34 +611,35 @@ new_fp() fp->parent = NULL; fp->datfile = NULL; fp->posfile = NULL; - return fp; + + return (fp); } /* * off_name: * Return a pointer to the offensive version of a file of this name. */ -char * -off_name(file) -char *file; +static char * +off_name(const char *file) { char *new; new = copy(file, (unsigned int) (strlen(file) + 2)); - return strcat(new, "-o"); + + return (strcat(new, "-o")); } /* * is_off_name: * Is the file an offensive-style name? */ -int -is_off_name(file) -char *file; +static int +is_off_name(const char *file) { int len; len = strlen(file); + return (len >= 3 && file[len - 2] == '-' && file[len - 1] == 'o'); } @@ -663,21 +648,19 @@ char *file; * Modify a FILEDESC element to be the parent of two children if * there are two children to be a parent of. */ -void -all_forts(fp, offensive) -FILEDESC *fp; -char *offensive; +static void +all_forts(FILEDESC *fp, char *offensive) { char *sp; FILEDESC *scene, *obscene; int fd; - auto char *datfile, *posfile; + char *datfile, *posfile; if (fp->child != NULL) /* this is a directory, not a file */ return; if (!is_fortfile(offensive, &datfile, &posfile, FALSE)) return; - if ((fd = open(offensive, 0)) < 0) + if ((fd = open(offensive, O_RDONLY)) < 0) return; DPRINTF(1, (stderr, "adding \"%s\" because of -a\n", offensive)); scene = new_fp(); @@ -697,36 +680,34 @@ char *offensive; obscene->fd = fd; obscene->inf = NULL; obscene->path = offensive; - if ((sp = rindex(offensive, '/')) == NULL) + if ((sp = strrchr(offensive, '/')) == NULL) obscene->name = offensive; else obscene->name = ++sp; obscene->datfile = datfile; obscene->posfile = posfile; - obscene->read_tbl = FALSE; -#ifdef OK_TO_WRITE_DISK - obscene->was_pos_file = (access(obscene->posfile, W_OK) >= 0); -#endif /* OK_TO_WRITE_DISK */ + obscene->read_tbl = false; + if (WriteToDisk) + obscene->was_pos_file = (access(obscene->posfile, W_OK) >= 0); } /* * add_dir: * Add the contents of an entire directory. */ -int -add_dir(fp) -FILEDESC *fp; +static int +add_dir(FILEDESC *fp) { DIR *dir; struct dirent *dirent; - auto FILEDESC *tailp; - auto char *name; + FILEDESC *tailp; + char *name; (void) close(fp->fd); fp->fd = -1; if ((dir = opendir(fp->path)) == NULL) { perror(fp->path); - return FALSE; + return (FALSE); } tailp = NULL; DPRINTF(1, (stderr, "adding dir \"%s\"\n", fp->path)); @@ -743,23 +724,24 @@ FILEDESC *fp; if (fp->num_children == 0) { (void) fprintf(stderr, "fortune: %s: No fortune files in directory.\n", fp->path); - return FALSE; + return (FALSE); } - return TRUE; + + return (TRUE); } /* * is_dir: * Return TRUE if the file is a directory, FALSE otherwise. */ -int -is_dir(file) -char *file; +static int +is_dir(const char *file) { - auto struct stat sbuf; + struct stat sbuf; if (stat(file, &sbuf) < 0) - return FALSE; + return (FALSE); + return (sbuf.st_mode & S_IFDIR); } @@ -771,20 +753,19 @@ char *file; * suffixes, as contained in suflist[], are ruled out. */ /* ARGSUSED */ -int -is_fortfile(file, datp, posp, check_for_offend) -char *file, **datp, **posp; -int check_for_offend; +static int +is_fortfile(const char *file, char **datp, char **posp, int check_for_offend) { int i; - char *sp; + const char *sp; char *datfile; - static char *suflist[] = { /* list of "illegal" suffixes" */ - "dat", "pos", "c", "h", "p", "i", "f", - "pas", "ftn", "ins.c", "ins,pas", - "ins.ftn", "sml", - NULL - }; + static const char *suflist[] = { + /* list of "illegal" suffixes" */ + "dat", "pos", "c", "h", "p", "i", "f", + "pas", "ftn", "ins.c", "ins,pas", + "ins.ftn", "sml", + NULL + }; DPRINTF(2, (stderr, "is_fortfile(%s) returns ", file)); @@ -796,28 +777,28 @@ int check_for_offend; i = strlen(file); if (Offend ^ (file[i - 2] == '-' && file[i - 1] == 'o')) { DPRINTF(2, (stderr, "FALSE (offending file)\n")); - return FALSE; + return (FALSE); } } - if ((sp = rindex(file, '/')) == NULL) + if ((sp = strrchr(file, '/')) == NULL) sp = file; else sp++; if (*sp == '.') { DPRINTF(2, (stderr, "FALSE (file starts with '.')\n")); - return FALSE; + return (FALSE); } if (Fortunes_only && strncmp(sp, "fortunes", 8) != 0) { DPRINTF(2, (stderr, "FALSE (check fortunes only)\n")); - return FALSE; + return (FALSE); } - if ((sp = rindex(sp, '.')) != NULL) { + if ((sp = strrchr(sp, '.')) != NULL) { sp++; for (i = 0; suflist[i] != NULL; i++) if (strcmp(sp, suflist[i]) == 0) { DPRINTF(2, (stderr, "FALSE (file has suffix \".%s\")\n", sp)); - return FALSE; + return (FALSE); } } @@ -830,67 +811,67 @@ int check_for_offend; DPRINTF(0, (stderr, "Warning: file \"%s\" unreadable\n", datfile)); #endif free(datfile); - return FALSE; + return (FALSE); } if (datp != NULL) *datp = datfile; else free(datfile); if (posp != NULL) { -#ifdef OK_TO_WRITE_DISK - *posp = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */ - (void) strcat(*posp, ".pos"); -#else - *posp = NULL; -#endif /* OK_TO_WRITE_DISK */ + if (WriteToDisk) { + *posp = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */ + strcat(*posp, ".pos"); + } + else { + *posp = NULL; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 10:18:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2A43EAA2; Wed, 24 Apr 2013 10:18:57 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C5111C08; Wed, 24 Apr 2013 10:18:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OAIvsg078614; Wed, 24 Apr 2013 10:18:57 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OAIuvW078613; Wed, 24 Apr 2013 10:18:56 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201304241018.r3OAIuvW078613@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 24 Apr 2013 10:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249835 - stable/9/gnu/usr.bin/groff/tmac X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 10:18:57 -0000 Author: pluknet Date: Wed Apr 24 10:18:56 2013 New Revision: 249835 URL: http://svnweb.freebsd.org/changeset/base/249835 Log: MFC r249281: Add FreeBSD 8.4. Modified: stable/9/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/9/gnu/usr.bin/groff/ (props changed) Modified: stable/9/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/9/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 24 08:51:15 2013 (r249834) +++ stable/9/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 24 10:18:56 2013 (r249835) @@ -49,6 +49,7 @@ .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.3 8.3 +.ds doc-operating-system-FreeBSD-8.4 8.4 .ds doc-operating-system-FreeBSD-9.1 9.1 .ds doc-operating-system-FreeBSD-10.0 10.0 . From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 10:20:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 931B0C41; Wed, 24 Apr 2013 10:20:21 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 859D81C19; Wed, 24 Apr 2013 10:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OAKLAA080314; Wed, 24 Apr 2013 10:20:21 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OAKL05080288; Wed, 24 Apr 2013 10:20:21 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201304241020.r3OAKL05080288@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 24 Apr 2013 10:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249836 - stable/8/gnu/usr.bin/groff/tmac X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 10:20:21 -0000 Author: pluknet Date: Wed Apr 24 10:20:21 2013 New Revision: 249836 URL: http://svnweb.freebsd.org/changeset/base/249836 Log: MFC r249281: Add FreeBSD 8.4. Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 24 10:18:56 2013 (r249835) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 24 10:20:21 2013 (r249836) @@ -75,6 +75,7 @@ .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.3 8.3 +.ds doc-operating-system-FreeBSD-8.4 8.4 .ds doc-operating-system-FreeBSD-9.0 9.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 12:47:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4A755673; Wed, 24 Apr 2013 12:47:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDD412EC; Wed, 24 Apr 2013 12:47:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OClVil030718; Wed, 24 Apr 2013 12:47:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OClUFS030707; Wed, 24 Apr 2013 12:47:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304241247.r3OClUFS030707@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Apr 2013 12:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249840 - in stable/9/games: bcd grdc morse number X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 12:47:31 -0000 Author: eadler Date: Wed Apr 24 12:47:30 2013 New Revision: 249840 URL: http://svnweb.freebsd.org/changeset/base/249840 Log: MFC r227101: Add static keywords to variables and functions where possible in games/. This allows us to detect unused functions and variables and allows the compiler to do a better job at optimisation. Modified: stable/9/games/bcd/bcd.c stable/9/games/grdc/grdc.c stable/9/games/morse/morse.c stable/9/games/number/number.c Directory Properties: stable/9/games/bcd/ (props changed) stable/9/games/grdc/ (props changed) stable/9/games/morse/ (props changed) stable/9/games/number/ (props changed) Modified: stable/9/games/bcd/bcd.c ============================================================================== --- stable/9/games/bcd/bcd.c Wed Apr 24 12:36:37 2013 (r249839) +++ stable/9/games/bcd/bcd.c Wed Apr 24 12:47:30 2013 (r249840) @@ -82,7 +82,7 @@ static const char rcsid[] = #include #include -u_short holes[256] = { +static u_short holes[256] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, @@ -117,7 +117,7 @@ u_short holes[256] = { 0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x0 }; -void printcard(char *); +static void printcard(char *); /* * i'th bit of w. @@ -145,7 +145,7 @@ main(int argc, char **argv) #define COLUMNS 48 -void +static void printcard(char *str) { static char rowchars[] = " 123456789"; Modified: stable/9/games/grdc/grdc.c ============================================================================== --- stable/9/games/grdc/grdc.c Wed Apr 24 12:36:37 2013 (r249839) +++ stable/9/games/grdc/grdc.c Wed Apr 24 12:47:30 2013 (r249840) @@ -26,29 +26,30 @@ #define XLENGTH 58 #define YDEPTH 7 -struct timespec now; -struct tm *tm; +static struct timespec now; +static struct tm *tm; -short disp[11] = { +static short disp[11] = { 075557, 011111, 071747, 071717, 055711, 074717, 074757, 071111, 075757, 075717, 002020 }; -long old[6], next[6], new[6], mask; +static long old[6], next[6], new[6], mask; -volatile sig_atomic_t sigtermed; +static volatile sig_atomic_t sigtermed; -int hascolor = 0; +static int hascolor = 0; -void set(int, int); -void standt(int); -void movto(int, int); -void sighndl(int); -void usage(void); +static void set(int, int); +static void standt(int); +static void movto(int, int); +static void sighndl(int); +static void usage(void); -void +static void sighndl(int signo) { - sigtermed=signo; + + sigtermed = signo; } int @@ -225,7 +226,7 @@ main(int argc, char *argv[]) return(0); } -void +static void set(int t, int n) { int i, m; @@ -239,7 +240,7 @@ set(int t, int n) mask |= m; } -void +static void standt(int on) { if (on) { @@ -257,13 +258,13 @@ standt(int on) } } -void +static void movto(int line, int col) { move(line, col); } -void +static void usage(void) { Modified: stable/9/games/morse/morse.c ============================================================================== --- stable/9/games/morse/morse.c Wed Apr 24 12:36:37 2013 (r249839) +++ stable/9/games/morse/morse.c Wed Apr 24 12:47:30 2013 (r249840) @@ -266,33 +266,33 @@ static const struct morsetab koi8rtab[] {'\0', ""} }; -void show(const char *), play(const char *), morse(char); -void ttyout(const char *); -void sighandler(int); +static void show(const char *), play(const char *), morse(char); +static void ttyout(const char *); +static void sighandler(int); #define GETOPTOPTS "c:d:ef:lsw:" #define USAGE \ "usage: morse [-els] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" -static int pflag, lflag, sflag, eflag; -static int wpm = 20; /* effective words per minute */ -static int cpm; /* effective words per minute between +static int pflag, lflag, sflag, eflag; +static int wpm = 20; /* effective words per minute */ +static int cpm; /* effective words per minute between * characters */ #define FREQUENCY 600 -static int freq = FREQUENCY; +static int freq = FREQUENCY; static char *device; /* for tty-controlled generator */ #define DASH_LEN 3 #define CHAR_SPACE 3 #define WORD_SPACE (7 - CHAR_SPACE - 1) -static float dot_clock; -static float cdot_clock; -int spkr, line; -struct termios otty, ntty; -int olflags; +static float dot_clock; +static float cdot_clock; +static int spkr, line; +static struct termios otty, ntty; +static int olflags; #ifdef SPEAKER -tone_t sound; +static tone_t sound; #undef GETOPTOPTS #define GETOPTOPTS "c:d:ef:lpsw:" #undef USAGE @@ -444,7 +444,7 @@ main(int argc, char **argv) exit(0); } -void +static void morse(char c) { const struct morsetab *m; @@ -478,7 +478,7 @@ morse(char c) } } -void +static void show(const char *s) { if (lflag) { @@ -493,7 +493,7 @@ show(const char *s) } } -void +static void play(const char *s) { #ifdef SPEAKER @@ -535,7 +535,7 @@ play(const char *s) #endif } -void +static void ttyout(const char *s) { const char *c; @@ -577,7 +577,7 @@ ttyout(const char *s) usleep(duration); } -void +static void sighandler(int signo) { Modified: stable/9/games/number/number.c ============================================================================== --- stable/9/games/number/number.c Wed Apr 24 12:36:37 2013 (r249839) +++ stable/9/games/number/number.c Wed Apr 24 12:47:30 2013 (r249840) @@ -74,14 +74,13 @@ static const char *name1[] = { "novemdecillion", "vigintillion", }; -void convert(char *); -int number(char *, int); -void pfract(int); -void toobig(void); -int unit(int, char *); -void usage(void); +static void convert(char *); +static int number(char *, int); +static void pfract(int); +static int unit(int, char *); +static void usage(void); -int lflag; +static int lflag; int main(int argc, char *argv[]) @@ -120,7 +119,7 @@ main(int argc, char *argv[]) exit(0); } -void +static void convert(char *line) { int flen, len, rval; @@ -188,7 +187,7 @@ badnum: errx(1, "illegal number: %s", (void)printf("\n"); } -int +static int unit(int len, char *p) { int off, rval; @@ -222,7 +221,7 @@ unit(int len, char *p) return (rval); } -int +static int number(char *p, int len) { int val, rval; @@ -260,7 +259,7 @@ number(char *p, int len) return (rval); } -void +static void pfract(int len) { static char const * const pref[] = { "", "ten-", "hundred-" }; @@ -278,7 +277,7 @@ pfract(int len) } } -void +static void usage(void) { (void)fprintf(stderr, "usage: number [-l] [# ...]\n"); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 12:47:43 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 98C1A7C3; Wed, 24 Apr 2013 12:47:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1961512EE; Wed, 24 Apr 2013 12:47:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OClgSr030785; Wed, 24 Apr 2013 12:47:42 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OClg1R030781; Wed, 24 Apr 2013 12:47:42 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304241247.r3OClg1R030781@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Apr 2013 12:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249841 - in stable/8/games: bcd grdc morse number X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 12:47:43 -0000 Author: eadler Date: Wed Apr 24 12:47:41 2013 New Revision: 249841 URL: http://svnweb.freebsd.org/changeset/base/249841 Log: MFC r227101: Add static keywords to variables and functions where possible in games/. This allows us to detect unused functions and variables and allows the compiler to do a better job at optimisation. Modified: stable/8/games/bcd/bcd.c stable/8/games/grdc/grdc.c stable/8/games/morse/morse.c stable/8/games/number/number.c Directory Properties: stable/8/games/bcd/ (props changed) stable/8/games/grdc/ (props changed) stable/8/games/morse/ (props changed) stable/8/games/number/ (props changed) Modified: stable/8/games/bcd/bcd.c ============================================================================== --- stable/8/games/bcd/bcd.c Wed Apr 24 12:47:30 2013 (r249840) +++ stable/8/games/bcd/bcd.c Wed Apr 24 12:47:41 2013 (r249841) @@ -86,7 +86,7 @@ static const char rcsid[] = #include #include -u_short holes[256] = { +static u_short holes[256] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, @@ -121,7 +121,7 @@ u_short holes[256] = { 0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x0 }; -void printcard(char *); +static void printcard(char *); /* * i'th bit of w. @@ -149,7 +149,7 @@ main(int argc, char **argv) #define COLUMNS 48 -void +static void printcard(char *str) { static char rowchars[] = " 123456789"; Modified: stable/8/games/grdc/grdc.c ============================================================================== --- stable/8/games/grdc/grdc.c Wed Apr 24 12:47:30 2013 (r249840) +++ stable/8/games/grdc/grdc.c Wed Apr 24 12:47:41 2013 (r249841) @@ -26,29 +26,30 @@ #define XLENGTH 58 #define YDEPTH 7 -struct timespec now; -struct tm *tm; +static struct timespec now; +static struct tm *tm; -short disp[11] = { +static short disp[11] = { 075557, 011111, 071747, 071717, 055711, 074717, 074757, 071111, 075757, 075717, 002020 }; -long old[6], next[6], new[6], mask; +static long old[6], next[6], new[6], mask; -volatile sig_atomic_t sigtermed; +static volatile sig_atomic_t sigtermed; -int hascolor = 0; +static int hascolor = 0; -void set(int, int); -void standt(int); -void movto(int, int); -void sighndl(int); -void usage(void); +static void set(int, int); +static void standt(int); +static void movto(int, int); +static void sighndl(int); +static void usage(void); -void +static void sighndl(int signo) { - sigtermed=signo; + + sigtermed = signo; } int @@ -225,7 +226,7 @@ main(int argc, char *argv[]) return(0); } -void +static void set(int t, int n) { int i, m; @@ -239,7 +240,7 @@ set(int t, int n) mask |= m; } -void +static void standt(int on) { if (on) { @@ -257,13 +258,13 @@ standt(int on) } } -void +static void movto(int line, int col) { move(line, col); } -void +static void usage(void) { Modified: stable/8/games/morse/morse.c ============================================================================== --- stable/8/games/morse/morse.c Wed Apr 24 12:47:30 2013 (r249840) +++ stable/8/games/morse/morse.c Wed Apr 24 12:47:41 2013 (r249841) @@ -262,33 +262,33 @@ static const struct morsetab koi8rtab[] {'\0', ""} }; -void show(const char *), play(const char *), morse(char); -void ttyout(const char *); -void sighandler(int); +static void show(const char *), play(const char *), morse(char); +static void ttyout(const char *); +static void sighandler(int); #define GETOPTOPTS "c:d:ef:lsw:" #define USAGE \ "usage: morse [-els] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" -static int pflag, lflag, sflag, eflag; -static int wpm = 20; /* effective words per minute */ -static int cpm; /* effective words per minute between +static int pflag, lflag, sflag, eflag; +static int wpm = 20; /* effective words per minute */ +static int cpm; /* effective words per minute between * characters */ #define FREQUENCY 600 -static int freq = FREQUENCY; +static int freq = FREQUENCY; static char *device; /* for tty-controlled generator */ #define DASH_LEN 3 #define CHAR_SPACE 3 #define WORD_SPACE (7 - CHAR_SPACE - 1) -static float dot_clock; -static float cdot_clock; -int spkr, line; -struct termios otty, ntty; -int olflags; +static float dot_clock; +static float cdot_clock; +static int spkr, line; +static struct termios otty, ntty; +static int olflags; #ifdef SPEAKER -tone_t sound; +static tone_t sound; #undef GETOPTOPTS #define GETOPTOPTS "c:d:ef:lpsw:" #undef USAGE @@ -440,7 +440,7 @@ main(int argc, char **argv) exit(0); } -void +static void morse(char c) { const struct morsetab *m; @@ -474,7 +474,7 @@ morse(char c) } } -void +static void show(const char *s) { if (lflag) { @@ -489,7 +489,7 @@ show(const char *s) } } -void +static void play(const char *s) { #ifdef SPEAKER @@ -531,7 +531,7 @@ play(const char *s) #endif } -void +static void ttyout(const char *s) { const char *c; @@ -573,7 +573,7 @@ ttyout(const char *s) usleep(duration); } -void +static void sighandler(int signo) { Modified: stable/8/games/number/number.c ============================================================================== --- stable/8/games/number/number.c Wed Apr 24 12:47:30 2013 (r249840) +++ stable/8/games/number/number.c Wed Apr 24 12:47:41 2013 (r249841) @@ -78,14 +78,13 @@ static const char *name1[] = { "novemdecillion", "vigintillion", }; -void convert(char *); -int number(char *, int); -void pfract(int); -void toobig(void); -int unit(int, char *); -void usage(void); +static void convert(char *); +static int number(char *, int); +static void pfract(int); +static int unit(int, char *); +static void usage(void); -int lflag; +static int lflag; int main(argc, argv) @@ -126,7 +125,7 @@ main(argc, argv) exit(0); } -void +static void convert(line) char *line; { @@ -195,7 +194,7 @@ badnum: errx(1, "illegal number: %s", (void)printf("\n"); } -int +static int unit(len, p) int len; char *p; @@ -231,7 +230,7 @@ unit(len, p) return (rval); } -int +static int number(p, len) char *p; int len; @@ -271,7 +270,7 @@ number(p, len) return (rval); } -void +static void pfract(len) int len; { @@ -290,7 +289,7 @@ pfract(len) } } -void +static void usage() { (void)fprintf(stderr, "usage: number [-l] [# ...]\n"); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 19:22:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 082615A4; Wed, 24 Apr 2013 19:22:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EF0C0186D; Wed, 24 Apr 2013 19:22:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OJMJhf091421; Wed, 24 Apr 2013 19:22:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OJMJVt091420; Wed, 24 Apr 2013 19:22:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304241922.r3OJMJVt091420@svn.freebsd.org> From: Alexander Motin Date: Wed, 24 Apr 2013 19:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249850 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 19:22:20 -0000 Author: mav Date: Wed Apr 24 19:22:19 2013 New Revision: 249850 URL: http://svnweb.freebsd.org/changeset/base/249850 Log: MFC r248687: No need to erase all 64 bytes of CFIS area if we never use more then 16. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:00:45 2013 (r249849) +++ stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:22:19 2013 (r249850) @@ -1266,8 +1266,8 @@ ahci_dmainit(device_t dev) NULL, NULL, AHCI_WORK_SIZE, 1, AHCI_WORK_SIZE, 0, NULL, NULL, &ch->dma.work_tag)) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, 0, - &ch->dma.work_map)) + if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_ZERO, &ch->dma.work_map)) goto error; if (bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { @@ -2671,7 +2671,7 @@ ahci_setup_fis(device_t dev, struct ahci struct ahci_channel *ch = device_get_softc(dev); u_int8_t *fis = &ctp->cfis[0]; - bzero(ctp->cfis, 64); + bzero(ctp->cfis, 16); fis[0] = 0x27; /* host to device */ fis[1] = (ccb->ccb_h.target_id & 0x0f); if (ccb->ccb_h.func_code == XPT_SCSI_IO) { @@ -2686,10 +2686,10 @@ ahci_setup_fis(device_t dev, struct ahci } fis[7] = ATA_D_LBA; fis[15] = ATA_A_4BIT; - bzero(ctp->acmd, 32); bcopy((ccb->ccb_h.flags & CAM_CDB_POINTER) ? ccb->csio.cdb_io.cdb_ptr : ccb->csio.cdb_io.cdb_bytes, ctp->acmd, ccb->csio.cdb_len); + bzero(ctp->acmd + ccb->csio.cdb_len, 32 - ccb->csio.cdb_len); } else if ((ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) == 0) { fis[1] |= 0x80; fis[2] = ccb->ataio.cmd.command; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 19:24:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 61630766; Wed, 24 Apr 2013 19:24:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3AD98188D; Wed, 24 Apr 2013 19:24:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OJOrc6091909; Wed, 24 Apr 2013 19:24:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OJOrK9091908; Wed, 24 Apr 2013 19:24:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304241924.r3OJOrK9091908@svn.freebsd.org> From: Alexander Motin Date: Wed, 24 Apr 2013 19:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249851 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 19:24:54 -0000 Author: mav Date: Wed Apr 24 19:24:53 2013 New Revision: 249851 URL: http://svnweb.freebsd.org/changeset/base/249851 Log: MFC r248698: Depending on combination of running commands (NCQ/non-NCQ) try to avoid extra read from PxCI/PxSACT registers. If only NCQ commands are running, we don't really need PxCI. If only non-NCQ commands are running we don't need PxSACT. Mixed set may happen only on controllers with FIS-based switching when port multiplier is attached, and then we have to read both registers. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:22:19 2013 (r249850) +++ stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:24:53 2013 (r249851) @@ -1507,7 +1507,7 @@ ahci_ch_intr(void *data) { device_t dev = (device_t)data; struct ahci_channel *ch = device_get_softc(dev); - uint32_t istatus, sstatus, cstatus, serr = 0, sntf = 0, ok, err; + uint32_t istatus, cstatus, serr = 0, sntf = 0, ok, err; enum ahci_err_type et; int i, ccs, port, reset = 0; @@ -1517,8 +1517,13 @@ ahci_ch_intr(void *data) return; ATA_OUTL(ch->r_mem, AHCI_P_IS, istatus); /* Read command statuses. */ - sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT); - cstatus = ATA_INL(ch->r_mem, AHCI_P_CI); + if (ch->numtslots != 0) + cstatus = ATA_INL(ch->r_mem, AHCI_P_SACT); + else + cstatus = 0; + if (ch->numrslots != ch->numtslots) + cstatus |= ATA_INL(ch->r_mem, AHCI_P_CI); + /* Read SNTF in one of possible ways. */ if (istatus & AHCI_P_IX_SDB) { if (ch->caps & AHCI_CAP_SSNTF) sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF); @@ -1578,14 +1583,14 @@ ahci_ch_intr(void *data) } } } - err = ch->rslots & (cstatus | sstatus); + err = ch->rslots & cstatus; } else { ccs = 0; err = 0; port = -1; } /* Complete all successfull commands. */ - ok = ch->rslots & ~(cstatus | sstatus); + ok = ch->rslots & ~cstatus; for (i = 0; i < ch->numslots; i++) { if ((ok >> i) & 1) ahci_end_transaction(&ch->slot[i], AHCI_ERR_NONE); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 19:33:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A380FC4A; Wed, 24 Apr 2013 19:33:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 964511927; Wed, 24 Apr 2013 19:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OJXbNb095242; Wed, 24 Apr 2013 19:33:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OJXbQX095240; Wed, 24 Apr 2013 19:33:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304241933.r3OJXbQX095240@svn.freebsd.org> From: Alexander Motin Date: Wed, 24 Apr 2013 19:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249852 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 19:33:38 -0000 Author: mav Date: Wed Apr 24 19:33:37 2013 New Revision: 249852 URL: http://svnweb.freebsd.org/changeset/base/249852 Log: MFC r248704: Read Asynchronous Notification statuses only if Port Multiplier or ATAPI device are connected. ATA disks are not using ANs, while the extra register read operation is quite expensive. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:24:53 2013 (r249851) +++ stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:33:37 2013 (r249852) @@ -1524,7 +1524,8 @@ ahci_ch_intr(void *data) if (ch->numrslots != ch->numtslots) cstatus |= ATA_INL(ch->r_mem, AHCI_P_CI); /* Read SNTF in one of possible ways. */ - if (istatus & AHCI_P_IX_SDB) { + if ((istatus & AHCI_P_IX_SDB) && + (ch->pm_present || ch->curr[0].atapi != 0)) { if (ch->caps & AHCI_CAP_SSNTF) sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF); else if (ch->fbs_enabled) { From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 19:36:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 00AF0BA; Wed, 24 Apr 2013 19:36:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E6E731A48; Wed, 24 Apr 2013 19:36:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OJaeFo096022; Wed, 24 Apr 2013 19:36:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OJaeY6096017; Wed, 24 Apr 2013 19:36:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304241936.r3OJaeY6096017@svn.freebsd.org> From: Alexander Motin Date: Wed, 24 Apr 2013 19:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249853 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 19:36:41 -0000 Author: mav Date: Wed Apr 24 19:36:40 2013 New Revision: 249853 URL: http://svnweb.freebsd.org/changeset/base/249853 Log: MFC r249346: Create controller-level DMA tag, handling range of supported addresses. That simplifies logic for channels and gives the bus information about what device actually allocated the tag. Submitted by: jhb Modified: stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ahci/ahci.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:33:37 2013 (r249852) +++ stable/9/sys/dev/ahci/ahci.c Wed Apr 24 19:36:40 2013 (r249853) @@ -459,9 +459,23 @@ ahci_attach(device_t dev) ctlr->ccc = 0; mtx_init(&ctlr->em_mtx, "AHCI EM lock", NULL, MTX_DEF); ctlr->emloc = ATA_INL(ctlr->r_mem, AHCI_EM_LOC); + + /* Create controller-wide DMA tag. */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), 0, 0, + (ctlr->caps & AHCI_CAP_64BIT) ? BUS_SPACE_MAXADDR : + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE, + 0, NULL, NULL, &ctlr->dma_tag)) { + bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, + ctlr->r_mem); + rman_fini(&ctlr->sc_iomem); + return ENXIO; + } + ahci_ctlr_setup(dev); /* Setup interrupts. */ if (ahci_setup_interrupt(dev)) { + bus_dma_tag_destroy(ctlr->dma_tag); bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); return ENXIO; @@ -555,6 +569,7 @@ ahci_detach(device_t dev) } } pci_release_msi(dev); + bus_dma_tag_destroy(ctlr->dma_tag); /* Free memory. */ rman_fini(&ctlr->sc_iomem); if (ctlr->r_mem) @@ -868,6 +883,14 @@ ahci_child_location_str(device_t dev, de return (0); } +static bus_dma_tag_t +ahci_get_dma_tag(device_t dev, device_t child) +{ + struct ahci_controller *ctlr = device_get_softc(dev); + + return (ctlr->dma_tag); +} + devclass_t ahci_devclass; static device_method_t ahci_methods[] = { DEVMETHOD(device_probe, ahci_probe), @@ -881,6 +904,7 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), { 0, 0 } }; static driver_t ahci_driver = { @@ -1256,13 +1280,9 @@ ahci_dmainit(device_t dev) struct ahci_dc_cb_args dcba; size_t rfsize; - if (ch->caps & AHCI_CAP_64BIT) - ch->dma.max_address = BUS_SPACE_MAXADDR; - else - ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; /* Command area. */ if (bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, - ch->dma.max_address, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_WORK_SIZE, 1, AHCI_WORK_SIZE, 0, NULL, NULL, &ch->dma.work_tag)) goto error; @@ -1281,7 +1301,7 @@ ahci_dmainit(device_t dev) else rfsize = 256; if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, - ch->dma.max_address, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rfsize, 1, rfsize, 0, NULL, NULL, &ch->dma.rfis_tag)) goto error; @@ -1296,7 +1316,7 @@ ahci_dmainit(device_t dev) ch->dma.rfis_bus = dcba.maddr; /* Data area. */ if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, - ch->dma.max_address, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_SG_ENTRIES * PAGE_SIZE * ch->numslots, AHCI_SG_ENTRIES, AHCI_PRD_MAX, Modified: stable/9/sys/dev/ahci/ahci.h ============================================================================== --- stable/9/sys/dev/ahci/ahci.h Wed Apr 24 19:33:37 2013 (r249852) +++ stable/9/sys/dev/ahci/ahci.h Wed Apr 24 19:36:40 2013 (r249853) @@ -348,7 +348,6 @@ struct ata_dma { uint8_t *rfis; /* FIS receive area */ bus_addr_t rfis_bus; /* bus address of rfis */ bus_dma_tag_t data_tag; /* data DMA tag */ - u_int64_t max_address; /* highest DMA'able address */ }; enum ahci_slot_states { @@ -438,6 +437,7 @@ struct ahci_channel { /* structure describing a AHCI controller */ struct ahci_controller { device_t dev; + bus_dma_tag_t dma_tag; int r_rid; struct resource *r_mem; struct rman sc_iomem; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 20:10:55 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C42BA197; Wed, 24 Apr 2013 20:10:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B386A1C42; Wed, 24 Apr 2013 20:10:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3OKAtGJ009367; Wed, 24 Apr 2013 20:10:55 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3OKAqHe009341; Wed, 24 Apr 2013 20:10:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201304242010.r3OKAqHe009341@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 24 Apr 2013 20:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249856 - in stable/9: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers cddl/contrib/opensolaris/cmd/dtrace/test/ts... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 20:10:55 -0000 Author: pfg Date: Wed Apr 24 20:10:52 2013 New Revision: 249856 URL: http://svnweb.freebsd.org/changeset/base/249856 Log: MFC r248690, r248706, 248708, r248752: Dtrace: merge new functions from Illumos. This covers illumos issues: 1455 DTrace tracemem() should take an optional size argument 1451 DTrace needs toupper()/tolower() subroutines 1457 lltostr() D subroutine should take an optional base 1694 Add type-aware print() action 3511 dtrace.c erroneously checks for memory alignment on amd64 This includes an enhanced print() described here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/ This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos. Illumos Revisions: 13457:571b0355c2e3 13458:5e394d8db762 13459:c3454574dd1a 13501:c3a7090dbc16 13483:f413e6c5d297 Reference: https://www.illumos.org/issues/1455 https://www.illumos.org/issues/1451 https://www.illumos.org/issues/1457 https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694 https://www.illumos.org/issues/3511 Tested by: Fabian Keil Obtained from: Illumos Added: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d - copied unchanged from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d - copied from r248708, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d - copied unchanged from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d - copied unchanged from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d - copied unchanged from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out - copied unchanged from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c - copied unchanged from r248708, head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) Deleted: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toomany.d Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h stable/9/cddl/lib/libdtrace/Makefile stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Directory Properties: stable/9/ (props changed) stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) stable/9/cddl/lib/ (props changed) stable/9/cddl/lib/libdtrace/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower(2152006)); + exit(1); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(toupper(timestamp)); + exit(1); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower()); + exit(1); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower("dory", "eel", "roughy")); + exit(1); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(toupper()); + exit(1); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower("haino", "tylo")); + exit(1); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d) @@ -0,0 +1,80 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +int64_t val[int]; + +BEGIN +{ + base = -2; + i = 0; + val[i++] = -10; + val[i++] = -1; + val[i++] = 0; + val[i++] = 10; + val[i++] = 100; + val[i++] = 1000; + val[i++] = (1LL << 62); + maxval = i; + i = 0; +} + +tick-1ms +/i < maxval/ +{ + printf("base %2d of %20d: ", base, val[i]); +} + +tick-1ms +/i < maxval/ +{ + printf(" %s\n", lltostr(val[i], base)); +} + +ERROR +{ + printf(" \n"); +} + +tick-1ms +/i < maxval/ +{ + i++; +} + +tick-1ms +/i == maxval/ +{ + i = 0; + base++; +} + +tick-1ms +/base > 40/ +{ + exit(0); +} + Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out) @@ -0,0 +1,302 @@ +base -2 of -10: +base -2 of -1: +base -2 of 0: +base -2 of 10: +base -2 of 100: +base -2 of 1000: +base -2 of 4611686018427387904: +base -1 of -10: +base -1 of -1: +base -1 of 0: +base -1 of 10: +base -1 of 100: +base -1 of 1000: +base -1 of 4611686018427387904: +base 0 of -10: +base 0 of -1: +base 0 of 0: +base 0 of 10: +base 0 of 100: +base 0 of 1000: +base 0 of 4611686018427387904: +base 1 of -10: +base 1 of -1: +base 1 of 0: +base 1 of 10: +base 1 of 100: +base 1 of 1000: +base 1 of 4611686018427387904: +base 2 of -10: 1111111111111111111111111111111111111111111111111111111111110110 +base 2 of -1: 1111111111111111111111111111111111111111111111111111111111111111 +base 2 of 0: 0 +base 2 of 10: 1010 +base 2 of 100: 1100100 +base 2 of 1000: 1111101000 +base 2 of 4611686018427387904: 100000000000000000000000000000000000000000000000000000000000000 +base 3 of -10: 11112220022122120101211020120210210211120 +base 3 of -1: 11112220022122120101211020120210210211220 +base 3 of 0: 0 +base 3 of 10: 101 +base 3 of 100: 10201 +base 3 of 1000: 1101001 +base 3 of 4611686018427387904: 1010201120122220002201001122110012110111 +base 4 of -10: 33333333333333333333333333333312 +base 4 of -1: 33333333333333333333333333333333 +base 4 of 0: 0 +base 4 of 10: 22 +base 4 of 100: 1210 +base 4 of 1000: 33220 +base 4 of 4611686018427387904: 10000000000000000000000000000000 +base 5 of -10: 2214220303114400424121122411 +base 5 of -1: 2214220303114400424121122430 +base 5 of 0: 0 +base 5 of 10: 20 +base 5 of 100: 400 +base 5 of 1000: 13000 +base 5 of 4611686018427387904: 302141200402211214402403104 +base 6 of -10: 3520522010102100444244410 +base 6 of -1: 3520522010102100444244423 +base 6 of 0: 0 +base 6 of 10: 14 +base 6 of 100: 244 +base 6 of 1000: 4344 +base 6 of 4611686018427387904: 550120301313313111041104 +base 7 of -10: 45012021522523134134556 +base 7 of -1: 45012021522523134134601 +base 7 of 0: 0 +base 7 of 10: 13 +base 7 of 100: 202 +base 7 of 1000: 2626 +base 7 of 4611686018427387904: 11154003640456024361134 +base 8 of -10: 01777777777777777777766 +base 8 of -1: 01777777777777777777777 +base 8 of 0: 0 +base 8 of 10: 012 +base 8 of 100: 0144 +base 8 of 1000: 01750 +base 8 of 4611686018427387904: 0400000000000000000000 +base 9 of -10: 145808576354216723746 +base 9 of -1: 145808576354216723756 +base 9 of 0: 0 +base 9 of 10: 11 +base 9 of 100: 121 +base 9 of 1000: 1331 +base 9 of 4611686018427387904: 33646586081048405414 +base 10 of -10: -10 +base 10 of -1: -1 +base 10 of 0: 0 +base 10 of 10: 10 +base 10 of 100: 100 +base 10 of 1000: 1000 +base 10 of 4611686018427387904: 4611686018427387904 +base 11 of -10: 335500516a429071276 +base 11 of -1: 335500516a429071284 +base 11 of 0: 0 +base 11 of 10: a +base 11 of 100: 91 +base 11 of 1000: 82a +base 11 of 4611686018427387904: 9140013181078458a4 +base 12 of -10: 839365134a2a240706 +base 12 of -1: 839365134a2a240713 +base 12 of 0: 0 +base 12 of 10: a +base 12 of 100: 84 +base 12 of 1000: 6b4 +base 12 of 4611686018427387904: 20b3a733a268670194 +base 13 of -10: 219505a9511a867b66 +base 13 of -1: 219505a9511a867b72 +base 13 of 0: 0 +base 13 of 10: a +base 13 of 100: 79 +base 13 of 1000: 5bc +base 13 of 4611686018427387904: 6c1349246a2881c84 +base 14 of -10: 8681049adb03db166 +base 14 of -1: 8681049adb03db171 +base 14 of 0: 0 +base 14 of 10: a +base 14 of 100: 72 +base 14 of 1000: 516 +base 14 of 4611686018427387904: 219038263637dd3c4 +base 15 of -10: 2c1d56b648c6cd106 +base 15 of -1: 2c1d56b648c6cd110 +base 15 of 0: 0 +base 15 of 10: a +base 15 of 100: 6a +base 15 of 1000: 46a +base 15 of 4611686018427387904: a7e8ce189a933404 +base 16 of -10: 0xfffffffffffffff6 +base 16 of -1: 0xffffffffffffffff +base 16 of 0: 0x0 +base 16 of 10: 0xa +base 16 of 100: 0x64 +base 16 of 1000: 0x3e8 +base 16 of 4611686018427387904: 0x4000000000000000 +base 17 of -10: 67979g60f5428008 +base 17 of -1: 67979g60f5428010 +base 17 of 0: 0 +base 17 of 10: a +base 17 of 100: 5f +base 17 of 1000: 37e +base 17 of 4611686018427387904: 1a6a6ca03e10a88d +base 18 of -10: 2d3fgb0b9cg4bd26 +base 18 of -1: 2d3fgb0b9cg4bd2f +base 18 of 0: 0 +base 18 of 10: a +base 18 of 100: 5a +base 18 of 1000: 31a +base 18 of 4611686018427387904: c588bdbfgd12ge4 +base 19 of -10: 141c8786h1ccaag7 +base 19 of -1: 141c8786h1ccaagg +base 19 of 0: 0 +base 19 of 10: a +base 19 of 100: 55 +base 19 of 1000: 2ec +base 19 of 4611686018427387904: 5ecbb6fi9h7ggi9 +base 20 of -10: b53bjh07be4dj06 +base 20 of -1: b53bjh07be4dj0f +base 20 of 0: 0 +base 20 of 10: a +base 20 of 100: 50 +base 20 of 1000: 2a0 +base 20 of 4611686018427387904: 2g5hjj51hib39f4 +base 21 of -10: 5e8g4ggg7g56di6 +base 21 of -1: 5e8g4ggg7g56dif +base 21 of 0: 0 +base 21 of 10: a +base 21 of 100: 4g +base 21 of 1000: 25d +base 21 of 4611686018427387904: 18hjgjjjhebh8f4 +base 22 of -10: 2l4lf104353j8k6 +base 22 of -1: 2l4lf104353j8kf +base 22 of 0: 0 +base 22 of 10: a +base 22 of 100: 4c +base 22 of 1000: 21a +base 22 of 4611686018427387904: g6g95gc0hha7g4 +base 23 of -10: 1ddh88h2782i50j +base 23 of -1: 1ddh88h2782i515 +base 23 of 0: 0 +base 23 of 10: a +base 23 of 100: 48 +base 23 of 1000: 1kb +base 23 of 4611686018427387904: 93a22467dc4chd +base 24 of -10: l12ee5fn0ji1i6 +base 24 of -1: l12ee5fn0ji1if +base 24 of 0: 0 +base 24 of 10: a +base 24 of 100: 44 +base 24 of 1000: 1hg +base 24 of 4611686018427387904: 566ffd9ni4mcag +base 25 of -10: c9c336o0mlb7e6 +base 25 of -1: c9c336o0mlb7ef +base 25 of 0: 0 +base 25 of 10: a +base 25 of 100: 40 +base 25 of 1000: 1f0 +base 25 of 4611686018427387904: 32970kc6bo2kg4 +base 26 of -10: 7b7n2pcniokcg6 +base 26 of -1: 7b7n2pcniokcgf +base 26 of 0: 0 +base 26 of 10: a +base 26 of 100: 3m +base 26 of 1000: 1cc +base 26 of 4611686018427387904: 1m8c769io65344 +base 27 of -10: 4eo8hfam6fllmf +base 27 of -1: 4eo8hfam6fllmo +base 27 of 0: 0 +base 27 of 10: a +base 27 of 100: 3j +base 27 of 1000: 1a1 +base 27 of 4611686018427387904: 13jfho2j1hc5cd +base 28 of -10: 2nc6j26l66rho6 +base 28 of -1: 2nc6j26l66rhof +base 28 of 0: 0 +base 28 of 10: a +base 28 of 100: 3g +base 28 of 1000: 17k +base 28 of 4611686018427387904: jo1ilfj8fkpd4 +base 29 of -10: 1n3rsh11f098re +base 29 of -1: 1n3rsh11f098rn +base 29 of 0: 0 +base 29 of 10: a +base 29 of 100: 3d +base 29 of 1000: 15e +base 29 of 4611686018427387904: d0slim0b029e6 +base 30 of -10: 14l9lkmo30o406 +base 30 of -1: 14l9lkmo30o40f +base 30 of 0: 0 +base 30 of 10: a +base 30 of 100: 3a +base 30 of 1000: 13a +base 30 of 4611686018427387904: 8k9rrkl0ml104 +base 31 of -10: nd075ib45k866 +base 31 of -1: nd075ib45k86f +base 31 of 0: 0 +base 31 of 10: a +base 31 of 100: 37 +base 31 of 1000: 118 +base 31 of 4611686018427387904: 5qfh94i8okhh4 +base 32 of -10: fvvvvvvvvvvvm +base 32 of -1: fvvvvvvvvvvvv +base 32 of 0: 0 +base 32 of 10: a +base 32 of 100: 34 +base 32 of 1000: v8 +base 32 of 4611686018427387904: 4000000000000 +base 33 of -10: b1w8p7j5q9r66 +base 33 of -1: b1w8p7j5q9r6f +base 33 of 0: 0 +base 33 of 10: a +base 33 of 100: 31 +base 33 of 1000: ua +base 33 of 4611686018427387904: 2p826a4q6ivi4 +base 34 of -10: 7orp63sh4dph8 +base 34 of -1: 7orp63sh4dphh +base 34 of 0: 0 +base 34 of 10: a +base 34 of 100: 2w +base 34 of 1000: te +base 34 of 4611686018427387904: 1vnvr0wl9ketu +base 35 of -10: 5g24a25twkwf6 +base 35 of -1: 5g24a25twkwff +base 35 of 0: 0 +base 35 of 10: a +base 35 of 100: 2u +base 35 of 1000: sk +base 35 of 4611686018427387904: 1cqrb9a7gvgu4 +base 36 of -10: 3w5e11264sgs6 +base 36 of -1: 3w5e11264sgsf +base 36 of 0: 0 +base 36 of 10: a +base 36 of 100: 2s +base 36 of 1000: rs +base 36 of 4611686018427387904: z1ci99jj7474 +base 37 of -10: +base 37 of -1: +base 37 of 0: +base 37 of 10: +base 37 of 100: +base 37 of 1000: +base 37 of 4611686018427387904: +base 38 of -10: +base 38 of -1: +base 38 of 0: +base 38 of 10: +base 38 of 100: +base 38 of 1000: +base 38 of 4611686018427387904: +base 39 of -10: +base 39 of -1: +base 39 of 0: +base 39 of 10: +base 39 of 100: +base 39 of 1000: +base 39 of 4611686018427387904: +base 40 of -10: +base 40 of -1: +base 40 of 0: +base 40 of 10: +base 40 of 100: +base 40 of 1000: +base 40 of 4611686018427387904: + Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d) @@ -0,0 +1,66 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + + input[i] = "ahi"; + expected[i++] = "ahi"; + + input[i] = "MaHi!"; + expected[i++] = "mahi!"; + + input[i] = " Nase-5"; + expected[i++] = " nase-5"; + + input[i] = "!@#$%"; + expected[i++] = "!@#$%"; + + i = 0; +} + +tick-1ms +/input[i] != NULL && (this->out = tolower(input[i])) != expected[i]/ +{ + printf("expected tolower(\"%s\") to be \"%s\"; found \"%s\"\n", + input[i], expected[i], this->out); + exit(1); +} + +tick-1ms +/input[i] != NULL/ +{ + printf("tolower(\"%s\") is \"%s\", as expected\n", + input[i], expected[i]); +} + +tick-1ms +/input[i++] == NULL/ +{ + exit(0); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d (from r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248706, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d) @@ -0,0 +1,66 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + + input[i] = "ahi"; + expected[i++] = "AHI"; + + input[i] = "MaHi!"; + expected[i++] = "MAHI!"; + + input[i] = " dace-9"; + expected[i++] = " DACE-9"; + + input[i] = "!@#$%"; + expected[i++] = "!@#$%"; + + i = 0; +} + +tick-1ms +/input[i] != NULL && (this->out = toupper(input[i])) != expected[i]/ +{ + printf("expected toupper(\"%s\") to be \"%s\"; found \"%s\"\n", + input[i], expected[i], this->out); + exit(1); +} + +tick-1ms +/input[i] != NULL/ +{ + printf("toupper(\"%s\") is \"%s\", as expected\n", + input[i], expected[i]); +} + +tick-1ms +/input[i++] == NULL/ +{ + exit(0); +} Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d Wed Apr 24 19:47:00 2013 (r249855) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d Wed Apr 24 20:10:52 2013 (r249856) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -32,44 +34,51 @@ * a runtime error. * * SECTION: Pointers and Arrays/Generic Pointers - * - * NOTES: - * This test doesn't apply to x86; for the time being, we're working - * around this with the preprocessor. */ #pragma D option quiet -int array[3]; -uintptr_t uptr; +#if defined(__i386) || defined(__amd64) +#define __x86 1 +#endif + +int array[2]; +char *ptr; int *p; int *q; int *r; BEGIN { -#ifdef __i386 + array[0] = 0x12345678; + array[1] = 0xabcdefff; + + ptr = (char *) &array[0]; + + p = (int *) (ptr); + q = (int *) (ptr + 2); + r = (int *) (ptr + 3); + + printf("*p: 0x%x\n", *p); + printf("*q: 0x%x\n", *q); + printf("*r: 0x%x\n", *r); + + /* + * On x86, the above unaligned memory accesses are allowed and should + * not result in the ERROR probe firing. + */ +#ifdef __x86 exit(1); #else - array[0] = 20; - array[1] = 40; - array[2] = 80; - - uptr = (uintptr_t) &array[0]; - - p = (int *) (uptr); - q = (int *) (uptr + 2); - r = (int *) (uptr + 3); - - printf("array[0]: %d\t*p: %d\n", array[0], *p); - printf("array[1]: %d\t*q: %d\n", array[1], *q); - printf("array[2]: %d\t*r: %d\n", array[2], *r); - exit(0); #endif } ERROR { +#ifdef __x86 + exit(0); +#else exit(1); +#endif } Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d (from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + tracemem(`dtrace_zero, 256, 0, "fishpong"); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d (from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + tracemem(`dtrace_zero, 256, "fishpong"); + exit(0); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d (from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d Wed Apr 24 20:10:52 2013 (r249856, copy of r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d) @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + i = -10; +} + +tick-10ms +/i++ < 150/ +{ + printf("%d:", i); + tracemem(`dtrace_zero, 128, i); + printf("\n"); +} + +tick-10ms +/i >= 150/ +{ + exit(0); +} Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out (from r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out Wed Apr 24 20:10:52 2013 (r249856, copy of r248690, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out) @@ -0,0 +1,1313 @@ +-9: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-8: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-7: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-6: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-5: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-4: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-3: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 22:07:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8E53C897; Wed, 24 Apr 2013 22:07:59 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) by mx1.freebsd.org (Postfix) with ESMTP id 57EBD10C9; Wed, 24 Apr 2013 22:07:59 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id A4C9DC3AF9; Wed, 24 Apr 2013 22:07:52 +0000 (UTC) Date: Thu, 25 Apr 2013 00:07:52 +0200 From: Jeremie Le Hen To: Mikolaj Golub Subject: Re: svn commit: r249734 - stable/9/sys/kern Message-ID: <20130424220752.GA2622@caravan.chchile.org> Mail-Followup-To: Mikolaj Golub , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org References: <201304211714.r3LHEo0R075715@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201304211714.r3LHEo0R075715@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 22:07:59 -0000 Hi Mikolaj, On Sun, Apr 21, 2013 at 05:14:50PM +0000, Mikolaj Golub wrote: > Author: trociny > Date: Sun Apr 21 17:14:50 2013 > New Revision: 249734 > URL: http://svnweb.freebsd.org/changeset/base/249734 > > Log: > MFC r249238, r249239: > > r249238: > > Use 4-byte padding for core dump notes on both 32 and 64bit archs. > > Although native word padding (i.e. 8-byte on 64bit arch) looks to be > in agreement with standards, other parts of our code and other OSes > use 4-byte alignment. > > This is not expected to change alignment for currently generated core > dump notes, as the notes look to consist of structures with sizes > multiple of 8 on 64-bit archs. But there are plans to add additional > notes, where 4-byte vs 8-byte alignment makes difference. > Sorry, I'm a little late, trying to catch up on emails. I'd say this deserves a comment. Even if you commit log clearly states the reason for this change, a casual reader may think it would be preferable to have native alignment and fix it without thinking of checking the SVN metadata. -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-stable@FreeBSD.ORG Wed Apr 24 23:39:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AFCEB23E for ; Wed, 24 Apr 2013 23:39:41 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm30-vm0.bullet.mail.bf1.yahoo.com (nm30-vm0.bullet.mail.bf1.yahoo.com [98.139.213.126]) by mx1.freebsd.org (Postfix) with ESMTP id C5F781452 for ; Wed, 24 Apr 2013 23:39:40 +0000 (UTC) Received: from [98.139.212.149] by nm30.bullet.mail.bf1.yahoo.com with NNFMP; 24 Apr 2013 23:39:33 -0000 Received: from [98.139.213.2] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 24 Apr 2013 23:39:33 -0000 Received: from [127.0.0.1] by smtp102.mail.bf1.yahoo.com with NNFMP; 24 Apr 2013 23:39:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1366846773; bh=0/qTGcaGGbpkiHp74xKa2YuRXgIyLm5LQmhjFqyKyfM=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=eOYxII5KWbPbE+01TcVuoDumbserA07tO4iRxQgNNDFq0E7wSOuR/1Vdyz+FUaUuHCGmeSRSBPSTBm7TZZIi0M9CeO8W7L471fVytnKX+3ffrvofCnmxA6LcHGPNXL+coxTBCzyr0xFtKu6S4taK0nP+a28hNDfI+mHSr1MzNjk= X-Yahoo-Newman-Id: 81895.61328.bm@smtp102.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yBlNZqcVM1lyfwpwxDvMgGZHGGBBT2Wjt1JKfXmqHL.RwzU t7rlMhZiEqukMtgSZAvdwhEWmn7qMzZT_x.A.ErxaVCtfDr_WW3y00ItKs_U dF8bQ5xPTEH9Bm4pATYcMdLfnAF8PIwqYaraPWTv0xnzohMuhWXD9m7pt7sG lWfep3MTe04m3R0g.ggECXaJcqPuya.kr1aklc7seoxwuKZR173FPaRaMvTN zkQHqIDls9YDOa4eP3bETaOcdkQ9rIYORKUmQY9G2aEfZNDuixLN21ICFjwS d0jVFHfNw6N7KCil0ehzSovzdPYYc7l8zjU8OXWKI0BCZjRqK9pdQFUaaubK mwqIxewSXgjrvnxUBx6Vwvo5daGw6E0xwaCPtjNGc4BLPx7gpLrDvKPlKfQG 4froaneFkE4wbtL5e0xAl8y6FXNaaj3pg_PlwW6xOItLxTuQmGG3YYznoRfU ftNouxXVLQE4- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from phobos.corp.netflix.com (scott4long@69.53.237.66 with ) by smtp102.mail.bf1.yahoo.com with SMTP; 24 Apr 2013 16:39:32 -0700 PDT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r249152 - in stable/9/sys: cam cam/ata cam/scsi geom geom/part From: Scott Long In-Reply-To: <201304051141.r35Bfui1062429@svn.freebsd.org> Date: Wed, 24 Apr 2013 16:39:31 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <363EF017-CFC2-4006-8F1B-E18A4091F2CC@yahoo.com> References: <201304051141.r35Bfui1062429@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1503) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Apr 2013 23:39:41 -0000 I've already responded to Alexander in private, but in case he doesn't = respond, I'm stating publicly that I object to this commit (and the = corresponding one in HEAD) and I'd like to have it reviewed and = reverted. Scott On Apr 5, 2013, at 4:41 AM, Alexander Motin wrote: > Author: mav > Date: Fri Apr 5 11:41:56 2013 > New Revision: 249152 > URL: http://svnweb.freebsd.org/changeset/base/249152 >=20 > Log: > MFC r238886, r238892: > Implement media change notification for DA and CD removable media = devices. > It includes three parts: > 1) Modifications to CAM to detect media media changes and report = them to > disk(9) layer. For modern SATA (and potentially UAS) devices it = utilizes > Asynchronous Notification mechanism to receive events from hardware. > Active polling with TEST UNIT READY commands with 3 seconds period is = used > for incapable hardware. After that both CD and DA drivers work the = same way, > detecting two conditions: "NOT READY: Medium not present" after = medium was > detected previously, and "UNIT ATTENTION: Not ready to ready change, = medium > may have changed". First one reported to disk(9) as media removal, = second > as media insert/change. To reliably receive second event new > AC_UNIT_ATTENTION async added to make UAs broadcasted to all periphs = by > generic error handling code in cam_periph_error(). > 2) Modifications to GEOM core to handle media remove and change = events. > Media removal handled by spoiling all consumers attached to the = provider. > Media change event also schedules provider retaste after spoiling to = probe > new media. New flag G_CF_ORPHAN was added to consumers to reflect = that > consumer is in process of destruction. It allows retaste to create = new > geom instance of the same class, while previous one is still dying. > 3) Modifications to some GEOM classes: DEV -- to report media change > events to devd; PART class already handles spoiling alike to orphan. >=20 > Modified: > stable/9/sys/cam/ata/ata_all.h > stable/9/sys/cam/ata/ata_xpt.c > stable/9/sys/cam/cam_ccb.h > stable/9/sys/cam/cam_periph.c > stable/9/sys/cam/cam_xpt.c > stable/9/sys/cam/scsi/scsi_cd.c > stable/9/sys/cam/scsi/scsi_da.c > stable/9/sys/geom/geom.h > stable/9/sys/geom/geom_dev.c > stable/9/sys/geom/geom_disk.c > stable/9/sys/geom/geom_disk.h > stable/9/sys/geom/geom_event.c > stable/9/sys/geom/geom_io.c > stable/9/sys/geom/geom_slice.c > stable/9/sys/geom/geom_subr.c > stable/9/sys/geom/part/g_part.c > Directory Properties: > stable/9/sys/ (props changed) >=20 > Modified: stable/9/sys/cam/ata/ata_all.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/ata/ata_all.h Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/ata/ata_all.h Fri Apr 5 11:41:56 2013 = (r249152) > @@ -35,6 +35,7 @@ struct ccb_ataio; > struct cam_periph; > union ccb; >=20 > +#define SID_AEN 0x04 /* Abuse inq_flags bit to track = enabled AEN. */ > #define SID_DMA 0x10 /* Abuse inq_flags bit to track = enabled DMA. */ >=20 > struct ata_cmd { >=20 > Modified: stable/9/sys/cam/ata/ata_xpt.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/ata/ata_xpt.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/ata/ata_xpt.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -463,6 +463,12 @@ negotiate: > 0, 0x02); > break; > case PROBE_SETAN: > + /* Remember what transport thinks about AEN. */ > + if (softc->caps & CTS_SATA_CAPS_H_AN) > + path->device->inq_flags |=3D SID_AEN; > + else > + path->device->inq_flags &=3D ~SID_AEN; > + xpt_async(AC_GETDEV_CHANGED, path, NULL); > cam_fill_ataio(ataio, > 1, > probedone, > @@ -1157,6 +1163,12 @@ notsata: > cts.xport_specific.sata.valid =3D CTS_SATA_VALID_CAPS; > xpt_action((union ccb *)&cts); > softc->caps =3D caps; > + /* Remember what transport thinks about AEN. */ > + if (softc->caps & CTS_SATA_CAPS_H_AN) > + path->device->inq_flags |=3D SID_AEN; > + else > + path->device->inq_flags &=3D ~SID_AEN; > + xpt_async(AC_GETDEV_CHANGED, path, NULL); > if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) = { > path->device->flags &=3D ~CAM_DEV_UNCONFIGURED; > xpt_acquire_device(path->device); >=20 > Modified: stable/9/sys/cam/cam_ccb.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/cam_ccb.h Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/cam_ccb.h Fri Apr 5 11:41:56 2013 = (r249152) > @@ -755,6 +755,7 @@ struct ccb_relsim { > * Definitions for the asynchronous callback CCB fields. > */ > typedef enum { > + AC_UNIT_ATTENTION =3D 0x4000,/* Device reported UNIT = ATTENTION */ > AC_ADVINFO_CHANGED =3D 0x2000,/* Advance info might have = changes */ > AC_CONTRACT =3D 0x1000,/* A contractual callback */ > AC_GETDEV_CHANGED =3D 0x800,/* Getdev info might have = changed */ >=20 > Modified: stable/9/sys/cam/cam_periph.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/cam_periph.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/cam_periph.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -1604,6 +1604,7 @@ cam_periph_error(union ccb *ccb, cam_fla > const char *action_string; > cam_status status; > int frozen, error, openings, print, lost_device; > + int error_code, sense_key, asc, ascq; > u_int32_t relsim_flags, timeout; >=20 > print =3D 1; > @@ -1770,6 +1771,12 @@ cam_periph_error(union ccb *ccb, cam_fla > xpt_async(AC_LOST_DEVICE, newpath, NULL); > xpt_free_path(newpath); > } > + > + /* Broadcast UNIT ATTENTIONs to all periphs. */ > + } else if (scsi_extract_sense_ccb(ccb, > + &error_code, &sense_key, &asc, &ascq) && > + sense_key =3D=3D SSD_KEY_UNIT_ATTENTION) { > + xpt_async(AC_UNIT_ATTENTION, orig_ccb->ccb_h.path, = orig_ccb); > } >=20 > /* Attempt a retry */ >=20 > Modified: stable/9/sys/cam/cam_xpt.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/cam_xpt.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/cam_xpt.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -4053,6 +4053,7 @@ xpt_async_string(u_int32_t async_code) > case AC_GETDEV_CHANGED: return ("AC_GETDEV_CHANGED"); > case AC_CONTRACT: return ("AC_CONTRACT"); > case AC_ADVINFO_CHANGED: return ("AC_ADVINFO_CHANGED"); > + case AC_UNIT_ATTENTION: return ("AC_UNIT_ATTENTION"); > } > return ("AC_UNKNOWN"); > } >=20 > Modified: stable/9/sys/cam/scsi/scsi_cd.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -97,6 +97,7 @@ typedef enum { > CD_FLAG_NEW_DISC =3D 0x0002, > CD_FLAG_DISC_LOCKED =3D 0x0004, > CD_FLAG_DISC_REMOVABLE =3D 0x0008, > + CD_FLAG_SAW_MEDIA =3D 0x0010, > CD_FLAG_CHANGER =3D 0x0040, > CD_FLAG_ACTIVE =3D 0x0080, > CD_FLAG_SCHED_ON_COMP =3D 0x0100, > @@ -110,6 +111,7 @@ typedef enum { > CD_CCB_PROBE =3D 0x01, > CD_CCB_BUFFER_IO =3D 0x02, > CD_CCB_WAITING =3D 0x03, > + CD_CCB_TUR =3D 0x04, > CD_CCB_TYPE_MASK =3D 0x0F, > CD_CCB_RETRY_UA =3D 0x10 > } cd_ccb_state; > @@ -154,12 +156,14 @@ struct cd_softc { > struct cam_periph *periph; > int minimum_command_size; > int outstanding_cmds; > + int tur; > struct task sysctl_task; > struct sysctl_ctx_list sysctl_ctx; > struct sysctl_oid *sysctl_tree; > STAILQ_HEAD(, cd_mode_params) mode_queue; > struct cd_tocdata toc; > struct disk *disk; > + struct callout mediapoll_c; > }; >=20 > struct cd_page_sizes { > @@ -281,6 +285,7 @@ static int cdsendkey(struct = cam_periph=20 > struct dvd_authinfo *authinfo); > static int cdreaddvdstructure(struct cam_periph = *periph, > struct dvd_struct = *dvdstruct); > +static timeout_t cdmediapoll; >=20 > static struct periph_driver cddriver =3D > { > @@ -290,6 +295,9 @@ static struct periph_driver cddriver =3D >=20 > PERIPHDRIVER_DECLARE(cd, cddriver); >=20 > +#ifndef CD_DEFAULT_POLL_PERIOD > +#define CD_DEFAULT_POLL_PERIOD 3 > +#endif > #ifndef CD_DEFAULT_RETRY > #define CD_DEFAULT_RETRY 4 > #endif > @@ -303,6 +311,7 @@ PERIPHDRIVER_DECLARE(cd, cddriver); > #define CHANGER_MAX_BUSY_SECONDS 15 > #endif >=20 > +static int cd_poll_period =3D CD_DEFAULT_POLL_PERIOD; > static int cd_retry_count =3D CD_DEFAULT_RETRY; > static int cd_timeout =3D CD_DEFAULT_TIMEOUT; > static int changer_min_busy_seconds =3D CHANGER_MIN_BUSY_SECONDS; > @@ -311,6 +320,9 @@ static int changer_max_busy_seconds =3D CH > static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM = driver"); > static SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, > "CD Changer"); > +SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RW, > + &cd_poll_period, 0, "Media polling period in seconds"); > +TUNABLE_INT("kern.cam.cd.poll_period", &cd_poll_period); > SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, > &cd_retry_count, 0, "Normal I/O retry count"); > TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); > @@ -494,6 +506,7 @@ cdcleanup(struct cam_periph *periph) > xpt_print(periph->path, "can't remove sysctl = context\n"); > } >=20 > + callout_drain(&softc->mediapoll_c); > disk_destroy(softc->disk); > free(softc, M_DEVBUF); > cam_periph_lock(periph); > @@ -504,6 +517,7 @@ cdasync(void *callback_arg, u_int32_t co > struct cam_path *path, void *arg) > { > struct cam_periph *periph; > + struct cd_softc *softc; >=20 > periph =3D (struct cam_periph *)callback_arg; > switch (code) { > @@ -541,10 +555,39 @@ cdasync(void *callback_arg, u_int32_t co >=20 > break; > } > + case AC_UNIT_ATTENTION: > + { > + union ccb *ccb; > + int error_code, sense_key, asc, ascq; > + > + softc =3D (struct cd_softc *)periph->softc; > + ccb =3D (union ccb *)arg; > + > + /* > + * Handle all media change UNIT ATTENTIONs except > + * our own, as they will be handled by cderror(). > + */ > + if (xpt_path_periph(ccb->ccb_h.path) !=3D periph && > + scsi_extract_sense_ccb(ccb, > + &error_code, &sense_key, &asc, &ascq)) { > + if (asc =3D=3D 0x28 && ascq =3D=3D 0x00) > + disk_media_changed(softc->disk, = M_NOWAIT); > + } > + cam_periph_async(periph, code, path, arg); > + break; > + } > + case AC_SCSI_AEN: > + softc =3D (struct cd_softc *)periph->softc; > + if (softc->state =3D=3D CD_STATE_NORMAL && !softc->tur) = { > + if (cam_periph_acquire(periph) =3D=3D = CAM_REQ_CMP) { > + softc->tur =3D 1; > + xpt_schedule(periph, CAM_PRIORITY_DEV); > + } > + } > + /* FALLTHROUGH */ > case AC_SENT_BDR: > case AC_BUS_RESET: > { > - struct cd_softc *softc; > struct ccb_hdr *ccbh; >=20 > softc =3D (struct cd_softc *)periph->softc; > @@ -784,8 +827,8 @@ cdregister(struct cam_periph *periph, vo > * Add an async callback so that we get > * notified if this device goes away. > */ > - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE, > - cdasync, periph, periph->path); > + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | > + AC_SCSI_AEN | AC_UNIT_ATTENTION, cdasync, periph, = periph->path); >=20 > /* > * If the target lun is greater than 0, we most likely have a CD > @@ -1001,6 +1044,17 @@ cdregister(struct cam_periph *periph, vo > } > } >=20 > + /* > + * Schedule a periodic media polling events. > + */ > + callout_init_mtx(&softc->mediapoll_c, periph->sim->mtx, 0); > + if ((softc->flags & CD_FLAG_DISC_REMOVABLE) && > + (softc->flags & CD_FLAG_CHANGER) =3D=3D 0 && > + (cgd->inq_flags & SID_AEN) =3D=3D 0 && > + cd_poll_period !=3D 0) > + callout_reset(&softc->mediapoll_c, cd_poll_period * hz, > + cdmediapoll, periph); > + > cdregisterexit: >=20 > if ((softc->flags & CD_FLAG_CHANGER) =3D=3D 0) > @@ -1496,8 +1550,25 @@ cdstart(struct cam_periph *periph, union > periph->immediate_priority =3D = CAM_PRIORITY_NONE; > wakeup(&periph->ccb_list); > } else if (bp =3D=3D NULL) { > - xpt_release_ccb(start_ccb); > + if (softc->tur) { > + softc->tur =3D 0; > + csio =3D &start_ccb->csio; > + scsi_test_unit_ready(csio, > + /*retries*/ cd_retry_count, > + cddone, > + MSG_SIMPLE_Q_TAG, > + SSD_FULL_SIZE, > + cd_timeout); > + start_ccb->ccb_h.ccb_bp =3D NULL; > + start_ccb->ccb_h.ccb_state =3D = CD_CCB_TUR; > + xpt_action(start_ccb); > + } else > + xpt_release_ccb(start_ccb); > } else { > + if (softc->tur) { > + softc->tur =3D 0; > + cam_periph_release_locked(periph); > + } > bioq_remove(&softc->bio_queue, bp); >=20 > scsi_read_write(&start_ccb->csio, > @@ -1541,7 +1612,7 @@ cdstart(struct cam_periph *periph, union >=20 > xpt_action(start_ccb); > } > - if (bp !=3D NULL) { > + if (bp !=3D NULL || softc->tur) { > /* Have more work to do, so ensure we stay = scheduled */ > xpt_schedule(periph, CAM_PRIORITY_NORMAL); > } > @@ -1835,6 +1906,25 @@ cddone(struct cam_periph *periph, union=20 > wakeup(&done_ccb->ccb_h.cbfcnp); > return; > } > + case CD_CCB_TUR: > + { > + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) !=3D = CAM_REQ_CMP) { > + > + if (cderror(done_ccb, CAM_RETRY_SELTO, > + SF_RETRY_UA | SF_NO_RECOVERY | SF_NO_PRINT) = =3D=3D > + ERESTART) > + return; > + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) !=3D = 0) > + cam_release_devq(done_ccb->ccb_h.path, > + /*relsim_flags*/0, > + /*reduction*/0, > + /*timeout*/0, > + /*getcount_only*/0); > + } > + xpt_release_ccb(done_ccb); > + cam_periph_release_locked(periph); > + return; > + } > default: > break; > } > @@ -2826,7 +2916,7 @@ cdcheckmedia(struct cam_periph *periph) > cdprevent(periph, PR_ALLOW); > return (error); > } else { > - softc->flags |=3D CD_FLAG_VALID_MEDIA; > + softc->flags |=3D CD_FLAG_SAW_MEDIA | = CD_FLAG_VALID_MEDIA; > softc->disk->d_sectorsize =3D softc->params.blksize; > softc->disk->d_mediasize =3D > (off_t)softc->params.blksize * = softc->params.disksize; > @@ -3171,6 +3261,14 @@ cderror(union ccb *ccb, u_int32_t cam_fl > &error_code, &sense_key, &asc, &ascq)) { > if (sense_key =3D=3D SSD_KEY_ILLEGAL_REQUEST) > error =3D cd6byteworkaround(ccb); > + else if (sense_key =3D=3D SSD_KEY_UNIT_ATTENTION && > + asc =3D=3D 0x28 && ascq =3D=3D 0x00) > + disk_media_changed(softc->disk, M_NOWAIT); > + else if (sense_key =3D=3D SSD_KEY_NOT_READY && > + asc =3D=3D 0x3a && (softc->flags & = CD_FLAG_SAW_MEDIA)) { > + softc->flags &=3D ~CD_FLAG_SAW_MEDIA; > + disk_media_gone(softc->disk, M_NOWAIT); > + } > } >=20 > if (error =3D=3D ERESTART) > @@ -3186,6 +3284,26 @@ cderror(union ccb *ccb, u_int32_t cam_fl > &softc->saved_ccb)); > } >=20 > +static void > +cdmediapoll(void *arg) > +{ > + struct cam_periph *periph =3D arg; > + struct cd_softc *softc =3D periph->softc; > + > + if (softc->flags & CD_FLAG_CHANGER) > + return; > + > + if (softc->state =3D=3D CD_STATE_NORMAL && !softc->tur) { > + if (cam_periph_acquire(periph) =3D=3D CAM_REQ_CMP) { > + softc->tur =3D 1; > + xpt_schedule(periph, CAM_PRIORITY_DEV); > + } > + } > + /* Queue us up again */ > + if (cd_poll_period !=3D 0) > + callout_schedule(&softc->mediapoll_c, cd_poll_period * = hz); > +} > + > /* > * Read table of contents > */ >=20 > Modified: stable/9/sys/cam/scsi/scsi_da.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -77,6 +77,7 @@ typedef enum { > DA_FLAG_NEW_PACK =3D 0x002, > DA_FLAG_PACK_LOCKED =3D 0x004, > DA_FLAG_PACK_REMOVABLE =3D 0x008, > + DA_FLAG_SAW_MEDIA =3D 0x010, > DA_FLAG_NEED_OTAG =3D 0x020, > DA_FLAG_WENT_IDLE =3D 0x040, > DA_FLAG_RETRY_UA =3D 0x080, > @@ -101,6 +102,7 @@ typedef enum { > DA_CCB_WAITING =3D 0x04, > DA_CCB_DUMP =3D 0x05, > DA_CCB_DELETE =3D 0x06, > + DA_CCB_TUR =3D 0x07, > DA_CCB_TYPE_MASK =3D 0x0F, > DA_CCB_RETRY_UA =3D 0x10 > } da_ccb_state; > @@ -150,6 +152,7 @@ struct da_softc { > int unmap_max_ranges; > int unmap_max_lba; > int delete_running; > + int tur; > da_delete_methods delete_method; > struct disk_params params; > struct disk *disk; > @@ -161,6 +164,7 @@ struct da_softc { > uint64_t wwpn; > uint8_t unmap_buf[UNMAP_MAX_RANGES * 16 + 8]; > struct scsi_read_capacity_data_long rcaplong; > + struct callout mediapoll_c; > }; >=20 > struct da_quirk_entry { > @@ -875,6 +879,11 @@ static void dasetgeom(struct = cam_periph > size_t rcap_size); > static timeout_t dasendorderedtag; > static void dashutdown(void *arg, int howto); > +static timeout_t damediapoll; > + > +#ifndef DA_DEFAULT_POLL_PERIOD > +#define DA_DEFAULT_POLL_PERIOD 3 > +#endif >=20 > #ifndef DA_DEFAULT_TIMEOUT > #define DA_DEFAULT_TIMEOUT 60 /* Timeout in seconds */ > @@ -889,12 +898,16 @@ static void dashutdown(void *arg, = int h > #endif >=20 >=20 > +static int da_poll_period =3D DA_DEFAULT_POLL_PERIOD; > static int da_retry_count =3D DA_DEFAULT_RETRY; > static int da_default_timeout =3D DA_DEFAULT_TIMEOUT; > static int da_send_ordered =3D DA_DEFAULT_SEND_ORDERED; >=20 > static SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, > "CAM Direct Access Disk driver"); > +SYSCTL_INT(_kern_cam_da, OID_AUTO, poll_period, CTLFLAG_RW, > + &da_poll_period, 0, "Media polling period in seconds"); > +TUNABLE_INT("kern.cam.da.poll_period", &da_poll_period); > SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW, > &da_retry_count, 0, "Normal I/O retry count"); > TUNABLE_INT("kern.cam.da.retry_count", &da_retry_count); > @@ -984,6 +997,9 @@ daopen(struct disk *dp) > (softc->quirks & DA_Q_NO_PREVENT) =3D=3D 0) > daprevent(periph, PR_PREVENT); >=20 > + if (error =3D=3D 0) > + softc->flags |=3D DA_FLAG_SAW_MEDIA; > + > cam_periph_unhold(periph); > cam_periph_unlock(periph); >=20 > @@ -1068,7 +1084,8 @@ daschedule(struct cam_periph *periph) >=20 > /* Check if we have more work to do. */ > if (bioq_first(&softc->bio_queue) || > - (!softc->delete_running && = bioq_first(&softc->delete_queue))) { > + (!softc->delete_running && bioq_first(&softc->delete_queue)) = || > + softc->tur) { > prio =3D CAM_PRIORITY_NORMAL; > } >=20 > @@ -1315,6 +1332,7 @@ dacleanup(struct cam_periph *periph) > xpt_print(periph->path, "can't remove sysctl = context\n"); > } >=20 > + callout_drain(&softc->mediapoll_c); > disk_destroy(softc->disk); > callout_drain(&softc->sendordered_c); > free(softc, M_DEVBUF); > @@ -1326,6 +1344,7 @@ daasync(void *callback_arg, u_int32_t co > struct cam_path *path, void *arg) > { > struct cam_periph *periph; > + struct da_softc *softc; >=20 > periph =3D (struct cam_periph *)callback_arg; > switch (code) { > @@ -1377,10 +1396,43 @@ daasync(void *callback_arg, u_int32_t co > } > break; > } > + case AC_UNIT_ATTENTION: > + { > + union ccb *ccb; > + int error_code, sense_key, asc, ascq; > + > + softc =3D (struct da_softc *)periph->softc; > + ccb =3D (union ccb *)arg; > + > + /* > + * Handle all UNIT ATTENTIONs except our own, > + * as they will be handled by daerror(). > + */ > + if (xpt_path_periph(ccb->ccb_h.path) !=3D periph && > + scsi_extract_sense_ccb(ccb, > + &error_code, &sense_key, &asc, &ascq)) { > + if (asc =3D=3D 0x2A && ascq =3D=3D 0x09) { > + xpt_print(ccb->ccb_h.path, > + "capacity data has changed\n"); > + dareprobe(periph); > + } else if (asc =3D=3D 0x28 && ascq =3D=3D 0x00) > + disk_media_changed(softc->disk, = M_NOWAIT); > + } > + cam_periph_async(periph, code, path, arg); > + break; > + } > + case AC_SCSI_AEN: > + softc =3D (struct da_softc *)periph->softc; > + if (softc->state =3D=3D DA_STATE_NORMAL && !softc->tur) = { > + if (cam_periph_acquire(periph) =3D=3D = CAM_REQ_CMP) { > + softc->tur =3D 1; > + xpt_schedule(periph, CAM_PRIORITY_DEV); > + } > + } > + /* FALLTHROUGH */ > case AC_SENT_BDR: > case AC_BUS_RESET: > { > - struct da_softc *softc; > struct ccb_hdr *ccbh; >=20 > softc =3D (struct da_softc *)periph->softc; > @@ -1711,9 +1763,9 @@ daregister(struct cam_periph *periph, vo > * fine without them and the only alternative > * would be to not attach the device on failure. > */ > - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET > - | AC_LOST_DEVICE | AC_ADVINFO_CHANGED, > - daasync, periph, periph->path); > + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | > + AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION, > + daasync, periph, periph->path); >=20 > /* > * Emit an attribute changed notification just in case=20 > @@ -1723,6 +1775,16 @@ daregister(struct cam_periph *periph, vo > */ > disk_attr_changed(softc->disk, "GEOM::physpath", M_NOWAIT); >=20 > + /* > + * Schedule a periodic media polling events. > + */ > + callout_init_mtx(&softc->mediapoll_c, periph->sim->mtx, 0); > + if ((softc->flags & DA_FLAG_PACK_REMOVABLE) && > + (cgd->inq_flags & SID_AEN) =3D=3D 0 && > + da_poll_period !=3D 0) > + callout_reset(&softc->mediapoll_c, da_poll_period * hz, > + damediapoll, periph); > + > xpt_schedule(periph, CAM_PRIORITY_DEV); >=20 > return(CAM_REQ_CMP); > @@ -1860,9 +1922,25 @@ dastart(struct cam_periph *periph, union > /* Run regular command. */ > bp =3D bioq_takefirst(&softc->bio_queue); > if (bp =3D=3D NULL) { > - xpt_release_ccb(start_ccb); > + if (softc->tur) { > + softc->tur =3D 0; > + scsi_test_unit_ready(&start_ccb->csio, > + /*retries*/ da_retry_count, > + dadone, > + MSG_SIMPLE_Q_TAG, > + SSD_FULL_SIZE, > + da_default_timeout * 1000); > + start_ccb->ccb_h.ccb_bp =3D NULL; > + start_ccb->ccb_h.ccb_state =3D = DA_CCB_TUR; > + xpt_action(start_ccb); > + } else > + xpt_release_ccb(start_ccb); > break; > } > + if (softc->tur) { > + softc->tur =3D 0; > + cam_periph_release_locked(periph); > + } >=20 > if ((bp->bio_flags & BIO_ORDERED) !=3D 0 || > (softc->flags & DA_FLAG_NEED_OTAG) !=3D 0) { > @@ -2429,6 +2507,25 @@ dadone(struct cam_periph *periph, union=20 > case DA_CCB_DUMP: > /* No-op. We're polling */ > return; > + case DA_CCB_TUR: > + { > + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) !=3D = CAM_REQ_CMP) { > + > + if (daerror(done_ccb, CAM_RETRY_SELTO, > + SF_RETRY_UA | SF_NO_RECOVERY | SF_NO_PRINT) = =3D=3D > + ERESTART) > + return; > + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) !=3D = 0) > + cam_release_devq(done_ccb->ccb_h.path, > + /*relsim_flags*/0, > + /*reduction*/0, > + /*timeout*/0, > + /*getcount_only*/0); > + } > + xpt_release_ccb(done_ccb); > + cam_periph_release_locked(periph); > + return; > + } > default: > break; > } > @@ -2489,6 +2586,13 @@ daerror(union ccb *ccb, u_int32_t cam_fl > xpt_print(periph->path, "capacity data has = changed\n"); > dareprobe(periph); > sense_flags |=3D SF_NO_PRINT; > + } else if (sense_key =3D=3D SSD_KEY_UNIT_ATTENTION && > + asc =3D=3D 0x28 && ascq =3D=3D 0x00) > + disk_media_changed(softc->disk, M_NOWAIT); > + else if (sense_key =3D=3D SSD_KEY_NOT_READY && > + asc =3D=3D 0x3a && (softc->flags & = DA_FLAG_SAW_MEDIA)) { > + softc->flags &=3D ~DA_FLAG_SAW_MEDIA; > + disk_media_gone(softc->disk, M_NOWAIT); > } > } > if (error =3D=3D ERESTART) > @@ -2505,6 +2609,23 @@ daerror(union ccb *ccb, u_int32_t cam_fl > } >=20 > static void > +damediapoll(void *arg) > +{ > + struct cam_periph *periph =3D arg; > + struct da_softc *softc =3D periph->softc; > + > + if (softc->state =3D=3D DA_STATE_NORMAL && !softc->tur) { > + if (cam_periph_acquire(periph) =3D=3D CAM_REQ_CMP) { > + softc->tur =3D 1; > + daschedule(periph); > + } > + } > + /* Queue us up again */ > + if (da_poll_period !=3D 0) > + callout_schedule(&softc->mediapoll_c, da_poll_period * = hz); > +} > + > +static void > daprevent(struct cam_periph *periph, int action) > { > struct da_softc *softc; >=20 > Modified: stable/9/sys/geom/geom.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom.h Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom.h Fri Apr 5 11:41:56 2013 = (r249152) > @@ -169,7 +169,9 @@ struct g_consumer { > struct g_provider *provider; > LIST_ENTRY(g_consumer) consumers; /* XXX: better name */ > int acr, acw, ace; > - int spoiled; > + int flags; > +#define G_CF_SPOILED 0x1 > +#define G_CF_ORPHAN 0x4 > struct devstat *stat; > u_int nstart, nend; >=20 > @@ -242,6 +244,8 @@ int g_post_event(g_event_t *func, void * > int g_waitfor_event(g_event_t *func, void *arg, int flag, ...); > void g_cancel_event(void *ref); > int g_attr_changed(struct g_provider *pp, const char *attr, int flag); > +int g_media_changed(struct g_provider *pp, int flag); > +int g_media_gone(struct g_provider *pp, int flag); > void g_orphan_provider(struct g_provider *pp, int error); > void g_waitidlelock(void); >=20 >=20 > Modified: stable/9/sys/geom/geom_dev.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_dev.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_dev.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -105,6 +106,21 @@ g_dev_print(void) > static void > g_dev_attrchanged(struct g_consumer *cp, const char *attr) > { > + struct cdev *dev; > + char buf[SPECNAMELEN + 6]; > + > + if (strcmp(attr, "GEOM::media") =3D=3D 0) { > + dev =3D cp->geom->softc; > + snprintf(buf, sizeof(buf), "cdev=3D%s", dev->si_name); > + devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, = M_WAITOK); > + dev =3D cp->cp_alias_dev; > + if (dev !=3D NULL) { > + snprintf(buf, sizeof(buf), "cdev=3D%s", = dev->si_name); > + devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", = buf, > + M_WAITOK); > + } > + return; > + } >=20 > if (strcmp(attr, "GEOM::physpath") !=3D 0) > return; > @@ -119,7 +135,6 @@ g_dev_attrchanged(struct g_consumer *cp, > g_io_getattr("GEOM::physpath", cp, &physpath_len, = physpath); > g_access(cp, -1, 0, 0); > if (error =3D=3D 0 && strlen(physpath) !=3D 0) { > - struct cdev *dev; > struct cdev *old_alias_dev; > struct cdev **alias_devp; >=20 > @@ -161,9 +176,6 @@ g_dev_taste(struct g_class *mp, struct g >=20 > g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); > g_topology_assert(); > - LIST_FOREACH(cp, &pp->consumers, consumers) > - if (cp->geom->class =3D=3D mp) > - return (NULL); > gp =3D g_new_geomf(mp, "%s", pp->name); > cp =3D g_new_consumer(gp); > error =3D g_attach(cp, pp); >=20 > Modified: stable/9/sys/geom/geom_disk.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_disk.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -649,6 +649,32 @@ disk_attr_changed(struct disk *dp, const > (void)g_attr_changed(pp, attr, flag); > } >=20 > +void > +disk_media_changed(struct disk *dp, int flag) > +{ > + struct g_geom *gp; > + struct g_provider *pp; > + > + gp =3D dp->d_geom; > + if (gp !=3D NULL) { > + LIST_FOREACH(pp, &gp->provider, provider) > + g_media_changed(pp, flag); > + } > +} > + > +void > +disk_media_gone(struct disk *dp, int flag) > +{ > + struct g_geom *gp; > + struct g_provider *pp; > + > + gp =3D dp->d_geom; > + if (gp !=3D NULL) { > + LIST_FOREACH(pp, &gp->provider, provider) > + g_media_gone(pp, flag); > + } > +} > + > static void > g_kern_disks(void *p, int flag __unused) > { >=20 > Modified: stable/9/sys/geom/geom_disk.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_disk.h Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_disk.h Fri Apr 5 11:41:56 2013 = (r249152) > @@ -112,6 +112,8 @@ void disk_create(struct disk *disk, int=20 > void disk_destroy(struct disk *disk); > void disk_gone(struct disk *disk); > void disk_attr_changed(struct disk *dp, const char *attr, int flag); > +void disk_media_changed(struct disk *dp, int flag); > +void disk_media_gone(struct disk *dp, int flag); >=20 > #define DISK_VERSION_00 0x58561059 > #define DISK_VERSION_01 0x5856105a >=20 > Modified: stable/9/sys/geom/geom_event.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_event.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_event.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -202,14 +202,12 @@ g_orphan_register(struct g_provider *pp) > * Tell all consumers the bad news. > * Don't be surprised if they self-destruct. > */ > - cp =3D LIST_FIRST(&pp->consumers); > - while (cp !=3D NULL) { > - cp2 =3D LIST_NEXT(cp, consumers); > + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { > KASSERT(cp->geom->orphan !=3D NULL, > ("geom %s has no orphan, class %s", > cp->geom->name, cp->geom->class->name)); > + cp->flags |=3D G_CF_ORPHAN; > cp->geom->orphan(cp); > - cp =3D cp2; > } > if (LIST_EMPTY(&pp->consumers) && wf) > g_destroy_provider(pp); >=20 > Modified: stable/9/sys/geom/geom_io.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_io.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_io.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -311,6 +311,8 @@ g_io_check(struct bio *bp) > /* if provider is marked for error, don't disturb. */ > if (pp->error) > return (pp->error); > + if (cp->flags & G_CF_ORPHAN) > + return (ENXIO); >=20 > switch(bp->bio_cmd) { > case BIO_READ: >=20 > Modified: stable/9/sys/geom/geom_slice.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_slice.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_slice.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -465,6 +465,7 @@ g_slice_spoiled(struct g_consumer *cp) > g_topology_assert(); > gp =3D cp->geom; > g_trace(G_T_TOPOLOGY, "g_slice_spoiled(%p/%s)", cp, gp->name); > + cp->flags |=3D G_CF_ORPHAN; > gsp =3D gp->softc; > gp->softc =3D NULL; > g_slice_free(gsp); >=20 > Modified: stable/9/sys/geom/geom_subr.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/geom_subr.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/geom_subr.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -260,10 +260,11 @@ g_modevent(module_t mod, int type, void=20 > static void > g_retaste_event(void *arg, int flag) > { > - struct g_class *cp, *mp; > - struct g_geom *gp, *gp2; > + struct g_class *mp, *mp2; > + struct g_geom *gp; > struct g_hh00 *hh; > struct g_provider *pp; > + struct g_consumer *cp; >=20 > g_topology_assert(); > if (flag =3D=3D EV_CANCEL) /* XXX: can't happen ? */ > @@ -280,17 +281,20 @@ g_retaste_event(void *arg, int flag) > } > g_trace(G_T_TOPOLOGY, "g_retaste(%s)", mp->name); >=20 > - LIST_FOREACH(cp, &g_classes, class) { > - LIST_FOREACH(gp, &cp->geom, geom) { > + LIST_FOREACH(mp2, &g_classes, class) { > + LIST_FOREACH(gp, &mp2->geom, geom) { > LIST_FOREACH(pp, &gp->provider, provider) { > if (pp->acr || pp->acw || pp->ace) > continue; > - LIST_FOREACH(gp2, &mp->geom, geom) { > - if (!strcmp(pp->name, = gp2->name)) > + LIST_FOREACH(cp, &pp->consumers, = consumers) { > + if (cp->geom->class =3D=3D mp && > + (cp->flags & G_CF_ORPHAN) =3D=3D= 0) > break; > } > - if (gp2 !=3D NULL) > - g_wither_geom(gp2, ENXIO); > + if (cp !=3D NULL) { > + cp->flags |=3D G_CF_ORPHAN; > + g_wither_geom(cp->geom, ENXIO); > + } > mp->taste(mp, pp, 0); > g_topology_assert(); > } > @@ -531,7 +535,7 @@ g_new_provider_event(void *arg, int flag > { > struct g_class *mp; > struct g_provider *pp; > - struct g_consumer *cp; > + struct g_consumer *cp, *next_cp; >=20 > g_topology_assert(); > if (flag =3D=3D EV_CANCEL) > @@ -542,11 +546,17 @@ g_new_provider_event(void *arg, int flag > G_VALID_PROVIDER(pp); > KASSERT(!(pp->flags & G_PF_WITHER), > ("g_new_provider_event but withered")); > + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { > + if ((cp->flags & G_CF_ORPHAN) =3D=3D 0 && > + cp->geom->attrchanged !=3D NULL) > + cp->geom->attrchanged(cp, "GEOM::media"); > + } > LIST_FOREACH(mp, &g_classes, class) { > if (mp->taste =3D=3D NULL) > continue; > LIST_FOREACH(cp, &pp->consumers, consumers) > - if (cp->geom->class =3D=3D mp) > + if (cp->geom->class =3D=3D mp && > + (cp->flags & G_CF_ORPHAN) =3D=3D 0) > break; > if (cp !=3D NULL) > continue; > @@ -803,7 +813,7 @@ g_access(struct g_consumer *cp, int dcr, > * are probably just ahead of the event telling us that. Fail > * now rather than having to unravel this later. > */ > - if (cp->geom->spoiled !=3D NULL && cp->spoiled && > + if (cp->geom->spoiled !=3D NULL && (cp->flags & G_CF_SPOILED) && > (dcr > 0 || dcw > 0 || dce > 0)) > return (ENXIO); >=20 > @@ -953,6 +963,7 @@ g_std_spoiled(struct g_consumer *cp) > g_topology_assert(); > G_VALID_CONSUMER(cp); > g_trace(G_T_TOPOLOGY, "g_std_spoiled(%p)", cp); > + cp->flags |=3D G_CF_ORPHAN; > g_detach(cp); > gp =3D cp->geom; > LIST_FOREACH(pp, &gp->provider, provider) > @@ -988,9 +999,9 @@ g_spoil_event(void *arg, int flag) > G_VALID_PROVIDER(pp); > for (cp =3D LIST_FIRST(&pp->consumers); cp !=3D NULL; cp =3D = cp2) { > cp2 =3D LIST_NEXT(cp, consumers); > - if (!cp->spoiled) > + if ((cp->flags & G_CF_SPOILED) =3D=3D 0) > continue; > - cp->spoiled =3D 0; > + cp->flags &=3D ~G_CF_SPOILED; > if (cp->geom->spoiled =3D=3D NULL) > continue; > cp->geom->spoiled(cp); > @@ -1015,11 +1026,54 @@ g_spoil(struct g_provider *pp, struct g_ > KASSERT(cp2->acw =3D=3D 0, ("spoiling cp->acw =3D %d", = cp2->acw)); > */ > KASSERT(cp2->ace =3D=3D 0, ("spoiling cp->ace =3D %d", = cp2->ace)); > - cp2->spoiled++; > + cp2->flags |=3D G_CF_SPOILED; > } > g_post_event(g_spoil_event, pp, M_WAITOK, pp, NULL); > } >=20 > +static void > +g_media_changed_event(void *arg, int flag) > +{ > + struct g_provider *pp; > + int retaste; > + > + g_topology_assert(); > + if (flag =3D=3D EV_CANCEL) > + return; > + pp =3D arg; > + G_VALID_PROVIDER(pp); > + > + /* > + * If provider was not open for writing, queue retaste after = spoiling. > + * If it was, retaste will happen automatically on close. > + */ > + retaste =3D (pp->acw =3D=3D 0 && pp->error =3D=3D 0 && > + !(pp->geom->flags & G_GEOM_WITHER)); > + g_spoil_event(arg, flag); > + if (retaste) > + g_post_event(g_new_provider_event, pp, M_WAITOK, pp, = NULL); > +} > + > +int > +g_media_changed(struct g_provider *pp, int flag) > +{ > + struct g_consumer *cp; > + > + LIST_FOREACH(cp, &pp->consumers, consumers) > + cp->flags |=3D G_CF_SPOILED; > + return (g_post_event(g_media_changed_event, pp, flag, pp, = NULL)); > +} > + > +int > +g_media_gone(struct g_provider *pp, int flag) > +{ > + struct g_consumer *cp; > + > + LIST_FOREACH(cp, &pp->consumers, consumers) > + cp->flags |=3D G_CF_SPOILED; > + return (g_post_event(g_spoil_event, pp, flag, pp, NULL)); > +} > + > int > g_getattr__(const char *attr, struct g_consumer *cp, void *var, int = len) > { > @@ -1175,15 +1229,15 @@ db_show_geom_consumer(int indent, struct > cp->provider); > } > gprintln(" access: r%dw%de%d", cp->acr, cp->acw, = cp->ace); > - gprintln(" spoiled: %d", cp->spoiled); > + gprintln(" flags: 0x%04x", cp->flags); > gprintln(" nstart: %u", cp->nstart); > gprintln(" nend: %u", cp->nend); > } else { > gprintf("consumer: %p (%s), access=3Dr%dw%de%d", cp, > cp->provider !=3D NULL ? cp->provider->name : = "none", > cp->acr, cp->acw, cp->ace); > - if (cp->spoiled) > - db_printf(", spoiled=3D%d", cp->spoiled); > + if (cp->flags) > + db_printf(", flags=3D0x%04x", cp->flags); > db_printf("\n"); > } > } >=20 > Modified: stable/9/sys/geom/part/g_part.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/geom/part/g_part.c Fri Apr 5 11:30:31 2013 = (r249151) > +++ stable/9/sys/geom/part/g_part.c Fri Apr 5 11:41:56 2013 = (r249152) > @@ -2055,6 +2055,7 @@ g_part_spoiled(struct g_consumer *cp) > G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, = cp->provider->name)); > g_topology_assert(); >=20 > + cp From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 00:33:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 237BCDE4 for ; Thu, 25 Apr 2013 00:33:10 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm34.bullet.mail.gq1.yahoo.com (nm34.bullet.mail.gq1.yahoo.com [98.136.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id DE2A71625 for ; Thu, 25 Apr 2013 00:33:09 +0000 (UTC) Received: from [98.137.12.174] by nm34.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2013 00:27:00 -0000 Received: from [208.71.42.214] by tm13.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2013 00:27:00 -0000 Received: from [127.0.0.1] by smtp225.mail.gq1.yahoo.com with NNFMP; 25 Apr 2013 00:27:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1366849620; bh=KC5zFl1Y2t7X+iiiblSlipxZqtgtBweFQLlb1YTytSE=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=sse8HRFWlDRxQ3v/dbL79snCc1bamoTqIyk4umCwlA0CruW5i5nWdKCNNFVwKN9ZPtUoGAegw8rbS6ktjpDqPw1fIIZvFBq1gRP3BL6PB3jSE2EHB85XZ8czLuM2nk/9CmbhHqHP0wq5iU4/t8GQkZv89GugKeQhzHm3P6e4kn8= X-Yahoo-Newman-Id: 179390.80989.bm@smtp225.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: drllVzMVM1ljll1XPGEyqrAS.a.oYjIKAplJHqW_97ZBRqw IxKJysLQpHuyoghgkMju2QLBDTbmCPJxulk4cBeGp23jnhrT0lCnbNac8LOB mn5J.pLoBe_V_jqArJQ5st.oba2_GLTCF8G3cPk5hlr8wyqnRJDWypmOiGTw YTLbaPol8ffFC9svEaSIeBWBUq2_F3B5n1SRaVX8bh8ECqFo9rgMpu8hToCd MEuSItaz4M23Jd6HOQbfkPxeqB74Cl04bXJlZpsFZeaLUHqFQqPqUVvQ_Ds0 hRSCRHvlkup6bU8mB.3WxtHVhqru4r5vCiKn69mZHBvN5CQcU.8M_qxQxew_ HTON2699TvD.CbtMWb.dkQwytdAW2C55S3Awqsoo9x.ElKnfSJJKmBc1ZV8_ HcYOeIPwOzgmY3Z1jeYM6KYvXDvNyuVdjEXdtLtyzL3AgO9coh16SDQuOlqN 5h2hd.gaWUZqLiYWwwtidsPRvLIYJQQ-- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from phobos.corp.netflix.com (scott4long@69.53.237.66 with plain) by smtp225.mail.gq1.yahoo.com with SMTP; 24 Apr 2013 17:27:00 -0700 PDT Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi From: Scott Long In-Reply-To: <51763216.5000101@FreeBSD.org> Date: Wed, 24 Apr 2013 17:26:59 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <76B6FC68-C395-49A8-AAF6-45B64E4C0A83@yahoo.com> References: <201304180944.r3I9i05t093967@svn.freebsd.org> <51763216.5000101@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1503) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Wemm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 00:33:10 -0000 On Apr 23, 2013, at 12:02 AM, Alexander Motin wrote: > On 23.04.2013 05:35, Scott Long wrote: >> What problem does this solve, other than to unintentionally break the = MPT driver? This needs to be backed out of HEAD and stable/9 until a = better analysis is done. >=20 > It depends on definition of "problem". I don't think that polling in a = tight loop is a right way to do anything while system is operational. >=20 Breaking a common storage controller for nothing more than aesthetic = reasons is a problem. I'd like you to discuss and review this stuff = more. Please. Pretty, pretty please. > Search through the sources shows that the only two drivers doing nasty = things on shutdown_post_sync are mpt and hptmv. While hptmv really = shuts worker thread down there, mpt just disables interrupts breaking = normal operation. That situation looks quite dirty to me. =46rom one = side if controller really needs shutdown (to flush some caches, etc), = then it should not receive any (or reject all) commands after that point = (either polled or not). If it doesn't need shutdown, then what for are = these shaman dances? >=20 You'll need to talk to Gibbs about MPT. I committed the code as a proxy = for him; I don't recall why he specifically wanted to shut down = interrupts there. Talking to him would be a good pre-commit action. > Instead of revert, I propose this trivial non-invasive patch to fix = the problem by moving hptmv and mpt shutdown a bit later in shutdown = order: http://people.freebsd.org/~mav/post_sync.patch >=20 I'm fine with the concept, so long as it works. Have you tested it? (btw, sorry I missed this response earlier) Thanks, Scott >> On Apr 18, 2013, at 3:44 AM, Alexander Motin wrote: >>=20 >>> Author: mav >>> Date: Thu Apr 18 09:44:00 2013 >>> New Revision: 249611 >>> URL: http://svnweb.freebsd.org/changeset/base/249611 >>>=20 >>> Log: >>> MFC r248872, r249048: >>> Make pre-shutdown flush and spindown routines to not use = xpt_polled_action(), >>> but execute the commands in regular way. There is no any reason to = cook CPU >>> while the system is still fully operational. After this change = polling in >>> CAM is used only for kernel dumping. >>>=20 >>> Modified: >>> stable/9/sys/cam/ata/ata_da.c >>> stable/9/sys/cam/scsi/scsi_da.c >>> Directory Properties: >>> stable/9/sys/ (props changed) >>>=20 >>> Modified: stable/9/sys/cam/ata/ata_da.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:40:34 2013 = (r249610) >>> +++ stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:44:00 2013 = (r249611) >>> @@ -1825,11 +1825,10 @@ adaflush(void) >>> { >>> struct cam_periph *periph; >>> struct ada_softc *softc; >>> + union ccb *ccb; >>> int error; >>>=20 >>> CAM_PERIPH_FOREACH(periph, &adadriver) { >>> - union ccb ccb; >>> - >>> /* If we paniced with lock held - not recurse here. */ >>> if (cam_periph_owned(periph)) >>> continue; >>> @@ -1845,10 +1844,8 @@ adaflush(void) >>> continue; >>> } >>>=20 >>> - xpt_setup_ccb(&ccb.ccb_h, periph->path, = CAM_PRIORITY_NORMAL); >>> - >>> - ccb.ccb_h.ccb_state =3D ADA_CCB_DUMP; >>> - cam_fill_ataio(&ccb.ataio, >>> + ccb =3D cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); >>> + cam_fill_ataio(&ccb->ataio, >>> 0, >>> adadone, >>> CAM_DIR_NONE, >>> @@ -1856,20 +1853,17 @@ adaflush(void) >>> NULL, >>> 0, >>> ada_default_timeout*1000); >>> - >>> if (softc->flags & ADA_FLAG_CAN_48BIT) >>> - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, = 0, 0); >>> + ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, = 0, 0); >>> else >>> - ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, = 0); >>> - xpt_polled_action(&ccb); >>> + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, = 0); >>>=20 >>> - error =3D cam_periph_error(&ccb, >>> - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); >>> - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) !=3D 0) >>> - cam_release_devq(ccb.ccb_h.path, = /*relsim_flags*/0, >>> - /*reduction*/0, /*timeout*/0, = /*getcount_only*/0); >>> + error =3D cam_periph_runccb(ccb, adaerror, = /*cam_flags*/0, >>> + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, >>> + softc->disk->d_devstat); >>> if (error !=3D 0) >>> xpt_print(periph->path, "Synchronize cache = failed\n"); >>> + xpt_release_ccb(ccb); >>> cam_periph_unlock(periph); >>> } >>> } >>> @@ -1879,11 +1873,10 @@ adaspindown(uint8_t cmd, int flags) >>> { >>> struct cam_periph *periph; >>> struct ada_softc *softc; >>> + union ccb *ccb; >>> int error; >>>=20 >>> CAM_PERIPH_FOREACH(periph, &adadriver) { >>> - union ccb ccb; >>> - >>> /* If we paniced with lock held - not recurse here. */ >>> if (cam_periph_owned(periph)) >>> continue; >>> @@ -1900,10 +1893,8 @@ adaspindown(uint8_t cmd, int flags) >>> if (bootverbose) >>> xpt_print(periph->path, "spin-down\n"); >>>=20 >>> - xpt_setup_ccb(&ccb.ccb_h, periph->path, = CAM_PRIORITY_NORMAL); >>> - >>> - ccb.ccb_h.ccb_state =3D ADA_CCB_DUMP; >>> - cam_fill_ataio(&ccb.ataio, >>> + ccb =3D cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); >>> + cam_fill_ataio(&ccb->ataio, >>> 0, >>> adadone, >>> CAM_DIR_NONE | flags, >>> @@ -1911,17 +1902,14 @@ adaspindown(uint8_t cmd, int flags) >>> NULL, >>> 0, >>> ada_default_timeout*1000); >>> + ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, 0); >>>=20 >>> - ata_28bit_cmd(&ccb.ataio, cmd, 0, 0, 0); >>> - xpt_polled_action(&ccb); >>> - >>> - error =3D cam_periph_error(&ccb, >>> - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); >>> - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) !=3D 0) >>> - cam_release_devq(ccb.ccb_h.path, = /*relsim_flags*/0, >>> - /*reduction*/0, /*timeout*/0, = /*getcount_only*/0); >>> + error =3D cam_periph_runccb(ccb, adaerror, = /*cam_flags*/0, >>> + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, >>> + softc->disk->d_devstat); >>> if (error !=3D 0) >>> xpt_print(periph->path, "Spin-down disk = failed\n"); >>> + xpt_release_ccb(ccb); >>> cam_periph_unlock(periph); >>> } >>> } >>>=20 >>> Modified: stable/9/sys/cam/scsi/scsi_da.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:40:34 2013 = (r249610) >>> +++ stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:44:00 2013 = (r249611) >>> @@ -2834,11 +2834,10 @@ dashutdown(void * arg, int howto) >>> { >>> struct cam_periph *periph; >>> struct da_softc *softc; >>> + union ccb *ccb; >>> int error; >>>=20 >>> CAM_PERIPH_FOREACH(periph, &dadriver) { >>> - union ccb ccb; >>> - >>> cam_periph_lock(periph); >>> softc =3D (struct da_softc *)periph->softc; >>>=20 >>> @@ -2852,10 +2851,8 @@ dashutdown(void * arg, int howto) >>> continue; >>> } >>>=20 >>> - xpt_setup_ccb(&ccb.ccb_h, periph->path, = CAM_PRIORITY_NORMAL); >>> - >>> - ccb.ccb_h.ccb_state =3D DA_CCB_DUMP; >>> - scsi_synchronize_cache(&ccb.csio, >>> + ccb =3D cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); >>> + scsi_synchronize_cache(&ccb->csio, >>> /*retries*/0, >>> /*cbfcnp*/dadone, >>> MSG_SIMPLE_Q_TAG, >>> @@ -2864,15 +2861,12 @@ dashutdown(void * arg, int howto) >>> SSD_FULL_SIZE, >>> 60 * 60 * 1000); >>>=20 >>> - xpt_polled_action(&ccb); >>> - >>> - error =3D cam_periph_error(&ccb, >>> - 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, = NULL); >>> - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) !=3D 0) >>> - cam_release_devq(ccb.ccb_h.path, = /*relsim_flags*/0, >>> - /*reduction*/0, /*timeout*/0, = /*getcount_only*/0); >>> + error =3D cam_periph_runccb(ccb, daerror, = /*cam_flags*/0, >>> + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY | = SF_QUIET_IR, >>> + softc->disk->d_devstat); >>> if (error !=3D 0) >>> xpt_print(periph->path, "Synchronize cache = failed\n"); >>> + xpt_release_ccb(ccb); >>> cam_periph_unlock(periph); >>> } >>> } >>=20 >=20 >=20 > --=20 > Alexander Motin From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 01:42:58 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 560DCAF4; Thu, 25 Apr 2013 01:42:58 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4475D17F3; Thu, 25 Apr 2013 01:42:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P1gwPs025338; Thu, 25 Apr 2013 01:42:58 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P1gso7025310; Thu, 25 Apr 2013 01:42:54 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250142.r3P1gso7025310@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 01:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249865 - in stable/9/contrib/sendmail: . cf/cf cf/m4 contrib doc/op include/sm libmilter libsm mailstats makemap praliases rmail src test vacation X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 01:42:58 -0000 Author: gshapiro Date: Thu Apr 25 01:42:54 2013 New Revision: 249865 URL: http://svnweb.freebsd.org/changeset/base/249865 Log: MFC: Merge sendmail 8.14.7 Added: stable/9/contrib/sendmail/libsm/t-fget.c - copied unchanged from r249729, head/contrib/sendmail/libsm/t-fget.c Modified: stable/9/contrib/sendmail/CACerts stable/9/contrib/sendmail/PGPKEYS stable/9/contrib/sendmail/RELEASE_NOTES stable/9/contrib/sendmail/cf/cf/submit.cf stable/9/contrib/sendmail/cf/m4/version.m4 stable/9/contrib/sendmail/contrib/etrn.pl stable/9/contrib/sendmail/doc/op/op.me stable/9/contrib/sendmail/include/sm/config.h stable/9/contrib/sendmail/include/sm/io.h stable/9/contrib/sendmail/libmilter/Makefile.m4 stable/9/contrib/sendmail/libmilter/sm_gethost.c stable/9/contrib/sendmail/libsm/Makefile.m4 stable/9/contrib/sendmail/libsm/cf.c stable/9/contrib/sendmail/libsm/fget.c stable/9/contrib/sendmail/mailstats/mailstats.c stable/9/contrib/sendmail/makemap/makemap.c stable/9/contrib/sendmail/praliases/praliases.c stable/9/contrib/sendmail/rmail/rmail.c stable/9/contrib/sendmail/src/Makefile.m4 stable/9/contrib/sendmail/src/alias.c stable/9/contrib/sendmail/src/collect.c stable/9/contrib/sendmail/src/conf.c stable/9/contrib/sendmail/src/control.c stable/9/contrib/sendmail/src/deliver.c stable/9/contrib/sendmail/src/main.c stable/9/contrib/sendmail/src/map.c stable/9/contrib/sendmail/src/mci.c stable/9/contrib/sendmail/src/milter.c stable/9/contrib/sendmail/src/mime.c stable/9/contrib/sendmail/src/parseaddr.c stable/9/contrib/sendmail/src/queue.c stable/9/contrib/sendmail/src/readcf.c stable/9/contrib/sendmail/src/recipient.c stable/9/contrib/sendmail/src/savemail.c stable/9/contrib/sendmail/src/sendmail.h stable/9/contrib/sendmail/src/sfsasl.c stable/9/contrib/sendmail/src/srvrsmtp.c stable/9/contrib/sendmail/src/tls.c stable/9/contrib/sendmail/src/usersmtp.c stable/9/contrib/sendmail/src/util.c stable/9/contrib/sendmail/src/version.c stable/9/contrib/sendmail/test/Makefile.m4 stable/9/contrib/sendmail/vacation/vacation.c Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/CACerts ============================================================================== --- stable/9/contrib/sendmail/CACerts Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/CACerts Thu Apr 25 01:42:54 2013 (r249865) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.5 2011/05/06 23:05:10 ca Exp $ +# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -10,93 +10,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - c2:3c:61:67:3b:0a:cc:5e - Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + f1:41:b3:3d:ba:bd:33:49 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Validity - Not Before: May 14 04:42:18 2009 GMT - Not After : May 13 04:42:18 2012 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + Not Before: Mar 10 02:47:46 2012 GMT + Not After : Mar 10 02:47:46 2015 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: - 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: - e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: - b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: - 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: - 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: - d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: - 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: - 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: - 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: - 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: - c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: - dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: - ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: - d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: - fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: - f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: - 71:9d + Public-Key: (2048 bit) + Modulus: + 00:a2:80:fc:c6:ce:7f:60:38:65:f4:38:f9:7a:d9: + 87:fd:47:eb:3f:2c:4a:c9:38:77:6a:77:94:92:7f: + 83:3d:99:57:2c:5f:37:bb:ba:12:10:17:56:fa:eb: + 43:a6:4b:4c:1e:30:32:07:94:2f:5a:d8:65:49:29: + fa:24:d1:f0:0b:45:2d:e5:d5:cb:7d:60:dc:a6:ce: + a4:47:35:30:ee:5e:8d:c2:30:e7:a7:63:32:b0:59: + 80:cc:8c:99:64:77:8f:50:8e:88:51:47:36:ea:9a: + f3:b4:c0:8c:a6:ab:c6:42:57:88:b9:5f:9f:61:15: + bb:79:65:93:ca:a9:fd:17:eb:87:26:8b:eb:b7:2b: + 7e:33:05:2b:ba:c0:46:f7:08:fd:da:c1:50:9b:3d: + 26:83:5c:53:97:89:2c:cc:5f:f2:7b:a8:b7:3d:fb: + f2:b4:89:0d:43:ef:18:5c:21:75:71:cc:f0:c2:a3: + 84:69:c0:a7:f3:9b:de:c1:c7:5a:5c:7e:68:da:49: + 71:af:58:a8:51:9f:bd:f9:3d:bb:a5:92:fa:7b:1d: + 52:f5:fe:90:59:95:27:65:a4:af:97:9a:4f:01:39: + 59:7d:08:6f:a1:8f:42:47:49:bf:12:52:53:39:74: + 8d:62:3b:bd:4c:4f:05:0f:c4:b9:3e:da:a8:0e:96: + 05:2d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + 08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB X509v3 Authority Key Identifier: - keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org - serial:C2:3C:61:67:3B:0A:CC:5E + keyid:08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org + serial:F1:41:B3:3D:BA:BD:33:49 X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2009@esmtp.org + email:ca+ca-rsa2012@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2009@esmtp.org - Signature Algorithm: md5WithRSAEncryption - b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: - 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: - 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: - 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: - 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: - 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: - 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: - 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: - 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: - f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: - 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: - 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: - ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: - 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: - d0:82:1e:07 + email:ca+ca-rsa2012@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 9a:8f:4d:23:5b:30:80:e1:94:e4:66:9c:3a:17:8b:79:49:5b: + ec:5d:e5:a1:22:2d:71:37:a1:51:e7:1d:b1:0d:a9:9b:aa:a9: + 0d:c7:cd:d6:24:f9:e0:f0:57:be:4f:74:0c:4b:7a:42:4c:70: + 19:2e:8e:eb:cb:1b:00:26:27:eb:1c:42:33:d5:ec:32:b4:6c: + 7d:a3:04:a1:5c:00:49:c9:0d:4c:4d:28:37:06:22:77:ec:40: + 15:25:3a:23:84:ae:1f:da:90:dd:c9:dc:27:ee:7c:ec:e5:df: + b8:ba:1e:3f:ee:c2:91:a2:3f:22:92:1e:f3:06:7e:aa:e9:c3: + 11:2d:3d:2f:85:f7:fc:d7:e2:f8:6d:70:a6:40:62:69:e7:52: + ed:1b:19:38:72:86:08:a1:3d:47:c8:68:82:41:db:db:2a:52: + 25:d7:49:aa:9e:c5:83:22:7d:2f:0b:df:8c:90:2d:b5:aa:33: + c7:9b:e8:39:8f:bb:79:5b:13:2d:4e:a9:69:59:c7:09:26:e2: + b5:53:80:86:72:bb:7c:be:e9:46:5b:d8:b2:78:42:d6:5d:c3: + bb:3a:3b:5f:0f:e8:c3:60:fb:88:9f:3a:2b:9f:d3:7d:9f:c7: + 32:aa:4d:34:a7:66:a1:25:16:95:a6:69:e7:86:a3:5c:b9:b9: + df:58:05:e3 -----BEGIN CERTIFICATE----- -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 -gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxMjEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxMkBlc210cC5vcmeCCQDxQbM9ur0z +STAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQCaj00jWzCA4ZTkZpw6F4t5SVvsXeWhIi1xN6FR5x2xDambqqkN +x83WJPng8Fe+T3QMS3pCTHAZLo7ryxsAJifrHEIz1ewytGx9owShXABJyQ1MTSg3 +BiJ37EAVJTojhK4f2pDdydwn7nzs5d+4uh4/7sKRoj8ikh7zBn6q6cMRLT0vhff8 +1+L4bXCmQGJp51LtGxk4coYIoT1HyGiCQdvbKlIl10mqnsWDIn0vC9+MkC21qjPH +m+g5j7t5WxMtTqlpWccJJuK1U4CGcrt8vulGW9iyeELWXcO7OjtfD+jDYPuInzor +n9N9n8cyqk00p2ahJRaVpmnnhqNcubnfWAXj -----END CERTIFICATE----- Modified: stable/9/contrib/sendmail/PGPKEYS ============================================================================== --- stable/9/contrib/sendmail/PGPKEYS Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/PGPKEYS Thu Apr 25 01:42:54 2013 (r249865) @@ -142,6 +142,143 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 2048 5207CAD3 2013-01-02 ------- RSA Sign & Encrypt +fingerprint: B87D 4569 86F1 9484 07E5 CCB4 3D68 B25D 5207 CAD3 +uid Sendmail Signing Key/2013 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.13 (Darwin) + +mQENBFDkiE4BCAC7jVxyAGrnqq7bW4lAe83CxIUT4YHb+Ai49cecSCeOGqPSdlcg +NYdNzi7KKpF9r4ShSctw2mHqWkwE7AimgJL3w5Iw026YtFrGfB5KHnBIC3dWKiJu +ZM20qKx0Y5KqLjZStlajHL/gfhzhHEZXMcgFbYMGQ57Yuug8eEdmBb9ihgQgosdT +RmdNH5zqch4G3Yf246JqeyESBCi8NHbOHzdfEWze3H2mGRmGeKfcnKRPlZV9OEdG +E6ZEN6FBMghthZRa0f0AWw34YGxtvIAXOm/as64qpzJ2ebbH4HWvNRAaWetARG/I +4OwCkvcpqFROXXFOALlFJiAiXkK1RRPcPWyJABEBAAG0MVNlbmRtYWlsIFNpZ25p +bmcgS2V5LzIwMTMgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATkEEwECACMFAlDk +iE4CGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRA9aLJdUgfK02WeB/9r +tNy5h/ouE9ixuzIDd7q5/n5ApIu0dnjLrieoOIgKPKLUwQMO18cjueKtRcAk1NP/ +BTYodw1rPOuZrtlgIltoAz4EN14SDGqiVVhgNkJVazOQ/4V0/zVAg+AZAngC3IFY +MXI99/HOnhTTZ+lHwDbvZdNu/yY0LDOl0VO41atRD9A/ujbRbjQL+QCkabi+M0Vr +Boz/4JKxbidsG41JFGQMTJxXuglZOWagB/T30/pYR5kxlTT5w7Y++JTGpOsvfAoP +B5wp1rTtsA5d7+oxmmwHBBIlDFidWTt2y8Hk1E+Fx+zHLvqdG6qZuxgtdA1g+DSx +MBbgmUztfAJsRKAJw91RiQEcBBABAgAGBQJQ5Ij4AAoJEI5a6fvO7vQ7IVwH/2U+ +K1L0/wP+Qgbb6Ge+Q6Px0x5YltJE56AoDgjAQof0jVgXXXJXb7uy+KIZnvBRdDeU +4z25qLFCAAoI1Coeu+DStv3q1MauQ6i05EG4qnK0h/VHRKsaGpgBpU6Q0HUzCeUj ++jedYsBxUjKlIQgbNbKh8rc/q38q8zGP5gswH+gbiO4gfLE5vUD+c/j3Bk7vTwjH +wcS82QznXDxFu92M9pe9cjz4OlMhT3KqA9ek/3X0FgkxX8LdIajWXUXrVbxeYEbv +0mrctI0SDMpy7TU8m1fc+87tbUsAC6lZx39dB+6CgYWcegLZGkwBYNhI5FtGSfml +Z7QloikEjxhADUqtHL+JARwEEAECAAYFAlDkiRMACgkQOaTHfal4hLBIyQf+JsMO +NKuvzLXB9jVrvVZE9Eyngomj4j4wVEK2ugFcf4lryi800rUaqO8R7mgR4iIqK9NU +EEwazvyBU+57Qcn5CfxrRTrVWz3GUET3qjsUPOihmSnIg7V9nremQzQG7wWcraJe +Abm1mG0cwXA1Gasak5Z4wD4Q5FmoKTWBYvP8l8lnHmnG12cbDiKCwn1qW6parkW/ +HlAaItO5N7Or58gpKSDrbaLBV0l2jxlOk9eeWkeYdnrF5PAmOf2/32AGRrGC+YI9 +vgqK34Hslxf00v5yjw7wYiYNu4Yq9eCKCXw7cIWzHRAoE951tpQ0AciNS15TWNc4 +MMiK4mUMY/9+YKwllokBHAQQAQIABgUCUOSJGAAKCRBgTfvyhUEKvuC0B/4iqq2K +hZiA5RWoxfXrwJwfaOtAHNgUpuDC51JX48vZB0Ie5lgARjqyCLbVPTIj/A+oRpll +z0FHQuCpYDTzSJs2X3Ol04COrsuWNRanNm2/Jh10m9vubyX1Ge0pGvhm3yFClFKS +O/LoioYWZ370PdQrVkccp5cfEHjiiCqVh3PLzbhPDj9Js9HKRNi0aQ34uJlZc+VK +1lAihymzO23fklJg3heL5HXH+btuJxkyi8aQ1p4meHVFYFqcjO/S7PyNJeMd0gwu +6ykWuL0N7Hq2WDfSYorDKf6fZMm/jQwkAJo26/Nmq0SSkMkviy0aowgjsR0zTudO +Tnpun4pNcYKSkbK9iJwEEAECAAYFAlDkiRsACgkQEolum6d/JCmgvQP7BjbE1xC9 +EFequc5ixwcrKbyvel8JZR4QaMfjZ/YltFJEAtNpiUmyI1s5CVqPnPoMqGJSxbkH +eTiIinsj/lxgImE8sDAdzxfIQc9sUFwm/SZmYnLPBxd0FtziaNPxVY1zHbpBiC4R +vYTBGrYwKDxkMIkI26mQ3C+6jpQHZjCq+ZiInAQQAQIABgUCUOSJHwAKCRDYqvDK +9rMHKT9CBACU3RGc9MLTbgXuA4F/jjbQ98I4Ei61y5i0jAt4Wk9qi3WLCpIEorVA +9LzyqClIioS4HoLLIH944Dr6Q7nC+SwifBGgxWVogEPl8vcMUfmUIkUa/KD9N9Wn +t8nSyaYNYYDefjzBy4veyrZF/zTl9RUjD3Y5h6VRSpVqox3pb3g0QoicBBABAgAG +BQJQ5IkjAAoJEJdDARhwk7hB9oUD/19C8pRVgzlM4aCjbh1DhmF23C6eegE7Z82f +9ZByKKKZscahOXp0vdWHuKvQ/j09rfROcb08k+6EofVg/lyT5yj3+SFy7Md+6RKB +oJVfX4Q3d1kWjawwYoTinMAbiANgEbiERZt9OUvxFq1zB3XjfD/DtsTDXO0Jb9nL +an8Eu9KPiJwEEAECAAYFAlDkiSYACgkQHnuzyK+VliVdngP+IhF8I7YICl7LYK8t +eYHHSQuR0HGRJAY2Sm6AgDvS8d2d6BWHovzhcXWmZt5t4qtO9JoO3arEJPFLi+sM +4zltrZ0G2w2iLuK8puGh4PM2V2PjRVWlhmwVdY4yERdqCwD9+TpgPudxDaOpCpD5 +pry2zkHzgtRVnKaB5wUxQSX/9+2InAQQAQIABgUCUOSJKQAKCRBwoCRNHvmSUT5j +A/0RNa+Q73G4STet1vUxJWyufNOOag82ziISGFX5qZ5HnvVheJuUYlplfx3pLGZs +VyxNPJ86vgdobNXG2dJYn/y/3C/9jIp0NiKJYEMVNlOrDvqoh3/7LdDCQC4dPKj/ +T4nSKgK/ny3Bvz8RHf874fnZZt6xjo+DFTzvktChYBSBh4icBBABAgAGBQJQ5Iks +AAoJEMjV7SmV9hdxzAYEAJ6iOI1YzJlNzZptUsCcBR+40sAL43UaaDXCjhEtRgpy ++EQSpGVEzCvN5sxF4z8QXo82x9zQJWZmYV974KXqIq8jFEuSLZAuVuPs2RlfRyAl +P5lATnXdGzrTXgoNLoXEt/vQqYuqFwqXkVvZcLkGHPwTOysyFH/vy8xLXmRI58RZ +iJwEEAECAAYFAlDkiaAACgkQIYPhsTlvB4lMRgP/b5lffwl6KwYI2d/ZoQVaMN+r +aun6ziVCLqMQRiUR03H06fFo31RmGdPRuQ97jxS8EZPNabygjAfKq3F74DPoSlvL +/8AXhj3UXoERf2XIj03o8we5SG0Tg6zLSNB65NoGR1whRgxwAxCgIRaRfudREYQR +6Vd7WpTHeRWttXLyiIiImwQQAQIABgUCUOSJvAAKCRCJaWK4Z4wKA+BYA/jBXOD2 +4pBFFELiCyFW+iTlzsJt5vwyTLolm8Ez77DkepkYOr6ZGiDb1cp3AL1e2ynwbSxq +NeAvwVfIm5TOO8w+xEYplciupd12QfXVa9MiQwDJm4FOP+Nb6X9MSqlHL8E8XoJv +NPjJoY3zFEYn2OGZrD8UpVdU5Y+pKZtCYxc0iJwEEAECAAYFAlDkicMACgkQOCLb +R8w3Ty3mvQP/e97V+BsqxV9HeqJHnmi4NJYaKpP2HBuXntLSDxyqO8YGa3qKkYjj +/LAXp2QfBpwCWn8D0pQSoUF5jayoeNviKs1cfcuq4dyfdoiVBcWOgJQeUHSO8w/r +hevqzclCuWz1TqW7HKlljUbpvP9LDR9De9T6izc3eR9WuLcqBwV73ZyInAQQAQIA +BgUCUOSJxwAKCRCcHL3i41xWNXa+A/9GD14quBksQf6iWg2CbHufCyUqquvN4IbI +YlskEHvjTtaZ20SC0cGMMPe/X2VbfWOR4UjEdlSGQdLWZ8FjKj0hjSSUf28OcbSd +xXryuFFt0skY2dBW1LHgVDUnHTlK1m9p9k887tL31YUGmA7apZVSILhSnd1jI+G7 +NN3ni31Wo4icBBABAgAGBQJQ5InKAAoJEG9Sk9ijm6ZVMLQD/3BWsllRiwFCsiiL +KBJqnjRCdFTuHOl75g86IniLMXu11r+K4LR9mXbi2bduAzkwP7c9HSAFWli3bhfV +fgf68sogGcHAtQgjgjTg3NvjOPkeMT24PVJzgIUkbgFBmOoe30L7/YyKl7B53FrX +dIcuI0d47bXoUOvjzNueBKzLkA3WiJwEEAECAAYFAlDkic0ACgkQ71iWZNQy4Z18 +0AP/cNp30lU/1dMF4bXbmbYG/dwxzFa8K1RsxJJD/HGFTsPs30o5tp7IpHAA3wiP +QI13HhDA9hfRsuWHyNztL6uHDD4HRiab1j1hNgorzXMYp+EmFSX+LYfd/GPBHX6B +xzGy6HuhurF1cPcvEbdlmcdr50YLaO4WJbHfU+p/9eEMZKOInAQQAQIABgUCUOSJ +0AAKCRDBnB0lEtNGHeMQBACWhsL8KCmh+2XwIweQOboaGA6ShwDHx8CfPxcqv9ZJ +4jsRoHSjiSRK+Gbqh0/5aOppeO6Pg8CppuDJ7jN/l212ZfhR0JUWfC3ySb71BIr/ +NpKw3PqbdPK6ugcfVHd2JkHSqZvDXUgMHftzVZEeD+OSfCMo/ED0QcC+3M3eO4fX +a4icBBABAgAGBQJQ5InUAAoJEMApykAW9MzpXkwD/AgrFlIVjYGNSelqRgl+eaxK +ujeRUwcZOjKvleOa4U5QekaI1pTsbk7whbzABa4i+TS3AWwlhVOuKanJJqWmVLrW +dJY6PgVGhUGdSk+FwXji8MA2aqdfcTCT3L2V6QyqXMEP8K3KAOKdBDIFAd31pap4 +ICuaj09nuybr2UNyOh9KiEYEEBECAAYFAlDki9QACgkQGPUDgCTCeAJMiACfbkQT +VU4gsRwDHBMRB1de9s7cS94An2ObpRui9RhHBRE+FONdzwV7LT+oiJwEEAECAAYF +AlDki+MACgkQfEtnbaAOFWM1RQQAwzWY32cZMx6MYBB40elalCqcwS0sGPG+BLOd ++7qmRPFUk7r/IC56mPgvRMAB3Hk4EF2m8YDfYIT/3u0r9M85tvKfzaB9svbn9xIg +s43a5m6EZRs8O/oeEpGJA5B+ypSMMXj67HrS6UzShGiNVJHD1FQABEYLEIPXOpML +99ko0KKInAQQAQIABgUCUOSL6QAKCRDW4KH+T74q3eJ/A/kBmDLoDkOJqZaIUCgm +DEebLXmh72vglflntChfOZFoJgIRJt+1gH8GTfWL4fecpxv7l3VD32eo14mUIvIl +9EIGinr0iE5jz2sJNLEk+9TQL4oWA2khr1AOsw0+Pq6ju8BYKG9ImM/pUpCX0g+s +YUwkB0pwWpldcrEiWgVg8NfuQ4hGBBARAgAGBQJQ5IvuAAoJECH5xbz3apv1JV0A +nR1zsfcDOhe0eA6LzDCUvkj+GTZmAJ9OdU37HRmxpokcL1YT2vU8fYItmYicBBAB +AgAGBQJQ5Zm8AAoJEM8etQMiMnoB1VUD/2Ee+hUtbUiVsrCTtgyxMh3GYHxSRlsR +DmZ3Ic49V3fPmadCRDpw1I6iKLgeg3qCB/Fg+1pvZ4E09a2knr02wVybe1hvRVsN +6QZnDa5Sp7SYoMj+PGAj1Jv2JcTggBxBpFeHFOElZi0Sc0J8TjzsLWph/SYbiwSr +GGz3QCya5dP/iEYEEBECAAYFAlDl9uwACgkQCaeiStHlggfR0wCeORnxx6UraAW0 +VEphoedU+22CyVcAn1QWbw6Bgktk3+UIN4vzW6YQbGpHiJwEEAECAAYFAlDl+9EA +CgkQXx7Ib4gMnlUD3QP/fan4d5+L3LVrOkAtmQovwZqpB6+fOy671RO3SaE1+lr4 +/twHmKGC1h8jVZzkqRVRQ3tBPvG9lPlweUN9wA2+jpoe8LaqJ2hClDw1gP3EPz0U +lIfJAoeZQOpbTY4DWUFy/vxnHcpQh5H+aJDlhKzSB4E/C/le9ViOzzqPRh4K29yI +RgQQEQIABgUCUOcGZAAKCRDEsQeYhXlqI/CyAJ9WHdCZwVdeFcgjVqv42sy+7d14 +XgCfd2c4qU9ZacQmoZDSU7P5kIrf8xuJASIEEwECAAwFAlDnimMFgweGH4AACgkQ +dZbk85mBCRgEyAf+LgY3QOdXa/9YDdbZXvBQ4myyJH6LD8OnFglI/u1gz/yP5ngm +SeWsODQAm4UzYQxc4fDHDnmVjpTyqyoY70gO9zsMg3eociDtaEi4/J7ZQRlvI5cu +PFreqLe9CivEzSFsuBYsNRmkxsQHAUg59wqhaefjul94RtWLhUXu20Er3CfE4B7I +AXK4ncWgySyCtWxtK2SygOaxKY/enGqtVC2a/ZecB7o1KJ3ghx1w9CzXxRyEtmtT +qaQpoGs40sshQgY9EDUApFU/cXIZmMlmcFEtL8e9R9pptY7FdoeuINwB8nS7epxy +kavIjSW30ALAshGpXrTHWxnOipzey8pbtOrL4okCHAQQAQIABgUCUOlleQAKCRBQ +g+yIQOhvcYDlD/4v2PjuxnM53WVDOABTkxax2dPQ94ErEf01cAr4SZ4UE0j8pH03 +WKKCDGnE+xkX0N9NworDEpkyGAjbTxbpidOWC4r1P526Nhhr+B/4yiybyXg5oR5F +rAQaxdj5dvk3HUSfUoqAaag9P6w/wBEIQcRvZ5L+2eTBYwrsHaRfDoP6ce6fmJic +veYhYDQ3qxx6l3qeRwchTKLEdy0jLdbZl1AFNLRQGU4XOFM3UxKTk4XofEdEK8B0 +L83NjsE1S9IJleQiNM41fNte0SXTJ8J//SGRnKAyMtlclanX2KazTPKGu69pZQRY +om9xH7vJZIRv0pCjQbEc9Caw/mvSNlQWJ5589cLVfaWrQpSmzf6oAoVyzhC4tiWw +s2FmfzUYvvSKX1dpVMWIkYyCLyS7E+px6zFy1e77Pc+uhmAsNDgfTTfwJbBoLAFQ +42f/5mqKhQktiplM6ZzMNB49zwjsFK9Vt1OA9ggHtvo/LzAIoMnQUvijObnE3/+a +PUNKAaqggVJUQgK2htPjyAkUIq1HQ35WzvpaTUn7ADBezTo6Zhl9UbKW9+IuCmwN +w4ZFhhKC5VsWSVZGFVMwRNilSXpyPVYAWkkrEiNreLW7R/OwXUqA3fvK4lFRWpVV +AEcmL5Cygmrv+0SMUgJrymf/HSl6/JVNP0GMZ5l8WvKZ4usxsc0Yt+gjTrkBDQRQ +5IhOAQgAxmVBSjFMrpl+oMm7SG97BeBG/ApRkWyzHoYLXSWoq/lpYWZUyfRxPyvV +kMEnVSerTMfiq80yX/8niFm7SezXBzCFwxjt5d6v1BIs0p1qnEmN6ze9i1wz26fT +Eix+qtFewBbE31+bxCOxFQoIaCGWrR7gq7clNfkLKRjBbJcb/vkPc0S6l5+xaM/j +Zt19a4uBDzy6DfFOjJ/ZWzKCioqPeswJrElszGqB3Wvwip1iOA4Ec379s8mSCzqq +PoQ98jIhqW/vD6eHDdzkEdQJZKwzSVgClHcLehQMCtsGChf+cxCgFQSf+7ZOyu+Y +YbIK06IC/lJG7LGBWOd28+LqKAXamQARAQABiQEfBBgBAgAJBQJQ5IhOAhsMAAoJ +ED1osl1SB8rT698H/Ap1PMyHWdDZxIP7PkJKAGuXjSE3JAw+dNh3vaxF24NFBUvj +J6F5UwZiegCAIatKVF15SycuIDT6TG1NBQPD8Udp5w0lK+sZH0ViZGs5hNggBdiR +uv6yMpaPf6IbO6Of0OInrcni9UQVt1G6o7MseZBnxejuPX0E6CMbB578XfSrdliI +jwcHNo5TEc0IjPw4qpUYRd/cWlo8Cprqu7I6LTDUdXOl01peaGqkGhyUgoY83JyS +xIhNOUZG9qZ7p7MTpngmXX8brCg4ivylPLveAsbhgLLlRQO1ME/j4zyBvM5vWEPB +x4XQOkQ96TXgQoe/dvARKuUcAQl7RvZOIZcBTPs= +=kpXE +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 2048 CEEEF43B 2011-12-14 ------- RSA Sign & Encrypt fingerprint: CA7A 8F39 A241 9FFF B0A9 AB27 8E5A E9FB CEEE F43B uid Sendmail Signing Key/2012 @@ -2298,4 +2435,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.40 $, Last updated $Date: 2012/01/09 04:44:59 $ +$Revision: 8.43 $, Last updated $Date: 2013/01/18 17:40:21 $ Modified: stable/9/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/9/contrib/sendmail/RELEASE_NOTES Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/RELEASE_NOTES Thu Apr 25 01:42:54 2013 (r249865) @@ -1,11 +1,40 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2011 2012/12/21 18:42:16 ca Exp $ + $Id: RELEASE_NOTES,v 8.2024 2013/04/19 15:01:58 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.7/8.14.7 2013/04/21 + Drop support for IPv4-mapped IPv6 addresses to prevent the MTA + from using a mapped address over a legitimate IPv6 address + and to enforce the proper semantics over the IPv6 + connection. Problem noted by Ulrich Sporlein. + Fix a regression introduced in 8.14.6: the wrong list of + macros was sent to a milter in the EHLO stage. + Problem found by Fabrice Bellet, reported via RedHat + (Jaroslav Skarvada). + Fix handling of ORCPT parameter for DSNs: xtext decoding + was not performed and a wrong syntax check was applied + to the "addr-type" field. Problem noted by Dan Lukes + of Obludarium. + Fix handling of NUL characters in the MIME conversion functions + so that message bodies containing them will be sent + on properly. Note: this usually also affects mails + that are not converted as those functions are used + for other purposes too. Problem noted by Elchonon + Edelson of Lockheed Martin. + Do not perform "duplicate" elimination of recipients if they + resolve to the error mailer using a temporary failure + (4xy) via ruleset 0. Problem noted by Akira Takahashi + of IIJ. + CONTRIB: Updated version of etrn.pl script from John Beck + of Oracle. + Portability: + Unlike gcc, clang doesn't apply full prototypes to K&R + definitions. + 8.14.6/8.14.6 2012/12/23 Fix a regression introduced in 8.14.5: if a server offers two AUTH lines, the MTA would not read them after Modified: stable/9/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/9/contrib/sendmail/cf/cf/submit.cf Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/cf/cf/submit.cf Thu Apr 25 01:42:54 2013 (r249865) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri Dec 21 10:45:15 PST 2012 -##### in /extra/home/ca/sm-8.14.6/OpenSource/sendmail-8.14.6/cf/cf +##### built by ca@wiz.smi.sendmail.com on Fri Apr 19 08:04:44 PDT 2013 +##### in /extra/home/ca/sm-8.14.7/OpenSource/sendmail-8.14.7/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.6/Submit +DZ8.14.7/Submit ############### Modified: stable/9/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- stable/9/contrib/sendmail/cf/m4/version.m4 Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/cf/m4/version.m4 Thu Apr 25 01:42:54 2013 (r249865) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2013 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.222 2012/12/19 05:11:43 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.230 2013/04/18 15:07:16 ca Exp $') # divert(0) # Configuration version number -DZ8.14.6`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.7`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: stable/9/contrib/sendmail/contrib/etrn.pl ============================================================================== --- stable/9/contrib/sendmail/contrib/etrn.pl Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/contrib/etrn.pl Thu Apr 25 01:42:54 2013 (r249865) @@ -1,22 +1,40 @@ -#!/usr/local/bin/perl -w +#!/usr/perl5/bin/perl -w +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# # # Copyright (c) 1996-2000 by John T. Beck # All rights reserved. # -# Copyright (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -#ident "@(#)etrn.pl 1.1 00/09/06 SMI" -require 5.005; # minimal Perl version required +require 5.8.4; # minimal Perl version required use strict; +use warnings; use English; -# hardcoded constants, should work fine for BSD-based systems use Socket; use Getopt::Std; -use vars qw($opt_v); -my $sockaddr = 'S n a4 x8'; +our ($opt_v, $opt_b); # system requirements: # must have 'hostname' program. @@ -26,11 +44,12 @@ select(STDERR); chop(my $name = `hostname || uname -n`); -(my $hostname, my $aliases, my $type, my $len, undef) = gethostbyname($name); +my ($hostname) = (gethostbyname($name))[0]; -my $usage = "Usage: $PROGRAM_NAME [-v] host [args]"; -getopts('v'); +my $usage = "Usage: $PROGRAM_NAME [-bv] host [args]"; +getopts('bv'); my $verbose = $opt_v; +my $boot_check = $opt_b; my $server = shift(@ARGV); my @hosts = @ARGV; die $usage unless $server; @@ -86,24 +105,60 @@ if (!@hosts) { die "open $cwfile: $ERRNO"; } } + # Do this automatically if no client hosts are specified. + $boot_check = "yes"; } -($name, $aliases, my $proto) = getprotobyname('tcp'); -($name, $aliases, $port) = getservbyname($port, 'tcp') +my ($proto) = (getprotobyname('tcp'))[2]; +($port) = (getservbyname($port, 'tcp'))[2] unless $port =~ /^\d+/; +if ($boot_check) { + # first connect to localhost to verify that we can accept connections + print "verifying that localhost is accepting SMTP connections\n" + if ($verbose); + my $localhost_ok = 0; + ($name, my $laddr) = (gethostbyname('localhost'))[0, 4]; + (!defined($name)) && die "gethostbyname failed, unknown host localhost"; + + # get a connection + my $sinl = sockaddr_in($port, $laddr); + my $save_errno = 0; + for (my $num_tries = 1; $num_tries < 5; $num_tries++) { + socket(S, &PF_INET, &SOCK_STREAM, $proto) + || die "socket: $ERRNO"; + if (connect(S, $sinl)) { + &alarm("sending 'quit' to $server"); + print S "quit\n"; + alarm(0); + $localhost_ok = 1; + close(S); + alarm(0); + last; + } + print STDERR "localhost connect failed ($num_tries)\n"; + $save_errno = $ERRNO; + sleep(1 << $num_tries); + close(S); + alarm(0); + } + if (! $localhost_ok) { + die "could not connect to localhost: $save_errno\n"; + } +} + # look it up -($name, $aliases, $type, $len, my $thataddr) = gethostbyname($server); +($name, my $thataddr) = (gethostbyname($server))[0, 4]; (!defined($name)) && die "gethostbyname failed, unknown host $server"; - + # get a connection -my $that = pack($sockaddr, &AF_INET, $port, $thataddr); -socket(S, &AF_INET, &SOCK_STREAM, $proto) +my $sinr = sockaddr_in($port, $thataddr); +socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $ERRNO"; print "server = $server\n" if (defined($verbose)); &alarm("connect to $server"); -if (! connect(S, $that)) { +if (! connect(S, $sinr)) { die "cannot connect to $server: $ERRNO\n"; } alarm(0); Modified: stable/9/contrib/sendmail/doc/op/op.me ============================================================================== --- stable/9/contrib/sendmail/doc/op/op.me Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/doc/op/op.me Thu Apr 25 01:42:54 2013 (r249865) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.749 2012/03/02 22:37:11 ca Exp $ +.\" $Id: op.me,v 8.751 2013/04/08 21:41:25 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,7 +90,7 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.749 $ +.Ve $Revision: 8.751 $ .rm Ve .sp For Sendmail Version 8.14 @@ -5547,9 +5547,6 @@ It can have primary types or full types (such as .q text/plain ). -The class is initialized to have -.q text/plain -only. .ip $=s contains the set of subtypes of message that can be treated recursively. By default it contains only @@ -6609,8 +6606,13 @@ Modifier Options (flags) for the client .)b The .i Addr ess -mask may be a numeric address in dot notation +mask may be a numeric address in IPv4 dot notation or IPv6 colon notation or a network name. +Note that if a network name is specified, +only the first IP address returned for it will be used. +This may cause indeterminate behavior for network names +that resolve to multiple addresses. +Therefore, use of an address is recommended. .i Modifier can be the following character: .(b @@ -6778,8 +6780,13 @@ The key is used for error messages and logging. The .i Addr ess -mask may be a numeric address in dot notation +mask may be a numeric address in IPv4 dot notation or IPv6 colon notation or a network name. +Note that if a network name is specified, +only the first IP address returned for it will be used. +This may cause indeterminate behavior for network names +that resolve to multiple addresses. +Therefore, use of an address is recommended. The .i Family key defaults to INET (IPv4). @@ -11471,7 +11478,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.749 $ +.\"Version $Revision: 8.751 $ .\".ce 0 .bp 3 .ce Modified: stable/9/contrib/sendmail/include/sm/config.h ============================================================================== --- stable/9/contrib/sendmail/include/sm/config.h Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/include/sm/config.h Thu Apr 25 01:42:54 2013 (r249865) @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $ + * $Id: config.h,v 1.48 2013/03/22 22:48:57 gshapiro Exp $ */ /* @@ -24,14 +24,16 @@ /* ** SM_CONF_STDBOOL_H is 1 if exists +** +** Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions. */ # ifndef SM_CONF_STDBOOL_H -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define SM_CONF_STDBOOL_H 1 -# else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ +# else /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ # define SM_CONF_STDBOOL_H 0 -# endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ +# endif /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ # endif /* ! SM_CONF_STDBOOL_H */ /* Modified: stable/9/contrib/sendmail/include/sm/io.h ============================================================================== --- stable/9/contrib/sendmail/include/sm/io.h Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/include/sm/io.h Thu Apr 25 01:42:54 2013 (r249865) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2002, 2004, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990 * The Regents of the University of California. All rights reserved. @@ -11,7 +11,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: io.h,v 1.24 2004/03/03 19:14:49 ca Exp $ + * $Id: io.h,v 1.25 2013/03/12 15:24:49 ca Exp $ */ /*- @@ -269,7 +269,7 @@ int sm_io_close __P((SM_FILE_T *, int S SM_FILE_T *sm_io_dup __P((SM_FILE_T *)); int sm_io_eof __P((SM_FILE_T *)); int sm_io_error __P((SM_FILE_T *)); -char *sm_io_fgets __P((SM_FILE_T *, int, char *, int)); +int sm_io_fgets __P((SM_FILE_T *, int, char *, int)); int sm_io_flush __P((SM_FILE_T *, int SM_NONVOLATILE)); int PRINTFLIKE(3, 4) Modified: stable/9/contrib/sendmail/libmilter/Makefile.m4 ============================================================================== --- stable/9/contrib/sendmail/libmilter/Makefile.m4 Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/libmilter/Makefile.m4 Thu Apr 25 01:42:54 2013 (r249865) @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 8.88 2012/09/25 17:40:32 ca Exp $ +dnl $Id: Makefile.m4,v 8.92 2013/04/16 20:19:54 ca Exp $ include(confBUILDTOOLSDIR`/M4/switch.m4') dnl only required for compilation of EXTRAS Modified: stable/9/contrib/sendmail/libmilter/sm_gethost.c ============================================================================== --- stable/9/contrib/sendmail/libmilter/sm_gethost.c Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/libmilter/sm_gethost.c Thu Apr 25 01:42:54 2013 (r249865) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001, 2004, 2010 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2001, 2004, 2010, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -9,7 +9,7 @@ */ #include -SM_RCSID("@(#)$Id: sm_gethost.c,v 8.29 2010/07/27 01:09:31 ca Exp $") +SM_RCSID("@(#)$Id: sm_gethost.c,v 8.30 2013/02/22 22:43:33 gshapiro Exp $") #include #if NETINET || NETINET6 @@ -101,7 +101,12 @@ mi_gethostbyname(name, family) # endif /* SOLARIS == 20300 || SOLARIS == 203 */ #else /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */ # if NETINET6 - int flags = AI_DEFAULT|AI_ALL; +# ifndef SM_IPNODEBYNAME_FLAGS + /* For IPv4-mapped addresses, use: AI_DEFAULT|AI_ALL */ +# define SM_IPNODEBYNAME_FLAGS AI_ADDRCONFIG +# endif /* SM_IPNODEBYNAME_FLAGS */ + + int flags = SM_IPNODEBYNAME_FLAGS; int err; # endif /* NETINET6 */ Modified: stable/9/contrib/sendmail/libsm/Makefile.m4 ============================================================================== --- stable/9/contrib/sendmail/libsm/Makefile.m4 Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/libsm/Makefile.m4 Thu Apr 25 01:42:54 2013 (r249865) @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 1.72 2006/08/16 21:06:31 ca Exp $ +dnl $Id: Makefile.m4,v 1.73 2013/03/12 15:24:50 ca Exp $ define(`confREQUIRE_LIBUNIX') include(confBUILDTOOLSDIR`/M4/switch.m4') @@ -18,6 +18,7 @@ smcheck(`t-exc', `compile-run') smcheck(`t-rpool', `compile-run') smcheck(`t-string', `compile-run') smcheck(`t-smstdio', `compile-run') +smcheck(`t-fget', `compile-run') smcheck(`t-match', `compile-run') smcheck(`t-strio', `compile-run') smcheck(`t-heap', `compile-run') Modified: stable/9/contrib/sendmail/libsm/cf.c ============================================================================== --- stable/9/contrib/sendmail/libsm/cf.c Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/libsm/cf.c Thu Apr 25 01:42:54 2013 (r249865) @@ -9,7 +9,7 @@ */ #include -SM_RCSID("@(#)$Id: cf.c,v 1.6 2001/09/11 04:04:47 gshapiro Exp $") +SM_RCSID("@(#)$Id: cf.c,v 1.7 2013/03/12 15:24:50 ca Exp $") #include #include @@ -54,7 +54,7 @@ sm_cf_getopt(path, optc, optv) if (cfp == NULL) return errno; - while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) + while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) { p = strchr(buf, '\n'); if (p != NULL) Modified: stable/9/contrib/sendmail/libsm/fget.c ============================================================================== --- stable/9/contrib/sendmail/libsm/fget.c Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/libsm/fget.c Thu Apr 25 01:42:54 2013 (r249865) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2001, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -13,7 +13,7 @@ */ #include -SM_RCSID("@(#)$Id: fget.c,v 1.24 2001/09/11 04:04:48 gshapiro Exp $") +SM_RCSID("@(#)$Id: fget.c,v 1.25 2013/03/12 15:24:50 ca Exp $") #include #include #include @@ -33,31 +33,32 @@ SM_RCSID("@(#)$Id: fget.c,v 1.24 2001/09 ** n -- size of 'buf' ** ** Returns: -** success: returns value of 'buf' -** failure: NULL (no characters were read) -** timeout: NULL and errno set to EAGAIN +** success: number of characters +** failure: -1 +** timeout: -1 and errno set to EAGAIN ** ** Side Effects: ** may move the file pointer */ -char * +int sm_io_fgets(fp, timeout, buf, n) register SM_FILE_T *fp; int timeout; char *buf; register int n; { - register int len; - register char *s; - register unsigned char *p, *t; + int len, r; + char *s; + unsigned char *p, *t; SM_REQUIRE_ISA(fp, SmFileMagic); if (n <= 0) /* sanity check */ - return NULL; + return -1; s = buf; n--; /* leave space for NUL */ + r = 0; while (n > 0) { /* If the buffer is empty, refill it. */ @@ -73,7 +74,7 @@ sm_io_fgets(fp, timeout, buf, n) { /* EOF/error: stop with partial or no line */ if (s == buf) - return NULL; + return -1; break; } len = fp->f_r; @@ -93,18 +94,20 @@ sm_io_fgets(fp, timeout, buf, n) if (t != NULL) { len = ++t - p; + r += len; fp->f_r -= len; fp->f_p = t; (void) memcpy((void *) s, (void *) p, len); s[len] = 0; - return buf; + return r; } fp->f_r -= len; fp->f_p += len; (void) memcpy((void *) s, (void *) p, len); s += len; + r += len; n -= len; } *s = 0; - return buf; + return r; } Copied: stable/9/contrib/sendmail/libsm/t-fget.c (from r249729, head/contrib/sendmail/libsm/t-fget.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/sendmail/libsm/t-fget.c Thu Apr 25 01:42:54 2013 (r249865, copy of r249729, head/contrib/sendmail/libsm/t-fget.c) @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2013 Sendmail, Inc. and its suppliers. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the sendmail distribution. + */ + +#include +SM_IDSTR(id, "@(#)$Id: t-fget.c,v 1.1 2013/03/12 15:24:50 ca Exp $") + +#include +#include +#include +#include + +void +check(char *msg, int l) +{ + SM_FILE_T *wfp, *rfp; + char buf[256]; + size_t n; + int r, i; + static char fn[] = "tfget"; + + wfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn, + SM_IO_WRONLY_B, NULL); + SM_TEST(wfp != NULL); + for (i = 0; i < l; i++) + { + r = sm_io_putc(wfp, SM_TIME_DEFAULT, msg[i]); + SM_TEST(r >= 0); + } + r = sm_io_close(wfp, SM_TIME_DEFAULT); + SM_TEST(r == 0); + + rfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn, + SM_IO_RDONLY_B, NULL); + SM_TEST(rfp != NULL); + n = sizeof(buf); + r = sm_io_fgets(rfp, SM_TIME_DEFAULT, buf, n); + if (l == 0) + { + SM_TEST(r == -1); + SM_TEST(errno == 0); + } + else + { + SM_TEST(r == l); + if (r != l) + fprintf(stderr, "buf='%s', in='%s', r=%d, l=%d\n", + buf, msg, r, l); + } + SM_TEST(memcmp(buf, msg, l) == 0); + r = sm_io_close(rfp, SM_TIME_DEFAULT); + SM_TEST(r == 0); +} + + +int +main(argc, argv) + int argc; + char **argv; +{ + char res[256]; + int l; + + sm_test_begin(argc, argv, "test fget"); + + check("", strlen("")); + check("\n", strlen("\n")); + check("test\n", strlen("test\n")); + + l = snprintf(res, sizeof(res), "%c%s\n", '\0', "test ing"); + check(res, l); + + l = snprintf(res, sizeof(res), "%c%s%c\n", '\0', "test ing", '\0'); + check(res, l); + + l = snprintf(res, sizeof(res), "%c%s%c%s\n", + '\0', "test ing", '\0', "eol"); + check(res, l); + + return sm_test_end(); +} Modified: stable/9/contrib/sendmail/mailstats/mailstats.c ============================================================================== --- stable/9/contrib/sendmail/mailstats/mailstats.c Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/mailstats/mailstats.c Thu Apr 25 01:42:54 2013 (r249865) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2002, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -20,7 +20,7 @@ SM_IDSTR(copyright, Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n") -SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.100 2002/06/27 23:24:06 gshapiro Exp $") +SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.102 2013/03/12 15:24:50 ca Exp $") #include #include @@ -68,13 +68,14 @@ main(argc, argv) extern char *ctime(); extern char *optarg; extern int optind; +# define MSOPTS "cC:f:opP" cfile = getcfname(0, 0, SM_GET_SENDMAIL_CF, NULL); sfile = NULL; mnames = true; progmode = false; trunc = false; - while ((ch = getopt(argc, argv, "cC:f:opP")) != -1) + while ((ch = getopt(argc, argv, MSOPTS)) != -1) { switch (ch) { @@ -90,6 +91,7 @@ main(argc, argv) sfile = optarg; break; + case 'o': mnames = false; break; @@ -102,6 +104,7 @@ main(argc, argv) progmode = true; break; + case '?': default: usage: @@ -131,7 +134,7 @@ main(argc, argv) (void) sm_strlcpy(mtable[mno++], "*file*", MNAMELEN + 1); (void) sm_strlcpy(mtable[mno++], "*include*", MNAMELEN + 1); - while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) + while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) { register char *b; char *s; @@ -270,6 +273,7 @@ main(argc, argv) } } + if (progmode) { (void) time(&now); Modified: stable/9/contrib/sendmail/makemap/makemap.c ============================================================================== --- stable/9/contrib/sendmail/makemap/makemap.c Thu Apr 25 00:39:43 2013 (r249864) +++ stable/9/contrib/sendmail/makemap/makemap.c Thu Apr 25 01:42:54 2013 (r249865) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 01:44:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5A926D55; Thu, 25 Apr 2013 01:44:01 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8EE1805; Thu, 25 Apr 2013 01:44:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P1i1Pq025740; Thu, 25 Apr 2013 01:44:01 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P1i1rs025738; Thu, 25 Apr 2013 01:44:01 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250144.r3P1i1rs025738@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 01:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249866 - stable/9/contrib/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 01:44:01 -0000 Author: gshapiro Date: Thu Apr 25 01:44:00 2013 New Revision: 249866 URL: http://svnweb.freebsd.org/changeset/base/249866 Log: MFC: Update for sendmail 8.14.7 Modified: stable/9/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/9/contrib/sendmail/FREEBSD-upgrade Thu Apr 25 01:42:54 2013 (r249865) +++ stable/9/contrib/sendmail/FREEBSD-upgrade Thu Apr 25 01:44:00 2013 (r249866) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.6 +sendmail 8.14.7 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -29-December-2012 +21-April-2013 From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 01:46:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 417D7FB7; Thu, 25 Apr 2013 01:46:21 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 32A07181C; Thu, 25 Apr 2013 01:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P1kLEO026374; Thu, 25 Apr 2013 01:46:21 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P1kKRT026371; Thu, 25 Apr 2013 01:46:20 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250146.r3P1kKRT026371@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 01:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249867 - stable/9/etc/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 01:46:21 -0000 Author: gshapiro Date: Thu Apr 25 01:46:20 2013 New Revision: 249867 URL: http://svnweb.freebsd.org/changeset/base/249867 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.7/cf tree. Modified: stable/9/etc/sendmail/freebsd.mc stable/9/etc/sendmail/freebsd.submit.mc Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/sendmail/freebsd.mc ============================================================================== --- stable/9/etc/sendmail/freebsd.mc Thu Apr 25 01:44:00 2013 (r249866) +++ stable/9/etc/sendmail/freebsd.mc Thu Apr 25 01:46:20 2013 (r249867) @@ -41,7 +41,7 @@ divert(-1) # The best documentation for this .mc file is: # /usr/share/sendmail/cf/README or # /usr/src/contrib/sendmail/cf/README -# +# divert(0) VERSIONID(`$FreeBSD$') Modified: stable/9/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/9/etc/sendmail/freebsd.submit.mc Thu Apr 25 01:44:00 2013 (r249866) +++ stable/9/etc/sendmail/freebsd.submit.mc Thu Apr 25 01:46:20 2013 (r249867) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:14:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5469C57D; Thu, 25 Apr 2013 02:14:40 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 442F21907; Thu, 25 Apr 2013 02:14:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2EemC037059; Thu, 25 Apr 2013 02:14:40 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2EahE037033; Thu, 25 Apr 2013 02:14:36 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250214.r3P2EahE037033@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249868 - in stable/8/contrib/sendmail: . cf/cf cf/m4 contrib doc/op include/sm libmilter libsm mailstats makemap praliases rmail src test vacation X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:14:40 -0000 Author: gshapiro Date: Thu Apr 25 02:14:36 2013 New Revision: 249868 URL: http://svnweb.freebsd.org/changeset/base/249868 Log: MFC: Merge sendmail 8.14.7 Added: stable/8/contrib/sendmail/libsm/t-fget.c - copied unchanged from r249729, head/contrib/sendmail/libsm/t-fget.c Modified: stable/8/contrib/sendmail/CACerts stable/8/contrib/sendmail/PGPKEYS stable/8/contrib/sendmail/RELEASE_NOTES stable/8/contrib/sendmail/cf/cf/submit.cf stable/8/contrib/sendmail/cf/m4/version.m4 stable/8/contrib/sendmail/contrib/etrn.pl stable/8/contrib/sendmail/doc/op/op.me stable/8/contrib/sendmail/include/sm/config.h stable/8/contrib/sendmail/include/sm/io.h stable/8/contrib/sendmail/libmilter/Makefile.m4 stable/8/contrib/sendmail/libmilter/sm_gethost.c stable/8/contrib/sendmail/libsm/Makefile.m4 stable/8/contrib/sendmail/libsm/cf.c stable/8/contrib/sendmail/libsm/fget.c stable/8/contrib/sendmail/mailstats/mailstats.c stable/8/contrib/sendmail/makemap/makemap.c stable/8/contrib/sendmail/praliases/praliases.c stable/8/contrib/sendmail/rmail/rmail.c stable/8/contrib/sendmail/src/Makefile.m4 stable/8/contrib/sendmail/src/alias.c stable/8/contrib/sendmail/src/collect.c stable/8/contrib/sendmail/src/conf.c stable/8/contrib/sendmail/src/control.c stable/8/contrib/sendmail/src/deliver.c stable/8/contrib/sendmail/src/main.c stable/8/contrib/sendmail/src/map.c stable/8/contrib/sendmail/src/mci.c stable/8/contrib/sendmail/src/milter.c stable/8/contrib/sendmail/src/mime.c stable/8/contrib/sendmail/src/parseaddr.c stable/8/contrib/sendmail/src/queue.c stable/8/contrib/sendmail/src/readcf.c stable/8/contrib/sendmail/src/recipient.c stable/8/contrib/sendmail/src/savemail.c stable/8/contrib/sendmail/src/sendmail.h stable/8/contrib/sendmail/src/sfsasl.c stable/8/contrib/sendmail/src/srvrsmtp.c stable/8/contrib/sendmail/src/tls.c stable/8/contrib/sendmail/src/usersmtp.c stable/8/contrib/sendmail/src/util.c stable/8/contrib/sendmail/src/version.c stable/8/contrib/sendmail/test/Makefile.m4 stable/8/contrib/sendmail/vacation/vacation.c Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/CACerts ============================================================================== --- stable/8/contrib/sendmail/CACerts Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/CACerts Thu Apr 25 02:14:36 2013 (r249868) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.5 2011/05/06 23:05:10 ca Exp $ +# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -10,93 +10,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - c2:3c:61:67:3b:0a:cc:5e - Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + f1:41:b3:3d:ba:bd:33:49 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Validity - Not Before: May 14 04:42:18 2009 GMT - Not After : May 13 04:42:18 2012 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + Not Before: Mar 10 02:47:46 2012 GMT + Not After : Mar 10 02:47:46 2015 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: - 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: - e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: - b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: - 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: - 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: - d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: - 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: - 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: - 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: - 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: - c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: - dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: - ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: - d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: - fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: - f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: - 71:9d + Public-Key: (2048 bit) + Modulus: + 00:a2:80:fc:c6:ce:7f:60:38:65:f4:38:f9:7a:d9: + 87:fd:47:eb:3f:2c:4a:c9:38:77:6a:77:94:92:7f: + 83:3d:99:57:2c:5f:37:bb:ba:12:10:17:56:fa:eb: + 43:a6:4b:4c:1e:30:32:07:94:2f:5a:d8:65:49:29: + fa:24:d1:f0:0b:45:2d:e5:d5:cb:7d:60:dc:a6:ce: + a4:47:35:30:ee:5e:8d:c2:30:e7:a7:63:32:b0:59: + 80:cc:8c:99:64:77:8f:50:8e:88:51:47:36:ea:9a: + f3:b4:c0:8c:a6:ab:c6:42:57:88:b9:5f:9f:61:15: + bb:79:65:93:ca:a9:fd:17:eb:87:26:8b:eb:b7:2b: + 7e:33:05:2b:ba:c0:46:f7:08:fd:da:c1:50:9b:3d: + 26:83:5c:53:97:89:2c:cc:5f:f2:7b:a8:b7:3d:fb: + f2:b4:89:0d:43:ef:18:5c:21:75:71:cc:f0:c2:a3: + 84:69:c0:a7:f3:9b:de:c1:c7:5a:5c:7e:68:da:49: + 71:af:58:a8:51:9f:bd:f9:3d:bb:a5:92:fa:7b:1d: + 52:f5:fe:90:59:95:27:65:a4:af:97:9a:4f:01:39: + 59:7d:08:6f:a1:8f:42:47:49:bf:12:52:53:39:74: + 8d:62:3b:bd:4c:4f:05:0f:c4:b9:3e:da:a8:0e:96: + 05:2d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + 08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB X509v3 Authority Key Identifier: - keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org - serial:C2:3C:61:67:3B:0A:CC:5E + keyid:08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org + serial:F1:41:B3:3D:BA:BD:33:49 X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2009@esmtp.org + email:ca+ca-rsa2012@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2009@esmtp.org - Signature Algorithm: md5WithRSAEncryption - b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: - 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: - 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: - 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: - 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: - 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: - 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: - 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: - 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: - f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: - 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: - 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: - ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: - 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: - d0:82:1e:07 + email:ca+ca-rsa2012@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 9a:8f:4d:23:5b:30:80:e1:94:e4:66:9c:3a:17:8b:79:49:5b: + ec:5d:e5:a1:22:2d:71:37:a1:51:e7:1d:b1:0d:a9:9b:aa:a9: + 0d:c7:cd:d6:24:f9:e0:f0:57:be:4f:74:0c:4b:7a:42:4c:70: + 19:2e:8e:eb:cb:1b:00:26:27:eb:1c:42:33:d5:ec:32:b4:6c: + 7d:a3:04:a1:5c:00:49:c9:0d:4c:4d:28:37:06:22:77:ec:40: + 15:25:3a:23:84:ae:1f:da:90:dd:c9:dc:27:ee:7c:ec:e5:df: + b8:ba:1e:3f:ee:c2:91:a2:3f:22:92:1e:f3:06:7e:aa:e9:c3: + 11:2d:3d:2f:85:f7:fc:d7:e2:f8:6d:70:a6:40:62:69:e7:52: + ed:1b:19:38:72:86:08:a1:3d:47:c8:68:82:41:db:db:2a:52: + 25:d7:49:aa:9e:c5:83:22:7d:2f:0b:df:8c:90:2d:b5:aa:33: + c7:9b:e8:39:8f:bb:79:5b:13:2d:4e:a9:69:59:c7:09:26:e2: + b5:53:80:86:72:bb:7c:be:e9:46:5b:d8:b2:78:42:d6:5d:c3: + bb:3a:3b:5f:0f:e8:c3:60:fb:88:9f:3a:2b:9f:d3:7d:9f:c7: + 32:aa:4d:34:a7:66:a1:25:16:95:a6:69:e7:86:a3:5c:b9:b9: + df:58:05:e3 -----BEGIN CERTIFICATE----- -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 -gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxMjEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxMkBlc210cC5vcmeCCQDxQbM9ur0z +STAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQCaj00jWzCA4ZTkZpw6F4t5SVvsXeWhIi1xN6FR5x2xDambqqkN +x83WJPng8Fe+T3QMS3pCTHAZLo7ryxsAJifrHEIz1ewytGx9owShXABJyQ1MTSg3 +BiJ37EAVJTojhK4f2pDdydwn7nzs5d+4uh4/7sKRoj8ikh7zBn6q6cMRLT0vhff8 +1+L4bXCmQGJp51LtGxk4coYIoT1HyGiCQdvbKlIl10mqnsWDIn0vC9+MkC21qjPH +m+g5j7t5WxMtTqlpWccJJuK1U4CGcrt8vulGW9iyeELWXcO7OjtfD+jDYPuInzor +n9N9n8cyqk00p2ahJRaVpmnnhqNcubnfWAXj -----END CERTIFICATE----- Modified: stable/8/contrib/sendmail/PGPKEYS ============================================================================== --- stable/8/contrib/sendmail/PGPKEYS Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/PGPKEYS Thu Apr 25 02:14:36 2013 (r249868) @@ -142,6 +142,143 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 2048 5207CAD3 2013-01-02 ------- RSA Sign & Encrypt +fingerprint: B87D 4569 86F1 9484 07E5 CCB4 3D68 B25D 5207 CAD3 +uid Sendmail Signing Key/2013 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.13 (Darwin) + +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 +=kpXE +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 2048 CEEEF43B 2011-12-14 ------- RSA Sign & Encrypt fingerprint: CA7A 8F39 A241 9FFF B0A9 AB27 8E5A E9FB CEEE F43B uid Sendmail Signing Key/2012 @@ -2298,4 +2435,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.40 $, Last updated $Date: 2012/01/09 04:44:59 $ +$Revision: 8.43 $, Last updated $Date: 2013/01/18 17:40:21 $ Modified: stable/8/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/8/contrib/sendmail/RELEASE_NOTES Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/RELEASE_NOTES Thu Apr 25 02:14:36 2013 (r249868) @@ -1,11 +1,40 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2011 2012/12/21 18:42:16 ca Exp $ + $Id: RELEASE_NOTES,v 8.2024 2013/04/19 15:01:58 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.7/8.14.7 2013/04/21 + Drop support for IPv4-mapped IPv6 addresses to prevent the MTA + from using a mapped address over a legitimate IPv6 address + and to enforce the proper semantics over the IPv6 + connection. Problem noted by Ulrich Sporlein. + Fix a regression introduced in 8.14.6: the wrong list of + macros was sent to a milter in the EHLO stage. + Problem found by Fabrice Bellet, reported via RedHat + (Jaroslav Skarvada). + Fix handling of ORCPT parameter for DSNs: xtext decoding + was not performed and a wrong syntax check was applied + to the "addr-type" field. Problem noted by Dan Lukes + of Obludarium. + Fix handling of NUL characters in the MIME conversion functions + so that message bodies containing them will be sent + on properly. Note: this usually also affects mails + that are not converted as those functions are used + for other purposes too. Problem noted by Elchonon + Edelson of Lockheed Martin. + Do not perform "duplicate" elimination of recipients if they + resolve to the error mailer using a temporary failure + (4xy) via ruleset 0. Problem noted by Akira Takahashi + of IIJ. + CONTRIB: Updated version of etrn.pl script from John Beck + of Oracle. + Portability: + Unlike gcc, clang doesn't apply full prototypes to K&R + definitions. + 8.14.6/8.14.6 2012/12/23 Fix a regression introduced in 8.14.5: if a server offers two AUTH lines, the MTA would not read them after Modified: stable/8/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/8/contrib/sendmail/cf/cf/submit.cf Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/cf/cf/submit.cf Thu Apr 25 02:14:36 2013 (r249868) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri Dec 21 10:45:15 PST 2012 -##### in /extra/home/ca/sm-8.14.6/OpenSource/sendmail-8.14.6/cf/cf +##### built by ca@wiz.smi.sendmail.com on Fri Apr 19 08:04:44 PDT 2013 +##### in /extra/home/ca/sm-8.14.7/OpenSource/sendmail-8.14.7/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.6/Submit +DZ8.14.7/Submit ############### Modified: stable/8/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- stable/8/contrib/sendmail/cf/m4/version.m4 Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/cf/m4/version.m4 Thu Apr 25 02:14:36 2013 (r249868) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2013 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.222 2012/12/19 05:11:43 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.230 2013/04/18 15:07:16 ca Exp $') # divert(0) # Configuration version number -DZ8.14.6`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.7`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: stable/8/contrib/sendmail/contrib/etrn.pl ============================================================================== --- stable/8/contrib/sendmail/contrib/etrn.pl Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/contrib/etrn.pl Thu Apr 25 02:14:36 2013 (r249868) @@ -1,22 +1,40 @@ -#!/usr/local/bin/perl -w +#!/usr/perl5/bin/perl -w +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# # # Copyright (c) 1996-2000 by John T. Beck # All rights reserved. # -# Copyright (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -#ident "@(#)etrn.pl 1.1 00/09/06 SMI" -require 5.005; # minimal Perl version required +require 5.8.4; # minimal Perl version required use strict; +use warnings; use English; -# hardcoded constants, should work fine for BSD-based systems use Socket; use Getopt::Std; -use vars qw($opt_v); -my $sockaddr = 'S n a4 x8'; +our ($opt_v, $opt_b); # system requirements: # must have 'hostname' program. @@ -26,11 +44,12 @@ select(STDERR); chop(my $name = `hostname || uname -n`); -(my $hostname, my $aliases, my $type, my $len, undef) = gethostbyname($name); +my ($hostname) = (gethostbyname($name))[0]; -my $usage = "Usage: $PROGRAM_NAME [-v] host [args]"; -getopts('v'); +my $usage = "Usage: $PROGRAM_NAME [-bv] host [args]"; +getopts('bv'); my $verbose = $opt_v; +my $boot_check = $opt_b; my $server = shift(@ARGV); my @hosts = @ARGV; die $usage unless $server; @@ -86,24 +105,60 @@ if (!@hosts) { die "open $cwfile: $ERRNO"; } } + # Do this automatically if no client hosts are specified. + $boot_check = "yes"; } -($name, $aliases, my $proto) = getprotobyname('tcp'); -($name, $aliases, $port) = getservbyname($port, 'tcp') +my ($proto) = (getprotobyname('tcp'))[2]; +($port) = (getservbyname($port, 'tcp'))[2] unless $port =~ /^\d+/; +if ($boot_check) { + # first connect to localhost to verify that we can accept connections + print "verifying that localhost is accepting SMTP connections\n" + if ($verbose); + my $localhost_ok = 0; + ($name, my $laddr) = (gethostbyname('localhost'))[0, 4]; + (!defined($name)) && die "gethostbyname failed, unknown host localhost"; + + # get a connection + my $sinl = sockaddr_in($port, $laddr); + my $save_errno = 0; + for (my $num_tries = 1; $num_tries < 5; $num_tries++) { + socket(S, &PF_INET, &SOCK_STREAM, $proto) + || die "socket: $ERRNO"; + if (connect(S, $sinl)) { + &alarm("sending 'quit' to $server"); + print S "quit\n"; + alarm(0); + $localhost_ok = 1; + close(S); + alarm(0); + last; + } + print STDERR "localhost connect failed ($num_tries)\n"; + $save_errno = $ERRNO; + sleep(1 << $num_tries); + close(S); + alarm(0); + } + if (! $localhost_ok) { + die "could not connect to localhost: $save_errno\n"; + } +} + # look it up -($name, $aliases, $type, $len, my $thataddr) = gethostbyname($server); +($name, my $thataddr) = (gethostbyname($server))[0, 4]; (!defined($name)) && die "gethostbyname failed, unknown host $server"; - + # get a connection -my $that = pack($sockaddr, &AF_INET, $port, $thataddr); -socket(S, &AF_INET, &SOCK_STREAM, $proto) +my $sinr = sockaddr_in($port, $thataddr); +socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $ERRNO"; print "server = $server\n" if (defined($verbose)); &alarm("connect to $server"); -if (! connect(S, $that)) { +if (! connect(S, $sinr)) { die "cannot connect to $server: $ERRNO\n"; } alarm(0); Modified: stable/8/contrib/sendmail/doc/op/op.me ============================================================================== --- stable/8/contrib/sendmail/doc/op/op.me Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/doc/op/op.me Thu Apr 25 02:14:36 2013 (r249868) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.749 2012/03/02 22:37:11 ca Exp $ +.\" $Id: op.me,v 8.751 2013/04/08 21:41:25 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,7 +90,7 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.749 $ +.Ve $Revision: 8.751 $ .rm Ve .sp For Sendmail Version 8.14 @@ -5547,9 +5547,6 @@ It can have primary types or full types (such as .q text/plain ). -The class is initialized to have -.q text/plain -only. .ip $=s contains the set of subtypes of message that can be treated recursively. By default it contains only @@ -6609,8 +6606,13 @@ Modifier Options (flags) for the client .)b The .i Addr ess -mask may be a numeric address in dot notation +mask may be a numeric address in IPv4 dot notation or IPv6 colon notation or a network name. +Note that if a network name is specified, +only the first IP address returned for it will be used. +This may cause indeterminate behavior for network names +that resolve to multiple addresses. +Therefore, use of an address is recommended. .i Modifier can be the following character: .(b @@ -6778,8 +6780,13 @@ The key is used for error messages and logging. The .i Addr ess -mask may be a numeric address in dot notation +mask may be a numeric address in IPv4 dot notation or IPv6 colon notation or a network name. +Note that if a network name is specified, +only the first IP address returned for it will be used. +This may cause indeterminate behavior for network names +that resolve to multiple addresses. +Therefore, use of an address is recommended. The .i Family key defaults to INET (IPv4). @@ -11471,7 +11478,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.749 $ +.\"Version $Revision: 8.751 $ .\".ce 0 .bp 3 .ce Modified: stable/8/contrib/sendmail/include/sm/config.h ============================================================================== --- stable/8/contrib/sendmail/include/sm/config.h Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/include/sm/config.h Thu Apr 25 02:14:36 2013 (r249868) @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $ + * $Id: config.h,v 1.48 2013/03/22 22:48:57 gshapiro Exp $ */ /* @@ -24,14 +24,16 @@ /* ** SM_CONF_STDBOOL_H is 1 if exists +** +** Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions. */ # ifndef SM_CONF_STDBOOL_H -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define SM_CONF_STDBOOL_H 1 -# else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ +# else /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ # define SM_CONF_STDBOOL_H 0 -# endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ +# endif /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ # endif /* ! SM_CONF_STDBOOL_H */ /* Modified: stable/8/contrib/sendmail/include/sm/io.h ============================================================================== --- stable/8/contrib/sendmail/include/sm/io.h Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/include/sm/io.h Thu Apr 25 02:14:36 2013 (r249868) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2002, 2004, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990 * The Regents of the University of California. All rights reserved. @@ -11,7 +11,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: io.h,v 1.24 2004/03/03 19:14:49 ca Exp $ + * $Id: io.h,v 1.25 2013/03/12 15:24:49 ca Exp $ */ /*- @@ -269,7 +269,7 @@ int sm_io_close __P((SM_FILE_T *, int S SM_FILE_T *sm_io_dup __P((SM_FILE_T *)); int sm_io_eof __P((SM_FILE_T *)); int sm_io_error __P((SM_FILE_T *)); -char *sm_io_fgets __P((SM_FILE_T *, int, char *, int)); +int sm_io_fgets __P((SM_FILE_T *, int, char *, int)); int sm_io_flush __P((SM_FILE_T *, int SM_NONVOLATILE)); int PRINTFLIKE(3, 4) Modified: stable/8/contrib/sendmail/libmilter/Makefile.m4 ============================================================================== --- stable/8/contrib/sendmail/libmilter/Makefile.m4 Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/libmilter/Makefile.m4 Thu Apr 25 02:14:36 2013 (r249868) @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 8.88 2012/09/25 17:40:32 ca Exp $ +dnl $Id: Makefile.m4,v 8.92 2013/04/16 20:19:54 ca Exp $ include(confBUILDTOOLSDIR`/M4/switch.m4') dnl only required for compilation of EXTRAS Modified: stable/8/contrib/sendmail/libmilter/sm_gethost.c ============================================================================== --- stable/8/contrib/sendmail/libmilter/sm_gethost.c Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/libmilter/sm_gethost.c Thu Apr 25 02:14:36 2013 (r249868) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001, 2004, 2010 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2001, 2004, 2010, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -9,7 +9,7 @@ */ #include -SM_RCSID("@(#)$Id: sm_gethost.c,v 8.29 2010/07/27 01:09:31 ca Exp $") +SM_RCSID("@(#)$Id: sm_gethost.c,v 8.30 2013/02/22 22:43:33 gshapiro Exp $") #include #if NETINET || NETINET6 @@ -101,7 +101,12 @@ mi_gethostbyname(name, family) # endif /* SOLARIS == 20300 || SOLARIS == 203 */ #else /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */ # if NETINET6 - int flags = AI_DEFAULT|AI_ALL; +# ifndef SM_IPNODEBYNAME_FLAGS + /* For IPv4-mapped addresses, use: AI_DEFAULT|AI_ALL */ +# define SM_IPNODEBYNAME_FLAGS AI_ADDRCONFIG +# endif /* SM_IPNODEBYNAME_FLAGS */ + + int flags = SM_IPNODEBYNAME_FLAGS; int err; # endif /* NETINET6 */ Modified: stable/8/contrib/sendmail/libsm/Makefile.m4 ============================================================================== --- stable/8/contrib/sendmail/libsm/Makefile.m4 Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/libsm/Makefile.m4 Thu Apr 25 02:14:36 2013 (r249868) @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 1.72 2006/08/16 21:06:31 ca Exp $ +dnl $Id: Makefile.m4,v 1.73 2013/03/12 15:24:50 ca Exp $ define(`confREQUIRE_LIBUNIX') include(confBUILDTOOLSDIR`/M4/switch.m4') @@ -18,6 +18,7 @@ smcheck(`t-exc', `compile-run') smcheck(`t-rpool', `compile-run') smcheck(`t-string', `compile-run') smcheck(`t-smstdio', `compile-run') +smcheck(`t-fget', `compile-run') smcheck(`t-match', `compile-run') smcheck(`t-strio', `compile-run') smcheck(`t-heap', `compile-run') Modified: stable/8/contrib/sendmail/libsm/cf.c ============================================================================== --- stable/8/contrib/sendmail/libsm/cf.c Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/libsm/cf.c Thu Apr 25 02:14:36 2013 (r249868) @@ -9,7 +9,7 @@ */ #include -SM_RCSID("@(#)$Id: cf.c,v 1.6 2001/09/11 04:04:47 gshapiro Exp $") +SM_RCSID("@(#)$Id: cf.c,v 1.7 2013/03/12 15:24:50 ca Exp $") #include #include @@ -54,7 +54,7 @@ sm_cf_getopt(path, optc, optv) if (cfp == NULL) return errno; - while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) + while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) { p = strchr(buf, '\n'); if (p != NULL) Modified: stable/8/contrib/sendmail/libsm/fget.c ============================================================================== --- stable/8/contrib/sendmail/libsm/fget.c Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/libsm/fget.c Thu Apr 25 02:14:36 2013 (r249868) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2001, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -13,7 +13,7 @@ */ #include -SM_RCSID("@(#)$Id: fget.c,v 1.24 2001/09/11 04:04:48 gshapiro Exp $") +SM_RCSID("@(#)$Id: fget.c,v 1.25 2013/03/12 15:24:50 ca Exp $") #include #include #include @@ -33,31 +33,32 @@ SM_RCSID("@(#)$Id: fget.c,v 1.24 2001/09 ** n -- size of 'buf' ** ** Returns: -** success: returns value of 'buf' -** failure: NULL (no characters were read) -** timeout: NULL and errno set to EAGAIN +** success: number of characters +** failure: -1 +** timeout: -1 and errno set to EAGAIN ** ** Side Effects: ** may move the file pointer */ -char * +int sm_io_fgets(fp, timeout, buf, n) register SM_FILE_T *fp; int timeout; char *buf; register int n; { - register int len; - register char *s; - register unsigned char *p, *t; + int len, r; + char *s; + unsigned char *p, *t; SM_REQUIRE_ISA(fp, SmFileMagic); if (n <= 0) /* sanity check */ - return NULL; + return -1; s = buf; n--; /* leave space for NUL */ + r = 0; while (n > 0) { /* If the buffer is empty, refill it. */ @@ -73,7 +74,7 @@ sm_io_fgets(fp, timeout, buf, n) { /* EOF/error: stop with partial or no line */ if (s == buf) - return NULL; + return -1; break; } len = fp->f_r; @@ -93,18 +94,20 @@ sm_io_fgets(fp, timeout, buf, n) if (t != NULL) { len = ++t - p; + r += len; fp->f_r -= len; fp->f_p = t; (void) memcpy((void *) s, (void *) p, len); s[len] = 0; - return buf; + return r; } fp->f_r -= len; fp->f_p += len; (void) memcpy((void *) s, (void *) p, len); s += len; + r += len; n -= len; } *s = 0; - return buf; + return r; } Copied: stable/8/contrib/sendmail/libsm/t-fget.c (from r249729, head/contrib/sendmail/libsm/t-fget.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/contrib/sendmail/libsm/t-fget.c Thu Apr 25 02:14:36 2013 (r249868, copy of r249729, head/contrib/sendmail/libsm/t-fget.c) @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2013 Sendmail, Inc. and its suppliers. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the sendmail distribution. + */ + +#include +SM_IDSTR(id, "@(#)$Id: t-fget.c,v 1.1 2013/03/12 15:24:50 ca Exp $") + +#include +#include +#include +#include + +void +check(char *msg, int l) +{ + SM_FILE_T *wfp, *rfp; + char buf[256]; + size_t n; + int r, i; + static char fn[] = "tfget"; + + wfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn, + SM_IO_WRONLY_B, NULL); + SM_TEST(wfp != NULL); + for (i = 0; i < l; i++) + { + r = sm_io_putc(wfp, SM_TIME_DEFAULT, msg[i]); + SM_TEST(r >= 0); + } + r = sm_io_close(wfp, SM_TIME_DEFAULT); + SM_TEST(r == 0); + + rfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn, + SM_IO_RDONLY_B, NULL); + SM_TEST(rfp != NULL); + n = sizeof(buf); + r = sm_io_fgets(rfp, SM_TIME_DEFAULT, buf, n); + if (l == 0) + { + SM_TEST(r == -1); + SM_TEST(errno == 0); + } + else + { + SM_TEST(r == l); + if (r != l) + fprintf(stderr, "buf='%s', in='%s', r=%d, l=%d\n", + buf, msg, r, l); + } + SM_TEST(memcmp(buf, msg, l) == 0); + r = sm_io_close(rfp, SM_TIME_DEFAULT); + SM_TEST(r == 0); +} + + +int +main(argc, argv) + int argc; + char **argv; +{ + char res[256]; + int l; + + sm_test_begin(argc, argv, "test fget"); + + check("", strlen("")); + check("\n", strlen("\n")); + check("test\n", strlen("test\n")); + + l = snprintf(res, sizeof(res), "%c%s\n", '\0', "test ing"); + check(res, l); + + l = snprintf(res, sizeof(res), "%c%s%c\n", '\0', "test ing", '\0'); + check(res, l); + + l = snprintf(res, sizeof(res), "%c%s%c%s\n", + '\0', "test ing", '\0', "eol"); + check(res, l); + + return sm_test_end(); +} Modified: stable/8/contrib/sendmail/mailstats/mailstats.c ============================================================================== --- stable/8/contrib/sendmail/mailstats/mailstats.c Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/mailstats/mailstats.c Thu Apr 25 02:14:36 2013 (r249868) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2002, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -20,7 +20,7 @@ SM_IDSTR(copyright, Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n") -SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.100 2002/06/27 23:24:06 gshapiro Exp $") +SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.102 2013/03/12 15:24:50 ca Exp $") #include #include @@ -68,13 +68,14 @@ main(argc, argv) extern char *ctime(); extern char *optarg; extern int optind; +# define MSOPTS "cC:f:opP" cfile = getcfname(0, 0, SM_GET_SENDMAIL_CF, NULL); sfile = NULL; mnames = true; progmode = false; trunc = false; - while ((ch = getopt(argc, argv, "cC:f:opP")) != -1) + while ((ch = getopt(argc, argv, MSOPTS)) != -1) { switch (ch) { @@ -90,6 +91,7 @@ main(argc, argv) sfile = optarg; break; + case 'o': mnames = false; break; @@ -102,6 +104,7 @@ main(argc, argv) progmode = true; break; + case '?': default: usage: @@ -131,7 +134,7 @@ main(argc, argv) (void) sm_strlcpy(mtable[mno++], "*file*", MNAMELEN + 1); (void) sm_strlcpy(mtable[mno++], "*include*", MNAMELEN + 1); - while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) + while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) { register char *b; char *s; @@ -270,6 +273,7 @@ main(argc, argv) } } + if (progmode) { (void) time(&now); Modified: stable/8/contrib/sendmail/makemap/makemap.c ============================================================================== --- stable/8/contrib/sendmail/makemap/makemap.c Thu Apr 25 01:46:20 2013 (r249867) +++ stable/8/contrib/sendmail/makemap/makemap.c Thu Apr 25 02:14:36 2013 (r249868) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:15:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BCD077C9; Thu, 25 Apr 2013 02:15:34 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AEAD01911; Thu, 25 Apr 2013 02:15:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2FYjA037368; Thu, 25 Apr 2013 02:15:34 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2FYKN037367; Thu, 25 Apr 2013 02:15:34 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250215.r3P2FYKN037367@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249869 - stable/8/contrib/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:15:34 -0000 Author: gshapiro Date: Thu Apr 25 02:15:34 2013 New Revision: 249869 URL: http://svnweb.freebsd.org/changeset/base/249869 Log: MFC: Update for sendmail 8.14.7 Modified: stable/8/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/8/contrib/sendmail/FREEBSD-upgrade Thu Apr 25 02:14:36 2013 (r249868) +++ stable/8/contrib/sendmail/FREEBSD-upgrade Thu Apr 25 02:15:34 2013 (r249869) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.6 +sendmail 8.14.7 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -29-December-2012 +21-April-2013 From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:16:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7543C932; Thu, 25 Apr 2013 02:16:30 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 66FD41917; Thu, 25 Apr 2013 02:16:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2GU8m037602; Thu, 25 Apr 2013 02:16:30 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2GU0h037600; Thu, 25 Apr 2013 02:16:30 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250216.r3P2GU0h037600@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249870 - stable/8/etc/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:16:30 -0000 Author: gshapiro Date: Thu Apr 25 02:16:29 2013 New Revision: 249870 URL: http://svnweb.freebsd.org/changeset/base/249870 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.7/cf tree. Modified: stable/8/etc/sendmail/freebsd.mc stable/8/etc/sendmail/freebsd.submit.mc Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/sendmail/freebsd.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.mc Thu Apr 25 02:15:34 2013 (r249869) +++ stable/8/etc/sendmail/freebsd.mc Thu Apr 25 02:16:29 2013 (r249870) @@ -41,7 +41,7 @@ divert(-1) # The best documentation for this .mc file is: # /usr/share/sendmail/cf/README or # /usr/src/contrib/sendmail/cf/README -# +# divert(0) VERSIONID(`$FreeBSD$') Modified: stable/8/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.submit.mc Thu Apr 25 02:15:34 2013 (r249869) +++ stable/8/etc/sendmail/freebsd.submit.mc Thu Apr 25 02:16:29 2013 (r249870) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:18:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2CA87AC4; Thu, 25 Apr 2013 02:18:19 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9641924; Thu, 25 Apr 2013 02:18:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2IJw8038001; Thu, 25 Apr 2013 02:18:19 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2IF83037969; Thu, 25 Apr 2013 02:18:15 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250218.r3P2IF83037969@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r249871 - in stable/7/contrib/sendmail: . cf/cf cf/m4 contrib doc/op include/sm libmilter libsm mailstats makemap praliases rmail src test vacation X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:18:19 -0000 Author: gshapiro Date: Thu Apr 25 02:18:15 2013 New Revision: 249871 URL: http://svnweb.freebsd.org/changeset/base/249871 Log: MFC: Merge sendmail 8.14.7 Added: stable/7/contrib/sendmail/libsm/t-fget.c - copied unchanged from r249729, head/contrib/sendmail/libsm/t-fget.c Modified: stable/7/contrib/sendmail/CACerts stable/7/contrib/sendmail/PGPKEYS stable/7/contrib/sendmail/RELEASE_NOTES stable/7/contrib/sendmail/cf/cf/submit.cf stable/7/contrib/sendmail/cf/m4/version.m4 stable/7/contrib/sendmail/contrib/etrn.pl stable/7/contrib/sendmail/doc/op/op.me stable/7/contrib/sendmail/include/sm/config.h stable/7/contrib/sendmail/include/sm/io.h stable/7/contrib/sendmail/libmilter/Makefile.m4 stable/7/contrib/sendmail/libmilter/sm_gethost.c stable/7/contrib/sendmail/libsm/Makefile.m4 stable/7/contrib/sendmail/libsm/cf.c stable/7/contrib/sendmail/libsm/fget.c stable/7/contrib/sendmail/mailstats/mailstats.c stable/7/contrib/sendmail/makemap/makemap.c stable/7/contrib/sendmail/praliases/praliases.c stable/7/contrib/sendmail/rmail/rmail.c stable/7/contrib/sendmail/src/Makefile.m4 stable/7/contrib/sendmail/src/alias.c stable/7/contrib/sendmail/src/collect.c stable/7/contrib/sendmail/src/conf.c stable/7/contrib/sendmail/src/control.c stable/7/contrib/sendmail/src/deliver.c stable/7/contrib/sendmail/src/main.c stable/7/contrib/sendmail/src/map.c stable/7/contrib/sendmail/src/mci.c stable/7/contrib/sendmail/src/milter.c stable/7/contrib/sendmail/src/mime.c stable/7/contrib/sendmail/src/parseaddr.c stable/7/contrib/sendmail/src/queue.c stable/7/contrib/sendmail/src/readcf.c stable/7/contrib/sendmail/src/recipient.c stable/7/contrib/sendmail/src/savemail.c stable/7/contrib/sendmail/src/sendmail.h stable/7/contrib/sendmail/src/sfsasl.c stable/7/contrib/sendmail/src/srvrsmtp.c stable/7/contrib/sendmail/src/tls.c stable/7/contrib/sendmail/src/usersmtp.c stable/7/contrib/sendmail/src/util.c stable/7/contrib/sendmail/src/version.c stable/7/contrib/sendmail/test/Makefile.m4 stable/7/contrib/sendmail/vacation/vacation.c Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/CACerts ============================================================================== --- stable/7/contrib/sendmail/CACerts Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/CACerts Thu Apr 25 02:18:15 2013 (r249871) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.5 2011/05/06 23:05:10 ca Exp $ +# $Id: CACerts,v 8.6 2013/01/18 15:14:17 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -10,93 +10,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - c2:3c:61:67:3b:0a:cc:5e - Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + f1:41:b3:3d:ba:bd:33:49 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Validity - Not Before: May 14 04:42:18 2009 GMT - Not After : May 13 04:42:18 2012 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + Not Before: Mar 10 02:47:46 2012 GMT + Not After : Mar 10 02:47:46 2015 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: - 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: - e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: - b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: - 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: - 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: - d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: - 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: - 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: - 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: - 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: - c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: - dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: - ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: - d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: - fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: - f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: - 71:9d + Public-Key: (2048 bit) + Modulus: + 00:a2:80:fc:c6:ce:7f:60:38:65:f4:38:f9:7a:d9: + 87:fd:47:eb:3f:2c:4a:c9:38:77:6a:77:94:92:7f: + 83:3d:99:57:2c:5f:37:bb:ba:12:10:17:56:fa:eb: + 43:a6:4b:4c:1e:30:32:07:94:2f:5a:d8:65:49:29: + fa:24:d1:f0:0b:45:2d:e5:d5:cb:7d:60:dc:a6:ce: + a4:47:35:30:ee:5e:8d:c2:30:e7:a7:63:32:b0:59: + 80:cc:8c:99:64:77:8f:50:8e:88:51:47:36:ea:9a: + f3:b4:c0:8c:a6:ab:c6:42:57:88:b9:5f:9f:61:15: + bb:79:65:93:ca:a9:fd:17:eb:87:26:8b:eb:b7:2b: + 7e:33:05:2b:ba:c0:46:f7:08:fd:da:c1:50:9b:3d: + 26:83:5c:53:97:89:2c:cc:5f:f2:7b:a8:b7:3d:fb: + f2:b4:89:0d:43:ef:18:5c:21:75:71:cc:f0:c2:a3: + 84:69:c0:a7:f3:9b:de:c1:c7:5a:5c:7e:68:da:49: + 71:af:58:a8:51:9f:bd:f9:3d:bb:a5:92:fa:7b:1d: + 52:f5:fe:90:59:95:27:65:a4:af:97:9a:4f:01:39: + 59:7d:08:6f:a1:8f:42:47:49:bf:12:52:53:39:74: + 8d:62:3b:bd:4c:4f:05:0f:c4:b9:3e:da:a8:0e:96: + 05:2d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + 08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB X509v3 Authority Key Identifier: - keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org - serial:C2:3C:61:67:3B:0A:CC:5E + keyid:08:38:E3:88:92:53:6E:F1:56:69:27:44:B5:4C:A0:18:CA:06:97:EB + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org + serial:F1:41:B3:3D:BA:BD:33:49 X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2009@esmtp.org + email:ca+ca-rsa2012@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2009@esmtp.org - Signature Algorithm: md5WithRSAEncryption - b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: - 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: - 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: - 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: - 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: - 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: - 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: - 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: - 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: - f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: - 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: - 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: - ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: - 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: - d0:82:1e:07 + email:ca+ca-rsa2012@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 9a:8f:4d:23:5b:30:80:e1:94:e4:66:9c:3a:17:8b:79:49:5b: + ec:5d:e5:a1:22:2d:71:37:a1:51:e7:1d:b1:0d:a9:9b:aa:a9: + 0d:c7:cd:d6:24:f9:e0:f0:57:be:4f:74:0c:4b:7a:42:4c:70: + 19:2e:8e:eb:cb:1b:00:26:27:eb:1c:42:33:d5:ec:32:b4:6c: + 7d:a3:04:a1:5c:00:49:c9:0d:4c:4d:28:37:06:22:77:ec:40: + 15:25:3a:23:84:ae:1f:da:90:dd:c9:dc:27:ee:7c:ec:e5:df: + b8:ba:1e:3f:ee:c2:91:a2:3f:22:92:1e:f3:06:7e:aa:e9:c3: + 11:2d:3d:2f:85:f7:fc:d7:e2:f8:6d:70:a6:40:62:69:e7:52: + ed:1b:19:38:72:86:08:a1:3d:47:c8:68:82:41:db:db:2a:52: + 25:d7:49:aa:9e:c5:83:22:7d:2f:0b:df:8c:90:2d:b5:aa:33: + c7:9b:e8:39:8f:bb:79:5b:13:2d:4e:a9:69:59:c7:09:26:e2: + b5:53:80:86:72:bb:7c:be:e9:46:5b:d8:b2:78:42:d6:5d:c3: + bb:3a:3b:5f:0f:e8:c3:60:fb:88:9f:3a:2b:9f:d3:7d:9f:c7: + 32:aa:4d:34:a7:66:a1:25:16:95:a6:69:e7:86:a3:5c:b9:b9: + df:58:05:e3 -----BEGIN CERTIFICATE----- -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 -gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxMjEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxMkBlc210cC5vcmeCCQDxQbM9ur0z +STAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTJAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQCaj00jWzCA4ZTkZpw6F4t5SVvsXeWhIi1xN6FR5x2xDambqqkN +x83WJPng8Fe+T3QMS3pCTHAZLo7ryxsAJifrHEIz1ewytGx9owShXABJyQ1MTSg3 +BiJ37EAVJTojhK4f2pDdydwn7nzs5d+4uh4/7sKRoj8ikh7zBn6q6cMRLT0vhff8 +1+L4bXCmQGJp51LtGxk4coYIoT1HyGiCQdvbKlIl10mqnsWDIn0vC9+MkC21qjPH +m+g5j7t5WxMtTqlpWccJJuK1U4CGcrt8vulGW9iyeELWXcO7OjtfD+jDYPuInzor +n9N9n8cyqk00p2ahJRaVpmnnhqNcubnfWAXj -----END CERTIFICATE----- Modified: stable/7/contrib/sendmail/PGPKEYS ============================================================================== --- stable/7/contrib/sendmail/PGPKEYS Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/PGPKEYS Thu Apr 25 02:18:15 2013 (r249871) @@ -142,6 +142,143 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 2048 5207CAD3 2013-01-02 ------- RSA Sign & Encrypt +fingerprint: B87D 4569 86F1 9484 07E5 CCB4 3D68 B25D 5207 CAD3 +uid Sendmail Signing Key/2013 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.13 (Darwin) + +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 +=kpXE +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 2048 CEEEF43B 2011-12-14 ------- RSA Sign & Encrypt fingerprint: CA7A 8F39 A241 9FFF B0A9 AB27 8E5A E9FB CEEE F43B uid Sendmail Signing Key/2012 @@ -2298,4 +2435,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.40 $, Last updated $Date: 2012/01/09 04:44:59 $ +$Revision: 8.43 $, Last updated $Date: 2013/01/18 17:40:21 $ Modified: stable/7/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/7/contrib/sendmail/RELEASE_NOTES Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/RELEASE_NOTES Thu Apr 25 02:18:15 2013 (r249871) @@ -1,11 +1,40 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.2011 2012/12/21 18:42:16 ca Exp $ + $Id: RELEASE_NOTES,v 8.2024 2013/04/19 15:01:58 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.7/8.14.7 2013/04/21 + Drop support for IPv4-mapped IPv6 addresses to prevent the MTA + from using a mapped address over a legitimate IPv6 address + and to enforce the proper semantics over the IPv6 + connection. Problem noted by Ulrich Sporlein. + Fix a regression introduced in 8.14.6: the wrong list of + macros was sent to a milter in the EHLO stage. + Problem found by Fabrice Bellet, reported via RedHat + (Jaroslav Skarvada). + Fix handling of ORCPT parameter for DSNs: xtext decoding + was not performed and a wrong syntax check was applied + to the "addr-type" field. Problem noted by Dan Lukes + of Obludarium. + Fix handling of NUL characters in the MIME conversion functions + so that message bodies containing them will be sent + on properly. Note: this usually also affects mails + that are not converted as those functions are used + for other purposes too. Problem noted by Elchonon + Edelson of Lockheed Martin. + Do not perform "duplicate" elimination of recipients if they + resolve to the error mailer using a temporary failure + (4xy) via ruleset 0. Problem noted by Akira Takahashi + of IIJ. + CONTRIB: Updated version of etrn.pl script from John Beck + of Oracle. + Portability: + Unlike gcc, clang doesn't apply full prototypes to K&R + definitions. + 8.14.6/8.14.6 2012/12/23 Fix a regression introduced in 8.14.5: if a server offers two AUTH lines, the MTA would not read them after Modified: stable/7/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/7/contrib/sendmail/cf/cf/submit.cf Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/cf/cf/submit.cf Thu Apr 25 02:18:15 2013 (r249871) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri Dec 21 10:45:15 PST 2012 -##### in /extra/home/ca/sm-8.14.6/OpenSource/sendmail-8.14.6/cf/cf +##### built by ca@wiz.smi.sendmail.com on Fri Apr 19 08:04:44 PDT 2013 +##### in /extra/home/ca/sm-8.14.7/OpenSource/sendmail-8.14.7/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.6/Submit +DZ8.14.7/Submit ############### Modified: stable/7/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- stable/7/contrib/sendmail/cf/m4/version.m4 Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/cf/m4/version.m4 Thu Apr 25 02:18:15 2013 (r249871) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2013 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.222 2012/12/19 05:11:43 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.230 2013/04/18 15:07:16 ca Exp $') # divert(0) # Configuration version number -DZ8.14.6`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.7`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: stable/7/contrib/sendmail/contrib/etrn.pl ============================================================================== --- stable/7/contrib/sendmail/contrib/etrn.pl Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/contrib/etrn.pl Thu Apr 25 02:18:15 2013 (r249871) @@ -1,22 +1,40 @@ -#!/usr/local/bin/perl -w +#!/usr/perl5/bin/perl -w +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# # # Copyright (c) 1996-2000 by John T. Beck # All rights reserved. # -# Copyright (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -#ident "@(#)etrn.pl 1.1 00/09/06 SMI" -require 5.005; # minimal Perl version required +require 5.8.4; # minimal Perl version required use strict; +use warnings; use English; -# hardcoded constants, should work fine for BSD-based systems use Socket; use Getopt::Std; -use vars qw($opt_v); -my $sockaddr = 'S n a4 x8'; +our ($opt_v, $opt_b); # system requirements: # must have 'hostname' program. @@ -26,11 +44,12 @@ select(STDERR); chop(my $name = `hostname || uname -n`); -(my $hostname, my $aliases, my $type, my $len, undef) = gethostbyname($name); +my ($hostname) = (gethostbyname($name))[0]; -my $usage = "Usage: $PROGRAM_NAME [-v] host [args]"; -getopts('v'); +my $usage = "Usage: $PROGRAM_NAME [-bv] host [args]"; +getopts('bv'); my $verbose = $opt_v; +my $boot_check = $opt_b; my $server = shift(@ARGV); my @hosts = @ARGV; die $usage unless $server; @@ -86,24 +105,60 @@ if (!@hosts) { die "open $cwfile: $ERRNO"; } } + # Do this automatically if no client hosts are specified. + $boot_check = "yes"; } -($name, $aliases, my $proto) = getprotobyname('tcp'); -($name, $aliases, $port) = getservbyname($port, 'tcp') +my ($proto) = (getprotobyname('tcp'))[2]; +($port) = (getservbyname($port, 'tcp'))[2] unless $port =~ /^\d+/; +if ($boot_check) { + # first connect to localhost to verify that we can accept connections + print "verifying that localhost is accepting SMTP connections\n" + if ($verbose); + my $localhost_ok = 0; + ($name, my $laddr) = (gethostbyname('localhost'))[0, 4]; + (!defined($name)) && die "gethostbyname failed, unknown host localhost"; + + # get a connection + my $sinl = sockaddr_in($port, $laddr); + my $save_errno = 0; + for (my $num_tries = 1; $num_tries < 5; $num_tries++) { + socket(S, &PF_INET, &SOCK_STREAM, $proto) + || die "socket: $ERRNO"; + if (connect(S, $sinl)) { + &alarm("sending 'quit' to $server"); + print S "quit\n"; + alarm(0); + $localhost_ok = 1; + close(S); + alarm(0); + last; + } + print STDERR "localhost connect failed ($num_tries)\n"; + $save_errno = $ERRNO; + sleep(1 << $num_tries); + close(S); + alarm(0); + } + if (! $localhost_ok) { + die "could not connect to localhost: $save_errno\n"; + } +} + # look it up -($name, $aliases, $type, $len, my $thataddr) = gethostbyname($server); +($name, my $thataddr) = (gethostbyname($server))[0, 4]; (!defined($name)) && die "gethostbyname failed, unknown host $server"; - + # get a connection -my $that = pack($sockaddr, &AF_INET, $port, $thataddr); -socket(S, &AF_INET, &SOCK_STREAM, $proto) +my $sinr = sockaddr_in($port, $thataddr); +socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $ERRNO"; print "server = $server\n" if (defined($verbose)); &alarm("connect to $server"); -if (! connect(S, $that)) { +if (! connect(S, $sinr)) { die "cannot connect to $server: $ERRNO\n"; } alarm(0); Modified: stable/7/contrib/sendmail/doc/op/op.me ============================================================================== --- stable/7/contrib/sendmail/doc/op/op.me Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/doc/op/op.me Thu Apr 25 02:18:15 2013 (r249871) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.749 2012/03/02 22:37:11 ca Exp $ +.\" $Id: op.me,v 8.751 2013/04/08 21:41:25 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,7 +90,7 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.749 $ +.Ve $Revision: 8.751 $ .rm Ve .sp For Sendmail Version 8.14 @@ -5547,9 +5547,6 @@ It can have primary types or full types (such as .q text/plain ). -The class is initialized to have -.q text/plain -only. .ip $=s contains the set of subtypes of message that can be treated recursively. By default it contains only @@ -6609,8 +6606,13 @@ Modifier Options (flags) for the client .)b The .i Addr ess -mask may be a numeric address in dot notation +mask may be a numeric address in IPv4 dot notation or IPv6 colon notation or a network name. +Note that if a network name is specified, +only the first IP address returned for it will be used. +This may cause indeterminate behavior for network names +that resolve to multiple addresses. +Therefore, use of an address is recommended. .i Modifier can be the following character: .(b @@ -6778,8 +6780,13 @@ The key is used for error messages and logging. The .i Addr ess -mask may be a numeric address in dot notation +mask may be a numeric address in IPv4 dot notation or IPv6 colon notation or a network name. +Note that if a network name is specified, +only the first IP address returned for it will be used. +This may cause indeterminate behavior for network names +that resolve to multiple addresses. +Therefore, use of an address is recommended. The .i Family key defaults to INET (IPv4). @@ -11471,7 +11478,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.749 $ +.\"Version $Revision: 8.751 $ .\".ce 0 .bp 3 .ce Modified: stable/7/contrib/sendmail/include/sm/config.h ============================================================================== --- stable/7/contrib/sendmail/include/sm/config.h Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/include/sm/config.h Thu Apr 25 02:18:15 2013 (r249871) @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $ + * $Id: config.h,v 1.48 2013/03/22 22:48:57 gshapiro Exp $ */ /* @@ -24,14 +24,16 @@ /* ** SM_CONF_STDBOOL_H is 1 if exists +** +** Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions. */ # ifndef SM_CONF_STDBOOL_H -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define SM_CONF_STDBOOL_H 1 -# else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ +# else /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ # define SM_CONF_STDBOOL_H 0 -# endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ +# endif /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ # endif /* ! SM_CONF_STDBOOL_H */ /* Modified: stable/7/contrib/sendmail/include/sm/io.h ============================================================================== --- stable/7/contrib/sendmail/include/sm/io.h Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/include/sm/io.h Thu Apr 25 02:18:15 2013 (r249871) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2002, 2004, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990 * The Regents of the University of California. All rights reserved. @@ -11,7 +11,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: io.h,v 1.24 2004/03/03 19:14:49 ca Exp $ + * $Id: io.h,v 1.25 2013/03/12 15:24:49 ca Exp $ */ /*- @@ -269,7 +269,7 @@ int sm_io_close __P((SM_FILE_T *, int S SM_FILE_T *sm_io_dup __P((SM_FILE_T *)); int sm_io_eof __P((SM_FILE_T *)); int sm_io_error __P((SM_FILE_T *)); -char *sm_io_fgets __P((SM_FILE_T *, int, char *, int)); +int sm_io_fgets __P((SM_FILE_T *, int, char *, int)); int sm_io_flush __P((SM_FILE_T *, int SM_NONVOLATILE)); int PRINTFLIKE(3, 4) Modified: stable/7/contrib/sendmail/libmilter/Makefile.m4 ============================================================================== --- stable/7/contrib/sendmail/libmilter/Makefile.m4 Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/libmilter/Makefile.m4 Thu Apr 25 02:18:15 2013 (r249871) @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 8.88 2012/09/25 17:40:32 ca Exp $ +dnl $Id: Makefile.m4,v 8.92 2013/04/16 20:19:54 ca Exp $ include(confBUILDTOOLSDIR`/M4/switch.m4') dnl only required for compilation of EXTRAS Modified: stable/7/contrib/sendmail/libmilter/sm_gethost.c ============================================================================== --- stable/7/contrib/sendmail/libmilter/sm_gethost.c Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/libmilter/sm_gethost.c Thu Apr 25 02:18:15 2013 (r249871) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001, 2004, 2010 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2001, 2004, 2010, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -9,7 +9,7 @@ */ #include -SM_RCSID("@(#)$Id: sm_gethost.c,v 8.29 2010/07/27 01:09:31 ca Exp $") +SM_RCSID("@(#)$Id: sm_gethost.c,v 8.30 2013/02/22 22:43:33 gshapiro Exp $") #include #if NETINET || NETINET6 @@ -101,7 +101,12 @@ mi_gethostbyname(name, family) # endif /* SOLARIS == 20300 || SOLARIS == 203 */ #else /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */ # if NETINET6 - int flags = AI_DEFAULT|AI_ALL; +# ifndef SM_IPNODEBYNAME_FLAGS + /* For IPv4-mapped addresses, use: AI_DEFAULT|AI_ALL */ +# define SM_IPNODEBYNAME_FLAGS AI_ADDRCONFIG +# endif /* SM_IPNODEBYNAME_FLAGS */ + + int flags = SM_IPNODEBYNAME_FLAGS; int err; # endif /* NETINET6 */ Modified: stable/7/contrib/sendmail/libsm/Makefile.m4 ============================================================================== --- stable/7/contrib/sendmail/libsm/Makefile.m4 Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/libsm/Makefile.m4 Thu Apr 25 02:18:15 2013 (r249871) @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 1.72 2006/08/16 21:06:31 ca Exp $ +dnl $Id: Makefile.m4,v 1.73 2013/03/12 15:24:50 ca Exp $ define(`confREQUIRE_LIBUNIX') include(confBUILDTOOLSDIR`/M4/switch.m4') @@ -18,6 +18,7 @@ smcheck(`t-exc', `compile-run') smcheck(`t-rpool', `compile-run') smcheck(`t-string', `compile-run') smcheck(`t-smstdio', `compile-run') +smcheck(`t-fget', `compile-run') smcheck(`t-match', `compile-run') smcheck(`t-strio', `compile-run') smcheck(`t-heap', `compile-run') Modified: stable/7/contrib/sendmail/libsm/cf.c ============================================================================== --- stable/7/contrib/sendmail/libsm/cf.c Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/libsm/cf.c Thu Apr 25 02:18:15 2013 (r249871) @@ -9,7 +9,7 @@ */ #include -SM_RCSID("@(#)$Id: cf.c,v 1.6 2001/09/11 04:04:47 gshapiro Exp $") +SM_RCSID("@(#)$Id: cf.c,v 1.7 2013/03/12 15:24:50 ca Exp $") #include #include @@ -54,7 +54,7 @@ sm_cf_getopt(path, optc, optv) if (cfp == NULL) return errno; - while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) + while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) { p = strchr(buf, '\n'); if (p != NULL) Modified: stable/7/contrib/sendmail/libsm/fget.c ============================================================================== --- stable/7/contrib/sendmail/libsm/fget.c Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/libsm/fget.c Thu Apr 25 02:18:15 2013 (r249871) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2001, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -13,7 +13,7 @@ */ #include -SM_RCSID("@(#)$Id: fget.c,v 1.24 2001/09/11 04:04:48 gshapiro Exp $") +SM_RCSID("@(#)$Id: fget.c,v 1.25 2013/03/12 15:24:50 ca Exp $") #include #include #include @@ -33,31 +33,32 @@ SM_RCSID("@(#)$Id: fget.c,v 1.24 2001/09 ** n -- size of 'buf' ** ** Returns: -** success: returns value of 'buf' -** failure: NULL (no characters were read) -** timeout: NULL and errno set to EAGAIN +** success: number of characters +** failure: -1 +** timeout: -1 and errno set to EAGAIN ** ** Side Effects: ** may move the file pointer */ -char * +int sm_io_fgets(fp, timeout, buf, n) register SM_FILE_T *fp; int timeout; char *buf; register int n; { - register int len; - register char *s; - register unsigned char *p, *t; + int len, r; + char *s; + unsigned char *p, *t; SM_REQUIRE_ISA(fp, SmFileMagic); if (n <= 0) /* sanity check */ - return NULL; + return -1; s = buf; n--; /* leave space for NUL */ + r = 0; while (n > 0) { /* If the buffer is empty, refill it. */ @@ -73,7 +74,7 @@ sm_io_fgets(fp, timeout, buf, n) { /* EOF/error: stop with partial or no line */ if (s == buf) - return NULL; + return -1; break; } len = fp->f_r; @@ -93,18 +94,20 @@ sm_io_fgets(fp, timeout, buf, n) if (t != NULL) { len = ++t - p; + r += len; fp->f_r -= len; fp->f_p = t; (void) memcpy((void *) s, (void *) p, len); s[len] = 0; - return buf; + return r; } fp->f_r -= len; fp->f_p += len; (void) memcpy((void *) s, (void *) p, len); s += len; + r += len; n -= len; } *s = 0; - return buf; + return r; } Copied: stable/7/contrib/sendmail/libsm/t-fget.c (from r249729, head/contrib/sendmail/libsm/t-fget.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/contrib/sendmail/libsm/t-fget.c Thu Apr 25 02:18:15 2013 (r249871, copy of r249729, head/contrib/sendmail/libsm/t-fget.c) @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2013 Sendmail, Inc. and its suppliers. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the sendmail distribution. + */ + +#include +SM_IDSTR(id, "@(#)$Id: t-fget.c,v 1.1 2013/03/12 15:24:50 ca Exp $") + +#include +#include +#include +#include + +void +check(char *msg, int l) +{ + SM_FILE_T *wfp, *rfp; + char buf[256]; + size_t n; + int r, i; + static char fn[] = "tfget"; + + wfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn, + SM_IO_WRONLY_B, NULL); + SM_TEST(wfp != NULL); + for (i = 0; i < l; i++) + { + r = sm_io_putc(wfp, SM_TIME_DEFAULT, msg[i]); + SM_TEST(r >= 0); + } + r = sm_io_close(wfp, SM_TIME_DEFAULT); + SM_TEST(r == 0); + + rfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn, + SM_IO_RDONLY_B, NULL); + SM_TEST(rfp != NULL); + n = sizeof(buf); + r = sm_io_fgets(rfp, SM_TIME_DEFAULT, buf, n); + if (l == 0) + { + SM_TEST(r == -1); + SM_TEST(errno == 0); + } + else + { + SM_TEST(r == l); + if (r != l) + fprintf(stderr, "buf='%s', in='%s', r=%d, l=%d\n", + buf, msg, r, l); + } + SM_TEST(memcmp(buf, msg, l) == 0); + r = sm_io_close(rfp, SM_TIME_DEFAULT); + SM_TEST(r == 0); +} + + +int +main(argc, argv) + int argc; + char **argv; +{ + char res[256]; + int l; + + sm_test_begin(argc, argv, "test fget"); + + check("", strlen("")); + check("\n", strlen("\n")); + check("test\n", strlen("test\n")); + + l = snprintf(res, sizeof(res), "%c%s\n", '\0', "test ing"); + check(res, l); + + l = snprintf(res, sizeof(res), "%c%s%c\n", '\0', "test ing", '\0'); + check(res, l); + + l = snprintf(res, sizeof(res), "%c%s%c%s\n", + '\0', "test ing", '\0', "eol"); + check(res, l); + + return sm_test_end(); +} Modified: stable/7/contrib/sendmail/mailstats/mailstats.c ============================================================================== --- stable/7/contrib/sendmail/mailstats/mailstats.c Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/mailstats/mailstats.c Thu Apr 25 02:18:15 2013 (r249871) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2002, 2013 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -20,7 +20,7 @@ SM_IDSTR(copyright, Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n") -SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.100 2002/06/27 23:24:06 gshapiro Exp $") +SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.102 2013/03/12 15:24:50 ca Exp $") #include #include @@ -68,13 +68,14 @@ main(argc, argv) extern char *ctime(); extern char *optarg; extern int optind; +# define MSOPTS "cC:f:opP" cfile = getcfname(0, 0, SM_GET_SENDMAIL_CF, NULL); sfile = NULL; mnames = true; progmode = false; trunc = false; - while ((ch = getopt(argc, argv, "cC:f:opP")) != -1) + while ((ch = getopt(argc, argv, MSOPTS)) != -1) { switch (ch) { @@ -90,6 +91,7 @@ main(argc, argv) sfile = optarg; break; + case 'o': mnames = false; break; @@ -102,6 +104,7 @@ main(argc, argv) progmode = true; break; + case '?': default: usage: @@ -131,7 +134,7 @@ main(argc, argv) (void) sm_strlcpy(mtable[mno++], "*file*", MNAMELEN + 1); (void) sm_strlcpy(mtable[mno++], "*include*", MNAMELEN + 1); - while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) + while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) { register char *b; char *s; @@ -270,6 +273,7 @@ main(argc, argv) } } + if (progmode) { (void) time(&now); Modified: stable/7/contrib/sendmail/makemap/makemap.c ============================================================================== --- stable/7/contrib/sendmail/makemap/makemap.c Thu Apr 25 02:16:29 2013 (r249870) +++ stable/7/contrib/sendmail/makemap/makemap.c Thu Apr 25 02:18:15 2013 (r249871) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:18:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 46C2AC2F; Thu, 25 Apr 2013 02:18:51 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 38E32192C; Thu, 25 Apr 2013 02:18:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2IptH038127; Thu, 25 Apr 2013 02:18:51 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2IpPO038126; Thu, 25 Apr 2013 02:18:51 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250218.r3P2IpPO038126@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r249872 - stable/7/contrib/sendmail X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:18:51 -0000 Author: gshapiro Date: Thu Apr 25 02:18:50 2013 New Revision: 249872 URL: http://svnweb.freebsd.org/changeset/base/249872 Log: MFC: Update for sendmail 8.14.7 Modified: stable/7/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/7/contrib/sendmail/FREEBSD-upgrade Thu Apr 25 02:18:15 2013 (r249871) +++ stable/7/contrib/sendmail/FREEBSD-upgrade Thu Apr 25 02:18:50 2013 (r249872) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.6 +sendmail 8.14.7 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -29-December-2012 +21-April-2013 From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:18:58 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9EC8DD37; Thu, 25 Apr 2013 02:18:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 61E30192D; Thu, 25 Apr 2013 02:18:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2Iwqn038188; Thu, 25 Apr 2013 02:18:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2Iw0Z038187; Thu, 25 Apr 2013 02:18:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201304250218.r3P2Iw0Z038187@svn.freebsd.org> From: Glen Barber Date: Thu, 25 Apr 2013 02:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249873 - stable/8/release/scripts X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:18:58 -0000 Author: gjb (doc,ports committer) Date: Thu Apr 25 02:18:57 2013 New Revision: 249873 URL: http://svnweb.freebsd.org/changeset/base/249873 Log: Update perl version to that included on install medium. This is a direct commit to stable/8 with no intent to MFC/MFS. Modified: stable/8/release/scripts/package-split.py Modified: stable/8/release/scripts/package-split.py ============================================================================== --- stable/8/release/scripts/package-split.py Thu Apr 25 02:18:50 2013 (r249872) +++ stable/8/release/scripts/package-split.py Thu Apr 25 02:18:57 2013 (r249873) @@ -63,7 +63,7 @@ def disc1_packages(): if doing_dvd: pkgs.extend(['archivers/unzip', 'emulators/linux_base-f10', - 'lang/perl5.12', + 'lang/perl5.14', 'misc/freebsd-doc-all', 'net/mpd5', 'net/rsync', From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:19:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 13F76EFA; Thu, 25 Apr 2013 02:19:47 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0592E1935; Thu, 25 Apr 2013 02:19:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2Jksj038391; Thu, 25 Apr 2013 02:19:46 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2JkGq038389; Thu, 25 Apr 2013 02:19:46 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250219.r3P2JkGq038389@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r249874 - stable/7/etc/sendmail X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:19:47 -0000 Author: gshapiro Date: Thu Apr 25 02:19:46 2013 New Revision: 249874 URL: http://svnweb.freebsd.org/changeset/base/249874 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.7/cf tree. Modified: stable/7/etc/sendmail/freebsd.mc stable/7/etc/sendmail/freebsd.submit.mc Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/sendmail/freebsd.mc ============================================================================== --- stable/7/etc/sendmail/freebsd.mc Thu Apr 25 02:18:57 2013 (r249873) +++ stable/7/etc/sendmail/freebsd.mc Thu Apr 25 02:19:46 2013 (r249874) @@ -41,7 +41,7 @@ divert(-1) # The best documentation for this .mc file is: # /usr/share/sendmail/cf/README or # /usr/src/contrib/sendmail/cf/README -# +# divert(0) VERSIONID(`$FreeBSD$') Modified: stable/7/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/7/etc/sendmail/freebsd.submit.mc Thu Apr 25 02:18:57 2013 (r249873) +++ stable/7/etc/sendmail/freebsd.submit.mc Thu Apr 25 02:19:46 2013 (r249874) @@ -9,7 +9,6 @@ divert(-1) # # - # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail # that acts as a initial mail submission program. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:24:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1490122D; Thu, 25 Apr 2013 02:24:25 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 01AB51A5C; Thu, 25 Apr 2013 02:24:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2OOY5040946; Thu, 25 Apr 2013 02:24:24 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2OOYE040945; Thu, 25 Apr 2013 02:24:24 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250224.r3P2OOYE040945@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249875 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:24:25 -0000 Author: gshapiro Date: Thu Apr 25 02:24:24 2013 New Revision: 249875 URL: http://svnweb.freebsd.org/changeset/base/249875 Log: Record sendmail 8.14.7 upgrade Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Apr 25 02:19:46 2013 (r249874) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Apr 25 02:24:24 2013 (r249875) @@ -1185,6 +1185,9 @@ OpenSSL has been updated to version 0.9.8x. + The sendmail + (&man.sendmail.8;) utility has been updated to version 8.14.7. + The tcpdump (&man.tcpdump.1;) utility has been updated to version 4.2.1. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:25:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A10383A0; Thu, 25 Apr 2013 02:25:42 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 922301A63; Thu, 25 Apr 2013 02:25:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2PgkD041229; Thu, 25 Apr 2013 02:25:42 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2PgLE041228; Thu, 25 Apr 2013 02:25:42 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250225.r3P2PgLE041228@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249876 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:25:42 -0000 Author: gshapiro Date: Thu Apr 25 02:25:42 2013 New Revision: 249876 URL: http://svnweb.freebsd.org/changeset/base/249876 Log: Record sendmail 8.14.7 upgrade Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Apr 25 02:24:24 2013 (r249875) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Apr 25 02:25:42 2013 (r249876) @@ -1217,8 +1217,8 @@ OpenSSL has been updated to version 0.9.8q. - sendmail has been updated to - version 8.14.5. + sendmail has + been updated to version 8.14.7. The timezone database has been updated to the tzdata2010o From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 02:27:13 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BCECD5A1; Thu, 25 Apr 2013 02:27:13 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AE9BE1A74; Thu, 25 Apr 2013 02:27:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3P2RDZa041530; Thu, 25 Apr 2013 02:27:13 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3P2RDda041529; Thu, 25 Apr 2013 02:27:13 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201304250227.r3P2RDda041529@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 25 Apr 2013 02:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r249877 - stable/7/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 02:27:13 -0000 Author: gshapiro Date: Thu Apr 25 02:27:13 2013 New Revision: 249877 URL: http://svnweb.freebsd.org/changeset/base/249877 Log: Record sendmail 8.14.7 upgrade Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Apr 25 02:25:42 2013 (r249876) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Apr 25 02:27:13 2013 (r249877) @@ -660,8 +660,8 @@ OpenSSL has been updated to version 0.9.8q. - sendmail has been updated to - version 8.14.5. + sendmail has + been updated to version 8.14.7. The &man.tcsh.1; program has been updated to version 6.17.00. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 04:26:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9DDC9855; Thu, 25 Apr 2013 04:26:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ea0-x22f.google.com (mail-ea0-x22f.google.com [IPv6:2a00:1450:4013:c01::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 768821E49; Thu, 25 Apr 2013 04:26:25 +0000 (UTC) Received: by mail-ea0-f175.google.com with SMTP id f15so1020269eak.20 for ; Wed, 24 Apr 2013 21:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=bs51cOwQ/AR188Ii/cVtaLFRl6O1Fgqdng+O/rsdHr8=; b=obklsvDZVbKi12VcZn2XPkcZskhBGbOMWD8w1kBNw6KvOg9/waP78jWC3VQRslK0zu i2N3NTWy4IExg6w4ks5avHeDIMRb19MheYjCei24xBFSVTiF9oh5vzp1Yz5HPQOD96zw Y3IuEVHfU6Mpfd9gBxVrDP56cbnPUr30BXruz7J1/XgPwkCTJpEz2AYdyQcABrslZMIr q67G6jFXA/J1na9IywaahdAiNE+y4WISOHDHTtNrcFpB+y7Yc0xiN0q5uok8fOr4j7Ip FipZY05ewomU8hS/FmfcadNtTTtLaFqlzRtEcFc4dUDsXXL89EHeH2gc+MUI390sVp8e uPUA== X-Received: by 10.15.27.195 with SMTP id p43mr70622957eeu.8.1366863983652; Wed, 24 Apr 2013 21:26:23 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPSA id i53sm7998362eeu.5.2013.04.24.21.26.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Apr 2013 21:26:22 -0700 (PDT) Sender: Alexander Motin Message-ID: <5178B068.10300@FreeBSD.org> Date: Thu, 25 Apr 2013 07:26:16 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5 MIME-Version: 1.0 To: Scott Long Subject: Re: svn commit: r249152 - in stable/9/sys: cam cam/ata cam/scsi geom geom/part References: <201304051141.r35Bfui1062429@svn.freebsd.org> <363EF017-CFC2-4006-8F1B-E18A4091F2CC@yahoo.com> In-Reply-To: <363EF017-CFC2-4006-8F1B-E18A4091F2CC@yahoo.com> 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-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 04:26:26 -0000 On 25.04.2013 02:39, Scott Long wrote: > I've already responded to Alexander in private, but in case he doesn't respond, I'm stating publicly that I object to this commit (and the corresponding one in HEAD) and I'd like to have it reviewed and reverted. The commit was announced on scsi@ and geom@ lists before reaching head, and it waited for more then half a year before being merged to 9-STABLE. If you still have objections, I would like to discuss them. Could you not start each email from request of reverting others work? > On Apr 5, 2013, at 4:41 AM, Alexander Motin wrote: > >> Author: mav >> Date: Fri Apr 5 11:41:56 2013 >> New Revision: 249152 >> URL: http://svnweb.freebsd.org/changeset/base/249152 >> >> Log: >> MFC r238886, r238892: >> Implement media change notification for DA and CD removable media devices. >> It includes three parts: >> 1) Modifications to CAM to detect media media changes and report them to >> disk(9) layer. For modern SATA (and potentially UAS) devices it utilizes >> Asynchronous Notification mechanism to receive events from hardware. >> Active polling with TEST UNIT READY commands with 3 seconds period is used >> for incapable hardware. After that both CD and DA drivers work the same way, >> detecting two conditions: "NOT READY: Medium not present" after medium was >> detected previously, and "UNIT ATTENTION: Not ready to ready change, medium >> may have changed". First one reported to disk(9) as media removal, second >> as media insert/change. To reliably receive second event new >> AC_UNIT_ATTENTION async added to make UAs broadcasted to all periphs by >> generic error handling code in cam_periph_error(). >> 2) Modifications to GEOM core to handle media remove and change events. >> Media removal handled by spoiling all consumers attached to the provider. >> Media change event also schedules provider retaste after spoiling to probe >> new media. New flag G_CF_ORPHAN was added to consumers to reflect that >> consumer is in process of destruction. It allows retaste to create new >> geom instance of the same class, while previous one is still dying. >> 3) Modifications to some GEOM classes: DEV -- to report media change >> events to devd; PART class already handles spoiling alike to orphan. >> >> Modified: >> stable/9/sys/cam/ata/ata_all.h >> stable/9/sys/cam/ata/ata_xpt.c >> stable/9/sys/cam/cam_ccb.h >> stable/9/sys/cam/cam_periph.c >> stable/9/sys/cam/cam_xpt.c >> stable/9/sys/cam/scsi/scsi_cd.c >> stable/9/sys/cam/scsi/scsi_da.c >> stable/9/sys/geom/geom.h >> stable/9/sys/geom/geom_dev.c >> stable/9/sys/geom/geom_disk.c >> stable/9/sys/geom/geom_disk.h >> stable/9/sys/geom/geom_event.c >> stable/9/sys/geom/geom_io.c >> stable/9/sys/geom/geom_slice.c >> stable/9/sys/geom/geom_subr.c >> stable/9/sys/geom/part/g_part.c >> Directory Properties: >> stable/9/sys/ (props changed) >> >> Modified: stable/9/sys/cam/ata/ata_all.h >> ============================================================================== >> --- stable/9/sys/cam/ata/ata_all.h Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/ata/ata_all.h Fri Apr 5 11:41:56 2013 (r249152) >> @@ -35,6 +35,7 @@ struct ccb_ataio; >> struct cam_periph; >> union ccb; >> >> +#define SID_AEN 0x04 /* Abuse inq_flags bit to track enabled AEN. */ >> #define SID_DMA 0x10 /* Abuse inq_flags bit to track enabled DMA. */ >> >> struct ata_cmd { >> >> Modified: stable/9/sys/cam/ata/ata_xpt.c >> ============================================================================== >> --- stable/9/sys/cam/ata/ata_xpt.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/ata/ata_xpt.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -463,6 +463,12 @@ negotiate: >> 0, 0x02); >> break; >> case PROBE_SETAN: >> + /* Remember what transport thinks about AEN. */ >> + if (softc->caps & CTS_SATA_CAPS_H_AN) >> + path->device->inq_flags |= SID_AEN; >> + else >> + path->device->inq_flags &= ~SID_AEN; >> + xpt_async(AC_GETDEV_CHANGED, path, NULL); >> cam_fill_ataio(ataio, >> 1, >> probedone, >> @@ -1157,6 +1163,12 @@ notsata: >> cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; >> xpt_action((union ccb *)&cts); >> softc->caps = caps; >> + /* Remember what transport thinks about AEN. */ >> + if (softc->caps & CTS_SATA_CAPS_H_AN) >> + path->device->inq_flags |= SID_AEN; >> + else >> + path->device->inq_flags &= ~SID_AEN; >> + xpt_async(AC_GETDEV_CHANGED, path, NULL); >> if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { >> path->device->flags &= ~CAM_DEV_UNCONFIGURED; >> xpt_acquire_device(path->device); >> >> Modified: stable/9/sys/cam/cam_ccb.h >> ============================================================================== >> --- stable/9/sys/cam/cam_ccb.h Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/cam_ccb.h Fri Apr 5 11:41:56 2013 (r249152) >> @@ -755,6 +755,7 @@ struct ccb_relsim { >> * Definitions for the asynchronous callback CCB fields. >> */ >> typedef enum { >> + AC_UNIT_ATTENTION = 0x4000,/* Device reported UNIT ATTENTION */ >> AC_ADVINFO_CHANGED = 0x2000,/* Advance info might have changes */ >> AC_CONTRACT = 0x1000,/* A contractual callback */ >> AC_GETDEV_CHANGED = 0x800,/* Getdev info might have changed */ >> >> Modified: stable/9/sys/cam/cam_periph.c >> ============================================================================== >> --- stable/9/sys/cam/cam_periph.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/cam_periph.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -1604,6 +1604,7 @@ cam_periph_error(union ccb *ccb, cam_fla >> const char *action_string; >> cam_status status; >> int frozen, error, openings, print, lost_device; >> + int error_code, sense_key, asc, ascq; >> u_int32_t relsim_flags, timeout; >> >> print = 1; >> @@ -1770,6 +1771,12 @@ cam_periph_error(union ccb *ccb, cam_fla >> xpt_async(AC_LOST_DEVICE, newpath, NULL); >> xpt_free_path(newpath); >> } >> + >> + /* Broadcast UNIT ATTENTIONs to all periphs. */ >> + } else if (scsi_extract_sense_ccb(ccb, >> + &error_code, &sense_key, &asc, &ascq) && >> + sense_key == SSD_KEY_UNIT_ATTENTION) { >> + xpt_async(AC_UNIT_ATTENTION, orig_ccb->ccb_h.path, orig_ccb); >> } >> >> /* Attempt a retry */ >> >> Modified: stable/9/sys/cam/cam_xpt.c >> ============================================================================== >> --- stable/9/sys/cam/cam_xpt.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/cam_xpt.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -4053,6 +4053,7 @@ xpt_async_string(u_int32_t async_code) >> case AC_GETDEV_CHANGED: return ("AC_GETDEV_CHANGED"); >> case AC_CONTRACT: return ("AC_CONTRACT"); >> case AC_ADVINFO_CHANGED: return ("AC_ADVINFO_CHANGED"); >> + case AC_UNIT_ATTENTION: return ("AC_UNIT_ATTENTION"); >> } >> return ("AC_UNKNOWN"); >> } >> >> Modified: stable/9/sys/cam/scsi/scsi_cd.c >> ============================================================================== >> --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -97,6 +97,7 @@ typedef enum { >> CD_FLAG_NEW_DISC = 0x0002, >> CD_FLAG_DISC_LOCKED = 0x0004, >> CD_FLAG_DISC_REMOVABLE = 0x0008, >> + CD_FLAG_SAW_MEDIA = 0x0010, >> CD_FLAG_CHANGER = 0x0040, >> CD_FLAG_ACTIVE = 0x0080, >> CD_FLAG_SCHED_ON_COMP = 0x0100, >> @@ -110,6 +111,7 @@ typedef enum { >> CD_CCB_PROBE = 0x01, >> CD_CCB_BUFFER_IO = 0x02, >> CD_CCB_WAITING = 0x03, >> + CD_CCB_TUR = 0x04, >> CD_CCB_TYPE_MASK = 0x0F, >> CD_CCB_RETRY_UA = 0x10 >> } cd_ccb_state; >> @@ -154,12 +156,14 @@ struct cd_softc { >> struct cam_periph *periph; >> int minimum_command_size; >> int outstanding_cmds; >> + int tur; >> struct task sysctl_task; >> struct sysctl_ctx_list sysctl_ctx; >> struct sysctl_oid *sysctl_tree; >> STAILQ_HEAD(, cd_mode_params) mode_queue; >> struct cd_tocdata toc; >> struct disk *disk; >> + struct callout mediapoll_c; >> }; >> >> struct cd_page_sizes { >> @@ -281,6 +285,7 @@ static int cdsendkey(struct cam_periph >> struct dvd_authinfo *authinfo); >> static int cdreaddvdstructure(struct cam_periph *periph, >> struct dvd_struct *dvdstruct); >> +static timeout_t cdmediapoll; >> >> static struct periph_driver cddriver = >> { >> @@ -290,6 +295,9 @@ static struct periph_driver cddriver = >> >> PERIPHDRIVER_DECLARE(cd, cddriver); >> >> +#ifndef CD_DEFAULT_POLL_PERIOD >> +#define CD_DEFAULT_POLL_PERIOD 3 >> +#endif >> #ifndef CD_DEFAULT_RETRY >> #define CD_DEFAULT_RETRY 4 >> #endif >> @@ -303,6 +311,7 @@ PERIPHDRIVER_DECLARE(cd, cddriver); >> #define CHANGER_MAX_BUSY_SECONDS 15 >> #endif >> >> +static int cd_poll_period = CD_DEFAULT_POLL_PERIOD; >> static int cd_retry_count = CD_DEFAULT_RETRY; >> static int cd_timeout = CD_DEFAULT_TIMEOUT; >> static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; >> @@ -311,6 +320,9 @@ static int changer_max_busy_seconds = CH >> static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); >> static SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, >> "CD Changer"); >> +SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RW, >> + &cd_poll_period, 0, "Media polling period in seconds"); >> +TUNABLE_INT("kern.cam.cd.poll_period", &cd_poll_period); >> SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, >> &cd_retry_count, 0, "Normal I/O retry count"); >> TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); >> @@ -494,6 +506,7 @@ cdcleanup(struct cam_periph *periph) >> xpt_print(periph->path, "can't remove sysctl context\n"); >> } >> >> + callout_drain(&softc->mediapoll_c); >> disk_destroy(softc->disk); >> free(softc, M_DEVBUF); >> cam_periph_lock(periph); >> @@ -504,6 +517,7 @@ cdasync(void *callback_arg, u_int32_t co >> struct cam_path *path, void *arg) >> { >> struct cam_periph *periph; >> + struct cd_softc *softc; >> >> periph = (struct cam_periph *)callback_arg; >> switch (code) { >> @@ -541,10 +555,39 @@ cdasync(void *callback_arg, u_int32_t co >> >> break; >> } >> + case AC_UNIT_ATTENTION: >> + { >> + union ccb *ccb; >> + int error_code, sense_key, asc, ascq; >> + >> + softc = (struct cd_softc *)periph->softc; >> + ccb = (union ccb *)arg; >> + >> + /* >> + * Handle all media change UNIT ATTENTIONs except >> + * our own, as they will be handled by cderror(). >> + */ >> + if (xpt_path_periph(ccb->ccb_h.path) != periph && >> + scsi_extract_sense_ccb(ccb, >> + &error_code, &sense_key, &asc, &ascq)) { >> + if (asc == 0x28 && ascq == 0x00) >> + disk_media_changed(softc->disk, M_NOWAIT); >> + } >> + cam_periph_async(periph, code, path, arg); >> + break; >> + } >> + case AC_SCSI_AEN: >> + softc = (struct cd_softc *)periph->softc; >> + if (softc->state == CD_STATE_NORMAL && !softc->tur) { >> + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { >> + softc->tur = 1; >> + xpt_schedule(periph, CAM_PRIORITY_DEV); >> + } >> + } >> + /* FALLTHROUGH */ >> case AC_SENT_BDR: >> case AC_BUS_RESET: >> { >> - struct cd_softc *softc; >> struct ccb_hdr *ccbh; >> >> softc = (struct cd_softc *)periph->softc; >> @@ -784,8 +827,8 @@ cdregister(struct cam_periph *periph, vo >> * Add an async callback so that we get >> * notified if this device goes away. >> */ >> - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE, >> - cdasync, periph, periph->path); >> + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | >> + AC_SCSI_AEN | AC_UNIT_ATTENTION, cdasync, periph, periph->path); >> >> /* >> * If the target lun is greater than 0, we most likely have a CD >> @@ -1001,6 +1044,17 @@ cdregister(struct cam_periph *periph, vo >> } >> } >> >> + /* >> + * Schedule a periodic media polling events. >> + */ >> + callout_init_mtx(&softc->mediapoll_c, periph->sim->mtx, 0); >> + if ((softc->flags & CD_FLAG_DISC_REMOVABLE) && >> + (softc->flags & CD_FLAG_CHANGER) == 0 && >> + (cgd->inq_flags & SID_AEN) == 0 && >> + cd_poll_period != 0) >> + callout_reset(&softc->mediapoll_c, cd_poll_period * hz, >> + cdmediapoll, periph); >> + >> cdregisterexit: >> >> if ((softc->flags & CD_FLAG_CHANGER) == 0) >> @@ -1496,8 +1550,25 @@ cdstart(struct cam_periph *periph, union >> periph->immediate_priority = CAM_PRIORITY_NONE; >> wakeup(&periph->ccb_list); >> } else if (bp == NULL) { >> - xpt_release_ccb(start_ccb); >> + if (softc->tur) { >> + softc->tur = 0; >> + csio = &start_ccb->csio; >> + scsi_test_unit_ready(csio, >> + /*retries*/ cd_retry_count, >> + cddone, >> + MSG_SIMPLE_Q_TAG, >> + SSD_FULL_SIZE, >> + cd_timeout); >> + start_ccb->ccb_h.ccb_bp = NULL; >> + start_ccb->ccb_h.ccb_state = CD_CCB_TUR; >> + xpt_action(start_ccb); >> + } else >> + xpt_release_ccb(start_ccb); >> } else { >> + if (softc->tur) { >> + softc->tur = 0; >> + cam_periph_release_locked(periph); >> + } >> bioq_remove(&softc->bio_queue, bp); >> >> scsi_read_write(&start_ccb->csio, >> @@ -1541,7 +1612,7 @@ cdstart(struct cam_periph *periph, union >> >> xpt_action(start_ccb); >> } >> - if (bp != NULL) { >> + if (bp != NULL || softc->tur) { >> /* Have more work to do, so ensure we stay scheduled */ >> xpt_schedule(periph, CAM_PRIORITY_NORMAL); >> } >> @@ -1835,6 +1906,25 @@ cddone(struct cam_periph *periph, union >> wakeup(&done_ccb->ccb_h.cbfcnp); >> return; >> } >> + case CD_CCB_TUR: >> + { >> + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { >> + >> + if (cderror(done_ccb, CAM_RETRY_SELTO, >> + SF_RETRY_UA | SF_NO_RECOVERY | SF_NO_PRINT) == >> + ERESTART) >> + return; >> + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) >> + cam_release_devq(done_ccb->ccb_h.path, >> + /*relsim_flags*/0, >> + /*reduction*/0, >> + /*timeout*/0, >> + /*getcount_only*/0); >> + } >> + xpt_release_ccb(done_ccb); >> + cam_periph_release_locked(periph); >> + return; >> + } >> default: >> break; >> } >> @@ -2826,7 +2916,7 @@ cdcheckmedia(struct cam_periph *periph) >> cdprevent(periph, PR_ALLOW); >> return (error); >> } else { >> - softc->flags |= CD_FLAG_VALID_MEDIA; >> + softc->flags |= CD_FLAG_SAW_MEDIA | CD_FLAG_VALID_MEDIA; >> softc->disk->d_sectorsize = softc->params.blksize; >> softc->disk->d_mediasize = >> (off_t)softc->params.blksize * softc->params.disksize; >> @@ -3171,6 +3261,14 @@ cderror(union ccb *ccb, u_int32_t cam_fl >> &error_code, &sense_key, &asc, &ascq)) { >> if (sense_key == SSD_KEY_ILLEGAL_REQUEST) >> error = cd6byteworkaround(ccb); >> + else if (sense_key == SSD_KEY_UNIT_ATTENTION && >> + asc == 0x28 && ascq == 0x00) >> + disk_media_changed(softc->disk, M_NOWAIT); >> + else if (sense_key == SSD_KEY_NOT_READY && >> + asc == 0x3a && (softc->flags & CD_FLAG_SAW_MEDIA)) { >> + softc->flags &= ~CD_FLAG_SAW_MEDIA; >> + disk_media_gone(softc->disk, M_NOWAIT); >> + } >> } >> >> if (error == ERESTART) >> @@ -3186,6 +3284,26 @@ cderror(union ccb *ccb, u_int32_t cam_fl >> &softc->saved_ccb)); >> } >> >> +static void >> +cdmediapoll(void *arg) >> +{ >> + struct cam_periph *periph = arg; >> + struct cd_softc *softc = periph->softc; >> + >> + if (softc->flags & CD_FLAG_CHANGER) >> + return; >> + >> + if (softc->state == CD_STATE_NORMAL && !softc->tur) { >> + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { >> + softc->tur = 1; >> + xpt_schedule(periph, CAM_PRIORITY_DEV); >> + } >> + } >> + /* Queue us up again */ >> + if (cd_poll_period != 0) >> + callout_schedule(&softc->mediapoll_c, cd_poll_period * hz); >> +} >> + >> /* >> * Read table of contents >> */ >> >> Modified: stable/9/sys/cam/scsi/scsi_da.c >> ============================================================================== >> --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -77,6 +77,7 @@ typedef enum { >> DA_FLAG_NEW_PACK = 0x002, >> DA_FLAG_PACK_LOCKED = 0x004, >> DA_FLAG_PACK_REMOVABLE = 0x008, >> + DA_FLAG_SAW_MEDIA = 0x010, >> DA_FLAG_NEED_OTAG = 0x020, >> DA_FLAG_WENT_IDLE = 0x040, >> DA_FLAG_RETRY_UA = 0x080, >> @@ -101,6 +102,7 @@ typedef enum { >> DA_CCB_WAITING = 0x04, >> DA_CCB_DUMP = 0x05, >> DA_CCB_DELETE = 0x06, >> + DA_CCB_TUR = 0x07, >> DA_CCB_TYPE_MASK = 0x0F, >> DA_CCB_RETRY_UA = 0x10 >> } da_ccb_state; >> @@ -150,6 +152,7 @@ struct da_softc { >> int unmap_max_ranges; >> int unmap_max_lba; >> int delete_running; >> + int tur; >> da_delete_methods delete_method; >> struct disk_params params; >> struct disk *disk; >> @@ -161,6 +164,7 @@ struct da_softc { >> uint64_t wwpn; >> uint8_t unmap_buf[UNMAP_MAX_RANGES * 16 + 8]; >> struct scsi_read_capacity_data_long rcaplong; >> + struct callout mediapoll_c; >> }; >> >> struct da_quirk_entry { >> @@ -875,6 +879,11 @@ static void dasetgeom(struct cam_periph >> size_t rcap_size); >> static timeout_t dasendorderedtag; >> static void dashutdown(void *arg, int howto); >> +static timeout_t damediapoll; >> + >> +#ifndef DA_DEFAULT_POLL_PERIOD >> +#define DA_DEFAULT_POLL_PERIOD 3 >> +#endif >> >> #ifndef DA_DEFAULT_TIMEOUT >> #define DA_DEFAULT_TIMEOUT 60 /* Timeout in seconds */ >> @@ -889,12 +898,16 @@ static void dashutdown(void *arg, int h >> #endif >> >> >> +static int da_poll_period = DA_DEFAULT_POLL_PERIOD; >> static int da_retry_count = DA_DEFAULT_RETRY; >> static int da_default_timeout = DA_DEFAULT_TIMEOUT; >> static int da_send_ordered = DA_DEFAULT_SEND_ORDERED; >> >> static SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, >> "CAM Direct Access Disk driver"); >> +SYSCTL_INT(_kern_cam_da, OID_AUTO, poll_period, CTLFLAG_RW, >> + &da_poll_period, 0, "Media polling period in seconds"); >> +TUNABLE_INT("kern.cam.da.poll_period", &da_poll_period); >> SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW, >> &da_retry_count, 0, "Normal I/O retry count"); >> TUNABLE_INT("kern.cam.da.retry_count", &da_retry_count); >> @@ -984,6 +997,9 @@ daopen(struct disk *dp) >> (softc->quirks & DA_Q_NO_PREVENT) == 0) >> daprevent(periph, PR_PREVENT); >> >> + if (error == 0) >> + softc->flags |= DA_FLAG_SAW_MEDIA; >> + >> cam_periph_unhold(periph); >> cam_periph_unlock(periph); >> >> @@ -1068,7 +1084,8 @@ daschedule(struct cam_periph *periph) >> >> /* Check if we have more work to do. */ >> if (bioq_first(&softc->bio_queue) || >> - (!softc->delete_running && bioq_first(&softc->delete_queue))) { >> + (!softc->delete_running && bioq_first(&softc->delete_queue)) || >> + softc->tur) { >> prio = CAM_PRIORITY_NORMAL; >> } >> >> @@ -1315,6 +1332,7 @@ dacleanup(struct cam_periph *periph) >> xpt_print(periph->path, "can't remove sysctl context\n"); >> } >> >> + callout_drain(&softc->mediapoll_c); >> disk_destroy(softc->disk); >> callout_drain(&softc->sendordered_c); >> free(softc, M_DEVBUF); >> @@ -1326,6 +1344,7 @@ daasync(void *callback_arg, u_int32_t co >> struct cam_path *path, void *arg) >> { >> struct cam_periph *periph; >> + struct da_softc *softc; >> >> periph = (struct cam_periph *)callback_arg; >> switch (code) { >> @@ -1377,10 +1396,43 @@ daasync(void *callback_arg, u_int32_t co >> } >> break; >> } >> + case AC_UNIT_ATTENTION: >> + { >> + union ccb *ccb; >> + int error_code, sense_key, asc, ascq; >> + >> + softc = (struct da_softc *)periph->softc; >> + ccb = (union ccb *)arg; >> + >> + /* >> + * Handle all UNIT ATTENTIONs except our own, >> + * as they will be handled by daerror(). >> + */ >> + if (xpt_path_periph(ccb->ccb_h.path) != periph && >> + scsi_extract_sense_ccb(ccb, >> + &error_code, &sense_key, &asc, &ascq)) { >> + if (asc == 0x2A && ascq == 0x09) { >> + xpt_print(ccb->ccb_h.path, >> + "capacity data has changed\n"); >> + dareprobe(periph); >> + } else if (asc == 0x28 && ascq == 0x00) >> + disk_media_changed(softc->disk, M_NOWAIT); >> + } >> + cam_periph_async(periph, code, path, arg); >> + break; >> + } >> + case AC_SCSI_AEN: >> + softc = (struct da_softc *)periph->softc; >> + if (softc->state == DA_STATE_NORMAL && !softc->tur) { >> + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { >> + softc->tur = 1; >> + xpt_schedule(periph, CAM_PRIORITY_DEV); >> + } >> + } >> + /* FALLTHROUGH */ >> case AC_SENT_BDR: >> case AC_BUS_RESET: >> { >> - struct da_softc *softc; >> struct ccb_hdr *ccbh; >> >> softc = (struct da_softc *)periph->softc; >> @@ -1711,9 +1763,9 @@ daregister(struct cam_periph *periph, vo >> * fine without them and the only alternative >> * would be to not attach the device on failure. >> */ >> - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET >> - | AC_LOST_DEVICE | AC_ADVINFO_CHANGED, >> - daasync, periph, periph->path); >> + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | >> + AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION, >> + daasync, periph, periph->path); >> >> /* >> * Emit an attribute changed notification just in case >> @@ -1723,6 +1775,16 @@ daregister(struct cam_periph *periph, vo >> */ >> disk_attr_changed(softc->disk, "GEOM::physpath", M_NOWAIT); >> >> + /* >> + * Schedule a periodic media polling events. >> + */ >> + callout_init_mtx(&softc->mediapoll_c, periph->sim->mtx, 0); >> + if ((softc->flags & DA_FLAG_PACK_REMOVABLE) && >> + (cgd->inq_flags & SID_AEN) == 0 && >> + da_poll_period != 0) >> + callout_reset(&softc->mediapoll_c, da_poll_period * hz, >> + damediapoll, periph); >> + >> xpt_schedule(periph, CAM_PRIORITY_DEV); >> >> return(CAM_REQ_CMP); >> @@ -1860,9 +1922,25 @@ dastart(struct cam_periph *periph, union >> /* Run regular command. */ >> bp = bioq_takefirst(&softc->bio_queue); >> if (bp == NULL) { >> - xpt_release_ccb(start_ccb); >> + if (softc->tur) { >> + softc->tur = 0; >> + scsi_test_unit_ready(&start_ccb->csio, >> + /*retries*/ da_retry_count, >> + dadone, >> + MSG_SIMPLE_Q_TAG, >> + SSD_FULL_SIZE, >> + da_default_timeout * 1000); >> + start_ccb->ccb_h.ccb_bp = NULL; >> + start_ccb->ccb_h.ccb_state = DA_CCB_TUR; >> + xpt_action(start_ccb); >> + } else >> + xpt_release_ccb(start_ccb); >> break; >> } >> + if (softc->tur) { >> + softc->tur = 0; >> + cam_periph_release_locked(periph); >> + } >> >> if ((bp->bio_flags & BIO_ORDERED) != 0 || >> (softc->flags & DA_FLAG_NEED_OTAG) != 0) { >> @@ -2429,6 +2507,25 @@ dadone(struct cam_periph *periph, union >> case DA_CCB_DUMP: >> /* No-op. We're polling */ >> return; >> + case DA_CCB_TUR: >> + { >> + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { >> + >> + if (daerror(done_ccb, CAM_RETRY_SELTO, >> + SF_RETRY_UA | SF_NO_RECOVERY | SF_NO_PRINT) == >> + ERESTART) >> + return; >> + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) >> + cam_release_devq(done_ccb->ccb_h.path, >> + /*relsim_flags*/0, >> + /*reduction*/0, >> + /*timeout*/0, >> + /*getcount_only*/0); >> + } >> + xpt_release_ccb(done_ccb); >> + cam_periph_release_locked(periph); >> + return; >> + } >> default: >> break; >> } >> @@ -2489,6 +2586,13 @@ daerror(union ccb *ccb, u_int32_t cam_fl >> xpt_print(periph->path, "capacity data has changed\n"); >> dareprobe(periph); >> sense_flags |= SF_NO_PRINT; >> + } else if (sense_key == SSD_KEY_UNIT_ATTENTION && >> + asc == 0x28 && ascq == 0x00) >> + disk_media_changed(softc->disk, M_NOWAIT); >> + else if (sense_key == SSD_KEY_NOT_READY && >> + asc == 0x3a && (softc->flags & DA_FLAG_SAW_MEDIA)) { >> + softc->flags &= ~DA_FLAG_SAW_MEDIA; >> + disk_media_gone(softc->disk, M_NOWAIT); >> } >> } >> if (error == ERESTART) >> @@ -2505,6 +2609,23 @@ daerror(union ccb *ccb, u_int32_t cam_fl >> } >> >> static void >> +damediapoll(void *arg) >> +{ >> + struct cam_periph *periph = arg; >> + struct da_softc *softc = periph->softc; >> + >> + if (softc->state == DA_STATE_NORMAL && !softc->tur) { >> + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { >> + softc->tur = 1; >> + daschedule(periph); >> + } >> + } >> + /* Queue us up again */ >> + if (da_poll_period != 0) >> + callout_schedule(&softc->mediapoll_c, da_poll_period * hz); >> +} >> + >> +static void >> daprevent(struct cam_periph *periph, int action) >> { >> struct da_softc *softc; >> >> Modified: stable/9/sys/geom/geom.h >> ============================================================================== >> --- stable/9/sys/geom/geom.h Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom.h Fri Apr 5 11:41:56 2013 (r249152) >> @@ -169,7 +169,9 @@ struct g_consumer { >> struct g_provider *provider; >> LIST_ENTRY(g_consumer) consumers; /* XXX: better name */ >> int acr, acw, ace; >> - int spoiled; >> + int flags; >> +#define G_CF_SPOILED 0x1 >> +#define G_CF_ORPHAN 0x4 >> struct devstat *stat; >> u_int nstart, nend; >> >> @@ -242,6 +244,8 @@ int g_post_event(g_event_t *func, void * >> int g_waitfor_event(g_event_t *func, void *arg, int flag, ...); >> void g_cancel_event(void *ref); >> int g_attr_changed(struct g_provider *pp, const char *attr, int flag); >> +int g_media_changed(struct g_provider *pp, int flag); >> +int g_media_gone(struct g_provider *pp, int flag); >> void g_orphan_provider(struct g_provider *pp, int error); >> void g_waitidlelock(void); >> >> >> Modified: stable/9/sys/geom/geom_dev.c >> ============================================================================== >> --- stable/9/sys/geom/geom_dev.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_dev.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -105,6 +106,21 @@ g_dev_print(void) >> static void >> g_dev_attrchanged(struct g_consumer *cp, const char *attr) >> { >> + struct cdev *dev; >> + char buf[SPECNAMELEN + 6]; >> + >> + if (strcmp(attr, "GEOM::media") == 0) { >> + dev = cp->geom->softc; >> + snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); >> + devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); >> + dev = cp->cp_alias_dev; >> + if (dev != NULL) { >> + snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); >> + devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, >> + M_WAITOK); >> + } >> + return; >> + } >> >> if (strcmp(attr, "GEOM::physpath") != 0) >> return; >> @@ -119,7 +135,6 @@ g_dev_attrchanged(struct g_consumer *cp, >> g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); >> g_access(cp, -1, 0, 0); >> if (error == 0 && strlen(physpath) != 0) { >> - struct cdev *dev; >> struct cdev *old_alias_dev; >> struct cdev **alias_devp; >> >> @@ -161,9 +176,6 @@ g_dev_taste(struct g_class *mp, struct g >> >> g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); >> g_topology_assert(); >> - LIST_FOREACH(cp, &pp->consumers, consumers) >> - if (cp->geom->class == mp) >> - return (NULL); >> gp = g_new_geomf(mp, "%s", pp->name); >> cp = g_new_consumer(gp); >> error = g_attach(cp, pp); >> >> Modified: stable/9/sys/geom/geom_disk.c >> ============================================================================== >> --- stable/9/sys/geom/geom_disk.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -649,6 +649,32 @@ disk_attr_changed(struct disk *dp, const >> (void)g_attr_changed(pp, attr, flag); >> } >> >> +void >> +disk_media_changed(struct disk *dp, int flag) >> +{ >> + struct g_geom *gp; >> + struct g_provider *pp; >> + >> + gp = dp->d_geom; >> + if (gp != NULL) { >> + LIST_FOREACH(pp, &gp->provider, provider) >> + g_media_changed(pp, flag); >> + } >> +} >> + >> +void >> +disk_media_gone(struct disk *dp, int flag) >> +{ >> + struct g_geom *gp; >> + struct g_provider *pp; >> + >> + gp = dp->d_geom; >> + if (gp != NULL) { >> + LIST_FOREACH(pp, &gp->provider, provider) >> + g_media_gone(pp, flag); >> + } >> +} >> + >> static void >> g_kern_disks(void *p, int flag __unused) >> { >> >> Modified: stable/9/sys/geom/geom_disk.h >> ============================================================================== >> --- stable/9/sys/geom/geom_disk.h Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_disk.h Fri Apr 5 11:41:56 2013 (r249152) >> @@ -112,6 +112,8 @@ void disk_create(struct disk *disk, int >> void disk_destroy(struct disk *disk); >> void disk_gone(struct disk *disk); >> void disk_attr_changed(struct disk *dp, const char *attr, int flag); >> +void disk_media_changed(struct disk *dp, int flag); >> +void disk_media_gone(struct disk *dp, int flag); >> >> #define DISK_VERSION_00 0x58561059 >> #define DISK_VERSION_01 0x5856105a >> >> Modified: stable/9/sys/geom/geom_event.c >> ============================================================================== >> --- stable/9/sys/geom/geom_event.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_event.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -202,14 +202,12 @@ g_orphan_register(struct g_provider *pp) >> * Tell all consumers the bad news. >> * Don't be surprised if they self-destruct. >> */ >> - cp = LIST_FIRST(&pp->consumers); >> - while (cp != NULL) { >> - cp2 = LIST_NEXT(cp, consumers); >> + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { >> KASSERT(cp->geom->orphan != NULL, >> ("geom %s has no orphan, class %s", >> cp->geom->name, cp->geom->class->name)); >> + cp->flags |= G_CF_ORPHAN; >> cp->geom->orphan(cp); >> - cp = cp2; >> } >> if (LIST_EMPTY(&pp->consumers) && wf) >> g_destroy_provider(pp); >> >> Modified: stable/9/sys/geom/geom_io.c >> ============================================================================== >> --- stable/9/sys/geom/geom_io.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_io.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -311,6 +311,8 @@ g_io_check(struct bio *bp) >> /* if provider is marked for error, don't disturb. */ >> if (pp->error) >> return (pp->error); >> + if (cp->flags & G_CF_ORPHAN) >> + return (ENXIO); >> >> switch(bp->bio_cmd) { >> case BIO_READ: >> >> Modified: stable/9/sys/geom/geom_slice.c >> ============================================================================== >> --- stable/9/sys/geom/geom_slice.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_slice.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -465,6 +465,7 @@ g_slice_spoiled(struct g_consumer *cp) >> g_topology_assert(); >> gp = cp->geom; >> g_trace(G_T_TOPOLOGY, "g_slice_spoiled(%p/%s)", cp, gp->name); >> + cp->flags |= G_CF_ORPHAN; >> gsp = gp->softc; >> gp->softc = NULL; >> g_slice_free(gsp); >> >> Modified: stable/9/sys/geom/geom_subr.c >> ============================================================================== >> --- stable/9/sys/geom/geom_subr.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/geom_subr.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -260,10 +260,11 @@ g_modevent(module_t mod, int type, void >> static void >> g_retaste_event(void *arg, int flag) >> { >> - struct g_class *cp, *mp; >> - struct g_geom *gp, *gp2; >> + struct g_class *mp, *mp2; >> + struct g_geom *gp; >> struct g_hh00 *hh; >> struct g_provider *pp; >> + struct g_consumer *cp; >> >> g_topology_assert(); >> if (flag == EV_CANCEL) /* XXX: can't happen ? */ >> @@ -280,17 +281,20 @@ g_retaste_event(void *arg, int flag) >> } >> g_trace(G_T_TOPOLOGY, "g_retaste(%s)", mp->name); >> >> - LIST_FOREACH(cp, &g_classes, class) { >> - LIST_FOREACH(gp, &cp->geom, geom) { >> + LIST_FOREACH(mp2, &g_classes, class) { >> + LIST_FOREACH(gp, &mp2->geom, geom) { >> LIST_FOREACH(pp, &gp->provider, provider) { >> if (pp->acr || pp->acw || pp->ace) >> continue; >> - LIST_FOREACH(gp2, &mp->geom, geom) { >> - if (!strcmp(pp->name, gp2->name)) >> + LIST_FOREACH(cp, &pp->consumers, consumers) { >> + if (cp->geom->class == mp && >> + (cp->flags & G_CF_ORPHAN) == 0) >> break; >> } >> - if (gp2 != NULL) >> - g_wither_geom(gp2, ENXIO); >> + if (cp != NULL) { >> + cp->flags |= G_CF_ORPHAN; >> + g_wither_geom(cp->geom, ENXIO); >> + } >> mp->taste(mp, pp, 0); >> g_topology_assert(); >> } >> @@ -531,7 +535,7 @@ g_new_provider_event(void *arg, int flag >> { >> struct g_class *mp; >> struct g_provider *pp; >> - struct g_consumer *cp; >> + struct g_consumer *cp, *next_cp; >> >> g_topology_assert(); >> if (flag == EV_CANCEL) >> @@ -542,11 +546,17 @@ g_new_provider_event(void *arg, int flag >> G_VALID_PROVIDER(pp); >> KASSERT(!(pp->flags & G_PF_WITHER), >> ("g_new_provider_event but withered")); >> + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { >> + if ((cp->flags & G_CF_ORPHAN) == 0 && >> + cp->geom->attrchanged != NULL) >> + cp->geom->attrchanged(cp, "GEOM::media"); >> + } >> LIST_FOREACH(mp, &g_classes, class) { >> if (mp->taste == NULL) >> continue; >> LIST_FOREACH(cp, &pp->consumers, consumers) >> - if (cp->geom->class == mp) >> + if (cp->geom->class == mp && >> + (cp->flags & G_CF_ORPHAN) == 0) >> break; >> if (cp != NULL) >> continue; >> @@ -803,7 +813,7 @@ g_access(struct g_consumer *cp, int dcr, >> * are probably just ahead of the event telling us that. Fail >> * now rather than having to unravel this later. >> */ >> - if (cp->geom->spoiled != NULL && cp->spoiled && >> + if (cp->geom->spoiled != NULL && (cp->flags & G_CF_SPOILED) && >> (dcr > 0 || dcw > 0 || dce > 0)) >> return (ENXIO); >> >> @@ -953,6 +963,7 @@ g_std_spoiled(struct g_consumer *cp) >> g_topology_assert(); >> G_VALID_CONSUMER(cp); >> g_trace(G_T_TOPOLOGY, "g_std_spoiled(%p)", cp); >> + cp->flags |= G_CF_ORPHAN; >> g_detach(cp); >> gp = cp->geom; >> LIST_FOREACH(pp, &gp->provider, provider) >> @@ -988,9 +999,9 @@ g_spoil_event(void *arg, int flag) >> G_VALID_PROVIDER(pp); >> for (cp = LIST_FIRST(&pp->consumers); cp != NULL; cp = cp2) { >> cp2 = LIST_NEXT(cp, consumers); >> - if (!cp->spoiled) >> + if ((cp->flags & G_CF_SPOILED) == 0) >> continue; >> - cp->spoiled = 0; >> + cp->flags &= ~G_CF_SPOILED; >> if (cp->geom->spoiled == NULL) >> continue; >> cp->geom->spoiled(cp); >> @@ -1015,11 +1026,54 @@ g_spoil(struct g_provider *pp, struct g_ >> KASSERT(cp2->acw == 0, ("spoiling cp->acw = %d", cp2->acw)); >> */ >> KASSERT(cp2->ace == 0, ("spoiling cp->ace = %d", cp2->ace)); >> - cp2->spoiled++; >> + cp2->flags |= G_CF_SPOILED; >> } >> g_post_event(g_spoil_event, pp, M_WAITOK, pp, NULL); >> } >> >> +static void >> +g_media_changed_event(void *arg, int flag) >> +{ >> + struct g_provider *pp; >> + int retaste; >> + >> + g_topology_assert(); >> + if (flag == EV_CANCEL) >> + return; >> + pp = arg; >> + G_VALID_PROVIDER(pp); >> + >> + /* >> + * If provider was not open for writing, queue retaste after spoiling. >> + * If it was, retaste will happen automatically on close. >> + */ >> + retaste = (pp->acw == 0 && pp->error == 0 && >> + !(pp->geom->flags & G_GEOM_WITHER)); >> + g_spoil_event(arg, flag); >> + if (retaste) >> + g_post_event(g_new_provider_event, pp, M_WAITOK, pp, NULL); >> +} >> + >> +int >> +g_media_changed(struct g_provider *pp, int flag) >> +{ >> + struct g_consumer *cp; >> + >> + LIST_FOREACH(cp, &pp->consumers, consumers) >> + cp->flags |= G_CF_SPOILED; >> + return (g_post_event(g_media_changed_event, pp, flag, pp, NULL)); >> +} >> + >> +int >> +g_media_gone(struct g_provider *pp, int flag) >> +{ >> + struct g_consumer *cp; >> + >> + LIST_FOREACH(cp, &pp->consumers, consumers) >> + cp->flags |= G_CF_SPOILED; >> + return (g_post_event(g_spoil_event, pp, flag, pp, NULL)); >> +} >> + >> int >> g_getattr__(const char *attr, struct g_consumer *cp, void *var, int len) >> { >> @@ -1175,15 +1229,15 @@ db_show_geom_consumer(int indent, struct >> cp->provider); >> } >> gprintln(" access: r%dw%de%d", cp->acr, cp->acw, cp->ace); >> - gprintln(" spoiled: %d", cp->spoiled); >> + gprintln(" flags: 0x%04x", cp->flags); >> gprintln(" nstart: %u", cp->nstart); >> gprintln(" nend: %u", cp->nend); >> } else { >> gprintf("consumer: %p (%s), access=r%dw%de%d", cp, >> cp->provider != NULL ? cp->provider->name : "none", >> cp->acr, cp->acw, cp->ace); >> - if (cp->spoiled) >> - db_printf(", spoiled=%d", cp->spoiled); >> + if (cp->flags) >> + db_printf(", flags=0x%04x", cp->flags); >> db_printf("\n"); >> } >> } >> >> Modified: stable/9/sys/geom/part/g_part.c >> ============================================================================== >> --- stable/9/sys/geom/part/g_part.c Fri Apr 5 11:30:31 2013 (r249151) >> +++ stable/9/sys/geom/part/g_part.c Fri Apr 5 11:41:56 2013 (r249152) >> @@ -2055,6 +2055,7 @@ g_part_spoiled(struct g_consumer *cp) >> G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, cp->provider->name)); >> g_topology_assert(); >> >> + cp > -- Alexander Motin From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 06:20:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4E63CCED; Thu, 25 Apr 2013 06:20:25 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ea0-x22e.google.com (mail-ea0-x22e.google.com [IPv6:2a00:1450:4013:c01::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 3AD331122; Thu, 25 Apr 2013 06:20:24 +0000 (UTC) Received: by mail-ea0-f174.google.com with SMTP id z16so1084939ead.33 for ; Wed, 24 Apr 2013 23:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=+OzWmW6bUCRZj9s8prSXbg7Hi0wQSxbgSsmrnSz2BJk=; b=jrTqkMSka7FLtIbE3WRshY3bZO6+KQzbwLGYpZvgor4m5RH4cdaj0Gt4rIsrieA8kx tue0v3mQpewY17WDaYDUXhdn4bnyyyXpxJ/MRo4kUtGRvuTiwEkjJB78v3Sxz9o4EI78 3WDMH2saghyw3i59ZakLjB2i3x+VTo0SEa02ZJ5r9goM5pgTM39U486P8vKnBBcirqYD oOw40vJsSiDLwnx7AHTrPUPmgjFAdLg2z7TA3M6jXopWiBJwUoQENK/DuVr1bgrt9jK7 mwct0zxD04qugZNiO8rj3RfxXAJSoQhJS+ggCjhLD6i9nTijEZUl75ZvWycFTZq1+6oQ yd3A== X-Received: by 10.15.102.3 with SMTP id bq3mr72031479eeb.42.1366870823428; Wed, 24 Apr 2013 23:20:23 -0700 (PDT) Received: from localhost ([188.230.122.226]) by mx.google.com with ESMTPSA id cb50sm8376783eeb.14.2013.04.24.23.20.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 24 Apr 2013 23:20:22 -0700 (PDT) Date: Thu, 25 Apr 2013 09:20:20 +0300 From: Mikolaj Golub To: Jeremie Le Hen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r249734 - stable/9/sys/kern Message-ID: <20130425062018.GA74007@gmail.com> References: <201304211714.r3LHEo0R075715@svn.freebsd.org> <20130424220752.GA2622@caravan.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130424220752.GA2622@caravan.chchile.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 06:20:25 -0000 On Thu, Apr 25, 2013 at 12:07:52AM +0200, Jeremie Le Hen wrote: > Hi Mikolaj, > > On Sun, Apr 21, 2013 at 05:14:50PM +0000, Mikolaj Golub wrote: > > Author: trociny > > Date: Sun Apr 21 17:14:50 2013 > > New Revision: 249734 > > URL: http://svnweb.freebsd.org/changeset/base/249734 > > > > Log: > > MFC r249238, r249239: > > > > r249238: > > > > Use 4-byte padding for core dump notes on both 32 and 64bit archs. > > > > Although native word padding (i.e. 8-byte on 64bit arch) looks to be > > in agreement with standards, other parts of our code and other OSes > > use 4-byte alignment. > > > > This is not expected to change alignment for currently generated core > > dump notes, as the notes look to consist of structures with sizes > > multiple of 8 on 64-bit archs. But there are plans to add additional > > notes, where 4-byte vs 8-byte alignment makes difference. > > > > Sorry, I'm a little late, trying to catch up on emails. > > I'd say this deserves a comment. Even if you commit log clearly states > the reason for this change, a casual reader may think it would be > preferable to have native alignment and fix it without thinking of > checking the SVN metadata. Note, there are several places in this file where the padding is used. Their amount has increased after r249486. I thought about adding a constant #define ELF_NOTE_ROUNDSIZE 4 to imgactl_elf.c and using it throghthout the file. I think using '4' explicetly (instead of sizeof(Elf32_Size)) should diminish confusion about native alignment and the comment is not needed then. What do you think about this? -- Mikolaj Golub From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 06:23:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F259DE68; Thu, 25 Apr 2013 06:23:03 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 902681132; Thu, 25 Apr 2013 06:23:03 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id EDCAB89FBE; Thu, 25 Apr 2013 06:22:56 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.6/8.14.6) with ESMTP id r3P6MuNt001945; Thu, 25 Apr 2013 06:22:56 GMT (envelope-from phk@phk.freebsd.dk) To: Scott Long Subject: Re: svn commit: r249152 - in stable/9/sys: cam cam/ata cam/scsi geom geom/part In-reply-to: <363EF017-CFC2-4006-8F1B-E18A4091F2CC@yahoo.com> From: "Poul-Henning Kamp" References: <201304051141.r35Bfui1062429@svn.freebsd.org> <363EF017-CFC2-4006-8F1B-E18A4091F2CC@yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Thu, 25 Apr 2013 06:22:56 +0000 Message-ID: <1944.1366870976@critter.freebsd.dk> Cc: svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 06:23:04 -0000 In message <363EF017-CFC2-4006-8F1B-E18A4091F2CC@yahoo.com>, Scott Long writes: >I've already responded to Alexander in private, but in case he doesn't >respond, I'm stating publicly that I object to this commit (and the >corresponding one in HEAD) and I'd like to have it reviewed and reverted. Media-change notifications for SCSI devices has been on our wish-list for almost as long as we have had a SCSI subsystem. I for one, has never understood the why "SCSI-mafia" objected to it, and I don't feel I have ever gotten a comprehensive rationale for the objections. Maybe this would be a good time for you to lay out the rationale for the objections and let the project decide the issue on the merits ? Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 06:42:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EB3605E4; Thu, 25 Apr 2013 06:42:53 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) by mx1.freebsd.org (Postfix) with ESMTP id B552511BE; Thu, 25 Apr 2013 06:42:53 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id C7013C3D15; Thu, 25 Apr 2013 06:42:52 +0000 (UTC) Date: Thu, 25 Apr 2013 08:42:52 +0200 From: Jeremie Le Hen To: Mikolaj Golub Subject: Re: svn commit: r249734 - stable/9/sys/kern Message-ID: <20130425064252.GC2622@caravan.chchile.org> Mail-Followup-To: Mikolaj Golub , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org References: <201304211714.r3LHEo0R075715@svn.freebsd.org> <20130424220752.GA2622@caravan.chchile.org> <20130425062018.GA74007@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130425062018.GA74007@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 06:42:54 -0000 On Thu, Apr 25, 2013 at 09:20:20AM +0300, Mikolaj Golub wrote: > On Thu, Apr 25, 2013 at 12:07:52AM +0200, Jeremie Le Hen wrote: > > Hi Mikolaj, > > > > On Sun, Apr 21, 2013 at 05:14:50PM +0000, Mikolaj Golub wrote: > > > Author: trociny > > > Date: Sun Apr 21 17:14:50 2013 > > > New Revision: 249734 > > > URL: http://svnweb.freebsd.org/changeset/base/249734 > > > > > > Log: > > > MFC r249238, r249239: > > > > > > r249238: > > > > > > Use 4-byte padding for core dump notes on both 32 and 64bit archs. > > > > > > Although native word padding (i.e. 8-byte on 64bit arch) looks to be > > > in agreement with standards, other parts of our code and other OSes > > > use 4-byte alignment. > > > > > > This is not expected to change alignment for currently generated core > > > dump notes, as the notes look to consist of structures with sizes > > > multiple of 8 on 64-bit archs. But there are plans to add additional > > > notes, where 4-byte vs 8-byte alignment makes difference. > > > > > > > Sorry, I'm a little late, trying to catch up on emails. > > > > I'd say this deserves a comment. Even if you commit log clearly states > > the reason for this change, a casual reader may think it would be > > preferable to have native alignment and fix it without thinking of > > checking the SVN metadata. > > Note, there are several places in this file where the padding is > used. Their amount has increased after r249486. > > I thought about adding a constant > > #define ELF_NOTE_ROUNDSIZE 4 > > to imgactl_elf.c and using it throghthout the file. I think using '4' > explicetly (instead of sizeof(Elf32_Size)) should diminish confusion > about native alignment and the comment is not needed then. > > What do you think about this? Yes, sounds good. Thanks! -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 11:24:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 464D87F3; Thu, 25 Apr 2013 11:24:41 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 380911E60; Thu, 25 Apr 2013 11:24:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3PBOfTW030913; Thu, 25 Apr 2013 11:24:41 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3PBOfDS030912; Thu, 25 Apr 2013 11:24:41 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201304251124.r3PBOfDS030912@svn.freebsd.org> From: Randall Stewart Date: Thu, 25 Apr 2013 11:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249891 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 11:24:41 -0000 Author: rrs Date: Thu Apr 25 11:24:40 2013 New Revision: 249891 URL: http://svnweb.freebsd.org/changeset/base/249891 Log: MFC of PR r249848. PR: 174749, 157796 Modified: stable/8/sys/netinet/ip_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Thu Apr 25 08:57:15 2013 (r249890) +++ stable/8/sys/netinet/ip_output.c Thu Apr 25 11:24:40 2013 (r249891) @@ -197,8 +197,8 @@ ip_output(struct mbuf *m, struct mbuf *o hlen = ip->ip_hl << 2; } - dst = (struct sockaddr_in *)&ro->ro_dst; again: + dst = (struct sockaddr_in *)&ro->ro_dst; /* * If there is a cached route, * check that it is to the same destination From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 11:25:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7AD94966; Thu, 25 Apr 2013 11:25:25 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7E11E69; Thu, 25 Apr 2013 11:25:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3PBPPpB031095; Thu, 25 Apr 2013 11:25:25 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3PBPPLh031094; Thu, 25 Apr 2013 11:25:25 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201304251125.r3PBPPLh031094@svn.freebsd.org> From: Randall Stewart Date: Thu, 25 Apr 2013 11:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249892 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 11:25:25 -0000 Author: rrs Date: Thu Apr 25 11:25:24 2013 New Revision: 249892 URL: http://svnweb.freebsd.org/changeset/base/249892 Log: MFC of r249848 PR: 174749, 157796 Modified: stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Thu Apr 25 11:24:40 2013 (r249891) +++ stable/9/sys/netinet/ip_output.c Thu Apr 25 11:25:24 2013 (r249892) @@ -194,8 +194,8 @@ ip_output(struct mbuf *m, struct mbuf *o hlen = ip->ip_hl << 2; } - dst = (struct sockaddr_in *)&ro->ro_dst; again: + dst = (struct sockaddr_in *)&ro->ro_dst; ia = NULL; /* * If there is a cached route, From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 17:02:22 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DA91094E; Thu, 25 Apr 2013 17:02:22 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD0231F23; Thu, 25 Apr 2013 17:02:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3PH2MIR048579; Thu, 25 Apr 2013 17:02:22 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3PH2MWT048578; Thu, 25 Apr 2013 17:02:22 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304251702.r3PH2MWT048578@svn.freebsd.org> From: Sean Bruno Date: Thu, 25 Apr 2013 17:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249898 - stable/9/sys/dev/ciss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 17:02:22 -0000 Author: sbruno Date: Thu Apr 25 17:02:22 2013 New Revision: 249898 URL: http://svnweb.freebsd.org/changeset/base/249898 Log: MFC r249349 Repair camcontrol output and use CAM defined values for string sizes Modified: stable/9/sys/dev/ciss/ciss.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Thu Apr 25 16:34:04 2013 (r249897) +++ stable/9/sys/dev/ciss/ciss.c Thu Apr 25 17:02:22 2013 (r249898) @@ -3352,9 +3352,14 @@ ciss_cam_complete_fixup(struct ciss_soft cl = &sc->ciss_logical[bus][target]; - padstr(inq->vendor, "COMPAQ", 8); - padstr(inq->product, ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), 8); - padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), 16); + padstr(inq->vendor, "COMPAQ", + SID_VENDOR_SIZE); + padstr(inq->product, + ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), + SID_PRODUCT_SIZE); + padstr(inq->revision, + ciss_name_ldrive_status(cl->cl_lstatus->status), + SID_REVISION_SIZE); } } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 17:04:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A1AE7BFB; Thu, 25 Apr 2013 17:04:48 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9424F1F4F; Thu, 25 Apr 2013 17:04:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3PH4mNm049134; Thu, 25 Apr 2013 17:04:48 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3PH4mbC049133; Thu, 25 Apr 2013 17:04:48 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304251704.r3PH4mbC049133@svn.freebsd.org> From: Sean Bruno Date: Thu, 25 Apr 2013 17:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249899 - stable/8/sys/dev/ciss X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 17:04:48 -0000 Author: sbruno Date: Thu Apr 25 17:04:48 2013 New Revision: 249899 URL: http://svnweb.freebsd.org/changeset/base/249899 Log: MFC r249349 Repair camcontrol output and use CAM defined values for string sizes Modified: stable/8/sys/dev/ciss/ciss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ciss/ (props changed) Modified: stable/8/sys/dev/ciss/ciss.c ============================================================================== --- stable/8/sys/dev/ciss/ciss.c Thu Apr 25 17:02:22 2013 (r249898) +++ stable/8/sys/dev/ciss/ciss.c Thu Apr 25 17:04:48 2013 (r249899) @@ -3347,9 +3347,14 @@ ciss_cam_complete_fixup(struct ciss_soft cl = &sc->ciss_logical[bus][target]; - padstr(inq->vendor, "COMPAQ", 8); - padstr(inq->product, ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), 8); - padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), 16); + padstr(inq->vendor, "COMPAQ", + SID_VENDOR_SIZE); + padstr(inq->product, + ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), + SID_PRODUCT_SIZE); + padstr(inq->revision, + ciss_name_ldrive_status(cl->cl_lstatus->status), + SID_REVISION_SIZE); } } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 25 17:06:07 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E71E3D7D; Thu, 25 Apr 2013 17:06:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D91951F67; Thu, 25 Apr 2013 17:06:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3PH67ui049493; Thu, 25 Apr 2013 17:06:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3PH671E049492; Thu, 25 Apr 2013 17:06:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304251706.r3PH671E049492@svn.freebsd.org> From: Sean Bruno Date: Thu, 25 Apr 2013 17:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r249900 - stable/7/sys/dev/ciss X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Apr 2013 17:06:08 -0000 Author: sbruno Date: Thu Apr 25 17:06:07 2013 New Revision: 249900 URL: http://svnweb.freebsd.org/changeset/base/249900 Log: MFC r249349 Repair camcontrol output and use CAM defined values for string sizes Modified: stable/7/sys/dev/ciss/ciss.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/ciss/ciss.c ============================================================================== --- stable/7/sys/dev/ciss/ciss.c Thu Apr 25 17:04:48 2013 (r249899) +++ stable/7/sys/dev/ciss/ciss.c Thu Apr 25 17:06:07 2013 (r249900) @@ -3044,9 +3044,14 @@ ciss_cam_complete_fixup(struct ciss_soft cl = &sc->ciss_logical[bus][target]; - padstr(inq->vendor, "COMPAQ", 8); - padstr(inq->product, ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), 8); - padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), 16); + padstr(inq->vendor, "COMPAQ", + SID_VENDOR_SIZE); + padstr(inq->product, + ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), + SID_PRODUCT_SIZE); + padstr(inq->revision, + ciss_name_ldrive_status(cl->cl_lstatus->status), + SID_REVISION_SIZE); } } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 00:45:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 00DF1C3; Fri, 26 Apr 2013 00:45:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E72B11379; Fri, 26 Apr 2013 00:45:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q0j0uL010156; Fri, 26 Apr 2013 00:45:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q0j084010155; Fri, 26 Apr 2013 00:45:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304260045.r3Q0j084010155@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Apr 2013 00:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249910 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 00:45:01 -0000 Author: eadler Date: Fri Apr 26 00:45:00 2013 New Revision: 249910 URL: http://svnweb.freebsd.org/changeset/base/249910 Log: MFC r249801: Switch from K&R prototypes to modern C Modified: stable/9/lib/libc/gen/stringlist.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/stringlist.c ============================================================================== --- stable/9/lib/libc/gen/stringlist.c Fri Apr 26 00:00:14 2013 (r249909) +++ stable/9/lib/libc/gen/stringlist.c Fri Apr 26 00:45:00 2013 (r249910) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); * sl_init(): Initialize a string list */ StringList * -sl_init() +sl_init(void) { StringList *sl; @@ -67,9 +67,7 @@ sl_init() * sl_add(): Add an item to the string list */ int -sl_add(sl, name) - StringList *sl; - char *name; +sl_add(StringList *sl, char *name) { if (sl->sl_cur == sl->sl_max - 1) { sl->sl_max += _SL_CHUNKSIZE; @@ -86,9 +84,7 @@ sl_add(sl, name) * sl_free(): Free a stringlist */ void -sl_free(sl, all) - StringList *sl; - int all; +sl_free(StringList *sl, int all) { size_t i; @@ -108,9 +104,7 @@ sl_free(sl, all) * sl_find(): Find a name in the string list */ char * -sl_find(sl, name) - StringList *sl; - char *name; +sl_find(StringList *sl, char *name) { size_t i; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 00:45:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7D0CBC7; Fri, 26 Apr 2013 00:45:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6F25C137A; Fri, 26 Apr 2013 00:45:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q0j4IT010242; Fri, 26 Apr 2013 00:45:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q0j4mg010241; Fri, 26 Apr 2013 00:45:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304260045.r3Q0j4mg010241@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Apr 2013 00:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249911 - stable/8/lib/libc/gen X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 00:45:04 -0000 Author: eadler Date: Fri Apr 26 00:45:03 2013 New Revision: 249911 URL: http://svnweb.freebsd.org/changeset/base/249911 Log: MFC r249801: Switch from K&R prototypes to modern C Modified: stable/8/lib/libc/gen/stringlist.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/gen/stringlist.c ============================================================================== --- stable/8/lib/libc/gen/stringlist.c Fri Apr 26 00:45:00 2013 (r249910) +++ stable/8/lib/libc/gen/stringlist.c Fri Apr 26 00:45:03 2013 (r249911) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); * sl_init(): Initialize a string list */ StringList * -sl_init() +sl_init(void) { StringList *sl; @@ -67,9 +67,7 @@ sl_init() * sl_add(): Add an item to the string list */ int -sl_add(sl, name) - StringList *sl; - char *name; +sl_add(StringList *sl, char *name) { if (sl->sl_cur == sl->sl_max - 1) { sl->sl_max += _SL_CHUNKSIZE; @@ -86,9 +84,7 @@ sl_add(sl, name) * sl_free(): Free a stringlist */ void -sl_free(sl, all) - StringList *sl; - int all; +sl_free(StringList *sl, int all) { size_t i; @@ -108,9 +104,7 @@ sl_free(sl, all) * sl_find(): Find a name in the string list */ char * -sl_find(sl, name) - StringList *sl; - char *name; +sl_find(StringList *sl, char *name) { size_t i; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 00:47:23 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 53E6E3A5; Fri, 26 Apr 2013 00:47:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4625B138C; Fri, 26 Apr 2013 00:47:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q0lN89010676; Fri, 26 Apr 2013 00:47:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q0lMgo010674; Fri, 26 Apr 2013 00:47:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304260047.r3Q0lMgo010674@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Apr 2013 00:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249912 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 00:47:23 -0000 Author: eadler Date: Fri Apr 26 00:47:22 2013 New Revision: 249912 URL: http://svnweb.freebsd.org/changeset/base/249912 Log: MFC r249802: - sl_find does not modify 'name' - make the prototype of sl_find match NetBSD Modified: stable/9/lib/libc/gen/stringlist.3 stable/9/lib/libc/gen/stringlist.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/stringlist.3 ============================================================================== --- stable/9/lib/libc/gen/stringlist.3 Fri Apr 26 00:45:03 2013 (r249911) +++ stable/9/lib/libc/gen/stringlist.3 Fri Apr 26 00:47:22 2013 (r249912) @@ -49,7 +49,7 @@ .Ft void .Fn sl_free "StringList *sl" "int freeall" .Ft char * -.Fn sl_find "StringList *sl" "char *item" +.Fn sl_find "StringList *sl" "const char *item" .Sh DESCRIPTION The .Nm Modified: stable/9/lib/libc/gen/stringlist.c ============================================================================== --- stable/9/lib/libc/gen/stringlist.c Fri Apr 26 00:45:03 2013 (r249911) +++ stable/9/lib/libc/gen/stringlist.c Fri Apr 26 00:47:22 2013 (r249912) @@ -104,7 +104,7 @@ sl_free(StringList *sl, int all) * sl_find(): Find a name in the string list */ char * -sl_find(StringList *sl, char *name) +sl_find(StringList *sl, const char *name) { size_t i; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 00:47:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A3B3149E; Fri, 26 Apr 2013 00:47:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E8377138D; Fri, 26 Apr 2013 00:47:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q0lS0f010729; Fri, 26 Apr 2013 00:47:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q0lSOf010726; Fri, 26 Apr 2013 00:47:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304260047.r3Q0lSOf010726@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Apr 2013 00:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249913 - stable/8/lib/libc/gen X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 00:47:29 -0000 Author: eadler Date: Fri Apr 26 00:47:28 2013 New Revision: 249913 URL: http://svnweb.freebsd.org/changeset/base/249913 Log: MFC r249802: - sl_find does not modify 'name' - make the prototype of sl_find match NetBSD Modified: stable/8/lib/libc/gen/stringlist.3 stable/8/lib/libc/gen/stringlist.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/gen/stringlist.3 ============================================================================== --- stable/8/lib/libc/gen/stringlist.3 Fri Apr 26 00:47:22 2013 (r249912) +++ stable/8/lib/libc/gen/stringlist.3 Fri Apr 26 00:47:28 2013 (r249913) @@ -56,7 +56,7 @@ .Ft void .Fn sl_free "StringList *sl" "int freeall" .Ft char * -.Fn sl_find "StringList *sl" "char *item" +.Fn sl_find "StringList *sl" "const char *item" .Sh DESCRIPTION The .Nm Modified: stable/8/lib/libc/gen/stringlist.c ============================================================================== --- stable/8/lib/libc/gen/stringlist.c Fri Apr 26 00:47:22 2013 (r249912) +++ stable/8/lib/libc/gen/stringlist.c Fri Apr 26 00:47:28 2013 (r249913) @@ -104,7 +104,7 @@ sl_free(StringList *sl, int all) * sl_find(): Find a name in the string list */ char * -sl_find(StringList *sl, char *name) +sl_find(StringList *sl, const char *name) { size_t i; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 01:56:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2CB4BBE; Fri, 26 Apr 2013 01:56:59 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 039E615C8; Fri, 26 Apr 2013 01:56:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q1uwxR035517; Fri, 26 Apr 2013 01:56:58 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q1uwKv035510; Fri, 26 Apr 2013 01:56:58 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201304260156.r3Q1uwKv035510@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 26 Apr 2013 01:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249915 - in stable/9/sys: dev/random libkern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 01:56:59 -0000 Author: ache Date: Fri Apr 26 01:56:58 2013 New Revision: 249915 URL: http://svnweb.freebsd.org/changeset/base/249915 Log: MFC r249631 Attempt to mitigate poor initialization of arc4 by one-shot reinitialization from yarrow right after good entropy is harvested. Approved by: secteam (delphij) Modified: stable/9/sys/dev/random/randomdev_soft.c stable/9/sys/libkern/arc4random.c stable/9/sys/sys/libkern.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/9/sys/dev/random/randomdev_soft.c Fri Apr 26 00:53:34 2013 (r249914) +++ stable/9/sys/dev/random/randomdev_soft.c Fri Apr 26 01:56:58 2013 (r249915) @@ -366,6 +366,8 @@ random_yarrow_unblock(void) selwakeuppri(&random_systat.rsel, PUSER); wakeup(&random_systat); } + (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, + ARC4_ENTR_HAVE); } static int Modified: stable/9/sys/libkern/arc4random.c ============================================================================== --- stable/9/sys/libkern/arc4random.c Fri Apr 26 00:53:34 2013 (r249914) +++ stable/9/sys/libkern/arc4random.c Fri Apr 26 01:56:58 2013 (r249915) @@ -24,6 +24,8 @@ __FBSDID("$FreeBSD$"); #define ARC4_RESEED_SECONDS 300 #define ARC4_KEYBYTES (256 / 8) +int arc4rand_iniseed_state = ARC4_ENTR_NONE; + static u_int8_t arc4_i, arc4_j; static int arc4_numruns = 0; static u_int8_t arc4_sbox[256]; @@ -130,7 +132,8 @@ arc4rand(void *ptr, u_int len, int resee struct timeval tv; getmicrouptime(&tv); - if (reseed || + if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, + ARC4_ENTR_SEED) || reseed || (arc4_numruns > ARC4_RESEED_BYTES) || (tv.tv_sec > arc4_t_reseed)) arc4_randomstir(); Modified: stable/9/sys/sys/libkern.h ============================================================================== --- stable/9/sys/sys/libkern.h Fri Apr 26 00:53:34 2013 (r249914) +++ stable/9/sys/sys/libkern.h Fri Apr 26 01:56:58 2013 (r249915) @@ -70,6 +70,11 @@ static __inline int abs(int a) { return static __inline long labs(long a) { return (a < 0 ? -a : a); } static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); } +#define ARC4_ENTR_NONE 0 /* Don't have entropy yet. */ +#define ARC4_ENTR_HAVE 1 /* Have entropy. */ +#define ARC4_ENTR_SEED 2 /* Reseeding. */ +extern int arc4rand_iniseed_state; + /* Prototypes for non-quad routines. */ struct malloc_type; uint32_t arc4random(void); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 07:00:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 106901DE; Fri, 26 Apr 2013 07:00:50 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 025A91136; Fri, 26 Apr 2013 07:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q70n3v045873; Fri, 26 Apr 2013 07:00:49 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q70nkV045870; Fri, 26 Apr 2013 07:00:49 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304260700.r3Q70nkV045870@svn.freebsd.org> From: Martin Matuska Date: Fri, 26 Apr 2013 07:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249920 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 07:00:50 -0000 Author: mm Date: Fri Apr 26 07:00:49 2013 New Revision: 249920 URL: http://svnweb.freebsd.org/changeset/base/249920 Log: MFC r249787: The zfs synctask code restructuring introduced a new bug that makes it impossible to set quota and reservation on pools lower than version 22. Problem has been reported and a solution discussed with vendor. Illumos ZFS issues: 3739 cannot set zfs quota or reservation on pool version < 22 Reviewed by: Matthew Ahrens Reported by: Steve Wills Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Apr 26 05:42:35 2013 (r249919) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Apr 26 07:00:49 2013 (r249920) @@ -972,12 +972,18 @@ dsl_dir_set_quota_sync(void *arg, dmu_tx VERIFY0(dsl_dataset_hold(dp, ddsqra->ddsqra_name, FTAG, &ds)); - dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_QUOTA), - ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, - &ddsqra->ddsqra_value, tx); + if (spa_version(dp->dp_spa) >= SPA_VERSION_RECVD_PROPS) { + dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_QUOTA), + ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, + &ddsqra->ddsqra_value, tx); - VERIFY0(dsl_prop_get_int_ds(ds, - zfs_prop_to_name(ZFS_PROP_QUOTA), &newval)); + VERIFY0(dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_QUOTA), &newval)); + } else { + newval = ddsqra->ddsqra_value; + spa_history_log_internal_ds(ds, "set", tx, "%s=%lld", + zfs_prop_to_name(ZFS_PROP_QUOTA), (longlong_t)newval); + } dmu_buf_will_dirty(ds->ds_dir->dd_dbuf, tx); mutex_enter(&ds->ds_dir->dd_lock); @@ -1087,12 +1093,20 @@ dsl_dir_set_reservation_sync(void *arg, VERIFY0(dsl_dataset_hold(dp, ddsqra->ddsqra_name, FTAG, &ds)); - dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_RESERVATION), - ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, - &ddsqra->ddsqra_value, tx); + if (spa_version(dp->dp_spa) >= SPA_VERSION_RECVD_PROPS) { + dsl_prop_set_sync_impl(ds, + zfs_prop_to_name(ZFS_PROP_RESERVATION), + ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, + &ddsqra->ddsqra_value, tx); - VERIFY0(dsl_prop_get_int_ds(ds, - zfs_prop_to_name(ZFS_PROP_RESERVATION), &newval)); + VERIFY0(dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_RESERVATION), &newval)); + } else { + newval = ddsqra->ddsqra_value; + spa_history_log_internal_ds(ds, "set", tx, "%s=%lld", + zfs_prop_to_name(ZFS_PROP_RESERVATION), + (longlong_t)newval); + } dsl_dir_set_reservation_sync_impl(ds->ds_dir, newval, tx); dsl_dataset_rele(ds, FTAG); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Fri Apr 26 05:42:35 2013 (r249919) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Fri Apr 26 07:00:49 2013 (r249920) @@ -557,10 +557,6 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds } if (version < SPA_VERSION_RECVD_PROPS) { - zfs_prop_t prop = zfs_name_to_prop(propname); - if (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_RESERVATION) - return; - if (source & ZPROP_SRC_NONE) source = ZPROP_SRC_NONE; else if (source & ZPROP_SRC_RECEIVED) From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 07:55:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 729DE58D; Fri, 26 Apr 2013 07:55:29 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 05B2E13C1; Fri, 26 Apr 2013 07:55:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id r3Q7tRt7094346; Fri, 26 Apr 2013 11:55:27 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 26 Apr 2013 11:55:27 +0400 (MSK) From: Dmitry Morozovsky To: Eitan Adler Subject: Re: svn commit: r249912 - stable/9/lib/libc/gen In-Reply-To: <201304260047.r3Q0lMgo010674@svn.freebsd.org> Message-ID: References: <201304260047.r3Q0lMgo010674@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Fri, 26 Apr 2013 11:55:27 +0400 (MSK) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 07:55:29 -0000 On Fri, 26 Apr 2013, Eitan Adler wrote: > Author: eadler > Date: Fri Apr 26 00:47:22 2013 > New Revision: 249912 > URL: http://svnweb.freebsd.org/changeset/base/249912 > > Log: > MFC r249802: > - sl_find does not modify 'name' > - make the prototype of sl_find match NetBSD It seems include diff had been missed? marck@castor:/FreeBSD/rinet/src.9> svn diff include Index: include/stringlist.h =================================================================== --- include/stringlist.h (revision 249920) +++ include/stringlist.h (working copy) @@ -51,7 +51,7 @@ StringList *sl_init(void); int sl_add(StringList *, char *); void sl_free(StringList *, int); -char *sl_find(StringList *, char *); +char *sl_find(StringList *, const char *); __END_DECLS #endif /* _STRINGLIST_H */ -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 11:57:06 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3DE5EDE; Fri, 26 Apr 2013 11:57:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 301BB13B6; Fri, 26 Apr 2013 11:57:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QBv6B3053531; Fri, 26 Apr 2013 11:57:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QBv6YN053530; Fri, 26 Apr 2013 11:57:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201304261157.r3QBv6YN053530@svn.freebsd.org> From: Glen Barber Date: Fri, 26 Apr 2013 11:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249922 - stable/9/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 11:57:06 -0000 Author: gjb (doc,ports committer) Date: Fri Apr 26 11:57:05 2013 New Revision: 249922 URL: http://svnweb.freebsd.org/changeset/base/249922 Log: MFC remainder of r249802 (eadler) to fix build: - sl_find does not modify 'name' - make the prototype of sl_find match NetBSD Modified: stable/9/include/stringlist.h Directory Properties: stable/9/include/ (props changed) Modified: stable/9/include/stringlist.h ============================================================================== --- stable/9/include/stringlist.h Fri Apr 26 11:24:20 2013 (r249921) +++ stable/9/include/stringlist.h Fri Apr 26 11:57:05 2013 (r249922) @@ -51,7 +51,7 @@ __BEGIN_DECLS StringList *sl_init(void); int sl_add(StringList *, char *); void sl_free(StringList *, int); -char *sl_find(StringList *, char *); +char *sl_find(StringList *, const char *); __END_DECLS #endif /* _STRINGLIST_H */ From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 11:58:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 67327259; Fri, 26 Apr 2013 11:58:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 58E3F13C4; Fri, 26 Apr 2013 11:58:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QBwlIK053870; Fri, 26 Apr 2013 11:58:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QBwlLs053869; Fri, 26 Apr 2013 11:58:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201304261158.r3QBwlLs053869@svn.freebsd.org> From: Glen Barber Date: Fri, 26 Apr 2013 11:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249923 - stable/8/include X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 11:58:47 -0000 Author: gjb (doc,ports committer) Date: Fri Apr 26 11:58:46 2013 New Revision: 249923 URL: http://svnweb.freebsd.org/changeset/base/249923 Log: MFC remainder of r249802 (eadler) to fix build: - sl_find does not modify 'name' - make the prototype of sl_find match NetBSD Modified: stable/8/include/stringlist.h Directory Properties: stable/8/include/ (props changed) Modified: stable/8/include/stringlist.h ============================================================================== --- stable/8/include/stringlist.h Fri Apr 26 11:57:05 2013 (r249922) +++ stable/8/include/stringlist.h Fri Apr 26 11:58:46 2013 (r249923) @@ -51,7 +51,7 @@ __BEGIN_DECLS StringList *sl_init(void); int sl_add(StringList *, char *); void sl_free(StringList *, int); -char *sl_find(StringList *, char *); +char *sl_find(StringList *, const char *); __END_DECLS #endif /* _STRINGLIST_H */ From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 12:26:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5435D80A for ; Fri, 26 Apr 2013 12:26:11 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA83162C for ; Fri, 26 Apr 2013 12:26:10 +0000 (UTC) Received: by mail-pd0-f170.google.com with SMTP id 10so2419692pdi.29 for ; Fri, 26 Apr 2013 05:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=VP+im4XEdRDd/EifJrW7N/wzFqHmohy3D+JROFvwvks=; b=GOrOXDXViV2QRFR6BK8TujGSligGIbu1GdEjAd4R7Ayv96A1TsZh0v9i6Q1XGDmdcg RcxDT68kpuLVF5fKKYg8FeSqzvAGM8WmEQwIOZI2XOxpMn1fXc0uBbWagirCwgCQMosJ MqmFTPNqOkXSx4ws3TcK2PM4h27bTTyhW9Oto= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=VP+im4XEdRDd/EifJrW7N/wzFqHmohy3D+JROFvwvks=; b=hzTYg1vQtKQinzHhHlZ0GgPG9ueSlCWM+euh2mSy3HMsu2h4gaYUB4ZQNQVuaAvXD8 VIAwlQBT1sUQWG9mQ2f2bSKcAwgzrE8V0KRP3U/yccvWqf/gEZtwmfGVLF8N2JmCKL6h BsW2zTCW3kWNv971VGUSBymPQEqW4Xcq/koSO7QkU78FKlCnZkx+LtEvHVYiKRPgstyq jhtK2qIXr2w0oDk6SjJvtiP00p3Y89LiCo5XPudTe5+Xi5QFurq/dcl+IlfR4QsVrV8X h84vUyd8UDgy1x2fApAkQaBoFndEmjFqfrHV8kPSy4vHk3JdayRBJzL/KYecbLWr5b6F jSHQ== X-Received: by 10.68.253.232 with SMTP id ad8mr57379767pbd.164.1366979170468; Fri, 26 Apr 2013 05:26:10 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.159.97 with HTTP; Fri, 26 Apr 2013 05:25:39 -0700 (PDT) In-Reply-To: References: <201304260047.r3Q0lMgo010674@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Apr 2013 08:25:39 -0400 X-Google-Sender-Auth: -eoSw7-sxNJG_WTm4hH4_7DUL0Y Message-ID: Subject: Re: svn commit: r249912 - stable/9/lib/libc/gen To: Dmitry Morozovsky Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnAlsced1S24dXqVjOppIHZo1FX3FKZvD0Q8d+zqQAzGnm9GBX2UBF2C/hgJiUr0zKEtNZ9 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 12:26:11 -0000 On 26 April 2013 03:55, Dmitry Morozovsky wrote: > On Fri, 26 Apr 2013, Eitan Adler wrote: > >> Author: eadler >> Date: Fri Apr 26 00:47:22 2013 >> New Revision: 249912 >> URL: http://svnweb.freebsd.org/changeset/base/249912 >> >> Log: >> MFC r249802: >> - sl_find does not modify 'name' >> - make the prototype of sl_find match NetBSD > > It seems include diff had been missed? Sorry about that. I merged both, built, but did svn ci in lib/libc instead of the root :( -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 16:05:44 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 60E95CFA; Fri, 26 Apr 2013 16:05:44 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 04F131092; Fri, 26 Apr 2013 16:05:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QG5hqX044222; Fri, 26 Apr 2013 16:05:43 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QG5hdl044221; Fri, 26 Apr 2013 16:05:43 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304261605.r3QG5hdl044221@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 26 Apr 2013 16:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249935 - stable/9/lib/libc/nls X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 16:05:44 -0000 Author: jilles Date: Fri Apr 26 16:05:43 2013 New Revision: 249935 URL: http://svnweb.freebsd.org/changeset/base/249935 Log: MFC r249471: libc: Fix typo in French translation. PR: kern/177704 Submitted by: martymac Modified: stable/9/lib/libc/nls/fr_FR.ISO8859-1.msg Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/nls/fr_FR.ISO8859-1.msg ============================================================================== --- stable/9/lib/libc/nls/fr_FR.ISO8859-1.msg Fri Apr 26 15:59:19 2013 (r249934) +++ stable/9/lib/libc/nls/fr_FR.ISO8859-1.msg Fri Apr 26 16:05:43 2013 (r249935) @@ -94,7 +94,7 @@ $ EPROTONOSUPPORT $ ESOCKTNOSUPPORT 44 Type de socket non supporté $ EOPNOTSUPP -45 Opération non supporté +45 Opération non supportée $ EPFNOSUPPORT 46 Famille de protocole non supportée $ EAFNOSUPPORT From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 16:09:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 93C72EC3; Fri, 26 Apr 2013 16:09:11 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 84DDB10BF; Fri, 26 Apr 2013 16:09:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QG9BdB045015; Fri, 26 Apr 2013 16:09:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QG9BF2045012; Fri, 26 Apr 2013 16:09:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304261609.r3QG9BF2045012@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 26 Apr 2013 16:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249936 - stable/9/lib/libc/locale X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 16:09:11 -0000 Author: jilles Date: Fri Apr 26 16:09:10 2013 New Revision: 249936 URL: http://svnweb.freebsd.org/changeset/base/249936 Log: MFC r248803: btowc(3), isblank(3): Correct prototypes for _l variants. Modified: stable/9/lib/libc/locale/btowc.3 stable/9/lib/libc/locale/isblank.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/locale/btowc.3 ============================================================================== --- stable/9/lib/libc/locale/btowc.3 Fri Apr 26 16:05:43 2013 (r249935) +++ stable/9/lib/libc/locale/btowc.3 Fri Apr 26 16:09:10 2013 (r249936) @@ -42,9 +42,9 @@ .In wchar.h .In xlocale.h .Ft wint_t -.Fn btowc "int c" +.Fn btowc_l "int c" "locale_t loc" .Ft int -.Fn wctob "wint_t c" +.Fn wctob_l "wint_t c" "locale_t loc" .Sh DESCRIPTION The .Fn btowc Modified: stable/9/lib/libc/locale/isblank.3 ============================================================================== --- stable/9/lib/libc/locale/isblank.3 Fri Apr 26 16:05:43 2013 (r249935) +++ stable/9/lib/libc/locale/isblank.3 Fri Apr 26 16:09:10 2013 (r249936) @@ -41,7 +41,7 @@ .Ft int .Fn isblank "int c" .Ft int -.Fn isblank "int c" "locale_t loc" +.Fn isblank_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isblank From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 16:11:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 77504114; Fri, 26 Apr 2013 16:11:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 69E0710DC; Fri, 26 Apr 2013 16:11:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QGB8or047192; Fri, 26 Apr 2013 16:11:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QGB8SL047191; Fri, 26 Apr 2013 16:11:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304261611.r3QGB8SL047191@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 26 Apr 2013 16:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249938 - stable/8/lib/libc/nls X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 16:11:08 -0000 Author: jilles Date: Fri Apr 26 16:11:07 2013 New Revision: 249938 URL: http://svnweb.freebsd.org/changeset/base/249938 Log: MFC r249471: libc: Fix typo in French translation. PR: kern/177704 Submitted by: martymac Modified: stable/8/lib/libc/nls/fr_FR.ISO8859-1.msg Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/nls/fr_FR.ISO8859-1.msg ============================================================================== --- stable/8/lib/libc/nls/fr_FR.ISO8859-1.msg Fri Apr 26 16:11:03 2013 (r249937) +++ stable/8/lib/libc/nls/fr_FR.ISO8859-1.msg Fri Apr 26 16:11:07 2013 (r249938) @@ -94,7 +94,7 @@ $ EPROTONOSUPPORT $ ESOCKTNOSUPPORT 44 Type de socket non supporté $ EOPNOTSUPP -45 Opération non supporté +45 Opération non supportée $ EPFNOSUPPORT 46 Famille de protocole non supportée $ EAFNOSUPPORT From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 16:48:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B5FBB478 for ; Fri, 26 Apr 2013 16:48:00 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [IPv6:2607:f8b0:400c:c02::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 770201245 for ; Fri, 26 Apr 2013 16:48:00 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id q13so2761515vbe.2 for ; Fri, 26 Apr 2013 09:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=kDnHV1vpwlrnD5lyybTismnl7NTDlR3jjjPyL12DhBA=; b=dxL1aMCzOEK+fyCQ6qVYwmZRXHCNEUtD2+UtrH8OToF8w7QbsGhb151q1zptJdSvFn zM4jiBBmN0NfsjxfvBjR6BT4mXQuaN5T7UU3Z5mFtT9FEKoeeUIzejqQyMIAlVZ3ZNHE 0wI8mUHKI5AOaEo5dfkYjNUZIgSaEmoRyKCn8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=kDnHV1vpwlrnD5lyybTismnl7NTDlR3jjjPyL12DhBA=; b=bS98JSpJa3FE4/PH829IsMLi1vF6Wdq6y6wRNvQPc29/Xx9tUKwsXKDLFsRz4UnpQA /R9mawbrnWZDTyW121AACUN9OH4lMX5iTYU2gVZor6fjpyAihpAum1umg2gNEuGqmMUH mcSGtjFaTtW7og9oqCkEiE8UIs4YglrpSq4gQ2pZRlc6WBgnm5HgFpFnh1saTDS2Gewp c7WYQw2P3Nxge1L+aGrXIcO2erpDF5ZpCXyCSRF7/W4+XHbPLbnV4OFdqk+iu48IC0p5 VyIE4fXrLy0bkIGmWIREB7DxKqVHrKrCnxZ0jMDayP9aX3sUcu6RmlmMQsEUyMxPfY9d rw6Q== MIME-Version: 1.0 X-Received: by 10.58.28.144 with SMTP id b16mr20822141veh.43.1366994879834; Fri, 26 Apr 2013 09:47:59 -0700 (PDT) Received: by 10.220.215.70 with HTTP; Fri, 26 Apr 2013 09:47:59 -0700 (PDT) In-Reply-To: <201304180944.r3I9i05t093967@svn.freebsd.org> References: <201304180944.r3I9i05t093967@svn.freebsd.org> Date: Fri, 26 Apr 2013 09:47:59 -0700 Message-ID: Subject: Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi From: Peter Wemm To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmj6NqDQPJsKVsRLo1hafVP/e3vzzOm13G6wmJdrp4TnhvBwTXQngTFWEl73YEskH8I/uv4 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 16:48:00 -0000 On Thu, Apr 18, 2013 at 2:44 AM, Alexander Motin wrote: > Author: mav > Date: Thu Apr 18 09:44:00 2013 > New Revision: 249611 > URL: http://svnweb.freebsd.org/changeset/base/249611 > > Log: > MFC r248872, r249048: > Make pre-shutdown flush and spindown routines to not use xpt_polled_action(), > but execute the commands in regular way. There is no any reason to cook CPU > while the system is still fully operational. After this change polling in > CAM is used only for kernel dumping. FYI, this causes some drivers to deadlock when you attempt to cleanly reboot the machine. eg: mpt based systems. Adding new assumptions about interrupt-driven hooks continuing to work after the post-sync shutdown hooks don't seem like a -stable candidate. This breaks a number of machines in the freebsd.org cluster. I have to back out both of these changes to get them to reboot. > Modified: > stable/9/sys/cam/ata/ata_da.c > stable/9/sys/cam/scsi/scsi_da.c > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/cam/ata/ata_da.c > ============================================================================== > --- stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:40:34 2013 (r249610) > +++ stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:44:00 2013 (r249611) > @@ -1825,11 +1825,10 @@ adaflush(void) > { > struct cam_periph *periph; > struct ada_softc *softc; > + union ccb *ccb; > int error; > > CAM_PERIPH_FOREACH(periph, &adadriver) { > - union ccb ccb; > - > /* If we paniced with lock held - not recurse here. */ > if (cam_periph_owned(periph)) > continue; > @@ -1845,10 +1844,8 @@ adaflush(void) > continue; > } > > - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; > - cam_fill_ataio(&ccb.ataio, > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + cam_fill_ataio(&ccb->ataio, > 0, > adadone, > CAM_DIR_NONE, > @@ -1856,20 +1853,17 @@ adaflush(void) > NULL, > 0, > ada_default_timeout*1000); > - > if (softc->flags & ADA_FLAG_CAN_48BIT) > - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); > + ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); > else > - ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); > - xpt_polled_action(&ccb); > + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); > > - error = cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) > - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); > + error = cam_periph_runccb(ccb, adaerror, /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, > + softc->disk->d_devstat); > if (error != 0) > xpt_print(periph->path, "Synchronize cache failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } > @@ -1879,11 +1873,10 @@ adaspindown(uint8_t cmd, int flags) > { > struct cam_periph *periph; > struct ada_softc *softc; > + union ccb *ccb; > int error; > > CAM_PERIPH_FOREACH(periph, &adadriver) { > - union ccb ccb; > - > /* If we paniced with lock held - not recurse here. */ > if (cam_periph_owned(periph)) > continue; > @@ -1900,10 +1893,8 @@ adaspindown(uint8_t cmd, int flags) > if (bootverbose) > xpt_print(periph->path, "spin-down\n"); > > - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; > - cam_fill_ataio(&ccb.ataio, > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + cam_fill_ataio(&ccb->ataio, > 0, > adadone, > CAM_DIR_NONE | flags, > @@ -1911,17 +1902,14 @@ adaspindown(uint8_t cmd, int flags) > NULL, > 0, > ada_default_timeout*1000); > + ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, 0); > > - ata_28bit_cmd(&ccb.ataio, cmd, 0, 0, 0); > - xpt_polled_action(&ccb); > - > - error = cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) > - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); > + error = cam_periph_runccb(ccb, adaerror, /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, > + softc->disk->d_devstat); > if (error != 0) > xpt_print(periph->path, "Spin-down disk failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } > > Modified: stable/9/sys/cam/scsi/scsi_da.c > ============================================================================== > --- stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:40:34 2013 (r249610) > +++ stable/9/sys/cam/scsi/scsi_da.c Thu Apr 18 09:44:00 2013 (r249611) > @@ -2834,11 +2834,10 @@ dashutdown(void * arg, int howto) > { > struct cam_periph *periph; > struct da_softc *softc; > + union ccb *ccb; > int error; > > CAM_PERIPH_FOREACH(periph, &dadriver) { > - union ccb ccb; > - > cam_periph_lock(periph); > softc = (struct da_softc *)periph->softc; > > @@ -2852,10 +2851,8 @@ dashutdown(void * arg, int howto) > continue; > } > > - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state = DA_CCB_DUMP; > - scsi_synchronize_cache(&ccb.csio, > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + scsi_synchronize_cache(&ccb->csio, > /*retries*/0, > /*cbfcnp*/dadone, > MSG_SIMPLE_Q_TAG, > @@ -2864,15 +2861,12 @@ dashutdown(void * arg, int howto) > SSD_FULL_SIZE, > 60 * 60 * 1000); > > - xpt_polled_action(&ccb); > - > - error = cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) > - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); > + error = cam_periph_runccb(ccb, daerror, /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, > + softc->disk->d_devstat); > if (error != 0) > xpt_print(periph->path, "Synchronize cache failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 18:00:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D704BFB1; Fri, 26 Apr 2013 18:00:33 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by mx1.freebsd.org (Postfix) with ESMTP id E8DB9162B; Fri, 26 Apr 2013 18:00:32 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id c1so871577eek.10 for ; Fri, 26 Apr 2013 11:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=QIET37CWScrR/3482nqS4ZugrBZn/Eg9S0gvRVWOip0=; b=tphN8NFCYcgRPIQo/tLiNAeQJNkH9Y1bBFe+7w4/gsEWk/YI7pddPKS48SBeBIajG8 jeZemrINm7LGcx++P+LOtFuL/TQlsqFg22P02wtTLu05YIce1E+8Ywm9qBbkI3uDXY1X kD5uwXfwMKycrFhX3L2hFsi8+b00FzeMKN2AU9ifAH7Ru+g1N+zgfyPJHoGgpUWXU0Wk gvZ2Qx0uM3dYTtClg+s9HBWD1FxiPGMjaQKzjO8TPvDW3G4S7MIoGxLufeXlpblxfb2m QV90sGfXn5LOGuNbP0C15bU9i5kZyLQBY9s84KbpY+mCvwvBv6grNmycGlYTUZSRKOYT ASjw== X-Received: by 10.14.3.9 with SMTP id 9mr13705083eeg.33.1366999231520; Fri, 26 Apr 2013 11:00:31 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPSA id i53sm17250107eeu.5.2013.04.26.11.00.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 11:00:30 -0700 (PDT) Sender: Alexander Motin Message-ID: <517AC0BB.4040207@FreeBSD.org> Date: Fri, 26 Apr 2013 21:00:27 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5 MIME-Version: 1.0 To: Peter Wemm Subject: Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi References: <201304180944.r3I9i05t093967@svn.freebsd.org> In-Reply-To: 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-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 18:00:33 -0000 On 26.04.2013 19:47, Peter Wemm wrote: > On Thu, Apr 18, 2013 at 2:44 AM, Alexander Motin wrote: >> Author: mav >> Date: Thu Apr 18 09:44:00 2013 >> New Revision: 249611 >> URL: http://svnweb.freebsd.org/changeset/base/249611 >> >> Log: >> MFC r248872, r249048: >> Make pre-shutdown flush and spindown routines to not use xpt_polled_action(), >> but execute the commands in regular way. There is no any reason to cook CPU >> while the system is still fully operational. After this change polling in >> CAM is used only for kernel dumping. > > FYI, this causes some drivers to deadlock when you attempt to cleanly > reboot the machine. eg: mpt based systems. Thank you for the report, but I've seen your first email 23.04 and replied you with proposed solution the same day. > Adding new assumptions about interrupt-driven hooks continuing to work > after the post-sync shutdown hooks don't seem like a -stable > candidate. That is not "after the post-sync", but the post-sync itself. Is it written somewhere that it should not work? Because several GEOM modules are also doing some disk writes at post-sync stage and they expect to be handled in normal way. > This breaks a number of machines in the freebsd.org cluster. I have > to back out both of these changes to get them to reboot. I've made a search though the base system and found only two drivers affected by this change: mpt and hptmv. I've patched both at head r249849 and going to merge fix to stable/9 tomorrow unless objected. Have you tried that patch instead of reverting? -- Alexander Motin From owner-svn-src-stable@FreeBSD.ORG Fri Apr 26 21:07:28 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 46CBC60A; Fri, 26 Apr 2013 21:07:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 27E8E1DCD; Fri, 26 Apr 2013 21:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QL7S2a051032; Fri, 26 Apr 2013 21:07:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QL7RMK051027; Fri, 26 Apr 2013 21:07:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304262107.r3QL7RMK051027@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 26 Apr 2013 21:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249953 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Apr 2013 21:07:28 -0000 Author: jilles Date: Fri Apr 26 21:07:27 2013 New Revision: 249953 URL: http://svnweb.freebsd.org/changeset/base/249953 Log: MFC r249233: mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE. POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that has close-on-exec set. However, they do this incorrectly, leaving a window where a thread may fork and exec while the flag has not been set yet. The race is easily reproduced on a multicore system with one thread doing shm_open and close and another thread doing posix_spawnp and waitpid. Set UF_EXCLOSE via falloc()'s flags argument instead. This also simplifies the code. Modified: stable/9/sys/kern/uipc_mqueue.c stable/9/sys/kern/uipc_sem.c stable/9/sys/kern/uipc_shm.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_mqueue.c ============================================================================== --- stable/9/sys/kern/uipc_mqueue.c Fri Apr 26 19:56:14 2013 (r249952) +++ stable/9/sys/kern/uipc_mqueue.c Fri Apr 26 21:07:27 2013 (r249953) @@ -1977,7 +1977,7 @@ kern_kmq_open(struct thread *td, const c if (len < 2 || path[0] != '/' || index(path + 1, '/') != NULL) return (EINVAL); - error = falloc(td, &fp, &fd, 0); + error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) return (error); @@ -2032,10 +2032,6 @@ kern_kmq_open(struct thread *td, const c finit(fp, flags & (FREAD | FWRITE | O_NONBLOCK), DTYPE_MQUEUE, pn, &mqueueops); - FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd] == fp) - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; - FILEDESC_XUNLOCK(fdp); td->td_retval[0] = fd; fdrop(fp, td); return (0); Modified: stable/9/sys/kern/uipc_sem.c ============================================================================== --- stable/9/sys/kern/uipc_sem.c Fri Apr 26 19:56:14 2013 (r249952) +++ stable/9/sys/kern/uipc_sem.c Fri Apr 26 21:07:27 2013 (r249953) @@ -485,7 +485,7 @@ ksem_create(struct thread *td, const cha fdp = td->td_proc->p_fd; mode = (mode & ~fdp->fd_cmask) & ACCESSPERMS; - error = falloc(td, &fp, &fd, 0); + error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) { if (name == NULL) error = ENOSPC; @@ -578,10 +578,6 @@ ksem_create(struct thread *td, const cha finit(fp, FREAD | FWRITE, DTYPE_SEM, ks, &ksem_ops); - FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd] == fp) - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; - FILEDESC_XUNLOCK(fdp); fdrop(fp, td); return (0); Modified: stable/9/sys/kern/uipc_shm.c ============================================================================== --- stable/9/sys/kern/uipc_shm.c Fri Apr 26 19:56:14 2013 (r249952) +++ stable/9/sys/kern/uipc_shm.c Fri Apr 26 21:07:27 2013 (r249953) @@ -533,7 +533,7 @@ sys_shm_open(struct thread *td, struct s fdp = td->td_proc->p_fd; cmode = (uap->mode & ~fdp->fd_cmask) & ACCESSPERMS; - error = falloc(td, &fp, &fd, 0); + error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) return (error); @@ -628,10 +628,6 @@ sys_shm_open(struct thread *td, struct s finit(fp, FFLAGS(uap->flags & O_ACCMODE), DTYPE_SHM, shmfd, &shm_ops); - FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd] == fp) - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; - FILEDESC_XUNLOCK(fdp); td->td_retval[0] = fd; fdrop(fp, td); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 27 01:48:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7186A22F; Sat, 27 Apr 2013 01:48:10 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 648AE16E4; Sat, 27 Apr 2013 01:48:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3R1mAcA049234; Sat, 27 Apr 2013 01:48:10 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3R1mAE9049233; Sat, 27 Apr 2013 01:48:10 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201304270148.r3R1mAE9049233@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 27 Apr 2013 01:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249964 - stable/9/lib/libpmc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 27 Apr 2013 01:48:10 -0000 Author: bryanv Date: Sat Apr 27 01:48:09 2013 New Revision: 249964 URL: http://svnweb.freebsd.org/changeset/base/249964 Log: MFC r248783 Add missing space Modified: stable/9/lib/libpmc/pmc.sandybridgexeon.3 Directory Properties: stable/9/lib/libpmc/ (props changed) Modified: stable/9/lib/libpmc/pmc.sandybridgexeon.3 ============================================================================== --- stable/9/lib/libpmc/pmc.sandybridgexeon.3 Sat Apr 27 01:29:14 2013 (r249963) +++ stable/9/lib/libpmc/pmc.sandybridgexeon.3 Sat Apr 27 01:48:09 2013 (r249964) @@ -219,7 +219,7 @@ L1D. .It Li MISALIGN_MEM_REF.STORES .Pq Event 05H , Umask 02H Speculative cache-line split Store- address uops -dispatchedto L1D. +dispatched to L1D. .It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS .Pq Event 07H , Umask 01H False dependencies in MOB due to partial compare on From owner-svn-src-stable@FreeBSD.ORG Sat Apr 27 06:09:14 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B7434974; Sat, 27 Apr 2013 06:09:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A973B1FA3; Sat, 27 Apr 2013 06:09:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3R69EPK041452; Sat, 27 Apr 2013 06:09:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3R69ET4041450; Sat, 27 Apr 2013 06:09:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304270609.r3R69ET4041450@svn.freebsd.org> From: Alexander Motin Date: Sat, 27 Apr 2013 06:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249972 - in stable/9/sys/dev: hptmv mpt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 27 Apr 2013 06:09:14 -0000 Author: mav Date: Sat Apr 27 06:09:13 2013 New Revision: 249972 URL: http://svnweb.freebsd.org/changeset/base/249972 Log: MFC r249849: Move hptmv and mpt drivers shutdown a bit later to the SHUTDOWN_PRI_LAST stage of shutdown_post_sync. That should allow CAM to do final cache flush at the SHUTDOWN_PRI_DEFAULT without using polling magic. Modified: stable/9/sys/dev/hptmv/entry.c stable/9/sys/dev/mpt/mpt_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hptmv/entry.c ============================================================================== --- stable/9/sys/dev/hptmv/entry.c Sat Apr 27 05:44:39 2013 (r249971) +++ stable/9/sys/dev/hptmv/entry.c Sat Apr 27 06:09:13 2013 (r249972) @@ -2605,9 +2605,11 @@ launch_worker_thread(void) * hpt_worker_thread needs to be suspended after shutdown sync, when fs sync finished. */ #if (__FreeBSD_version < 500043) - EVENTHANDLER_REGISTER(shutdown_post_sync, shutdown_kproc, hptdaemonproc, SHUTDOWN_PRI_FIRST); + EVENTHANDLER_REGISTER(shutdown_post_sync, shutdown_kproc, hptdaemonproc, + SHUTDOWN_PRI_LAST); #else - EVENTHANDLER_REGISTER(shutdown_post_sync, kproc_shutdown, hptdaemonproc, SHUTDOWN_PRI_FIRST); + EVENTHANDLER_REGISTER(shutdown_post_sync, kproc_shutdown, hptdaemonproc, + SHUTDOWN_PRI_LAST); #endif } /* Modified: stable/9/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_pci.c Sat Apr 27 05:44:39 2013 (r249971) +++ stable/9/sys/dev/mpt/mpt_pci.c Sat Apr 27 06:09:13 2013 (r249972) @@ -568,7 +568,7 @@ mpt_pci_attach(device_t dev) } mpt->eh = EVENTHANDLER_REGISTER(shutdown_post_sync, mpt_pci_shutdown, - dev, SHUTDOWN_PRI_DEFAULT); + dev, SHUTDOWN_PRI_LAST); if (mpt->eh == NULL) { mpt_prt(mpt, "shutdown event registration failed\n"); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 27 07:00:32 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 36BCC39A; Sat, 27 Apr 2013 07:00:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 28B7310CD; Sat, 27 Apr 2013 07:00:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3R70WWA060252; Sat, 27 Apr 2013 07:00:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3R70WWu060251; Sat, 27 Apr 2013 07:00:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304270700.r3R70WWu060251@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 27 Apr 2013 07:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249975 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 27 Apr 2013 07:00:32 -0000 Author: glebius Date: Sat Apr 27 07:00:31 2013 New Revision: 249975 URL: http://svnweb.freebsd.org/changeset/base/249975 Log: Merge r249903 from head: Fix couple of mbuf leaks in incoming ARP processing. Modified: stable/9/sys/netinet/if_ether.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/if_ether.c ============================================================================== --- stable/9/sys/netinet/if_ether.c Sat Apr 27 06:57:39 2013 (r249974) +++ stable/9/sys/netinet/if_ether.c Sat Apr 27 07:00:31 2013 (r249975) @@ -543,13 +543,13 @@ in_arpinput(struct mbuf *m) if (ah->ar_pln != sizeof(struct in_addr)) { log(LOG_NOTICE, "in_arp: requested protocol length != %zu\n", sizeof(struct in_addr)); - return; + goto drop; } if (allow_multicast == 0 && ETHER_IS_MULTICAST(ar_sha(ah))) { log(LOG_NOTICE, "arp: %*D is multicast\n", ifp->if_addrlen, (u_char *)ar_sha(ah), ":"); - return; + goto drop; } op = ntohs(ah->ar_op);