From owner-svn-src-all@freebsd.org Sun Oct 18 00:59:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7AB1A17D82; Sun, 18 Oct 2015 00:59:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773E8C64; Sun, 18 Oct 2015 00:59:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I0xSaM053945; Sun, 18 Oct 2015 00:59:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I0xSrJ053943; Sun, 18 Oct 2015 00:59:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510180059.t9I0xSrJ053943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 18 Oct 2015 00:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289476 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 00:59:30 -0000 Author: adrian Date: Sun Oct 18 00:59:28 2015 New Revision: 289476 URL: https://svnweb.freebsd.org/changeset/base/289476 Log: if_arge: fix up TX workaround; add TX/RX requirements for busdma; add stats The early ethernet MACs (I think AR71xx and AR913x) require that both TX and RX require 4-byte alignment for all packets. The later MACs have started relaxing the requirements. For now, the 1-byte TX and 1-byte RX alignment requirements are only for the QCA955x SoCs. I'll add in the relaxed requirements as I review the datasheets and do testing. * Add a hardware flags field and 1-byte / 4-byte TX/RX alignment. * .. defaulting to 4-byte TX and 4-byte RX alignment. * Only enforce the TX alignment fixup if the hardware requires a 4-byte TX alignment. This avoids a call to m_defrag(). * Add counters for various situations for further debugging. * Set the 1-byte and 4-byte busdma alignment requirement when the tag is created. This improves the straight bridging performance from 130mbit/sec to 180mbit/sec, purely by removing the need for TX path bounce buffers. The main performance issue is the RX alignment requirement and any RX bounce buffering that's occuring. (In a local test, removing the RX fixup path and just aligning buffers raises the performance to above 400mbit/sec. In theory it's a no-op for SoCs before the QCA955x. Tested: * QCA9558 SoC in AP135 board, using software bridging between arge0/arge1. Modified: head/sys/mips/atheros/if_arge.c head/sys/mips/atheros/if_argevar.h Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Sat Oct 17 22:41:30 2015 (r289475) +++ head/sys/mips/atheros/if_arge.c Sun Oct 18 00:59:28 2015 (r289476) @@ -298,6 +298,29 @@ arge_attach_sysctl(device_t dev) "tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned, 0, "number of TX unaligned packets"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "tx_pkts_unaligned_start", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned_start, + 0, "number of TX unaligned packets (start)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "tx_pkts_unaligned_len", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned_len, + 0, "number of TX unaligned packets (len)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "tx_pkts_nosegs", CTLFLAG_RW, &sc->stats.tx_pkts_nosegs, + 0, "number of TX packets fail with no ring slots avail"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intr_stray_filter", CTLFLAG_RW, &sc->stats.intr_stray, + 0, "number of stray interrupts (filter)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intr_stray_intr", CTLFLAG_RW, &sc->stats.intr_stray2, + 0, "number of stray interrupts (intr)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intr_ok", CTLFLAG_RW, &sc->stats.intr_ok, + 0, "number of OK interrupts"); #ifdef ARGE_DEBUG SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_prod", CTLFLAG_RW, &sc->arge_cdata.arge_tx_prod, 0, ""); @@ -627,6 +650,22 @@ arge_attach(device_t dev) } /* + * Hardware workarounds. + */ + switch (ar71xx_soc) { + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: + /* Arbitrary alignment */ + sc->arge_hw_flags |= ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE; + sc->arge_hw_flags |= ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE; + break; + default: + sc->arge_hw_flags |= ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE; + sc->arge_hw_flags |= ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE; + break; + } + + /* * Some units (eg the TP-Link WR-1043ND) do not have a convenient * EEPROM location to read the ethernet MAC address from. * OpenWRT simply snaffles it from a fixed location. @@ -825,6 +864,9 @@ arge_attach(device_t dev) ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG0, FIFO_CFG0_ALL << FIFO_CFG0_ENABLE_SHIFT); + /* + * SoC specific bits. + */ switch (ar71xx_soc) { case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7241: @@ -1351,24 +1393,35 @@ arge_init_locked(struct arge_softc *sc) * Return whether the mbuf chain is correctly aligned * for the arge TX engine. * - * The TX engine requires each fragment to be aligned to a - * 4 byte boundary and the size of each fragment except - * the last to be a multiple of 4 bytes. + * All the MACs have a length requirement: any non-final + * fragment (ie, descriptor with MORE bit set) needs to have + * a length divisible by 4. * - * XXX TODO: I believe this is only a bug on the AR71xx and - * AR913x MACs. The later MACs (AR724x and later) does not - * need this workaround. + * The AR71xx, AR913x require the start address also be + * DWORD aligned. The later MACs don't. */ static int -arge_mbuf_chain_is_tx_aligned(struct mbuf *m0) +arge_mbuf_chain_is_tx_aligned(struct arge_softc *sc, struct mbuf *m0) { struct mbuf *m; for (m = m0; m != NULL; m = m->m_next) { - if((mtod(m, intptr_t) & 3) != 0) + /* + * Only do this for chips that require it. + */ + if ((sc->arge_hw_flags & ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE) && + (mtod(m, intptr_t) & 3) != 0) { + sc->stats.tx_pkts_unaligned_start++; return 0; - if ((m->m_next != NULL) && ((m->m_len & 0x03) != 0)) + } + + /* + * All chips have this requirement for length. + */ + if ((m->m_next != NULL) && ((m->m_len & 0x03) != 0)) { + sc->stats.tx_pkts_unaligned_len++; return 0; + } } return 1; } @@ -1389,15 +1442,10 @@ arge_encap(struct arge_softc *sc, struct ARGE_LOCK_ASSERT(sc); /* - * Fix mbuf chain, all fragments should be 4 bytes aligned and - * even 4 bytes - * - * XXX TODO: I believe this is only a bug on the AR71xx and - * AR913x MACs. The later MACs (AR724x and later) does not - * need this workaround. + * Fix mbuf chain based on hardware alignment constraints. */ m = *m_head; - if (! arge_mbuf_chain_is_tx_aligned(m)) { + if (! arge_mbuf_chain_is_tx_aligned(sc, m)) { sc->stats.tx_pkts_unaligned++; m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { @@ -1427,6 +1475,7 @@ arge_encap(struct arge_softc *sc, struct /* Check number of available descriptors. */ if (sc->arge_cdata.arge_tx_cnt + nsegs >= (ARGE_TX_RING_COUNT - 1)) { bus_dmamap_unload(sc->arge_cdata.arge_tx_tag, txd->tx_dmamap); + sc->stats.tx_pkts_nosegs++; return (ENOBUFS); } @@ -1444,7 +1493,9 @@ arge_encap(struct arge_softc *sc, struct desc = &sc->arge_rdata.arge_tx_ring[prod]; desc->packet_ctrl = ARGE_DMASIZE(txsegs[i].ds_len); - if (txsegs[i].ds_addr & 3) + /* XXX Note: only relevant for older MACs; but check length! */ + if ((sc->arge_hw_flags & ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE) && + (txsegs[i].ds_addr & 3)) panic("TX packet address unaligned\n"); desc->packet_addr = txsegs[i].ds_addr; @@ -1715,6 +1766,16 @@ arge_dma_alloc(struct arge_softc *sc) struct arge_txdesc *txd; struct arge_rxdesc *rxd; int error, i; + int arge_tx_align, arge_rx_align; + + /* Assume 4 byte alignment by default */ + arge_tx_align = 4; + arge_rx_align = 4; + + if (sc->arge_hw_flags & ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE) + arge_tx_align = 1; + if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE) + arge_rx_align = 1; /* Create parent DMA tag. */ error = bus_dma_tag_create( @@ -1775,7 +1836,7 @@ arge_dma_alloc(struct arge_softc *sc) /* Create tag for Tx buffers. */ error = bus_dma_tag_create( sc->arge_cdata.arge_parent_tag, /* parent */ - sizeof(uint32_t), 0, /* alignment, boundary */ + arge_tx_align, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -1793,7 +1854,7 @@ arge_dma_alloc(struct arge_softc *sc) /* Create tag for Rx buffers. */ error = bus_dma_tag_create( sc->arge_cdata.arge_parent_tag, /* parent */ - ARGE_RX_ALIGN, 0, /* alignment, boundary */ + arge_rx_align, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -2108,6 +2169,11 @@ arge_newbuf(struct arge_softc *sc, int i if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; + + /* + * Add extra space to "adjust" (copy) the packet back to be aligned + * for purposes of IPv4/IPv6 header contents. + */ m_adj(m, sizeof(uint64_t)); if (bus_dmamap_load_mbuf_sg(sc->arge_cdata.arge_rx_tag, @@ -2126,7 +2192,8 @@ arge_newbuf(struct arge_softc *sc, int i sc->arge_cdata.arge_rx_sparemap = map; rxd->rx_m = m; desc = rxd->desc; - if (segs[0].ds_addr & 3) + if ((sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE) && + segs[0].ds_addr & 3) panic("RX packet address unaligned"); desc->packet_addr = segs[0].ds_addr; desc->packet_ctrl = ARGE_DESC_EMPTY | ARGE_DMASIZE(segs[0].ds_len); @@ -2331,10 +2398,12 @@ arge_intr_filter(void *arg) if (status & DMA_INTR_ALL) { sc->arge_intr_status |= status; ARGE_WRITE(sc, AR71XX_DMA_INTR, 0); + sc->stats.intr_ok++; return (FILTER_SCHEDULE_THREAD); } sc->arge_intr_status = 0; + sc->stats.intr_stray++; return (FILTER_STRAY); } @@ -2355,8 +2424,10 @@ arge_intr(void *arg) /* * Is it our interrupt at all? */ - if (status == 0) + if (status == 0) { + sc->stats.intr_stray2++; return; + } if (status & DMA_INTR_RX_BUS_ERROR) { ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, DMA_RX_STATUS_BUS_ERROR); Modified: head/sys/mips/atheros/if_argevar.h ============================================================================== --- head/sys/mips/atheros/if_argevar.h Sat Oct 17 22:41:30 2015 (r289475) +++ head/sys/mips/atheros/if_argevar.h Sun Oct 18 00:59:28 2015 (r289476) @@ -37,7 +37,10 @@ #define ARGE_TX_DMA_SIZE ARGE_TX_RING_COUNT * sizeof(struct arge_desc) #define ARGE_MAXFRAGS 8 #define ARGE_RING_ALIGN sizeof(struct arge_desc) -#define ARGE_RX_ALIGN sizeof(uint32_t) +#define ARGE_RX_ALIGN_4BYTE sizeof(uint32_t) +#define ARGE_RX_ALIGN_1BYTE sizeof(char) +#define ARGE_TX_ALIGN_4BYTE sizeof(uint32_t) +#define ARGE_TX_ALIGN_1BYTE sizeof(char) #define ARGE_MAXFRAGS 8 #define ARGE_TX_RING_ADDR(sc, i) \ ((sc)->arge_rdata.arge_tx_ring_paddr + sizeof(struct arge_desc) * (i)) @@ -149,6 +152,22 @@ struct arge_pll_data { uint32_t pll_1000; }; +/* + * Hardware specific behaviours. + */ + +/* + * Older chips support 4 byte only transmit and receive + * addresses. + * + * Later chips support arbitrary TX and later later, + * arbitrary RX addresses. + */ +#define ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE 0x00000001 +#define ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE 0x00000002 +#define ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE 0x00000004 +#define ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE 0x00000008 + struct arge_softc { struct ifnet *arge_ifp; /* interface info */ device_t arge_dev; @@ -180,13 +199,20 @@ struct arge_softc { uint32_t arge_intr_status; int arge_mac_unit; int arge_if_flags; + uint32_t arge_hw_flags; uint32_t arge_debug; uint32_t arge_mdiofreq; struct { uint32_t tx_pkts_unaligned; + uint32_t tx_pkts_unaligned_start; + uint32_t tx_pkts_unaligned_len; + uint32_t tx_pkts_nosegs; uint32_t tx_pkts_aligned; uint32_t rx_overflow; uint32_t tx_underflow; + uint32_t intr_stray; + uint32_t intr_stray2; + uint32_t intr_ok; } stats; }; From owner-svn-src-all@freebsd.org Sun Oct 18 01:03:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13688A17EE7; Sun, 18 Oct 2015 01:03:45 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB496FD0; Sun, 18 Oct 2015 01:03:44 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I13hSd056672; Sun, 18 Oct 2015 01:03:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I13h0w056671; Sun, 18 Oct 2015 01:03:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510180103.t9I13h0w056671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 01:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289477 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 01:03:45 -0000 Author: ian Date: Sun Oct 18 01:03:43 2015 New Revision: 289477 URL: https://svnweb.freebsd.org/changeset/base/289477 Log: Fix a strange macro re-definition compile error. If the VM_MAXUSER_ADDRESS value is defined as a config option the definition is emitted into opt_global.h which is force-included into everything. In addition, the symbol is emitted by the genassym mechanism, but that by its nature reduces the value to a 0xnnnnnnnn number. When compiling a .S file you end up with two different definitions of the macro (they evaluate to the same number, but the text is different, upsetting the compiler). Nothing has changed about this code for a while but the compile error is new, so this must be fallout from the clang 3.7 update or something. Modified: head/sys/arm/mv/std-pj4b.mv Modified: head/sys/arm/mv/std-pj4b.mv ============================================================================== --- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015 (r289476) +++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015 (r289477) @@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" -options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" +# This was originally defined as "(KERNBASE-(1024*1024*1024))" but that +# (in opt_global.h) clashed with the value emitted by genassym which +# reduces the original macro text to its numeric value. The only way +# to avoid that is to define it here as the numeric value genassym emits. +options VM_MAXUSER_ADDRESS="0x80000000" From owner-svn-src-all@freebsd.org Sun Oct 18 02:00:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED17A109FC; Sun, 18 Oct 2015 02:00:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5CB664; Sun, 18 Oct 2015 02:00:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ndGoZFeumT2vondGpZcPpt; Sat, 17 Oct 2015 20:00:24 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=5lJygRwiOn0A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=7Qk2ozbKAAAA:8 a=PYnjg3YJAAAA:8 a=qyDxTJV7AAAA:8 a=85N1-lAfAAAA:8 a=zNd2u4x_AAAA:8 a=j4nzMFrpAAAA:8 a=LXAkBHwNKlrvpHAmy1AA:9 a=p1sdcP6kqR4I5I3S:21 a=MWrKzmkL3O-0r47v:21 a=jxAiteTpt7Uo66uM:21 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 4EAD99FDD; Sat, 17 Oct 2015 19:00:22 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9I20KLI062531; Sat, 17 Oct 2015 19:00:20 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510180200.t9I20KLI062531@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Warner Losh cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, David Malone , Ollivier Robert , Xin Li Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Warner Losh of "Sat, 17 Oct 2015 13:19:44 -0600." <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 17 Oct 2015 19:00:20 -0700 X-CMAE-Envelope: MS4wfJj8dMMkX+NzFAMaWo5f3YmOCMnUBcgYD35YiqnMnOPRGZGlKpimKgpdteyz5kIQHpypT7OLalUdy46fA01JChtCne0CjNbkFiowdx5cAUifzOUQfT0KqTOyFmE1iXlL7I7/f+9PXnry67sutXv5mrko/Muk7zGxyKfqnD8AJUV8iJnBr4k7PeUYR4hB5ezNGsoIVqxgKEA6FZNRqEYtazKdlDq8+VaVD9UNlat8adS2KRmFTEgjojA7gw1YhBbvDvc4YzQFNwHam4CsrzexO+ZX0pHjzUQqii0lcLkxE+8B7qx/koKTYDXtumu6SUcxg7tpBx25ftdetUNWfPNP0BhZDMkhnBUpGFnSKGmVHL//V1pDO0zz6ratcEA1x6t4FieASMbxM2GgvugmIRESOXxsixky9ZHk9kCjdMYA7WYu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 02:00:25 -0000 Agreed, this would be best. There was a suggestion a GSoC person could do it (though I'm willing to roll up my sleeves if necessary). -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com>, Warner Losh write s: > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=utf-8 > > Until the next leap second=E2=80=A6. It would be better to just > always try to grab the latest one=E2=80=A6 Can we put something > in periodic to do that so users that have releases > that are older than 6 months aren=E2=80=99t screwed? > > Warner > > > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: > >=20 > > Author: cy > > Date: Fri Oct 16 14:04:16 2015 > > New Revision: 289421 > > URL: https://svnweb.freebsd.org/changeset/base/289421 > >=20 > > Log: > > Add default leap-seconds file. This should help ntp networks get the > > leap second date correct > >=20 > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ or > > ftp://tycho.usno.navy.mil/pub/ntp/. > >=20 > > Suggested by: dwmalone > > Reviewed by: roberto, dwmalone, delphij > > Approved by: roberto > > MFC after: 1 week > >=20 > > Added: > > head/etc/ntp/ > > head/etc/ntp/Makefile (contents, props changed) > > head/etc/ntp/leap-seconds (contents, props changed) > > Modified: > > head/etc/Makefile > > head/etc/mtree/BSD.var.dist > > head/etc/ntp.conf > >=20 > > Modified: head/etc/Makefile > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r289420) > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r289421) > > @@ -240,6 +240,9 @@ distribution: > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > +.if ${MK_NTP} !=3D "no" > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > +.endif > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > .if ${MK_PKGBOOTSTRAP} !=3D "no" > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > >=20 > > Modified: head/etc/mtree/BSD.var.dist > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 = > (r289420) > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 = > (r289421) > > @@ -46,6 +46,8 @@ > > .. > > ipf mode=3D0700 > > .. > > + ntp mode=3D0700 > > + .. > > pkg > > .. > > ports > >=20 > > Modified: head/etc/ntp.conf > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r289420) > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r289421) > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > # > > #server 127.127.1.0 > > #fudge 127.127.1.0 stratum 10 > > + > > +# See = > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. > > +# for documentation regarding leapfile. Updates to the file can be = > obtained > > +# from ftp://time.nist.gov/pub/ or = > ftp://tycho.usno.navy.mil/pub/ntp/. > > +leapfile "/etc/ntp/leap-seconds" > >=20 > > Added: head/etc/ntp/Makefile > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 = > (r289421) > > @@ -0,0 +1,10 @@ > > +# $FreeBSD$ > > + > > +NO_OBJ=3D > > + > > +FILES=3D leap-seconds > > + > > +FILESDIR=3D /etc/ntp > > +FILESMODE=3D 644 > > + > > +.include > >=20 > > Added: head/etc/ntp/leap-seconds > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 = > (r289421) > > @@ -0,0 +1,119 @@ > > +# > > +# $FreeBSD$ > > +# > > +# ATOMIC TIME. > > +# The Coordinated Universal Time (UTC) is the reference time scale = > derived > > +# from The "Temps Atomique International" (TAI) calculated by the = > Bureau > > +# International des Poids et Mesures (BIPM) using a worldwide = > network of atomic > > +# clocks. UTC differs from TAI by an integer number of seconds; it = > is the basis > > +# of all activities in the world. > > +# > > +# > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of = > rotation of the earth. > > +# It is now mainly derived from Very Long Baseline Interferometry = > (VLBI). The various > > +# irregular fluctuations progressively detected in the rotation = > rate of the Earth lead > > +# in 1972 to the replacement of UT1 by UTC as the reference time = > scale. > > +# > > +# > > +# LEAP SECOND > > +# Atomic clocks are more stable than the rate of the earth = > rotatiob since the later > > +# undergoes a full range of geophysical perturbations at various = > time scales (lunisolar > > +# and core-mantle torques,atmospheric and oceanic effetcs, ...) > > +# Leap seconds are needed to keep the two time scales in = > agreement, i.e. UT1-UTC smaller > > +# than 0.9 second. So, when necessary a "leap second" is = > introduced in UTC. > > +# Since the adoption of this system in 1972 it has been necessary = > to add 26 seconds to UTC, > > +# firstly due to the initial choice of the value of the second = > (1/86400 mean solar day of > > +# the year 1820) and secondly to the general slowing down of the = > Earth's rotation. It is > > +# theorically possible to have a negative leap second (a second = > removed from UTC), but so far, > > +# all leap seconds have been positive (a second has been added to = > UTC). Based on what we know about the earth's rotation, > > +# it is unlikely that we will ever have a negative leap second. > > +# > > +# > > +# HISTORY > > +# The first leap second was added on June 30, 1972. Until 2000, it = > was necessary in average to add a leap second at a rate > > +# of 1 to 2 years. Since 2000, due to the fact that the earth rate = > of rotation is accelerating, leap seconds are introduced > > +# with an average frequency of 3 to 4 years. > > +# > > +# > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC > > +# The decision to introduce a leap second in UTC is the = > responsibility of the Earth Orientation Center of > > +# the International Earth Rotation and reference System Service = > (IERS). This center is located at Paris > > +# Observatory. According to international agreements, leap second = > date have to occur at fixed date : > > +# first preference is given to the end of December and June, and = > second preference at the end of March > > +# and September. Since the system was introduced in 1972, only = > dates in June and December were used. > > +# > > +# Questions or comments to: > > +# Daniel Gambis, daniel.gambis@obspm.fr > > +# Christian Bizouard: christian.bizouard@obspm.fr > > +# Earth orientation Center of the IERS > > +# Paris Observatory, France > > +# > > +# > > +# > > +# VALIDITY OF THE FILE > > +# It is important to express the validity of the file. These next = > two dates are > > +# given in units of seconds since 1900.0. > > +# > > +# 1) Last update of the file. > > +# > > +# Updated through IERS Bulletin C = > (ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > +# > > +# The following line shows the last update of this file in NTP = > timestamp: > > +# > > +#$ 3645216000 > > +# > > +# 2) Expiration date of the file given on a semi-annual basis: = > last June or last December > > +# > > +# File expires on 28 December 2015 > > +# > > +# Expire date in NTP timestamp: > > +# > > +#@ 3660249600 > > +# > > +# > > +# LIST OF LEAP SECONDS > > +# NTP timestamp (X parameter) is the number of seconds since = > 1900.0 > > +# > > +# MJD: The Modified Julian Day number. MJD =3D X/86400 + 15020 > > +# > > +# DTAI: The difference DTAI=3D TAI-UTC in units of seconds > > +# It is the quantity to add to UTC to get the time in TAI > > +# > > +# Day Month Year : epoch in clear > > +# > > +#NTP Time DTAI Day Month Year > > +# > > +2272060800 10 # 1 Jan 1972 > > +2287785600 11 # 1 Jul 1972 > > +2303683200 12 # 1 Jan 1973 > > +2335219200 13 # 1 Jan 1974 > > +2366755200 14 # 1 Jan 1975 > > +2398291200 15 # 1 Jan 1976 > > +2429913600 16 # 1 Jan 1977 > > +2461449600 17 # 1 Jan 1978 > > +2492985600 18 # 1 Jan 1979 > > +2524521600 19 # 1 Jan 1980 > > +2571782400 20 # 1 Jul 1981 > > +2603318400 21 # 1 Jul 1982 > > +2634854400 22 # 1 Jul 1983 > > +2698012800 23 # 1 Jul 1985 > > +2776982400 24 # 1 Jan 1988 > > +2840140800 25 # 1 Jan 1990 > > +2871676800 26 # 1 Jan 1991 > > +2918937600 27 # 1 Jul 1992 > > +2950473600 28 # 1 Jul 1993 > > +2982009600 29 # 1 Jul 1994 > > +3029443200 30 # 1 Jan 1996 > > +3076704000 31 # 1 Jul 1997 > > +3124137600 32 # 1 Jan 1999 > > +3345062400 33 # 1 Jan 2006 > > +3439756800 34 # 1 Jan 2009 > > +3550089600 35 # 1 Jul 2012 > > +3644697600 36 # 1 Jul 2015 > > +# > > +# In order to verify the integrity of this file, a hash code > > +# has been generated. For more information how to use > > +# this hash code, please consult the README file under the > > +# 'sha' repertory. > > +# > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > >=20 > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B > Content-Transfer-Encoding: 7bit > Content-Disposition: attachment; > filename=signature.asc > Content-Type: application/pgp-signature; > name=signature.asc > Content-Description: Message signed with OpenPGP using GPGMail > > -----BEGIN PGP SIGNATURE----- > Comment: GPGTools - https://gpgtools.org > > iQIcBAEBCgAGBQJWIp9QAAoJEGwc0Sh9sBEA8GMP/RxMSBQvI0BKgbMfYZh7+x2w > gGPNOl5FrDjv6R1QxM2alDe3sEZmhNsZ5o0Ekso4kA/uzz5hF9eElp2EA0wn2DMa > 1IWJKbLUwLsKvN5bC2cMVmzlklqknm9R7EVyRwPB1Q9jgN8cQV4q01tN96XzbCmQ > 1M2Tg8CccnpI9hpdOLjpZQB72kr+rTUm9YrIuiP+nq62NjP4u4UyquKOeUfyyZP1 > WnpDNHNknvzlhCnXiexFHUtueL0bAjnSs0F9C7k661xtdt43q/zp0VWkTUeib8/y > o64PLOmq3dRK+PLDwRLY94OSpe5QqDivyR4H0BAbKbV97GjC/9byhJenR2J+5GUC > 2w54ddlW6rr7rE5kZYd8E5DSoMlmunpm1rMbEwHLHtRXxorZxDUMvj779VS4rj2b > MDxVngI/H0/o3inpSZjsqyLqNut8h204r64m2W5MWTMUJ5z1Evb/Uj6Gewfu3rk2 > kALtxq32we0Edt8VjYUAOOG/ZjTUWdBY0DPsDBeqjeYqkTNP7Ebgj0z0P69UYRsu > XBuMd7ONzSDSAGYXHbyBa2eLhPxDpInBPZ/R4agybBQIJ1qKv6PtV0VH8VGYzADm > DhrVGOsSc/yyou+YX7EzTT4F0S1gjPEgO4wopmZdOUFaNBzE8n8UVxTmT4jMlrTH > SchUp801COK+osnNyG4c > =3+ya > -----END PGP SIGNATURE----- > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B-- > From owner-svn-src-all@freebsd.org Sun Oct 18 02:00:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1AEAA109FE; Sun, 18 Oct 2015 02:00:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C63D665; Sun, 18 Oct 2015 02:00:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ndGhZFeszT2vondGiZcPdQ; Sat, 17 Oct 2015 20:00:18 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=8nJEP1OIZ-IA:10 a=5lJygRwiOn0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=PYnjg3YJAAAA:8 a=qyDxTJV7AAAA:8 a=85N1-lAfAAAA:8 a=zNd2u4x_AAAA:8 a=5s6zO-qXuAxs_aenfAQA:9 a=VMSVR0KU_jCSt9j8:21 a=GIVkr1912MZHXu0C:21 a=hXHcXI2ZBuaQ5wAm:21 a=wPNLvfGTeEIA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 053C39FDD; Sat, 17 Oct 2015 19:00:14 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9I20EOP061734; Sat, 17 Oct 2015 19:00:14 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510180200.t9I20EOP061734@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Ian Lepore cc: Warner Losh , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Ian Lepore of "Sat, 17 Oct 2015 13:25:56 -0600." <1445109956.71631.44.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 17 Oct 2015 19:00:14 -0700 X-CMAE-Envelope: MS4wfF1/ro5ZvBdOsWGHUyXv4Ooa3aip5ab3fnvcAlguPBvMWWrj4Q13pFsN01eA1KKZsJyTSh1/+6MmXNGe0HzX3rwuaOdTz2VsyfHR5Qt8enF6Y33hrP0cRqfMHYaQT+L2jqzsVFyFXDYv+zMMrAw3VeJQhvzTIpDlEsjqExfYygL+pWI37AekLYDNj1wV2YBuzmnodp83sscRndP+FOVIeMnTLngX5apCX4yOYiXotP5pVuh8CgWOHecBj3pxYangc7unDnGzGGKYZwKDyLpPeypi1k2LqBZtYsUfR2zNNXp4hGbSyi1HntKx1WsWFxLRxS0RZZSFlqTn+kFMNffCEi0= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 02:00:25 -0000 In message <1445109956.71631.44.camel@freebsd.org>, Ian Lepore writes: > On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote: > > Until the next leap second…. It would be better to just > > always try to grab the latest one… Can we put something > > in periodic to do that so users that have releases > > that are older than 6 months aren’t screwed? > > > > Warner > > > > I think writing a leapfeatcher task for periodic daily|weekly would > make a nice junior-hacker task. It would be nice if it only hit the > network when expiration of the installed file is imminent (like within > a month), and only if both ntp and the leapfile feature are enabled and > stuff like that. It should probably have a configurable list of URLs t > o fetch from. Enablement through and rc.conf option possibly? Not that this is an elegant solution though. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > -- Ian > > > > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: > > > > > > Author: cy > > > Date: Fri Oct 16 14:04:16 2015 > > > New Revision: 289421 > > > URL: https://svnweb.freebsd.org/changeset/base/289421 > > > > > > Log: > > > Add default leap-seconds file. This should help ntp networks get > > > the > > > leap second date correct > > > > > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ > > > or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > > > > Suggested by: dwmalone > > > Reviewed by: roberto, dwmalone, delphij > > > Approved by: roberto > > > MFC after: 1 week > > > > > > Added: > > > head/etc/ntp/ > > > head/etc/ntp/Makefile (contents, props changed) > > > head/etc/ntp/leap-seconds (contents, props changed) > > > Modified: > > > head/etc/Makefile > > > head/etc/mtree/BSD.var.dist > > > head/etc/ntp.conf > > > > > > Modified: head/etc/Makefile > > > =================================================================== > > > =========== > > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r2894 > > > 20) > > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r2894 > > > 21) > > > @@ -240,6 +240,9 @@ distribution: > > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > > +.if ${MK_NTP} != "no" > > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > > +.endif > > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > > .if ${MK_PKGBOOTSTRAP} != "no" > > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > > > > > > Modified: head/etc/mtree/BSD.var.dist > > > =================================================================== > > > =========== > > > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 > > > (r289420) > > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 > > > (r289421) > > > @@ -46,6 +46,8 @@ > > > .. > > > ipf mode=0700 > > > .. > > > + ntp mode=0700 > > > + .. > > > pkg > > > .. > > > ports > > > > > > Modified: head/etc/ntp.conf > > > =================================================================== > > > =========== > > > --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r2894 > > > 20) > > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r2894 > > > 21) > > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > > # > > > #server 127.127.1.0 > > > #fudge 127.127.1.0 stratum 10 > > > + > > > +# See > > > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14 > > > . > > > +# for documentation regarding leapfile. Updates to the file can be > > > obtained > > > +# from ftp://time.nist.gov/pub/ or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > +leapfile "/etc/ntp/leap-seconds" > > > > > > Added: head/etc/ntp/Makefile > > > =================================================================== > > > =========== > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 (r > > > 289421) > > > @@ -0,0 +1,10 @@ > > > +# $FreeBSD$ > > > + > > > +NO_OBJ= > > > + > > > +FILES= leap-seconds > > > + > > > +FILESDIR= /etc/ntp > > > +FILESMODE= 644 > > > + > > > +.include > > > > > > Added: head/etc/ntp/leap-seconds > > > =================================================================== > > > =========== > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 > > > (r289421) > > > @@ -0,0 +1,119 @@ > > > +# > > > +# $FreeBSD$ > > > +# > > > +# ATOMIC TIME. > > > +# The Coordinated Universal Time (UTC) is the reference > > > time scale derived > > > +# from The "Temps Atomique International" (TAI) calculated > > > by the Bureau > > > +# International des Poids et Mesures (BIPM) using a > > > worldwide network of atomic > > > +# clocks. UTC differs from TAI by an integer number of > > > seconds; it is the basis > > > +# of all activities in the world. > > > +# > > > +# > > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the > > > rate of rotation of the earth. > > > +# It is now mainly derived from Very Long Baseline > > > Interferometry (VLBI). The various > > > +# irregular fluctuations progressively detected in the > > > rotation rate of the Earth lead > > > +# in 1972 to the replacement of UT1 by UTC as the reference > > > time scale. > > > +# > > > +# > > > +# LEAP SECOND > > > +# Atomic clocks are more stable than the rate of the earth > > > rotatiob since the later > > > +# undergoes a full range of geophysical perturbations at > > > various time scales (lunisolar > > > +# and core-mantle torques,atmospheric and oceanic effetcs, > > > ...) > > > +# Leap seconds are needed to keep the two time scales in > > > agreement, i.e. UT1-UTC smaller > > > +# than 0.9 second. So, when necessary a "leap second" is > > > introduced in UTC. > > > +# Since the adoption of this system in 1972 it has been > > > necessary to add 26 seconds to UTC, > > > +# firstly due to the initial choice of the value of the > > > second (1/86400 mean solar day of > > > +# the year 1820) and secondly to the general slowing down > > > of the Earth's rotation. It is > > > +# theorically possible to have a negative leap second (a > > > second removed from UTC), but so far, > > > +# all leap seconds have been positive (a second has been > > > added to UTC). Based on what we know about the earth's rotation, > > > +# it is unlikely that we will ever have a negative leap > > > second. > > > +# > > > +# > > > +# HISTORY > > > +# The first leap second was added on June 30, 1972. Until > > > 2000, it was necessary in average to add a leap second at a rate > > > +# of 1 to 2 years. Since 2000, due to the fact that the > > > earth rate of rotation is accelerating, leap seconds are introduced > > > +# with an average frequency of 3 to 4 years. > > > +# > > > +# > > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND > > > IN UTC > > > +# The decision to introduce a leap second in UTC is the > > > responsibility of the Earth Orientation Center of > > > +# the International Earth Rotation and reference System > > > Service (IERS). This center is located at Paris > > > +# Observatory. According to international agreements, leap > > > second date have to occur at fixed date : > > > +# first preference is given to the end of December and > > > June, and second preference at the end of March > > > +# and September. Since the system was introduced in 1972, > > > only dates in June and December were used. > > > +# > > > +# Questions or comments to: > > > +# Daniel Gambis, daniel.gambis@obspm.fr > > > +# Christian Bizouard: > > > christian.bizouard@obspm.fr > > > +# Earth orientation Center of the IERS > > > +# Paris Observatory, France > > > +# > > > +# > > > +# > > > +# VALIDITY OF THE FILE > > > +# It is important to express the validity of the file. > > > These next two dates are > > > +# given in units of seconds since 1900.0. > > > +# > > > +# 1) Last update of the file. > > > +# > > > +# Updated through IERS Bulletin C ( > > > ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > > +# > > > +# The following line shows the last update of this file in > > > NTP timestamp: > > > +# > > > +#$ 3645216000 > > > +# > > > +# 2) Expiration date of the file given on a semi-annual > > > basis: last June or last December > > > +# > > > +# File expires on 28 December 2015 > > > +# > > > +# Expire date in NTP timestamp: > > > +# > > > +#@ 3660249600 > > > +# > > > +# > > > +# LIST OF LEAP SECONDS > > > +# NTP timestamp (X parameter) is the number of seconds > > > since 1900.0 > > > +# > > > +# MJD: The Modified Julian Day number. MJD = X/86400 + > > > 15020 > > > +# > > > +# DTAI: The difference DTAI= TAI-UTC in units of seconds > > > +# It is the quantity to add to UTC to get the time in TAI > > > +# > > > +# Day Month Year : epoch in clear > > > +# > > > +#NTP Time DTAI Day Month Year > > > +# > > > +2272060800 10 # 1 Jan 1972 > > > +2287785600 11 # 1 Jul 1972 > > > +2303683200 12 # 1 Jan 1973 > > > +2335219200 13 # 1 Jan 1974 > > > +2366755200 14 # 1 Jan 1975 > > > +2398291200 15 # 1 Jan 1976 > > > +2429913600 16 # 1 Jan 1977 > > > +2461449600 17 # 1 Jan 1978 > > > +2492985600 18 # 1 Jan 1979 > > > +2524521600 19 # 1 Jan 1980 > > > +2571782400 20 # 1 Jul 1981 > > > +2603318400 21 # 1 Jul 1982 > > > +2634854400 22 # 1 Jul 1983 > > > +2698012800 23 # 1 Jul 1985 > > > +2776982400 24 # 1 Jan 1988 > > > +2840140800 25 # 1 Jan 1990 > > > +2871676800 26 # 1 Jan 1991 > > > +2918937600 27 # 1 Jul 1992 > > > +2950473600 28 # 1 Jul 1993 > > > +2982009600 29 # 1 Jul 1994 > > > +3029443200 30 # 1 Jan 1996 > > > +3076704000 31 # 1 Jul 1997 > > > +3124137600 32 # 1 Jan 1999 > > > +3345062400 33 # 1 Jan 2006 > > > +3439756800 34 # 1 Jan 2009 > > > +3550089600 35 # 1 Jul 2012 > > > +3644697600 36 # 1 Jul 2015 > > > +# > > > +# In order to verify the integrity of this file, a hash > > > code > > > +# has been generated. For more information how to use > > > +# this hash code, please consult the README file under the > > > +# 'sha' repertory. > > > +# > > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > > > > > > From owner-svn-src-all@freebsd.org Sun Oct 18 02:00:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A61C2A109FD; Sun, 18 Oct 2015 02:00:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C68D666; Sun, 18 Oct 2015 02:00:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ndGiZFetKT2vondGjZcPgL; Sat, 17 Oct 2015 20:00:18 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=5lJygRwiOn0A:10 a=7Qk2ozbKAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=_9h_t3xh06Rghkjd1bkA:9 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id AF862A06E; Sat, 17 Oct 2015 19:00:16 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9I20G3g061874; Sat, 17 Oct 2015 19:00:16 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510180200.t9I20G3g061874@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Warner Losh cc: David Malone , Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Warner Losh of "Sat, 17 Oct 2015 17:44:35 -0600." <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 17 Oct 2015 19:00:16 -0700 X-CMAE-Envelope: MS4wfF1/ro5ZvBdOsWGHUyXv4Ooa3aip5ab3fnvcAlguPBvMWWrj4Q13pFsN01eA1KKZsJyTSh1/+6MmXNGe0HzX3rwuaOdTz2VsyfHR5Qt8enF6Y33hrP0cRqfMHYaQT+L2jpGS8dF9R1XkKUk6rIyqNf0E/u3kEQhEliwByROY2v4sxcYHDQ8bvtsz1cpFjDZYp98Bnc9toRyU0+S/FtKYBDcjPgyfbIHCbyJsepv2yBRbT8Tl8hPrySEO2pMT3ql/hV4lDfUJAQlGZhDRMhmma26hJt8qSWV1tV6AiFHNHUVCEZbQMy4ZRu7BiW9+lj7KI9b/iETQ2hl0EqshiPxYgJQBq/ce1GLSFNni01fPOLwe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 02:00:25 -0000 In message <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com>, Warner Losh writes: > > On Oct 17, 2015, at 3:20 PM, David Malone = > wrote: > >=20 > > On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: > >> If the leapseconds file is present, the leap bits for reference > >> clocks and downstratum servers are ignored. > >>=20 > >> I can't determine from casual code examination (and I don't have time > >> to experiment now) whether that is true even if the file is expired. > >=20 > > The way the code seems to work is: > >=20 > > 1) Take a vote from your peers on if there is an upcoming > > leap second. Refclocks can outvote other peers. (This is > > in ntp_proto.c:clock_update() - search for leap_vote_ins). > > Assuming no bugs, yes. And assuming your peers are sending > the correct information. History with ntpd and ntp serves well > illustrates that these assumptions are violated often. > > > 2) If one seems to be pending, try to insert it into an > > in-memory table for the end of the month. > > NTP only recognizes June and December as valid leap insertion > points. This is likely safe for the foreseeable future though, even > though the official standard allows leap seconds to be the end of > any month. Too many things assume you only have leap seconds > at these times for IERS to issue one that isn=E2=80=99t at the end of = > December > or June until earth rotation forces their hand sometime around the > end of this century (give or take a few decades). > > > 3) If you find that you loaded a table and the leapsecond > > you are trying to insert is within the valid range of the > > table, return an error. (This is in ntp_leapsec.c:leapsec_add()) > >=20 > > So, I think the change should be safe, if the comments match the code. > > That=E2=80=99s a big if. Both Ian and I have witnessed the carnage of = > incorrect > leap seconds first hand and so are somewhat touchy on the subject. It > is a place where getting the canonical information is 1000x better than > relying on code to implement things that can=E2=80=99t go wrong. Because = > they > often do. Way way too often. When you have leap second info, always > always always try extra hard to make sure it is as up to date as you > can get it. Any =E2=80=9Cshort cut=E2=80=9D here is asking for trouble, = > even if you think > you can prove that no such trouble is possible. Would an rc.conf option to use an alternate ntp.conf be of help? Having said that (and shooting down my own idea), it does seem a bit messy and rather inelegant though. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Oct 18 03:09:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98ED5A108B1; Sun, 18 Oct 2015 03:09:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6385BBA6; Sun, 18 Oct 2015 03:09:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I393LN091884; Sun, 18 Oct 2015 03:09:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I393Bd091883; Sun, 18 Oct 2015 03:09:03 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510180309.t9I393Bd091883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 18 Oct 2015 03:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289480 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 03:09:04 -0000 Author: cy Date: Sun Oct 18 03:09:03 2015 New Revision: 289480 URL: https://svnweb.freebsd.org/changeset/base/289480 Log: Really fix ipfilter bug 3600459. Obtained from: ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4 MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Sun Oct 18 01:30:23 2015 (r289479) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Sun Oct 18 03:09:03 2015 (r289480) @@ -3650,7 +3650,6 @@ ipf_state_del(softc, is, why) if (is->is_ref > 0) { int refs; - is->is_ref--; refs = is->is_ref; MUTEX_EXIT(&is->is_lock); if (!orphan) @@ -3667,7 +3666,7 @@ ipf_state_del(softc, is, why) } } - is->is_ref = 0; + ASSERT(is->is_ref == 0); MUTEX_EXIT(&is->is_lock); if (is->is_tqehead[0] != NULL) { From owner-svn-src-all@freebsd.org Sun Oct 18 04:07:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BBBBA0F6FA; Sun, 18 Oct 2015 04:07:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08FE6B1F; Sun, 18 Oct 2015 04:07:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I47fI6009247; Sun, 18 Oct 2015 04:07:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I47f97009246; Sun, 18 Oct 2015 04:07:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180407.t9I47f97009246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 04:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289481 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 04:07:42 -0000 Author: ngie Date: Sun Oct 18 04:07:40 2015 New Revision: 289481 URL: https://svnweb.freebsd.org/changeset/base/289481 Log: Only enable -fstack-protector-strong on gcc 4.9+ and default to -fstack-protector when -fstack-protector-strong is not available, like it was implicitly before r288669 As noted by antoine@, devel/gcc (which is 4.8.5) lacks -fstack-protector-strong support, whereas 4.8.4i (devel/gcc48) has the support. Until a version is available which has -fstack-protector-strong support, be conservative and only enable support with 4.9+. Reviewed by: pfg X-MFC with: r288669, r289465 Differential Revision: https://reviews.freebsd.org/D3924 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Oct 18 03:09:03 2015 (r289480) +++ head/share/mk/bsd.sys.mk Sun Oct 18 04:07:40 2015 (r289481) @@ -150,11 +150,13 @@ CXXFLAGS.clang+= -Wno-c++11-extensions ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" .if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ (${COMPILER_TYPE} == "gcc" && \ - (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800)) + (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong -CFLAGS+= ${SSP_CFLAGS} +.else +SSP_CFLAGS?= -fstack-protector .endif +CFLAGS+= ${SSP_CFLAGS} .endif # SSP && !ARM && !MIPS # Allow user-specified additional warning flags, plus compiler specific flag overrides. From owner-svn-src-all@freebsd.org Sun Oct 18 04:50:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81458A0FFB2; Sun, 18 Oct 2015 04:50:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4722CCA9; Sun, 18 Oct 2015 04:50:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I4opaa020812; Sun, 18 Oct 2015 04:50:51 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I4opQ5020811; Sun, 18 Oct 2015 04:50:51 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510180450.t9I4opQ5020811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 18 Oct 2015 04:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289482 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 04:50:52 -0000 Author: sbruno Date: Sun Oct 18 04:50:51 2015 New Revision: 289482 URL: https://svnweb.freebsd.org/changeset/base/289482 Log: Correctly use the default values for location of MAC addrs of arge0, arge1, ath0. woo! Reviewed by: adrian Modified: head/sys/mips/conf/TP-MR3020.hints Modified: head/sys/mips/conf/TP-MR3020.hints ============================================================================== --- head/sys/mips/conf/TP-MR3020.hints Sun Oct 18 04:07:40 2015 (r289481) +++ head/sys/mips/conf/TP-MR3020.hints Sun Oct 18 04:50:51 2015 (r289482) @@ -26,18 +26,18 @@ hint.arswitch.0.is_gmii=1 # arge1 <-> sw # arge0 - MII, autoneg, phy(4) hint.arge.0.phymask=0x10 # PHY4 hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus +hint.arge.0.eeprommac=0x1fff0000 # arge1 - GMII, 1000/full hint.arge.1.phymask=0x0 # No directly mapped PHYs hint.arge.1.media=1000 hint.arge.1.fduplex=1 +hint.arge.1.eeprommac=0x1fff0006 # Where the ART is - last 64k in the flash # 0x9fff1000 ? -hint.ath.0.eepromaddr=0x1fff1000 +hint.ath.0.eepromaddr=0x1fff0000 hint.ath.0.eepromsize=16384 - -hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 # The board 4MiB flash layout in uboot env: # From owner-svn-src-all@freebsd.org Sun Oct 18 05:50:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 614D4A186B6; Sun, 18 Oct 2015 05:50:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13506147F; Sun, 18 Oct 2015 05:50:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I5nxXL038082; Sun, 18 Oct 2015 05:49:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I5nw5r038077; Sun, 18 Oct 2015 05:49:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180549.t9I5nw5r038077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 05:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289487 - in head: bin/dd bin/dd/tests contrib/netbsd-tests/bin/dd etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 05:50:00 -0000 Author: ngie Date: Sun Oct 18 05:49:58 2015 New Revision: 289487 URL: https://svnweb.freebsd.org/changeset/base/289487 Log: Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as bin/dd/tests Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used in validating the characters read from /dev/zero MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/bin/dd/tests/ - copied from r289485, user/ngie/more-tests2/bin/dd/tests/ Modified: head/bin/dd/Makefile head/bin/dd/tests/Makefile head/contrib/netbsd-tests/bin/dd/t_dd.sh head/etc/mtree/BSD.tests.dist Directory Properties: head/ (props changed) Modified: head/bin/dd/Makefile ============================================================================== --- head/bin/dd/Makefile Sun Oct 18 05:36:05 2015 (r289486) +++ head/bin/dd/Makefile Sun Oct 18 05:49:58 2015 (r289487) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= dd SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c @@ -24,4 +26,8 @@ test: ${PROG} gen .endfor @rm -f gen +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/bin/dd/tests/Makefile ============================================================================== --- user/ngie/more-tests2/bin/dd/tests/Makefile Sun Oct 18 05:29:49 2015 (r289485) +++ head/bin/dd/tests/Makefile Sun Oct 18 05:49:58 2015 (r289487) @@ -1,6 +1,6 @@ # $FreeBSD$ -NETBSD_ATF_TESTS_SH= dd +NETBSD_ATF_TESTS_SH= dd_test .include Modified: head/contrib/netbsd-tests/bin/dd/t_dd.sh ============================================================================== --- head/contrib/netbsd-tests/bin/dd/t_dd.sh Sun Oct 18 05:36:05 2015 (r289486) +++ head/contrib/netbsd-tests/bin/dd/t_dd.sh Sun Oct 18 05:49:58 2015 (r289487) @@ -44,6 +44,12 @@ length_head() { "the one expected to fail. (NetBSD PR bin/8521)" } length_body() { + # Begin FreeBSD + if ! df /dev/fd | grep -q '^fdescfs'; then + atf_skip "fdescfs is not mounted on /dev/fd" + fi + # End FreeBSD + test_dd_length 512 \ "dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >/dev/null 2>/dev/null" test_dd_length 512 \ Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Oct 18 05:36:05 2015 (r289486) +++ head/etc/mtree/BSD.tests.dist Sun Oct 18 05:49:58 2015 (r289487) @@ -12,6 +12,8 @@ .. date .. + dd + .. expr .. ls From owner-svn-src-all@freebsd.org Sun Oct 18 05:51:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DC7BA187B1; Sun, 18 Oct 2015 05:51:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05B9918B5; Sun, 18 Oct 2015 05:51:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I5pj56038797; Sun, 18 Oct 2015 05:51:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I5pj8j038796; Sun, 18 Oct 2015 05:51:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180551.t9I5pj8j038796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 05:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289488 - head/bin/test/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 05:51:46 -0000 Author: ngie Date: Sun Oct 18 05:51:44 2015 New Revision: 289488 URL: https://svnweb.freebsd.org/changeset/base/289488 Log: Clean up trailing whitespace MFC after: 3 days Modified: head/bin/test/tests/legacy_test.sh Modified: head/bin/test/tests/legacy_test.sh ============================================================================== --- head/bin/test/tests/legacy_test.sh Sun Oct 18 05:49:58 2015 (r289487) +++ head/bin/test/tests/legacy_test.sh Sun Oct 18 05:51:44 2015 (r289488) @@ -2,7 +2,7 @@ #- # Copyright (c) June 1996 Wolfram Schneider . Berlin. -# All rights reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ # $FreeBSD$ # force a specified test program, e.g. `env test=/bin/test sh regress.sh' -: ${test=test} +: ${test=test} t () { @@ -54,13 +54,13 @@ t () count=0 echo "1..130" -t 0 'b = b' -t 0 'b == b' -t 1 'b != b' -t 0 '\( b = b \)' -t 0 '\( b == b \)' -t 1 '! \( b = b \)' -t 1 '! \( b == b \)' +t 0 'b = b' +t 0 'b == b' +t 1 'b != b' +t 0 '\( b = b \)' +t 0 '\( b == b \)' +t 1 '! \( b = b \)' +t 1 '! \( b == b \)' t 1 '! -f /etc/passwd' t 0 '-h = -h' From owner-svn-src-all@freebsd.org Sun Oct 18 06:53:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70614A18E88; Sun, 18 Oct 2015 06:53:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 367B1D3F; Sun, 18 Oct 2015 06:53:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I6rVKN058209; Sun, 18 Oct 2015 06:53:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I6rVdH058208; Sun, 18 Oct 2015 06:53:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510180653.t9I6rVdH058208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 06:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289489 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 06:53:32 -0000 Author: mav Date: Sun Oct 18 06:53:31 2015 New Revision: 289489 URL: https://svnweb.freebsd.org/changeset/base/289489 Log: MFC r289136: Remove lock upgrade attempt from ctl_be_block_open_file(). I am not sure what for it was done. Now open routine should automatically fall back to read-only if open for writing is impossible. In such case attempt to upgrade to write sounds strange. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sun Oct 18 05:51:44 2015 (r289488) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sun Oct 18 06:53:31 2015 (r289489) @@ -1843,21 +1843,6 @@ ctl_be_block_open_file(struct ctl_be_blo return (error); } - /* - * Verify that we have the ability to upgrade to exclusive - * access on this file so we can trap errors at open instead - * of reporting them during first access. - */ - if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) { - vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY); - if (be_lun->vn->v_iflag & VI_DOOMED) { - error = EBADF; - snprintf(req->error_str, sizeof(req->error_str), - "error locking file %s", be_lun->dev_path); - return (error); - } - } - file_data->cred = crhold(curthread->td_ucred); if (params->lun_size_bytes != 0) be_lun->size_bytes = params->lun_size_bytes; From owner-svn-src-all@freebsd.org Sun Oct 18 07:19:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF46A18214; Sun, 18 Oct 2015 07:19:51 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with ESMTP id 0D8D16E9; Sun, 18 Oct 2015 07:19:49 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (localhost [127.0.0.1]) by salmon.maths.tcd.ie (Postfix) with ESMTP id EEE931591E5; Sun, 18 Oct 2015 08:19:40 +0100 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maths.tcd.ie; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:message-id:subject:subject :from:from:date:date:received:received:received; s=20150418; t= 1445152775; x=1446967176; bh=YZf6/QWxAnMmf3JWNQn3XJAjvMc5sbwCask ljYm5Vd8=; b=u+sYxrY4SQ+2ZQ4GYp6mf/SUqhGy/j5H6FEtg5HVkld9ZFyDqbh fhN6Z8CZn6uQqR+BoV7J6df5aF7w/XrJ6QfAHQJeWRyZ/YEjVC8/EJxA8yKS0ho9 Zf4fxQFihgTAMegKLFORyHuxpPSuEMCBjstrRkkLwirM848/ffSlEUFg= X-Virus-Scanned: amavisd-new at maths.tcd.ie Received: from salmon.maths.tcd.ie ([127.0.0.1]) by salmon.maths.tcd.ie (salmon.maths.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YQAvwxGhuuc1; Sun, 18 Oct 2015 08:19:35 +0100 (IST) Received: from walton.maths.tcd.ie (walton.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510a]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 01F151591E1; Sun, 18 Oct 2015 08:19:35 +0100 (IST) Received: by walton.maths.tcd.ie (Postfix, from userid 238) id AF6CC730AA; Sun, 18 Oct 2015 08:19:34 +0100 (IST) Date: Sun, 18 Oct 2015 08:19:34 +0100 From: David Malone To: Warner Losh Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Message-ID: <20151018071934.GA95077@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> <20151017212033.GA43955@walton.maths.tcd.ie> <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 07:19:51 -0000 Hi Warner, I was trying to check Ian's specific concern, that a valid source of leap seconds might be ignored if a expired leapseconds file was present. It seems that this is not the case, at lease based on my reading of the code and comments. I included the references to the code, so others could check if they wanted. I actually suggested configuring the leapseconds file by default to try and improve the vagueries of accepting advertised leap seconds that you mentioned. > NTP only recognizes June and December as valid leap insertion > points. Interestingly, this code seems to be gone from ntp_loopfilter.c and based on a quick look through the rest of the code, I can't see a similar general check. Some of the refclocks do retain this condition, but the general code path doesn't seem to. Possibly we should take this up with the NTP guys as a check worth retaining? David. From owner-svn-src-all@freebsd.org Sun Oct 18 07:26:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E44DEA183BC; Sun, 18 Oct 2015 07:26:12 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with ESMTP id 94C97C0D; Sun, 18 Oct 2015 07:26:12 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (localhost [127.0.0.1]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 9B7B31591E5; Sun, 18 Oct 2015 08:26:11 +0100 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maths.tcd.ie; h= user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:content-type:mime-version :references:message-id:subject:subject:from:from:date:date :received:received:received; s=20150418; t=1445153165; x= 1446967566; bh=Vu1Qlda7JxP1m4kNqFd8QjFjJtN89hERSLZSgqriy4A=; b=u uZIk9PDnTvJIs5S+ZgOJ3TBCClwScotUEN8ZxbTZP5dxNCnh8x5dYfVARvKmSlh0 tYxe0nglDXe4tJFcyPOLBb4M8zIP3i+L2GucePkL1dtvKZXlkq4QaHZwG+i8IQMZ Ixzer+QZvXJW3DNA0Cwgn4Hr2FkGCSOCs/kPGfvOn8= X-Virus-Scanned: amavisd-new at maths.tcd.ie Received: from salmon.maths.tcd.ie ([127.0.0.1]) by salmon.maths.tcd.ie (salmon.maths.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GoD9cSFJ1aF6; Sun, 18 Oct 2015 08:26:05 +0100 (IST) Received: from walton.maths.tcd.ie (walton.maths.tcd.ie [134.226.81.10]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 95E801591E1; Sun, 18 Oct 2015 08:26:05 +0100 (IST) Received: by walton.maths.tcd.ie (Postfix, from userid 238) id 18B20730AA; Sun, 18 Oct 2015 08:26:04 +0100 (IST) Date: Sun, 18 Oct 2015 08:26:04 +0100 From: David Malone To: Warner Losh Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Message-ID: <20151018072604.GB95077@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> <1445109956.71631.44.camel@freebsd.org> <95712496-46C7-4F1F-B267-F25E4924E3B4@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <95712496-46C7-4F1F-B267-F25E4924E3B4@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 07:26:13 -0000 On Sat, Oct 17, 2015 at 05:48:19PM -0600, Warner Losh wrote: > It should be very easy to try to fetch it once a day in June and December > until you succeed from each of the URLs in a list, with the default > list being the two canonical (for the US at least) sources. Shouldn’t > be more than a dozen lines in a periodic script. We probably also want to avoid trying to fetch an update at the same moment from a bunch of time synchronised machines. A random sleep might be enough, but we should be careful about setting automatic updates that fetch things from infrastructure other than our own. David. From owner-svn-src-all@freebsd.org Sun Oct 18 07:30:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16C43A18497; Sun, 18 Oct 2015 07:30:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4EACE0A; Sun, 18 Oct 2015 07:30:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I7UpmU067070; Sun, 18 Oct 2015 07:30:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I7Uoro067061; Sun, 18 Oct 2015 07:30:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180730.t9I7Uoro067061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 07:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289490 - in head: bin/ps lib/libxo lib/libxo/tests lib/libxo/tests/encoder sbin/savecore share/mk usr.bin/iscsictl usr.bin/wc usr.bin/xo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 07:30:52 -0000 Author: ngie Date: Sun Oct 18 07:30:50 2015 New Revision: 289490 URL: https://svnweb.freebsd.org/changeset/base/289490 Log: Make libxo depend on libutil because it uses humanize_number after r287111 Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division Modified: head/bin/ps/Makefile head/lib/libxo/Makefile head/lib/libxo/tests/Makefile head/lib/libxo/tests/encoder/Makefile head/sbin/savecore/Makefile head/share/mk/src.libnames.mk head/usr.bin/iscsictl/Makefile head/usr.bin/wc/Makefile head/usr.bin/xo/Makefile Directory Properties: head/ (props changed) head/sbin/ (props changed) head/share/ (props changed) Modified: head/bin/ps/Makefile ============================================================================== --- head/bin/ps/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/bin/ps/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -11,6 +11,6 @@ SRCS= fmt.c keyword.c nlist.c print.c ps # on large systems. # CFLAGS+=-DLAZY_PS -LIBADD= m kvm jail xo util +LIBADD= m kvm jail xo .include Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/lib/libxo/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -19,6 +19,8 @@ CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo INCS= xo.h xo_encoder.h INCSDIR=${INCLUDEDIR}/libxo +LIBADD= util + WARNS?= 5 MAN+= libxo.3 Modified: head/lib/libxo/tests/Makefile ============================================================================== --- head/lib/libxo/tests/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/lib/libxo/tests/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -242,8 +242,7 @@ PROGS+= test_11 CFLAGS+= -I${LIBXOSRC}/libxo -DPADD= ${LIBXO} ${LIBUTIL} -LDADD= -lxo -lutil +LIBADD= xo SUBDIR+= encoder Modified: head/lib/libxo/tests/encoder/Makefile ============================================================================== --- head/lib/libxo/tests/encoder/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/lib/libxo/tests/encoder/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -14,7 +14,6 @@ SRCS= enc_test.c CFLAGS+= -I${LIBXOSRC}/libxo -DPADD+= ${LIBXO} -LDADD+= -lxo +LIBADD= xo .include Modified: head/sbin/savecore/Makefile ============================================================================== --- head/sbin/savecore/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/sbin/savecore/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= savecore -LIBADD= z xo util +LIBADD= z xo MAN= savecore.8 .include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sun Oct 18 06:53:31 2015 (r289489) +++ head/share/mk/src.libnames.mk Sun Oct 18 07:30:50 2015 (r289490) @@ -239,6 +239,7 @@ _DP_vmmapi= util _DP_ctf= z _DP_proc= rtld_db util _DP_dtrace= rtld_db pthread +_DP_xo= util # Define spacial cases LDADD_supcplusplus= -lsupc++ Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/usr.bin/iscsictl/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -6,7 +6,7 @@ CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi MAN= iscsi.conf.5 iscsictl.8 -LIBADD= xo util +LIBADD= xo YFLAGS+= -v LFLAGS+= -i Modified: head/usr.bin/wc/Makefile ============================================================================== --- head/usr.bin/wc/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/usr.bin/wc/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -2,6 +2,6 @@ # $FreeBSD$ PROG= wc -LIBADD= xo util +LIBADD= xo .include Modified: head/usr.bin/xo/Makefile ============================================================================== --- head/usr.bin/xo/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/usr.bin/xo/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -12,7 +12,7 @@ MAN= xo.1 # XXX For xoversion.h CFLAGS+=-I${LIBXOSRC}/libxo -LIBADD= xo util +LIBADD= xo .if ${MK_TESTS} != "no" SUBDIR+= tests From owner-svn-src-all@freebsd.org Sun Oct 18 08:08:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ED02A18C3B; Sun, 18 Oct 2015 08:08:38 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52E66E92; Sun, 18 Oct 2015 08:08:38 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I88bHL078514; Sun, 18 Oct 2015 08:08:37 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I88b2B078513; Sun, 18 Oct 2015 08:08:37 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201510180808.t9I88b2B078513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 18 Oct 2015 08:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289492 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 08:08:38 -0000 Author: jmg Date: Sun Oct 18 08:08:37 2015 New Revision: 289492 URL: https://svnweb.freebsd.org/changeset/base/289492 Log: page sized is not spelled 4096 on all arches... Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Oct 18 07:33:44 2015 (r289491) +++ head/sys/sys/mbuf.h Sun Oct 18 08:08:37 2015 (r289492) @@ -344,7 +344,7 @@ struct mbuf { */ #define EXT_CLUSTER 1 /* mbuf cluster */ #define EXT_SFBUF 2 /* sendfile(2)'s sf_bufs */ -#define EXT_JUMBOP 3 /* jumbo cluster 4096 bytes */ +#define EXT_JUMBOP 3 /* jumbo cluster page sized */ #define EXT_JUMBO9 4 /* jumbo cluster 9216 bytes */ #define EXT_JUMBO16 5 /* jumbo cluster 16184 bytes */ #define EXT_PACKET 6 /* mbuf+cluster from packet zone */ From owner-svn-src-all@freebsd.org Sun Oct 18 08:12:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 850CCA18D13; Sun, 18 Oct 2015 08:12:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4774C1B9; Sun, 18 Oct 2015 08:12:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I8C6aP080394; Sun, 18 Oct 2015 08:12:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I8C535080389; Sun, 18 Oct 2015 08:12:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510180812.t9I8C535080389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 08:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289493 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 08:12:07 -0000 Author: mav Date: Sun Oct 18 08:12:05 2015 New Revision: 289493 URL: https://svnweb.freebsd.org/changeset/base/289493 Log: 5745 zfs set allows only one dataset property to be set at a time Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Bayard Bell Reviewed by: Richard PALO Reviewed by: Steven Hartland Approved by: Rich Lowe Author: Chris Williamson illumos/illumos-gate@30925561c223021e91d15899cbe75f80e54d8889 Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_util.c vendor/illumos/dist/man/man1m/zfs.1m Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 08:12:05 2015 (r289493) @@ -265,7 +265,7 @@ get_usage(zfs_help_t idx) "\n" "\tsend [-nvPe] -t \n")); case HELP_SET: - return (gettext("\tset " + return (gettext("\tset ... " " ...\n")); case HELP_SHARE: return (gettext("\tshare <-a | filesystem>\n")); @@ -480,15 +480,18 @@ usage(boolean_t requested) exit(requested ? 0 : 2); } +/* + * Take a property=value argument string and add it to the given nvlist. + * Modifies the argument inplace. + */ static int -parseprop(nvlist_t *props) +parseprop(nvlist_t *props, char *propname) { - char *propname = optarg; char *propval, *strval; if ((propval = strchr(propname, '=')) == NULL) { (void) fprintf(stderr, gettext("missing " - "'=' for -o option\n")); + "'=' for property=value argument\n")); return (-1); } *propval = '\0'; @@ -604,7 +607,7 @@ zfs_do_clone(int argc, char **argv) while ((c = getopt(argc, argv, "o:p")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg) != 0) return (1); break; case 'p': @@ -751,7 +754,7 @@ zfs_do_create(int argc, char **argv) nomem(); break; case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) goto error; break; case 's': @@ -3444,21 +3447,17 @@ out: } /* - * zfs set property=value { fs | snap | vol } ... + * zfs set property=value ... { fs | snap | vol } ... * - * Sets the given property for all datasets specified on the command line. + * Sets the given properties for all datasets specified on the command line. */ -typedef struct set_cbdata { - char *cb_propname; - char *cb_value; -} set_cbdata_t; static int set_callback(zfs_handle_t *zhp, void *data) { - set_cbdata_t *cbp = data; + nvlist_t *props = data; - if (zfs_prop_set(zhp, cbp->cb_propname, cbp->cb_value) != 0) { + if (zfs_prop_set_list(zhp, props) != 0) { switch (libzfs_errno(g_zfs)) { case EZFS_MOUNTFAILED: (void) fprintf(stderr, gettext("property may be set " @@ -3477,7 +3476,8 @@ set_callback(zfs_handle_t *zhp, void *da static int zfs_do_set(int argc, char **argv) { - set_cbdata_t cb; + nvlist_t *props = NULL; + int ds_start = -1; /* argv idx of first dataset arg */ int ret = 0; /* check for options */ @@ -3489,36 +3489,51 @@ zfs_do_set(int argc, char **argv) /* check number of arguments */ if (argc < 2) { - (void) fprintf(stderr, gettext("missing property=value " - "argument\n")); + (void) fprintf(stderr, gettext("missing arguments\n")); usage(B_FALSE); } if (argc < 3) { - (void) fprintf(stderr, gettext("missing dataset name\n")); + if (strchr(argv[1], '=') == NULL) { + (void) fprintf(stderr, gettext("missing property=value " + "argument(s)\n")); + } else { + (void) fprintf(stderr, gettext("missing dataset " + "name(s)\n")); + } usage(B_FALSE); } - /* validate property=value argument */ - cb.cb_propname = argv[1]; - if (((cb.cb_value = strchr(cb.cb_propname, '=')) == NULL) || - (cb.cb_value[1] == '\0')) { - (void) fprintf(stderr, gettext("missing value in " - "property=value argument\n")); + /* validate argument order: prop=val args followed by dataset args */ + for (int i = 1; i < argc; i++) { + if (strchr(argv[i], '=') != NULL) { + if (ds_start > 0) { + /* out-of-order prop=val argument */ + (void) fprintf(stderr, gettext("invalid " + "argument order\n"), i); + usage(B_FALSE); + } + } else if (ds_start < 0) { + ds_start = i; + } + } + if (ds_start < 0) { + (void) fprintf(stderr, gettext("missing dataset name(s)\n")); usage(B_FALSE); } - *cb.cb_value = '\0'; - cb.cb_value++; - - if (*cb.cb_propname == '\0') { - (void) fprintf(stderr, - gettext("missing property in property=value argument\n")); - usage(B_FALSE); + /* Populate a list of property settings */ + if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) + nomem(); + for (int i = 1; i < ds_start; i++) { + if ((ret = parseprop(props, argv[i])) != 0) + goto error; } - ret = zfs_for_each(argc - 2, argv + 2, NULL, - ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); + ret = zfs_for_each(argc - ds_start, argv + ds_start, 0, + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, props); +error: + nvlist_free(props); return (ret); } @@ -3578,7 +3593,7 @@ zfs_do_snapshot(int argc, char **argv) while ((c = getopt(argc, argv, "ro:")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) return (1); break; case 'r': Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 08:12:05 2015 (r289493) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. @@ -425,6 +425,7 @@ extern nvlist_t *zfs_valid_proplist(libz extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); +extern int zfs_prop_set_list(zfs_handle_t *, nvlist_t *); extern int zfs_prop_get(zfs_handle_t *, zfs_prop_t, char *, size_t, zprop_source_t *, char *, size_t, boolean_t); extern int zfs_prop_get_recvd(zfs_handle_t *, const char *, char *, size_t, Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 08:12:05 2015 (r289493) @@ -1499,15 +1499,10 @@ zfs_setprop_error(libzfs_handle_t *hdl, int zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval) { - zfs_cmd_t zc = { 0 }; int ret = -1; - prop_changelist_t *cl = NULL; char errbuf[1024]; libzfs_handle_t *hdl = zhp->zfs_hdl; - nvlist_t *nvl = NULL, *realprops; - zfs_prop_t prop; - boolean_t do_prefix = B_TRUE; - int added_resv; + nvlist_t *nvl = NULL; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), @@ -1519,65 +1514,133 @@ zfs_prop_set(zfs_handle_t *zhp, const ch goto error; } - if ((realprops = zfs_valid_proplist(hdl, zhp->zfs_type, nvl, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) - goto error; + ret = zfs_prop_set_list(zhp, nvl); +error: nvlist_free(nvl); - nvl = realprops; + return (ret); +} - prop = zfs_name_to_prop(propname); - if (prop == ZFS_PROP_VOLSIZE) { - if ((added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) - goto error; - } - if ((cl = changelist_gather(zhp, prop, 0, 0)) == NULL) - goto error; +/* + * Given an nvlist of property names and values, set the properties for the + * given dataset. + */ +int +zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props) +{ + zfs_cmd_t zc = { 0 }; + int ret = -1; + prop_changelist_t **cls = NULL; + int cl_idx; + char errbuf[1024]; + libzfs_handle_t *hdl = zhp->zfs_hdl; + nvlist_t *nvl; + int nvl_len; + int added_resv; - if (prop == ZFS_PROP_MOUNTPOINT && changelist_haszonedchild(cl)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "child dataset with inherited mountpoint is used " - "in a non-global zone")); - ret = zfs_error(hdl, EZFS_ZONED, errbuf); + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), + zhp->zfs_name); + + if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) goto error; - } /* - * We don't want to unmount & remount the dataset when changing - * its canmount property to 'on' or 'noauto'. We only use - * the changelist logic to unmount when setting canmount=off. - */ - if (prop == ZFS_PROP_CANMOUNT) { - uint64_t idx; - int err = zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET); - if (err == 0 && idx != ZFS_CANMOUNT_OFF) - do_prefix = B_FALSE; + * We have to check for any extra properties which need to be added + * before computing the length of the nvlist. + */ + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + if (zfs_name_to_prop(nvpair_name(elem)) == ZFS_PROP_VOLSIZE && + (added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) { + goto error; + } } - - if (do_prefix && (ret = changelist_prefix(cl)) != 0) + /* + * Check how many properties we're setting and allocate an array to + * store changelist pointers for postfix(). + */ + nvl_len = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) + nvl_len++; + if ((cls = calloc(nvl_len, sizeof (prop_changelist_t *))) == NULL) goto error; + cl_idx = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + + assert(cl_idx < nvl_len); + /* + * We don't want to unmount & remount the dataset when changing + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. + */ + if (!(prop == ZFS_PROP_CANMOUNT && + fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) { + cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); + if (cls[cl_idx] == NULL) + goto error; + } + + if (prop == ZFS_PROP_MOUNTPOINT && + changelist_haszonedchild(cls[cl_idx])) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "child dataset with inherited mountpoint is used " + "in a non-global zone")); + ret = zfs_error(hdl, EZFS_ZONED, errbuf); + goto error; + } + + if (cls[cl_idx] != NULL && + (ret = changelist_prefix(cls[cl_idx])) != 0) + goto error; + + cl_idx++; + } + assert(cl_idx == nvl_len); + /* - * Execute the corresponding ioctl() to set this property. + * Execute the corresponding ioctl() to set this list of properties. */ (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); - if (zcmd_write_src_nvlist(hdl, &zc, nvl) != 0) + if ((ret = zcmd_write_src_nvlist(hdl, &zc, nvl)) != 0 || + (ret = zcmd_alloc_dst_nvlist(hdl, &zc, 0)) != 0) goto error; ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); if (ret != 0) { - zfs_setprop_error(hdl, prop, errno, errbuf); + /* Get the list of unset properties back and report them. */ + nvlist_t *errorprops = NULL; + if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0) + goto error; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + zfs_setprop_error(hdl, prop, errno, errbuf); + } + nvlist_free(errorprops); + if (added_resv && errno == ENOSPC) { /* clean up the volsize property we tried to set */ uint64_t old_volsize = zfs_prop_get_int(zhp, ZFS_PROP_VOLSIZE); nvlist_free(nvl); + nvl = NULL; zcmd_free_nvlists(&zc); + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0) goto error; if (nvlist_add_uint64(nvl, @@ -1589,8 +1652,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch (void) zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); } } else { - if (do_prefix) - ret = changelist_postfix(cl); + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) { + int clp_err = changelist_postfix(cls[cl_idx]); + if (clp_err != 0) + ret = clp_err; + } + } /* * Refresh the statistics so the new property value @@ -1603,8 +1671,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch error: nvlist_free(nvl); zcmd_free_nvlists(&zc); - if (cl) - changelist_free(cl); + if (cls != NULL) { + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) + changelist_free(cls[cl_idx]); + } + free(cls); + } return (ret); } @@ -4110,7 +4183,7 @@ zfs_smb_acl_mgmt(libzfs_handle_t *hdl, c if (cmd == ZFS_SMB_ACL_RENAME) { if (nvlist_alloc(&nvlist, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); - return (NULL); + return (0); } } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_util.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_util.c Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_util.c Sun Oct 18 08:12:05 2015 (r289493) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ /* @@ -739,8 +739,9 @@ zcmd_alloc_dst_nvlist(libzfs_handle_t *h if (len == 0) len = 16 * 1024; zc->zc_nvlist_dst_size = len; - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == NULL) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -755,9 +756,9 @@ int zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc) { free((void *)(uintptr_t)zc->zc_nvlist_dst); - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) - == NULL) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -772,6 +773,9 @@ zcmd_free_nvlists(zfs_cmd_t *zc) free((void *)(uintptr_t)zc->zc_nvlist_conf); free((void *)(uintptr_t)zc->zc_nvlist_src); free((void *)(uintptr_t)zc->zc_nvlist_dst); + zc->zc_nvlist_conf = NULL; + zc->zc_nvlist_src = NULL; + zc->zc_nvlist_dst = NULL; } static int Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/man/man1m/zfs.1m Sun Oct 18 08:12:05 2015 (r289493) @@ -22,7 +22,7 @@ .\" .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 2011 Joshua M. Clulow -.\" Copyright (c) 2014 by Delphix. All rights reserved. +.\" Copyright (c) 2011, 2014 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2014 by Adam Stevko. All rights reserved. @@ -107,7 +107,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR... +\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR... .fi .LP @@ -2385,19 +2385,19 @@ For example, specifying \fB-t snapshot\f .sp .ne 2 .na -\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR +\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR[ \fIproperty\fR=\fIvalue\fR]... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR...\fR .ad .sp .6 .RS 4n -Sets the property to the given value for each dataset. Only some properties can -be edited. See the "Properties" section for more information on what properties -can be set and acceptable values. Numeric values can be specified as exact -values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR, -\fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes, -gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User -properties can be set on snapshots. For more information, see the "User -Properties" section. +Sets the property or list of properties to the given value(s) for each dataset. +Only some properties can be edited. See the "Properties" section for more +information on what properties can be set and acceptable values. Numeric values +can be specified as exact values, or in a human-readable form with a suffix of +\fBB\fR, \fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for +bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or +zettabytes, respectively). User properties can be set on snapshots. For more +information, see the "User Properties" section. .RE .sp From owner-svn-src-all@freebsd.org Sun Oct 18 08:13:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBAFDA18D58; Sun, 18 Oct 2015 08:13:52 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96D2636F; Sun, 18 Oct 2015 08:13:52 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I8DpcP080509; Sun, 18 Oct 2015 08:13:51 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I8DpuX080506; Sun, 18 Oct 2015 08:13:51 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201510180813.t9I8DpuX080506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 18 Oct 2015 08:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289494 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 08:13:53 -0000 Author: jmg Date: Sun Oct 18 08:13:51 2015 New Revision: 289494 URL: https://svnweb.freebsd.org/changeset/base/289494 Log: drop a bunch of white space at end of lines and end of files... -x -wb apparently doesn't hide end of file white space changes.. This is to reduce the amount of diff for my PCIe HP changes.. Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_if.m Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Sun Oct 18 08:12:05 2015 (r289493) +++ head/sys/dev/pci/pci.c Sun Oct 18 08:13:51 2015 (r289494) @@ -535,7 +535,7 @@ pci_romsize(uint64_t testval) } return (ln2size); } - + /* return log2 of address range supported by map register */ static int @@ -1706,7 +1706,7 @@ pci_remap_msix_method(device_t dev, devi free(used, M_DEVBUF); return (EINVAL); } - + /* Make sure none of the resources are allocated. */ for (i = 0; i < msix->msix_table_len; i++) { if (msix->msix_table[i].mte_vector == 0) @@ -2003,7 +2003,7 @@ pci_remap_intr_method(device_t bus, devi struct msix_table_entry *mte; struct msix_vector *mv; uint64_t addr; - uint32_t data; + uint32_t data; int error, i, j; /* @@ -4830,7 +4830,7 @@ pci_deactivate_resource(device_t dev, de if (error) return (error); - /* Disable decoding for device ROMs. */ + /* Disable decoding for device ROMs. */ if (device_get_parent(child) == dev) { dinfo = device_get_ivars(child); if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid)) Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sun Oct 18 08:12:05 2015 (r289493) +++ head/sys/dev/pci/pci_pci.c Sun Oct 18 08:13:51 2015 (r289494) @@ -57,7 +57,7 @@ static int pcib_resume(device_t dev); static int pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate); static uint16_t pcib_ari_get_rid(device_t pcib, device_t dev); -static uint32_t pcib_read_config(device_t dev, u_int b, u_int s, +static uint32_t pcib_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width); static void pcib_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, uint32_t val, int width); @@ -266,7 +266,7 @@ pcib_add_window_resources(struct pcib_wi free(w->res, M_DEVBUF); w->res = newarray; w->count += count; - + for (i = 0; i < count; i++) { error = rman_manage_region(&w->rman, rman_get_start(res[i]), rman_get_end(res[i])); @@ -783,7 +783,7 @@ pcib_get_mem_decode(struct pcib_softc *s sc->pmembase = PCI_PPBMEMBASE(0, pmemlow); pmemlow = pci_read_config(dev, PCIR_PMLIMITL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) + if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) sc->pmemlimit = PCI_PPBMEMLIMIT( pci_read_config(dev, PCIR_PMLIMITH_1, 4), pmemlow); else @@ -1126,7 +1126,7 @@ int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct pcib_softc *sc = device_get_softc(dev); - + switch (which) { case PCIB_IVAR_DOMAIN: *result = sc->domain; @@ -1243,9 +1243,9 @@ pcib_alloc_new_window(struct pcib_softc return (0); } } - return (ENOSPC); + return (ENOSPC); } - + wmask = (1ul << w->step) - 1; if (RF_ALIGNMENT(flags) < w->step) { flags &= ~RF_ALIGNMENT_MASK; @@ -1337,7 +1337,7 @@ pcib_expand_window(struct pcib_softc *sc KASSERT(w->base == rman_get_start(res), ("existing resource mismatch")); force_64k_base = 0; - } + } error = bus_adjust_resource(sc->dev, type, res, force_64k_base ? rman_get_start(res) : base, limit); @@ -1657,7 +1657,7 @@ pcib_release_resource(device_t dev, devi * is set up to, or capable of handling them. */ struct resource * -pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, +pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { struct pcib_softc *sc = device_get_softc(dev); @@ -1928,7 +1928,7 @@ pcib_route_interrupt(device_t pcib, devi int parent_intpin; int intnum; - /* + /* * * The PCI standard defines a swizzle of the child-side device/intpin to * the parent-side intpin as follows. @@ -2116,4 +2116,3 @@ pcib_try_enable_ari(device_t pcib, devic return (0); } - Modified: head/sys/dev/pci/pcib_if.m ============================================================================== --- head/sys/dev/pci/pcib_if.m Sun Oct 18 08:12:05 2015 (r289493) +++ head/sys/dev/pci/pcib_if.m Sun Oct 18 08:13:51 2015 (r289494) @@ -97,7 +97,7 @@ METHOD void write_config { }; # -# Route an interrupt. Returns a value suitable for stuffing into +# Route an interrupt. Returns a value suitable for stuffing into # a device's interrupt register. # METHOD int route_interrupt { @@ -206,4 +206,3 @@ METHOD void decode_rid { int *slot; int *func; } DEFAULT pcib_decode_rid; - From owner-svn-src-all@freebsd.org Sun Oct 18 09:33:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1765FA16001; Sun, 18 Oct 2015 09:33:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9ACA1C04; Sun, 18 Oct 2015 09:33:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I9XS8Z004708; Sun, 18 Oct 2015 09:33:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I9XSCX004707; Sun, 18 Oct 2015 09:33:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510180933.t9I9XSCX004707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Oct 2015 09:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289496 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 09:33:30 -0000 Author: kib Date: Sun Oct 18 09:33:28 2015 New Revision: 289496 URL: https://svnweb.freebsd.org/changeset/base/289496 Log: Only marker is guaranteed to be present on the queue after the relock in vm_pageout_fallback_object_lock() and vm_pageout_page_lock(). The check for the m->queue == queue assumes that the page does belong to a queue. Modify the 'unchanged' calculation bu dereferencing the marker tailq pointers, which is known to belong to the queue. Since for a page m linked to the queue, m->queue must be equal to the queue index, assert this instead of checking. In collaboration with: alc Sponsored by: The FreeBSD Foundation (kib) MFC after: 2 weeks Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Oct 18 09:02:17 2015 (r289495) +++ head/sys/vm/vm_pageout.c Sun Oct 18 09:33:28 2015 (r289496) @@ -292,11 +292,21 @@ vm_pageout_fallback_object_lock(vm_page_ vm_page_lock(m); vm_pagequeue_lock(pq); - /* Page queue might have changed. */ + /* + * The page's object might have changed, and/or the page might + * have moved from its original position in the queue. If the + * page's object has changed, then the caller should abandon + * processing the page because the wrong object lock was + * acquired. Use the marker's plinks.q, not the page's, to + * determine if the page has been moved. The state of the + * page's plinks.q can be indeterminate; whereas, the marker's + * plinks.q must be valid. + */ *next = TAILQ_NEXT(&marker, plinks.q); - unchanged = (m->queue == queue && - m->object == object && - &marker == TAILQ_NEXT(m, plinks.q)); + unchanged = m->object == object && + m == TAILQ_PREV(&marker, pglist, plinks.q); + KASSERT(!unchanged || m->queue == queue, + ("page %p queue %d %d", m, queue, m->queue)); TAILQ_REMOVE(&pq->pq_pl, &marker, plinks.q); return (unchanged); } @@ -333,7 +343,9 @@ vm_pageout_page_lock(vm_page_t m, vm_pag /* Page queue might have changed. */ *next = TAILQ_NEXT(&marker, plinks.q); - unchanged = (m->queue == queue && &marker == TAILQ_NEXT(m, plinks.q)); + unchanged = m == TAILQ_PREV(&marker, pglist, plinks.q); + KASSERT(!unchanged || m->queue == queue, + ("page %p queue %d %d", m, queue, m->queue)); TAILQ_REMOVE(&pq->pq_pl, &marker, plinks.q); return (unchanged); } From owner-svn-src-all@freebsd.org Sun Oct 18 09:46:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E28D7A16330; Sun, 18 Oct 2015 09:46:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CABDD2; Sun, 18 Oct 2015 09:46:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9I9k2rk089809 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 18 Oct 2015 12:46:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9I9k2rk089809 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9I9k2Yp089802; Sun, 18 Oct 2015 12:46:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Oct 2015 12:46:02 +0300 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289477 - head/sys/arm/mv Message-ID: <20151018094602.GF2257@kib.kiev.ua> References: <201510180103.t9I13h0w056671@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510180103.t9I13h0w056671@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 09:46:09 -0000 On Sun, Oct 18, 2015 at 01:03:43AM +0000, Ian Lepore wrote: > Author: ian > Date: Sun Oct 18 01:03:43 2015 > New Revision: 289477 > URL: https://svnweb.freebsd.org/changeset/base/289477 > > Log: > Fix a strange macro re-definition compile error. If the VM_MAXUSER_ADDRESS > value is defined as a config option the definition is emitted into > opt_global.h which is force-included into everything. In addition, the > symbol is emitted by the genassym mechanism, but that by its nature reduces > the value to a 0xnnnnnnnn number. When compiling a .S file you end up > with two different definitions of the macro (they evaluate to the same > number, but the text is different, upsetting the compiler). > > Nothing has changed about this code for a while but the compile error is > new, so this must be fallout from the clang 3.7 update or something. > > Modified: > head/sys/arm/mv/std-pj4b.mv > > Modified: head/sys/arm/mv/std-pj4b.mv > ============================================================================== > --- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015 (r289476) > +++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015 (r289477) > @@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B > machine arm armv6 > makeoptions CONF_CFLAGS="-march=armv7a" > > -options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" > +# This was originally defined as "(KERNBASE-(1024*1024*1024))" but that > +# (in opt_global.h) clashed with the value emitted by genassym which > +# reduces the original macro text to its numeric value. The only way > +# to avoid that is to define it here as the numeric value genassym emits. > +options VM_MAXUSER_ADDRESS="0x80000000" Genassym started to generate VM_MAXUSER_ADDRESS after r289372. Strange that I did not saw the error. Why does marvell need this override ? From owner-svn-src-all@freebsd.org Sun Oct 18 11:21:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26B1CA18AE6; Sun, 18 Oct 2015 11:21:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2210BC6; Sun, 18 Oct 2015 11:21:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IBL9oF035431; Sun, 18 Oct 2015 11:21:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBL8Gi035425; Sun, 18 Oct 2015 11:21:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181121.t9IBL8Gi035425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289497 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 11:21:10 -0000 Author: mav Date: Sun Oct 18 11:21:08 2015 New Revision: 289497 URL: https://svnweb.freebsd.org/changeset/base/289497 Log: MFV r289493: 5745 zfs set allows only one dataset property to be set at a time Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Bayard Bell Reviewed by: Richard PALO Reviewed by: Steven Hartland Approved by: Rich Lowe Author: Chris Williamson illumos/illumos-gate@30925561c223021e91d15899cbe75f80e54d8889 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Oct 18 11:21:08 2015 (r289497) @@ -18,7 +18,7 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright (c) 2014 by Delphix. All rights reserved. +.\" Copyright (c) 2011, 2014 by Delphix. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery @@ -117,7 +117,7 @@ .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set -.Ar property Ns = Ns Ar value +.Ar property Ns = Ns Ar value Oc ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get @@ -2121,14 +2121,14 @@ option, but sorts by property in descend .It Xo .Nm .Cm set -.Ar property Ns = Ns Ar value +.Ar property Ns = Ns Ar value Oc ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc .Pp -Sets the property to the given value for each dataset. Only some properties can -be edited. See the "Properties" section for more information on what properties -can be set and acceptable values. Numeric values can be specified as exact -values, or in a human-readable form with a suffix of +Sets the property or list of properties to the given value(s) for each dataset. +Only some properties can be edited. See the "Properties" section for more +information on what properties can be set and acceptable values. Numeric values +can be specified as exact values, or in a human-readable form with a suffix of .Sy B , K , M , G , T , P , E , Z (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User properties can be set on snapshots. For more Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:21:08 2015 (r289497) @@ -283,7 +283,7 @@ get_usage(zfs_help_t idx) "\n" "\tsend [-nvPe] -t \n")); case HELP_SET: - return (gettext("\tset " + return (gettext("\tset ... " " ...\n")); case HELP_SHARE: return (gettext("\tshare <-a | filesystem>\n")); @@ -498,6 +498,10 @@ usage(boolean_t requested) exit(requested ? 0 : 2); } +/* + * Take a property=value argument string and add it to the given nvlist. + * Modifies the argument inplace. + */ static int parseprop(nvlist_t *props, char *propname) { @@ -505,7 +509,7 @@ parseprop(nvlist_t *props, char *propnam if ((propval = strchr(propname, '=')) == NULL) { (void) fprintf(stderr, gettext("missing " - "'=' for -o option\n")); + "'=' for property=value argument\n")); return (-1); } *propval = '\0'; @@ -632,7 +636,7 @@ zfs_do_clone(int argc, char **argv) while ((c = getopt(argc, argv, "o:p")) != -1) { switch (c) { case 'o': - if (parseprop(props, optarg)) + if (parseprop(props, optarg) != 0) return (1); break; case 'p': @@ -3532,21 +3536,17 @@ out: } /* - * zfs set property=value { fs | snap | vol } ... + * zfs set property=value ... { fs | snap | vol } ... * - * Sets the given property for all datasets specified on the command line. + * Sets the given properties for all datasets specified on the command line. */ -typedef struct set_cbdata { - char *cb_propname; - char *cb_value; -} set_cbdata_t; static int set_callback(zfs_handle_t *zhp, void *data) { - set_cbdata_t *cbp = data; + nvlist_t *props = data; - if (zfs_prop_set(zhp, cbp->cb_propname, cbp->cb_value) != 0) { + if (zfs_prop_set_list(zhp, props) != 0) { switch (libzfs_errno(g_zfs)) { case EZFS_MOUNTFAILED: (void) fprintf(stderr, gettext("property may be set " @@ -3565,7 +3565,8 @@ set_callback(zfs_handle_t *zhp, void *da static int zfs_do_set(int argc, char **argv) { - set_cbdata_t cb; + nvlist_t *props = NULL; + int ds_start = -1; /* argv idx of first dataset arg */ int ret = 0; /* check for options */ @@ -3577,36 +3578,51 @@ zfs_do_set(int argc, char **argv) /* check number of arguments */ if (argc < 2) { - (void) fprintf(stderr, gettext("missing property=value " - "argument\n")); + (void) fprintf(stderr, gettext("missing arguments\n")); usage(B_FALSE); } if (argc < 3) { - (void) fprintf(stderr, gettext("missing dataset name\n")); + if (strchr(argv[1], '=') == NULL) { + (void) fprintf(stderr, gettext("missing property=value " + "argument(s)\n")); + } else { + (void) fprintf(stderr, gettext("missing dataset " + "name(s)\n")); + } usage(B_FALSE); } - /* validate property=value argument */ - cb.cb_propname = argv[1]; - if (((cb.cb_value = strchr(cb.cb_propname, '=')) == NULL) || - (cb.cb_value[1] == '\0')) { - (void) fprintf(stderr, gettext("missing value in " - "property=value argument\n")); + /* validate argument order: prop=val args followed by dataset args */ + for (int i = 1; i < argc; i++) { + if (strchr(argv[i], '=') != NULL) { + if (ds_start > 0) { + /* out-of-order prop=val argument */ + (void) fprintf(stderr, gettext("invalid " + "argument order\n"), i); + usage(B_FALSE); + } + } else if (ds_start < 0) { + ds_start = i; + } + } + if (ds_start < 0) { + (void) fprintf(stderr, gettext("missing dataset name(s)\n")); usage(B_FALSE); } - *cb.cb_value = '\0'; - cb.cb_value++; - - if (*cb.cb_propname == '\0') { - (void) fprintf(stderr, - gettext("missing property in property=value argument\n")); - usage(B_FALSE); + /* Populate a list of property settings */ + if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) + nomem(); + for (int i = 1; i < ds_start; i++) { + if ((ret = parseprop(props, argv[i])) != 0) + goto error; } - ret = zfs_for_each(argc - 2, argv + 2, 0, - ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); + ret = zfs_for_each(argc - ds_start, argv + ds_start, 0, + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, props); +error: + nvlist_free(props); return (ret); } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 11:21:08 2015 (r289497) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -430,6 +430,7 @@ extern nvlist_t *zfs_valid_proplist(libz extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); +extern int zfs_prop_set_list(zfs_handle_t *, nvlist_t *); extern int zfs_prop_get(zfs_handle_t *, zfs_prop_t, char *, size_t, zprop_source_t *, char *, size_t, boolean_t); extern int zfs_prop_get_recvd(zfs_handle_t *, const char *, char *, size_t, Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:21:08 2015 (r289497) @@ -1534,15 +1534,10 @@ zfs_setprop_error(libzfs_handle_t *hdl, int zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval) { - zfs_cmd_t zc = { 0 }; int ret = -1; - prop_changelist_t *cl = NULL; char errbuf[1024]; libzfs_handle_t *hdl = zhp->zfs_hdl; - nvlist_t *nvl = NULL, *realprops; - zfs_prop_t prop; - boolean_t do_prefix = B_TRUE; - int added_resv; + nvlist_t *nvl = NULL; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), @@ -1554,79 +1549,148 @@ zfs_prop_set(zfs_handle_t *zhp, const ch goto error; } - if ((realprops = zfs_valid_proplist(hdl, zhp->zfs_type, nvl, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) - goto error; + ret = zfs_prop_set_list(zhp, nvl); +error: nvlist_free(nvl); - nvl = realprops; + return (ret); +} - prop = zfs_name_to_prop(propname); - /* We don't support those properties on FreeBSD. */ - switch (prop) { - case ZFS_PROP_DEVICES: - case ZFS_PROP_ISCSIOPTIONS: - case ZFS_PROP_XATTR: - case ZFS_PROP_VSCAN: - case ZFS_PROP_NBMAND: - case ZFS_PROP_MLSLABEL: - (void) snprintf(errbuf, sizeof (errbuf), - "property '%s' not supported on FreeBSD", propname); - ret = zfs_error(hdl, EZFS_PERM, errbuf); - goto error; - } - if (prop == ZFS_PROP_VOLSIZE) { - if ((added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) - goto error; - } +/* + * Given an nvlist of property names and values, set the properties for the + * given dataset. + */ +int +zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props) +{ + zfs_cmd_t zc = { 0 }; + int ret = -1; + prop_changelist_t **cls = NULL; + int cl_idx; + char errbuf[1024]; + libzfs_handle_t *hdl = zhp->zfs_hdl; + nvlist_t *nvl; + int nvl_len; + int added_resv; - if ((cl = changelist_gather(zhp, prop, 0, 0)) == NULL) - goto error; + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), + zhp->zfs_name); - if (prop == ZFS_PROP_MOUNTPOINT && changelist_haszonedchild(cl)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "child dataset with inherited mountpoint is used " - "in a non-global zone")); - ret = zfs_error(hdl, EZFS_ZONED, errbuf); + if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) goto error; - } /* - * We don't want to unmount & remount the dataset when changing - * its canmount property to 'on' or 'noauto'. We only use - * the changelist logic to unmount when setting canmount=off. - */ - if (prop == ZFS_PROP_CANMOUNT) { - uint64_t idx; - int err = zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET); - if (err == 0 && idx != ZFS_CANMOUNT_OFF) - do_prefix = B_FALSE; + * We have to check for any extra properties which need to be added + * before computing the length of the nvlist. + */ + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + if (zfs_name_to_prop(nvpair_name(elem)) == ZFS_PROP_VOLSIZE && + (added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) { + goto error; + } } - - if (do_prefix && (ret = changelist_prefix(cl)) != 0) + /* + * Check how many properties we're setting and allocate an array to + * store changelist pointers for postfix(). + */ + nvl_len = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) + nvl_len++; + if ((cls = calloc(nvl_len, sizeof (prop_changelist_t *))) == NULL) goto error; + cl_idx = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + + assert(cl_idx < nvl_len); + /* + * We don't want to unmount & remount the dataset when changing + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. + */ + if (!(prop == ZFS_PROP_CANMOUNT && + fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) { + cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); + if (cls[cl_idx] == NULL) + goto error; + } + + if (prop == ZFS_PROP_MOUNTPOINT && + changelist_haszonedchild(cls[cl_idx])) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "child dataset with inherited mountpoint is used " + "in a non-global zone")); + ret = zfs_error(hdl, EZFS_ZONED, errbuf); + goto error; + } + + /* We don't support those properties on FreeBSD. */ + switch (prop) { + case ZFS_PROP_DEVICES: + case ZFS_PROP_ISCSIOPTIONS: + case ZFS_PROP_XATTR: + case ZFS_PROP_VSCAN: + case ZFS_PROP_NBMAND: + case ZFS_PROP_MLSLABEL: + (void) snprintf(errbuf, sizeof (errbuf), + "property '%s' not supported on FreeBSD", + nvpair_name(elem)); + ret = zfs_error(hdl, EZFS_PERM, errbuf); + goto error; + } + + if (cls[cl_idx] != NULL && + (ret = changelist_prefix(cls[cl_idx])) != 0) + goto error; + + cl_idx++; + } + assert(cl_idx == nvl_len); + /* - * Execute the corresponding ioctl() to set this property. + * Execute the corresponding ioctl() to set this list of properties. */ (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); - if (zcmd_write_src_nvlist(hdl, &zc, nvl) != 0) + if ((ret = zcmd_write_src_nvlist(hdl, &zc, nvl)) != 0 || + (ret = zcmd_alloc_dst_nvlist(hdl, &zc, 0)) != 0) goto error; ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); if (ret != 0) { - zfs_setprop_error(hdl, prop, errno, errbuf); + /* Get the list of unset properties back and report them. */ + nvlist_t *errorprops = NULL; + if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0) + goto error; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + zfs_setprop_error(hdl, prop, errno, errbuf); + } + nvlist_free(errorprops); + if (added_resv && errno == ENOSPC) { /* clean up the volsize property we tried to set */ uint64_t old_volsize = zfs_prop_get_int(zhp, ZFS_PROP_VOLSIZE); nvlist_free(nvl); + nvl = NULL; zcmd_free_nvlists(&zc); + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0) goto error; if (nvlist_add_uint64(nvl, @@ -1638,8 +1702,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch (void) zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); } } else { - if (do_prefix) - ret = changelist_postfix(cl); + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) { + int clp_err = changelist_postfix(cls[cl_idx]); + if (clp_err != 0) + ret = clp_err; + } + } /* * Refresh the statistics so the new property value @@ -1652,8 +1721,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch error: nvlist_free(nvl); zcmd_free_nvlists(&zc); - if (cl) - changelist_free(cl); + if (cls != NULL) { + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) + changelist_free(cls[cl_idx]); + } + free(cls); + } return (ret); } @@ -4203,7 +4277,7 @@ zfs_smb_acl_mgmt(libzfs_handle_t *hdl, c if (cmd == ZFS_SMB_ACL_RENAME) { if (nvlist_alloc(&nvlist, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); - return (NULL); + return (0); } } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Sun Oct 18 11:21:08 2015 (r289497) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ /* @@ -782,8 +782,9 @@ zcmd_alloc_dst_nvlist(libzfs_handle_t *h if (len == 0) len = 16 * 1024; zc->zc_nvlist_dst_size = len; - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == 0) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -798,9 +799,9 @@ int zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc) { free((void *)(uintptr_t)zc->zc_nvlist_dst); - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) - == 0) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -815,6 +816,9 @@ zcmd_free_nvlists(zfs_cmd_t *zc) free((void *)(uintptr_t)zc->zc_nvlist_conf); free((void *)(uintptr_t)zc->zc_nvlist_src); free((void *)(uintptr_t)zc->zc_nvlist_dst); + zc->zc_nvlist_conf = NULL; + zc->zc_nvlist_src = NULL; + zc->zc_nvlist_dst = NULL; } static int From owner-svn-src-all@freebsd.org Sun Oct 18 11:24:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79EC8A18BE7; Sun, 18 Oct 2015 11:24:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38981EC4; Sun, 18 Oct 2015 11:24:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IBNxWe037487; Sun, 18 Oct 2015 11:23:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBNxoS037483; Sun, 18 Oct 2015 11:23:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181123.t9IBNxoS037483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289498 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 11:24:00 -0000 Author: mav Date: Sun Oct 18 11:23:58 2015 New Revision: 289498 URL: https://svnweb.freebsd.org/changeset/base/289498 Log: 6298 zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Approved by: Robert Mustacchi Author: Joe Stein illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88 Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 11:23:58 2015 (r289498) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -809,7 +809,6 @@ zfs_do_create(int argc, char **argv) goto error; spa_version = zpool_get_prop_int(zpool_handle, ZPOOL_PROP_VERSION, NULL); - zpool_close(zpool_handle); if (spa_version >= SPA_VERSION_REFRESERVATION) resv_prop = ZFS_PROP_REFRESERVATION; else @@ -818,8 +817,11 @@ zfs_do_create(int argc, char **argv) (void) snprintf(msg, sizeof (msg), gettext("cannot create '%s'"), argv[0]); if (props && (real_props = zfs_valid_proplist(g_zfs, type, - props, 0, NULL, msg)) == NULL) + props, 0, NULL, zpool_handle, msg)) == NULL) { + zpool_close(zpool_handle); goto error; + } + zpool_close(zpool_handle); volsize = zvol_volsize_to_reservation(volsize, real_props); nvlist_free(real_props); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 11:23:58 2015 (r289498) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. @@ -421,7 +421,7 @@ extern const char *zfs_prop_column_name( extern boolean_t zfs_prop_align_right(zfs_prop_t); extern nvlist_t *zfs_valid_proplist(libzfs_handle_t *, zfs_type_t, - nvlist_t *, uint64_t, zfs_handle_t *, const char *); + nvlist_t *, uint64_t, zfs_handle_t *, zpool_handle_t *, const char *); extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:23:58 2015 (r289498) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -858,7 +858,8 @@ zfs_which_resv_prop(zfs_handle_t *zhp, z */ nvlist_t * zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl, - uint64_t zoned, zfs_handle_t *zhp, const char *errbuf) + uint64_t zoned, zfs_handle_t *zhp, zpool_handle_t *zpool_hdl, + const char *errbuf) { nvpair_t *elem; uint64_t intval; @@ -1052,8 +1053,8 @@ zfs_valid_proplist(libzfs_handle_t *hdl, case ZFS_PROP_RECORDSIZE: { int maxbs = SPA_MAXBLOCKSIZE; - if (zhp != NULL) { - maxbs = zpool_get_prop_int(zhp->zpool_hdl, + if (zpool_hdl != NULL) { + maxbs = zpool_get_prop_int(zpool_hdl, ZPOOL_PROP_MAXBLOCKSIZE, NULL); } /* @@ -1545,7 +1546,8 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl zhp->zfs_name); if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, zhp->zpool_hdl, + errbuf)) == NULL) goto error; /* @@ -3181,9 +3183,23 @@ zfs_create(libzfs_handle_t *hdl, const c else ost = DMU_OST_ZFS; + /* open zpool handle for prop validation */ + char pool_path[MAXNAMELEN]; + (void) strlcpy(pool_path, path, sizeof (pool_path)); + + /* truncate pool_path at first slash */ + char *p = strchr(pool_path, '/'); + if (p != NULL) + *p = '\0'; + + zpool_handle_t *zpool_handle = zpool_open(hdl, pool_path); + if (props && (props = zfs_valid_proplist(hdl, type, props, - zoned, NULL, errbuf)) == 0) + zoned, NULL, zpool_handle, errbuf)) == 0) { + zpool_close(zpool_handle); return (-1); + } + zpool_close(zpool_handle); if (type == ZFS_TYPE_VOLUME) { /* @@ -3251,13 +3267,6 @@ zfs_create(libzfs_handle_t *hdl, const c "parent '%s' is not a filesystem"), parent); return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); - case EDOM: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "volume block size must be power of 2 from " - "512B to 128KB")); - - return (zfs_error(hdl, EZFS_BADPROP, errbuf)); - case ENOTSUP: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "pool must be upgraded to set this " @@ -3452,7 +3461,7 @@ zfs_clone(zfs_handle_t *zhp, const char type = ZFS_TYPE_FILESYSTEM; } if ((props = zfs_valid_proplist(hdl, type, props, zoned, - zhp, errbuf)) == NULL) + zhp, zhp->zpool_hdl, errbuf)) == NULL) return (-1); } @@ -3596,11 +3605,23 @@ zfs_snapshot_nvl(libzfs_handle_t *hdl, n } } + /* + * get pool handle for prop validation. assumes all snaps are in the + * same pool, as does lzc_snapshot (below). + */ + char pool[MAXNAMELEN]; + elem = nvlist_next_nvpair(snaps, NULL); + (void) strlcpy(pool, nvpair_name(elem), sizeof (pool)); + pool[strcspn(pool, "/@")] = '\0'; + zpool_handle_t *zpool_hdl = zpool_open(hdl, pool); + if (props != NULL && (props = zfs_valid_proplist(hdl, ZFS_TYPE_SNAPSHOT, - props, B_FALSE, NULL, errbuf)) == NULL) { + props, B_FALSE, NULL, zpool_hdl, errbuf)) == NULL) { + zpool_close(zpool_hdl); return (-1); } + zpool_close(zpool_hdl); ret = lzc_snapshot(snaps, props, &errors); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:23:58 2015 (r289498) @@ -1131,8 +1131,8 @@ zpool_create(libzfs_handle_t *hdl, const zfs_prop_to_name(ZFS_PROP_ZONED), &zonestr) == 0) && strcmp(zonestr, "on") == 0); - if ((zc_fsprops = zfs_valid_proplist(hdl, - ZFS_TYPE_FILESYSTEM, fsprops, zoned, NULL, msg)) == NULL) { + if ((zc_fsprops = zfs_valid_proplist(hdl, ZFS_TYPE_FILESYSTEM, + fsprops, zoned, NULL, NULL, msg)) == NULL) { goto create_failed; } if (!zc_props && @@ -1168,6 +1168,21 @@ zpool_create(libzfs_handle_t *hdl, const "one or more vdevs refer to the same device")); return (zfs_error(hdl, EZFS_BADDEV, msg)); + case ERANGE: + /* + * This happens if the record size is smaller or larger + * than the allowed size range, or not a power of 2. + * + * NOTE: although zfs_valid_proplist is called earlier, + * this case may have slipped through since the + * pool does not exist yet and it is therefore + * impossible to read properties e.g. max blocksize + * from the pool. + */ + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "record size invalid")); + return (zfs_error(hdl, EZFS_BADPROP, msg)); + case EOVERFLOW: /* * This occurs when one of the devices is below From owner-svn-src-all@freebsd.org Sun Oct 18 11:36:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43816A18EB4; Sun, 18 Oct 2015 11:36:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 173A9365; Sun, 18 Oct 2015 11:36:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IBai5t040499; Sun, 18 Oct 2015 11:36:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBaheE040497; Sun, 18 Oct 2015 11:36:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181136.t9IBaheE040497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289499 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 11:36:45 -0000 Author: mav Date: Sun Oct 18 11:36:43 2015 New Revision: 289499 URL: https://svnweb.freebsd.org/changeset/base/289499 Log: MFV r247180: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 13967:92bec6d87f59 Illumos ZFS issues: 3557 dumpvp_size is not updated correctly when a dump zvol's size is changed 3558 setting the volsize on a dump device does not return back ENOSPC 3559 setting a volsize larger than the space available sometimes succeeds Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:23:58 2015 (r289498) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:36:43 2015 (r289499) @@ -845,10 +845,12 @@ zfs_do_create(int argc, char **argv) if (type == ZFS_TYPE_VOLUME && !noreserve) { zpool_handle_t *zpool_handle; + nvlist_t *real_props; uint64_t spa_version; char *p; zfs_prop_t resv_prop; char *strval; + char msg[1024]; if (p = strchr(argv[0], '/')) *p = '\0'; @@ -864,7 +866,15 @@ zfs_do_create(int argc, char **argv) resv_prop = ZFS_PROP_REFRESERVATION; else resv_prop = ZFS_PROP_RESERVATION; - volsize = zvol_volsize_to_reservation(volsize, props); + + (void) snprintf(msg, sizeof (msg), + gettext("cannot create '%s'"), argv[0]); + if (props && (real_props = zfs_valid_proplist(g_zfs, type, + props, 0, NULL, msg)) == NULL) + goto error; + + volsize = zvol_volsize_to_reservation(volsize, real_props); + nvlist_free(real_props); if (nvlist_lookup_string(props, zfs_prop_to_name(resv_prop), &strval) != 0) { Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:23:58 2015 (r289498) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:36:43 2015 (r289499) @@ -1403,6 +1403,7 @@ zfs_add_synthetic_resv(zfs_handle_t *zhp uint64_t old_reservation; uint64_t new_reservation; zfs_prop_t resv_prop; + nvlist_t *props; /* * If this is an existing volume, and someone is setting the volsize, @@ -1412,16 +1413,25 @@ zfs_add_synthetic_resv(zfs_handle_t *zhp if (zfs_which_resv_prop(zhp, &resv_prop) < 0) return (-1); old_reservation = zfs_prop_get_int(zhp, resv_prop); - if ((zvol_volsize_to_reservation(old_volsize, zhp->zfs_props) != - old_reservation) || nvlist_lookup_uint64(nvl, - zfs_prop_to_name(resv_prop), &new_reservation) != ENOENT) { + + props = fnvlist_alloc(); + fnvlist_add_uint64(props, zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), + zfs_prop_get_int(zhp, ZFS_PROP_VOLBLOCKSIZE)); + + if ((zvol_volsize_to_reservation(old_volsize, props) != + old_reservation) || nvlist_exists(nvl, + zfs_prop_to_name(resv_prop))) { + fnvlist_free(props); return (0); } if (nvlist_lookup_uint64(nvl, zfs_prop_to_name(ZFS_PROP_VOLSIZE), - &new_volsize) != 0) + &new_volsize) != 0) { + fnvlist_free(props); return (-1); - new_reservation = zvol_volsize_to_reservation(new_volsize, - zhp->zfs_props); + } + new_reservation = zvol_volsize_to_reservation(new_volsize, props); + fnvlist_free(props); + if (nvlist_add_uint64(nvl, zfs_prop_to_name(resv_prop), new_reservation) != 0) { (void) no_memory(zhp->zfs_hdl); From owner-svn-src-all@freebsd.org Sun Oct 18 11:44:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5076AA11154; Sun, 18 Oct 2015 11:44:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 286B6AF7; Sun, 18 Oct 2015 11:44:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IBiWbF043355; Sun, 18 Oct 2015 11:44:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBiVhW043350; Sun, 18 Oct 2015 11:44:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181144.t9IBiVhW043350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289500 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 11:44:33 -0000 Author: mav Date: Sun Oct 18 11:44:31 2015 New Revision: 289500 URL: https://svnweb.freebsd.org/changeset/base/289500 Log: MFC r289498: 6298 zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support. Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Approved by: Robert Mustacchi Author: Joe Stein illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:44:31 2015 (r289500) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . @@ -861,7 +861,6 @@ zfs_do_create(int argc, char **argv) goto error; spa_version = zpool_get_prop_int(zpool_handle, ZPOOL_PROP_VERSION, NULL); - zpool_close(zpool_handle); if (spa_version >= SPA_VERSION_REFRESERVATION) resv_prop = ZFS_PROP_REFRESERVATION; else @@ -870,8 +869,11 @@ zfs_do_create(int argc, char **argv) (void) snprintf(msg, sizeof (msg), gettext("cannot create '%s'"), argv[0]); if (props && (real_props = zfs_valid_proplist(g_zfs, type, - props, 0, NULL, msg)) == NULL) + props, 0, NULL, zpool_handle, msg)) == NULL) { + zpool_close(zpool_handle); goto error; + } + zpool_close(zpool_handle); volsize = zvol_volsize_to_reservation(volsize, real_props); nvlist_free(real_props); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 11:44:31 2015 (r289500) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -426,7 +426,7 @@ extern const char *zfs_prop_column_name( extern boolean_t zfs_prop_align_right(zfs_prop_t); extern nvlist_t *zfs_valid_proplist(libzfs_handle_t *, zfs_type_t, - nvlist_t *, uint64_t, zfs_handle_t *, const char *); + nvlist_t *, uint64_t, zfs_handle_t *, zpool_handle_t *, const char *); extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:44:31 2015 (r289500) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. @@ -890,7 +890,8 @@ zfs_which_resv_prop(zfs_handle_t *zhp, z */ nvlist_t * zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl, - uint64_t zoned, zfs_handle_t *zhp, const char *errbuf) + uint64_t zoned, zfs_handle_t *zhp, zpool_handle_t *zpool_hdl, + const char *errbuf) { nvpair_t *elem; uint64_t intval; @@ -1084,8 +1085,8 @@ zfs_valid_proplist(libzfs_handle_t *hdl, case ZFS_PROP_RECORDSIZE: { int maxbs = SPA_MAXBLOCKSIZE; - if (zhp != NULL) { - maxbs = zpool_get_prop_int(zhp->zpool_hdl, + if (zpool_hdl != NULL) { + maxbs = zpool_get_prop_int(zpool_hdl, ZPOOL_PROP_MAXBLOCKSIZE, NULL); } /* @@ -1590,7 +1591,8 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl zhp->zfs_name); if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, zhp->zpool_hdl, + errbuf)) == NULL) goto error; /* @@ -3254,9 +3256,23 @@ zfs_create(libzfs_handle_t *hdl, const c else ost = DMU_OST_ZFS; + /* open zpool handle for prop validation */ + char pool_path[MAXNAMELEN]; + (void) strlcpy(pool_path, path, sizeof (pool_path)); + + /* truncate pool_path at first slash */ + char *p = strchr(pool_path, '/'); + if (p != NULL) + *p = '\0'; + + zpool_handle_t *zpool_handle = zpool_open(hdl, pool_path); + if (props && (props = zfs_valid_proplist(hdl, type, props, - zoned, NULL, errbuf)) == 0) + zoned, NULL, zpool_handle, errbuf)) == 0) { + zpool_close(zpool_handle); return (-1); + } + zpool_close(zpool_handle); if (type == ZFS_TYPE_VOLUME) { /* @@ -3324,13 +3340,6 @@ zfs_create(libzfs_handle_t *hdl, const c "parent '%s' is not a filesystem"), parent); return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); - case EDOM: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "volume block size must be power of 2 from " - "512B to 128KB")); - - return (zfs_error(hdl, EZFS_BADPROP, errbuf)); - case ENOTSUP: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "pool must be upgraded to set this " @@ -3525,7 +3534,7 @@ zfs_clone(zfs_handle_t *zhp, const char type = ZFS_TYPE_FILESYSTEM; } if ((props = zfs_valid_proplist(hdl, type, props, zoned, - zhp, errbuf)) == NULL) + zhp, zhp->zpool_hdl, errbuf)) == NULL) return (-1); } @@ -3669,11 +3678,23 @@ zfs_snapshot_nvl(libzfs_handle_t *hdl, n } } + /* + * get pool handle for prop validation. assumes all snaps are in the + * same pool, as does lzc_snapshot (below). + */ + char pool[MAXNAMELEN]; + elem = nvlist_next_nvpair(snaps, NULL); + (void) strlcpy(pool, nvpair_name(elem), sizeof (pool)); + pool[strcspn(pool, "/@")] = '\0'; + zpool_handle_t *zpool_hdl = zpool_open(hdl, pool); + if (props != NULL && (props = zfs_valid_proplist(hdl, ZFS_TYPE_SNAPSHOT, - props, B_FALSE, NULL, errbuf)) == NULL) { + props, B_FALSE, NULL, zpool_hdl, errbuf)) == NULL) { + zpool_close(zpool_hdl); return (-1); } + zpool_close(zpool_hdl); ret = lzc_snapshot(snaps, props, &errors); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:44:31 2015 (r289500) @@ -1164,8 +1164,8 @@ zpool_create(libzfs_handle_t *hdl, const zfs_prop_to_name(ZFS_PROP_ZONED), &zonestr) == 0) && strcmp(zonestr, "on") == 0); - if ((zc_fsprops = zfs_valid_proplist(hdl, - ZFS_TYPE_FILESYSTEM, fsprops, zoned, NULL, msg)) == NULL) { + if ((zc_fsprops = zfs_valid_proplist(hdl, ZFS_TYPE_FILESYSTEM, + fsprops, zoned, NULL, NULL, msg)) == NULL) { goto create_failed; } if (!zc_props && @@ -1201,6 +1201,21 @@ zpool_create(libzfs_handle_t *hdl, const "one or more vdevs refer to the same device")); return (zfs_error(hdl, EZFS_BADDEV, msg)); + case ERANGE: + /* + * This happens if the record size is smaller or larger + * than the allowed size range, or not a power of 2. + * + * NOTE: although zfs_valid_proplist is called earlier, + * this case may have slipped through since the + * pool does not exist yet and it is therefore + * impossible to read properties e.g. max blocksize + * from the pool. + */ + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "record size invalid")); + return (zfs_error(hdl, EZFS_BADPROP, msg)); + case EOVERFLOW: /* * This occurs when one of the devices is below From owner-svn-src-all@freebsd.org Sun Oct 18 12:26:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D89B5A10287; Sun, 18 Oct 2015 12:26:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 861531C6F; Sun, 18 Oct 2015 12:26:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ICQPtC055011; Sun, 18 Oct 2015 12:26:25 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ICQPC6055010; Sun, 18 Oct 2015 12:26:25 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510181226.t9ICQPC6055010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 18 Oct 2015 12:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289501 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 12:26:26 -0000 Author: melifaro Date: Sun Oct 18 12:26:25 2015 New Revision: 289501 URL: https://svnweb.freebsd.org/changeset/base/289501 Log: Fix deletion of ifaddr lle entries when deleting prefix from interface in down state. Regression appeared in r287789, where the "prefix has no corresponding installed route" case was forgotten. Additionally, lltable_delete_addr() was called with incorrect byte order (default is network for lltable code). While here, improve comments on given cases and byte order. PR: 203573 Submitted by: phk Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Oct 18 11:44:31 2015 (r289500) +++ head/sys/netinet/in.c Sun Oct 18 12:26:25 2015 (r289501) @@ -734,14 +734,10 @@ in_scrubprefixlle(struct in_ifaddr *ia, struct sockaddr *saddr, *smask; struct ifnet *ifp; - /* - * remove all L2 entries on the given prefix - */ saddr = (struct sockaddr *)&addr; bzero(&addr, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; - addr.sin_addr.s_addr = ntohl(ia->ia_addr.sin_addr.s_addr); smask = (struct sockaddr *)&mask; bzero(&mask, sizeof(mask)); mask.sin_len = sizeof(mask); @@ -749,10 +745,21 @@ in_scrubprefixlle(struct in_ifaddr *ia, mask.sin_addr.s_addr = ia->ia_subnetmask; ifp = ia->ia_ifp; - if (all) + if (all) { + + /* + * Remove all L2 entries matching given prefix. + * Convert address to host representation to avoid + * doing this on every callback. ia_subnetmask is already + * stored in host representation. + */ + addr.sin_addr.s_addr = ntohl(ia->ia_addr.sin_addr.s_addr); lltable_prefix_free(AF_INET, saddr, smask, flags); - else + } else { + /* Remove interface address only */ + addr.sin_addr.s_addr = ia->ia_addr.sin_addr.s_addr; lltable_delete_addr(LLTABLE(ifp), LLE_IFADDR, saddr); + } } /* @@ -808,6 +815,14 @@ in_scrubprefix(struct in_ifaddr *target, fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); + + /* + * Removing address from !IFF_UP interface or + * prefix which exists on other interface (along with route). + * No entries should exist here except target addr. + * Given that, delete this entry only. + */ + in_scrubprefixlle(target, 0, flags); return (0); } From owner-svn-src-all@freebsd.org Sun Oct 18 13:23:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 884A9A16077; Sun, 18 Oct 2015 13:23:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 564F27CC; Sun, 18 Oct 2015 13:23:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDNLds072594; Sun, 18 Oct 2015 13:23:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDNLCt072593; Sun, 18 Oct 2015 13:23:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510181323.t9IDNLCt072593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 18 Oct 2015 13:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289502 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 13:23:22 -0000 Author: andrew Date: Sun Oct 18 13:23:21 2015 New Revision: 289502 URL: https://svnweb.freebsd.org/changeset/base/289502 Log: Correctly align the stack. The early csu assumed we passed the aux vector in through the stack pointer, however this may have been misaligned causing some userland applications to crash. A workaround was committed in r284707 where userland would check if the aux vector was passed using the old or new ABI and adjust the stack if needed. As 4 months have passed it is time to move to the new ABI, with the expectation the compat code in csu and the runtime linker to be removed in the future. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Oct 18 12:26:25 2015 (r289501) +++ head/sys/arm64/arm64/machdep.c Sun Oct 18 13:23:21 2015 (r289502) @@ -251,7 +251,13 @@ exec_setregs(struct thread *td, struct i memset(tf, 0, sizeof(struct trapframe)); - tf->tf_sp = stack; + /* + * We need to set x0 for init as it doesn't call + * cpu_set_syscall_retval to copy the value. We also + * need to set td_retval for the cases where we do. + */ + tf->tf_x[0] = td->td_retval[0] = stack; + tf->tf_sp = STACKALIGN(stack); tf->tf_lr = imgp->entry_addr; tf->tf_elr = imgp->entry_addr; } From owner-svn-src-all@freebsd.org Sun Oct 18 13:52:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CA89A168C3; Sun, 18 Oct 2015 13:52:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 441811393; Sun, 18 Oct 2015 13:52:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDqrdE081434; Sun, 18 Oct 2015 13:52:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDqrf2081433; Sun, 18 Oct 2015 13:52:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181352.t9IDqrf2081433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 13:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289503 - stable/10/sys/compat/linprocfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 13:52:54 -0000 Author: trasz Date: Sun Oct 18 13:52:53 2015 New Revision: 289503 URL: https://svnweb.freebsd.org/changeset/base/289503 Log: MFC r280981: Remove unused code. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/10/sys/compat/linprocfs/linprocfs.c Sun Oct 18 13:23:21 2015 (r289502) +++ stable/10/sys/compat/linprocfs/linprocfs.c Sun Oct 18 13:52:53 2015 (r289503) @@ -393,7 +393,6 @@ linprocfs_domtab(PFS_FILL_ARGS) /* * Filler function for proc/partitions - * */ static int linprocfs_dopartitions(PFS_FILL_ARGS) @@ -401,27 +400,9 @@ linprocfs_dopartitions(PFS_FILL_ARGS) struct g_class *cp; struct g_geom *gp; struct g_provider *pp; - struct nameidata nd; - const char *lep; - char *dlep, *flep; - size_t lep_len; - int error; int major, minor; - /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); - flep = NULL; - error = namei(&nd); - lep = linux_emul_path; - if (error == 0) { - if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) - lep = dlep; - vrele(nd.ni_vp); - } - lep_len = strlen(lep); - g_topology_lock(); - error = 0; sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " "ruse wio wmerge wsect wuse running use aveq\n"); @@ -447,8 +428,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) } g_topology_unlock(); - free(flep, M_TEMP); - return (error); + return (0); } From owner-svn-src-all@freebsd.org Sun Oct 18 13:58:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9749DA16AD6; Sun, 18 Oct 2015 13:58:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 485801845; Sun, 18 Oct 2015 13:58:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDwHD9081680; Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDwHME081679; Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181358.t9IDwHME081679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 13:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289504 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 13:58:18 -0000 Author: trasz Date: Sun Oct 18 13:58:17 2015 New Revision: 289504 URL: https://svnweb.freebsd.org/changeset/base/289504 Log: MFC r281689: Remove unused code from linux_mount(), and make it possible to mount any kind of filesystem instead of harcoded three. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_file.c ============================================================================== --- stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:52:53 2015 (r289503) +++ stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:58:17 2015 (r289504) @@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include - #ifdef COMPAT_LINUX32 #include #include @@ -1072,12 +1068,10 @@ linux_pwrite(td, uap) int linux_mount(struct thread *td, struct linux_mount_args *args) { - struct ufs_args ufs; char fstypename[MFSNAMELEN]; char mntonname[MNAMELEN], mntfromname[MNAMELEN]; int error; int fsflags; - void *fsdata; error = copyinstr(args->filesystemtype, fstypename, MFSNAMELEN - 1, NULL); @@ -1098,20 +1092,10 @@ linux_mount(struct thread *td, struct li if (strcmp(fstypename, "ext2") == 0) { strcpy(fstypename, "ext2fs"); - fsdata = &ufs; - ufs.fspec = mntfromname; -#define DEFAULT_ROOTID -2 - ufs.export.ex_root = DEFAULT_ROOTID; - ufs.export.ex_flags = - args->rwflag & LINUX_MS_RDONLY ? MNT_EXRDONLY : 0; } else if (strcmp(fstypename, "proc") == 0) { strcpy(fstypename, "linprocfs"); - fsdata = NULL; } else if (strcmp(fstypename, "vfat") == 0) { strcpy(fstypename, "msdosfs"); - fsdata = NULL; - } else { - return (ENODEV); } fsflags = 0; @@ -1131,19 +1115,11 @@ linux_mount(struct thread *td, struct li fsflags |= MNT_UPDATE; } - if (strcmp(fstypename, "linprocfs") == 0) { - error = kernel_vmount(fsflags, - "fstype", fstypename, - "fspath", mntonname, - NULL); - } else if (strcmp(fstypename, "msdosfs") == 0) { - error = kernel_vmount(fsflags, - "fstype", fstypename, - "fspath", mntonname, - "from", mntfromname, - NULL); - } else - error = EOPNOTSUPP; + error = kernel_vmount(fsflags, + "fstype", fstypename, + "fspath", mntonname, + "from", mntfromname, + NULL); return (error); } From owner-svn-src-all@freebsd.org Sun Oct 18 14:01:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BA7EA16BCF; Sun, 18 Oct 2015 14:01:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC6151A61; Sun, 18 Oct 2015 14:01:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IE1KsJ084379; Sun, 18 Oct 2015 14:01:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IE1KAu084378; Sun, 18 Oct 2015 14:01:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181401.t9IE1KAu084378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289505 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:01:22 -0000 Author: trasz Date: Sun Oct 18 14:01:20 2015 New Revision: 289505 URL: https://svnweb.freebsd.org/changeset/base/289505 Log: MFC r281726: Optimize the O_NOCTTY handling hack in linux_common_open(). MFC r281728: Add back fdrop() missed in r281726. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_file.c ============================================================================== --- stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:58:17 2015 (r289504) +++ stable/10/sys/compat/linux/linux_file.c Sun Oct 18 14:01:20 2015 (r289505) @@ -132,39 +132,39 @@ linux_common_open(struct thread *td, int /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode); + if (error != 0) + goto done; - if (!error) { - fd = td->td_retval[0]; - /* - * XXX In between kern_open() and fget(), another process - * having the same filedesc could use that fd without - * checking below. - */ - error = fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp); - if (!error) { - sx_slock(&proctree_lock); - PROC_LOCK(p); - if (!(bsd_flags & O_NOCTTY) && - SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { - PROC_UNLOCK(p); - sx_unlock(&proctree_lock); - /* XXXPJD: Verify if TIOCSCTTY is allowed. */ - if (fp->f_type == DTYPE_VNODE) - (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, - td->td_ucred, td); - } else { - PROC_UNLOCK(p); - sx_sunlock(&proctree_lock); - } + if (bsd_flags & O_NOCTTY) + goto done; + + /* + * XXX In between kern_open() and fget(), another process + * having the same filedesc could use that fd without + * checking below. + */ + fd = td->td_retval[0]; + if (fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp) == 0) { + if (fp->f_type != DTYPE_VNODE) { fdrop(fp, td); - /* - * XXX as above, fdrop()/kern_close() pair is racy. - */ - if (error) - kern_close(td, fd); + goto done; + } + sx_slock(&proctree_lock); + PROC_LOCK(p); + if (SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); + /* XXXPJD: Verify if TIOCSCTTY is allowed. */ + (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, + td->td_ucred, td); + } else { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); } + fdrop(fp, td); } +done: #ifdef DEBUG if (ldebug(open)) printf(LMSG("open returns error %d"), error); From owner-svn-src-all@freebsd.org Sun Oct 18 14:16:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE37DA16FC9; Sun, 18 Oct 2015 14:16:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84599C5; Sun, 18 Oct 2015 14:16:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEG1gI087447; Sun, 18 Oct 2015 14:16:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEG1uf087446; Sun, 18 Oct 2015 14:16:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181416.t9IEG1uf087446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289506 - stable/10/sbin/init X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:16:02 -0000 Author: trasz Date: Sun Oct 18 14:16:01 2015 New Revision: 289506 URL: https://svnweb.freebsd.org/changeset/base/289506 Log: MFC r285847: Add missing SIGUSR1 description. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/init/init.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/init/init.8 ============================================================================== --- stable/10/sbin/init/init.8 Sun Oct 18 14:01:20 2015 (r289505) +++ stable/10/sbin/init/init.8 Sun Oct 18 14:16:01 2015 (r289506) @@ -31,7 +31,7 @@ .\" @(#)init.8 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 14, 2012 +.Dd July 24, 2015 .Dt INIT 8 .Os .Sh NAME @@ -284,6 +284,7 @@ will signal the original as follows: .Bl -column Run-level SIGTERM .It Sy "Run-level Signal Action" +.It Cm 0 Ta Dv SIGUSR1 Ta "Halt" .It Cm 0 Ta Dv SIGUSR2 Ta "Halt and turn the power off" .It Cm 1 Ta Dv SIGTERM Ta "Go to single-user mode" .It Cm 6 Ta Dv SIGINT Ta "Reboot the machine" From owner-svn-src-all@freebsd.org Sun Oct 18 14:17:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7731BA18059; Sun, 18 Oct 2015 14:17:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EA3221B; Sun, 18 Oct 2015 14:17:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEHUMA087545; Sun, 18 Oct 2015 14:17:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEHUJL087544; Sun, 18 Oct 2015 14:17:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181417.t9IEHUJL087544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289507 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:17:31 -0000 Author: trasz Date: Sun Oct 18 14:17:30 2015 New Revision: 289507 URL: https://svnweb.freebsd.org/changeset/base/289507 Log: MFC r285870: Document md_root in loader(8). The md(4) manual page mentions it, but it's hard to find and easy to miss. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/boot/common/loader.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/loader.8 ============================================================================== --- stable/10/sys/boot/common/loader.8 Sun Oct 18 14:16:01 2015 (r289506) +++ stable/10/sys/boot/common/loader.8 Sun Oct 18 14:17:30 2015 (r289507) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 22, 2014 +.Dd July 25, 2015 .Dt LOADER 8 .Os .Sh NAME @@ -207,12 +207,18 @@ returns an error itself (see .Op Fl t Ar type .Ar file Cm ... .Xc -Loads a kernel, kernel loadable module (kld), or file of opaque -contents tagged as being of the type +Loads a kernel, kernel loadable module (kld), disk image, +or file of opaque contents tagged as being of the type .Ar type . Kernel and modules can be either in a.out or ELF format. Any arguments passed after the name of the file to be loaded will be passed as arguments to that file. +Use the +.Li md_image +type to make the kernel create a file-backed +.Xr md 4 +disk. +This is useful for booting from a temporary rootfs. Currently, argument passing does not work for the kernel. .Pp .It Ic load_geli Xo From owner-svn-src-all@freebsd.org Sun Oct 18 14:20:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CDA2A180D8; Sun, 18 Oct 2015 14:20:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA2133BB; Sun, 18 Oct 2015 14:20:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEKBkP087705; Sun, 18 Oct 2015 14:20:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEKBLA087704; Sun, 18 Oct 2015 14:20:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181420.t9IEKBLA087704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289508 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:20:13 -0000 Author: trasz Date: Sun Oct 18 14:20:11 2015 New Revision: 289508 URL: https://svnweb.freebsd.org/changeset/base/289508 Log: MFC r285881: Add md_root example to defaults/loader.conf. Note that this doesn't quite work yet - the preloaded image gets loaded twice for some reason. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Sun Oct 18 14:17:30 2015 (r289507) +++ stable/10/sys/boot/forth/loader.conf Sun Oct 18 14:20:11 2015 (r289508) @@ -50,6 +50,16 @@ entropy_cache_type="/boot/entropy" ############################################################## +### Initial memory disk settings ########################### +############################################################## + +#initmd_load="YES" # The "initmd" prefix is arbitrary. +#initmd_type="md_image" # Create md(4) disk at boot. +#initmd_name="/boot/root.img" # Path to a file containing the image. +#rootdev="ufs:/dev/md0" # Set the root filesystem to md(4) device. + + +############################################################## ### Loader settings ######################################## ############################################################## From owner-svn-src-all@freebsd.org Sun Oct 18 14:25:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F7E9A182DB; Sun, 18 Oct 2015 14:25:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C98DA4C; Sun, 18 Oct 2015 14:25:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEP5iS090433; Sun, 18 Oct 2015 14:25:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEP5gX090432; Sun, 18 Oct 2015 14:25:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181425.t9IEP5gX090432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289509 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:25:06 -0000 Author: trasz Date: Sun Oct 18 14:25:04 2015 New Revision: 289509 URL: https://svnweb.freebsd.org/changeset/base/289509 Log: MFC r286226: Rework the way iSCSI initiator handles system shutdown. This fixes hangs on shutdown with LUNs with mounted filesystems over a disconnected iSCSI session. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sun Oct 18 14:20:11 2015 (r289508) +++ stable/10/sys/dev/iscsi/iscsi.c Sun Oct 18 14:25:04 2015 (r289509) @@ -2324,11 +2324,23 @@ iscsi_shutdown(struct iscsi_softc *sc) { struct iscsi_session *is; - ISCSI_DEBUG("removing all sessions due to shutdown"); + /* + * Trying to reconnect during system shutdown would lead to hang. + */ + fail_on_disconnection = 1; + /* + * If we have any sessions waiting for reconnection, request + * maintenance thread to fail them immediately instead of waiting + * for reconnect timeout. + */ sx_slock(&sc->sc_lock); - TAILQ_FOREACH(is, &sc->sc_sessions, is_next) - iscsi_session_terminate(is); + TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { + ISCSI_SESSION_LOCK(is); + if (is->is_waiting_for_iscsid) + iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); + } sx_sunlock(&sc->sc_lock); } @@ -2354,12 +2366,7 @@ iscsi_load(void) } sc->sc_cdev->si_drv1 = sc; - /* - * Note that this needs to get run before dashutdown(). Otherwise, - * when rebooting with iSCSI session with outstanding requests, - * but disconnected, dashutdown() will hang on cam_periph_runccb(). - */ - sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); return (0); @@ -2377,7 +2384,7 @@ iscsi_unload(void) } if (sc->sc_shutdown_eh != NULL) - EVENTHANDLER_DEREGISTER(shutdown_post_sync, sc->sc_shutdown_eh); + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->sc_shutdown_eh); sx_slock(&sc->sc_lock); TAILQ_FOREACH_SAFE(is, &sc->sc_sessions, is_next, tmp) From owner-svn-src-all@freebsd.org Sun Oct 18 14:31:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 050C8A184F8; Sun, 18 Oct 2015 14:31:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E82D8A; Sun, 18 Oct 2015 14:31:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEVsXo093222; Sun, 18 Oct 2015 14:31:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEVs98093221; Sun, 18 Oct 2015 14:31:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181431.t9IEVs98093221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289510 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:31:56 -0000 Author: trasz Date: Sun Oct 18 14:31:54 2015 New Revision: 289510 URL: https://svnweb.freebsd.org/changeset/base/289510 Log: MFC r286281: Mark vgonel() as static. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:25:04 2015 (r289509) +++ stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:31:54 2015 (r289510) @@ -2802,7 +2802,7 @@ unlock: /* * vgone, with the vp interlock held. */ -void +static void vgonel(struct vnode *vp) { struct thread *td; From owner-svn-src-all@freebsd.org Sun Oct 18 14:34:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A343A18563; Sun, 18 Oct 2015 14:34:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D40A5FF2; Sun, 18 Oct 2015 14:34:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEYDng093388; Sun, 18 Oct 2015 14:34:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEYDvd093387; Sun, 18 Oct 2015 14:34:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181434.t9IEYDvd093387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289511 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:34:15 -0000 Author: trasz Date: Sun Oct 18 14:34:13 2015 New Revision: 289511 URL: https://svnweb.freebsd.org/changeset/base/289511 Log: MFC r286237: Fix panic that would happen on forcibly unmounting devfs (note that as it is now, devfs ignores MNT_FORCE anyway, so it needs to be modified to trigger the panic) with consumers still opened. Note that this still results in a leak of r/w/e counters. It seems to be harmless, though. If anyone knows a better way to approach this - please tell. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Sun Oct 18 14:31:54 2015 (r289510) +++ stable/10/sys/geom/geom_dev.c Sun Oct 18 14:34:13 2015 (r289511) @@ -399,6 +399,20 @@ g_dev_close(struct cdev *dev, int flags, #else e = 0; #endif + + /* + * The vgonel(9) - caused by eg. forced unmount of devfs - calls + * VOP_CLOSE(9) on devfs vnode without any FREAD or FWRITE flags, + * which would result in zero deltas, which in turn would cause + * panic in g_access(9). + * + * Note that we cannot zero the counters (ie. do "r = cp->acr" + * etc) instead, because the consumer might be opened in another + * devfs instance. + */ + if (r + w + e == 0) + return (EINVAL); + sc = cp->private; mtx_lock(&sc->sc_mtx); sc->sc_open += r + w + e; From owner-svn-src-all@freebsd.org Sun Oct 18 14:36:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4368EA185FC; Sun, 18 Oct 2015 14:36:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB701B6; Sun, 18 Oct 2015 14:36:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEa5c2093518; Sun, 18 Oct 2015 14:36:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEa5Lf093517; Sun, 18 Oct 2015 14:36:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181436.t9IEa5Lf093517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289512 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:36:06 -0000 Author: trasz Date: Sun Oct 18 14:36:04 2015 New Revision: 289512 URL: https://svnweb.freebsd.org/changeset/base/289512 Log: MFC r286283: Fix panic triggered by code like this: open("/dev/md0", O_EXEC); Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Sun Oct 18 14:34:13 2015 (r289511) +++ stable/10/sys/geom/geom_dev.c Sun Oct 18 14:36:04 2015 (r289512) @@ -356,6 +356,13 @@ g_dev_open(struct cdev *dev, int flags, #else e = 0; #endif + + /* + * This happens on attempt to open a device node with O_EXEC. + */ + if (r + w + e == 0) + return (EINVAL); + if (w) { /* * When running in very secure mode, do not allow From owner-svn-src-all@freebsd.org Sun Oct 18 14:41:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68946A1870E; Sun, 18 Oct 2015 14:41:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 158B57BB; Sun, 18 Oct 2015 14:41:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEfdoL096274; Sun, 18 Oct 2015 14:41:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEfcnH096271; Sun, 18 Oct 2015 14:41:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181441.t9IEfcnH096271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289513 - in stable/10/sys: fs/devfs kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:41:40 -0000 Author: trasz Date: Sun Oct 18 14:41:38 2015 New Revision: 289513 URL: https://svnweb.freebsd.org/changeset/base/289513 Log: MFC r287033: After r286237 it should be fine to call vgone(9) on a busy GEOM vnode; remove KASSERT that would prevent forced devfs unmount from working. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/devfs/devfs_vnops.c stable/10/sys/kern/vfs_subr.c stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Sun Oct 18 14:36:04 2015 (r289512) +++ stable/10/sys/fs/devfs/devfs_vnops.c Sun Oct 18 14:41:38 2015 (r289513) @@ -64,6 +64,7 @@ #include static struct vop_vector devfs_vnodeops; +static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include @@ -1763,7 +1764,7 @@ static struct vop_vector devfs_vnodeops .vop_vptocnp = devfs_vptocnp, }; -struct vop_vector devfs_specops = { +static struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, .vop_access = devfs_access, Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:36:04 2015 (r289512) +++ stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:41:38 2015 (r289513) @@ -2661,10 +2661,6 @@ loop: * If FORCECLOSE is set, forcibly close the vnode. */ if (vp->v_usecount == 0 || (flags & FORCECLOSE)) { - VNASSERT(vp->v_usecount == 0 || - vp->v_op != &devfs_specops || - (vp->v_type != VCHR && vp->v_type != VBLK), vp, - ("device VNODE %p is FORCECLOSED", vp)); vgonel(vp); } else { busy++; Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Sun Oct 18 14:36:04 2015 (r289512) +++ stable/10/sys/sys/vnode.h Sun Oct 18 14:41:38 2015 (r289513) @@ -822,7 +822,6 @@ void vnode_destroy_vobject(struct vnode extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; extern struct vop_vector default_vnodeops; -extern struct vop_vector devfs_specops; #define VOP_PANIC ((void*)(uintptr_t)vop_panic) #define VOP_NULL ((void*)(uintptr_t)vop_null) From owner-svn-src-all@freebsd.org Sun Oct 18 14:46:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90ADBA188E4; Sun, 18 Oct 2015 14:46:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4149F9C3; Sun, 18 Oct 2015 14:46:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEkC6o096504; Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEkCRS096503; Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181446.t9IEkCRS096503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289514 - stable/10/sbin/mdconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:46:13 -0000 Author: trasz Date: Sun Oct 18 14:46:12 2015 New Revision: 289514 URL: https://svnweb.freebsd.org/changeset/base/289514 Log: MFC r257165 (by jmg@): Document that -a will output the device name when -u is not specified.. when -u is specified it is not... update the docs to say that you can use full device names w/ -u, and update the examples... Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:41:38 2015 (r289513) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:46:12 2015 (r289514) @@ -89,6 +89,9 @@ Options indicate an action to be perform Attach a memory disk. This will configure and attach a memory disk with the parameters specified and attach it to the system. +If the +.Fl u Ar unit +option is not provided, the newly created device name will be printed on stdout. .It Fl d Detach a memory disk from the system and release all resources. .It Fl r @@ -209,9 +212,12 @@ that might adversely affect the system. Enable/disable readonly mode. .El .It Fl u Ar unit -Request a specific unit number for the +Request a specific unit number or device name for the .Xr md 4 device instead of automatic allocation. +If a device name is specified, it must be start with +.Dq md +followed by the unit number. .El .Pp The last form, @@ -237,19 +243,19 @@ with .Pa /tmp/boot.flp as backing storage: .Pp -.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4 +.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4 .Pp Detach and free all resources used by .Pa /dev/md4 : .Pp -.Dl mdconfig -d -u 4 +.Dl mdconfig -d -u md4 .Pp Create a 128MByte swap backed disk, initialize an .Xr ffs 7 file system on it, and mount it on .Pa /tmp : .Bd -literal -offset indent -mdconfig -a -t swap -s 128M -u 10 +mdconfig -a -t swap -s 128M -u md10 newfs -U /dev/md10 mount /dev/md10 /tmp chmod 1777 /tmp @@ -263,7 +269,7 @@ are implied .Pc : .Bd -literal -offset indent dd if=/dev/zero of=somebackingfile bs=1k count=5k -mdconfig -f somebackingfile -u 0 +mdconfig -f somebackingfile -u md0 bsdlabel -w md0 auto newfs md0c mount /dev/md0c /mnt @@ -290,7 +296,7 @@ is used to skip over the header informat .Pa md1.nop to the start of the filesystem in the image. .Bd -literal -offset indent -mdconfig -f diskimage.img -u 1 +mdconfig -f diskimage.img -u md1 gnop create -o 512K md1 mount /dev/md1.nop /mnt .Ed From owner-svn-src-all@freebsd.org Sun Oct 18 14:47:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25839A1893A; Sun, 18 Oct 2015 14:47:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2A3AB0D; Sun, 18 Oct 2015 14:47:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IElJGh096598; Sun, 18 Oct 2015 14:47:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IElJ7Q096597; Sun, 18 Oct 2015 14:47:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181447.t9IElJ7Q096597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289515 - stable/10/sbin/mdconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:47:21 -0000 Author: trasz Date: Sun Oct 18 14:47:19 2015 New Revision: 289515 URL: https://svnweb.freebsd.org/changeset/base/289515 Log: MFC r257182 (by jmg@): bump date forgotten in r257165 Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:46:12 2015 (r289514) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:47:19 2015 (r289515) @@ -41,7 +41,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2013 +.Dd October 26, 2013 .Dt MDCONFIG 8 .Os .Sh NAME From owner-svn-src-all@freebsd.org Sun Oct 18 14:52:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BFBA18AF5; Sun, 18 Oct 2015 14:52:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32372F98; Sun, 18 Oct 2015 14:52:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEqWkU099333; Sun, 18 Oct 2015 14:52:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEqVh9099329; Sun, 18 Oct 2015 14:52:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181452.t9IEqVh9099329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:52:33 -0000 Author: trasz Date: Sun Oct 18 14:52:31 2015 New Revision: 289516 URL: https://svnweb.freebsd.org/changeset/base/289516 Log: MFC r258909: Tweak mdconfig(8) manual page, in particular revise the EXAMPLES section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 stable/10/sbin/mdconfig/mdconfig.c stable/10/sys/dev/md/md.c stable/10/sys/sys/mdioctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:52:31 2015 (r289516) @@ -41,7 +41,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2013 +.Dd November 30, 2013 .Dt MDCONFIG 8 .Os .Sh NAME @@ -122,6 +122,8 @@ Using backing is generally preferred instead of using .Cm malloc backing. +.It Cm null +Bitsink; all writes do nothing, all reads return zeroes. .El .It Fl f Ar file Filename to use for the vnode type memory disk. Modified: stable/10/sbin/mdconfig/mdconfig.c ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:52:31 2015 (r289516) @@ -155,6 +155,9 @@ main(int argc, char **argv) } else if (!strcmp(optarg, "swap")) { mdio.md_type = MD_SWAP; mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; + } else if (!strcmp(optarg, "null")) { + mdio.md_type = MD_NULL; + mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; } else errx(1, "unknown type: %s", optarg); break; @@ -287,9 +290,10 @@ main(int argc, char **argv) } } - if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) && - sflag == NULL) - errx(1, "must specify -s for -t malloc or -t swap"); + if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP || + mdio.md_type == MD_NULL) && sflag == NULL) + errx(1, "must specify -s for -t malloc, -t swap, " + "or -t null"); if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0') errx(1, "must specify -f for -t vnode"); } else { Modified: stable/10/sys/dev/md/md.c ============================================================================== --- stable/10/sys/dev/md/md.c Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sys/dev/md/md.c Sun Oct 18 14:52:31 2015 (r289516) @@ -911,6 +911,22 @@ mdstart_swap(struct md_s *sc, struct bio return (rv != VM_PAGER_ERROR ? 0 : ENOSPC); } +static int +mdstart_null(struct md_s *sc, struct bio *bp) +{ + + switch (bp->bio_cmd) { + case BIO_READ: + bzero(bp->bio_data, bp->bio_length); + cpu_flush_dcache(bp->bio_data, bp->bio_length); + break; + case BIO_WRITE: + break; + } + bp->bio_resid = 0; + return (0); +} + static void md_kthread(void *arg) { @@ -1030,6 +1046,7 @@ mdinit(struct md_s *sc) pp->flags |= G_PF_ACCEPT_UNMAPPED; break; case MD_PRELOAD: + case MD_NULL: break; } sc->gp = gp; @@ -1248,6 +1265,7 @@ mdresize(struct md_s *sc, struct md_ioct switch (sc->type) { case MD_VNODE: + case MD_NULL: break; case MD_SWAP: if (mdio->md_mediasize <= 0 || @@ -1342,6 +1360,19 @@ mdcreate_swap(struct md_s *sc, struct md return (error); } +static int +mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) +{ + + /* + * Range check. Disallow negative sizes or any size less then the + * size of a page. Then round to a page. + */ + if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) + return (EDOM); + + return (0); +} static int xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) @@ -1374,6 +1405,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd case MD_PRELOAD: case MD_VNODE: case MD_SWAP: + case MD_NULL: break; default: return (EINVAL); @@ -1419,6 +1451,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd sc->start = mdstart_swap; error = mdcreate_swap(sc, mdio, td); break; + case MD_NULL: + sc->start = mdstart_null; + error = mdcreate_null(sc, mdio, td); + break; } if (error != 0) { mddestroy(sc, td); @@ -1589,6 +1625,9 @@ g_md_dumpconf(struct sbuf *sb, const cha case MD_SWAP: type = "swap"; break; + case MD_NULL: + type = "null"; + break; default: type = "unknown"; break; Modified: stable/10/sys/sys/mdioctl.h ============================================================================== --- stable/10/sys/sys/mdioctl.h Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sys/sys/mdioctl.h Sun Oct 18 14:52:31 2015 (r289516) @@ -43,7 +43,7 @@ #ifndef _SYS_MDIOCTL_H_ #define _SYS_MDIOCTL_H_ -enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP}; +enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL}; /* * Ioctl definitions for memory disk pseudo-device. From owner-svn-src-all@freebsd.org Sun Oct 18 14:55:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B58FAA18B89; Sun, 18 Oct 2015 14:55:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90D6C1AA; Sun, 18 Oct 2015 14:55:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEt9eW099498; Sun, 18 Oct 2015 14:55:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEt9ZH099497; Sun, 18 Oct 2015 14:55:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181455.t9IEt9ZH099497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289517 - stable/10/sbin/mdconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:55:10 -0000 Author: trasz Date: Sun Oct 18 14:55:09 2015 New Revision: 289517 URL: https://svnweb.freebsd.org/changeset/base/289517 Log: MFC r286360: Tweak mdconfig(8) manual page, in particular revise the EXAMPLES section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. MFC r286361: Whoops, wrong flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:52:31 2015 (r289516) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:55:09 2015 (r289517) @@ -41,12 +41,12 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2013 +.Dd August 6, 2015 .Dt MDCONFIG 8 .Os .Sh NAME .Nm mdconfig -.Nd configure and enable memory disks +.Nd create and control memory disks .Sh SYNOPSIS .Nm .Fl a @@ -79,7 +79,7 @@ .Sh DESCRIPTION The .Nm -utility configures and enables +utility creates and controls .Xr md 4 devices. .Pp @@ -107,7 +107,7 @@ If the .Fl o Cm reserve option is not set, creating and filling a large malloc-backed memory disk is a very easy way to -panic a system. +panic the system. .It Cm vnode A file specified with .Fl f Ar file @@ -168,7 +168,9 @@ or .Cm t which denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively. -The +When used without the +.Fl r +option, the .Fl a and .Fl t Ar swap @@ -210,6 +212,11 @@ Enable/disable compression features to r .It Oo Cm no Oc Ns Cm force Disable/enable extra sanity checks to prevent the user from doing something that might adversely affect the system. +This can be used with the +.Fl d +flag to forcibly destroy an +.Xr md 4 +disk that is still in use. .It Oo Cm no Oc Ns Cm readonly Enable/disable readonly mode. .El @@ -231,66 +238,58 @@ is provided for convenience as an abbrev .Fl t Ar vnode .Fl f Ar file . .Sh EXAMPLES -Create a 4 megabyte -.Xr malloc 9 -backed memory disk. -The name of the allocated unit will be printed on stdout, such as -.Dq Li md3 : -.Pp -.Dl mdconfig -a -t malloc -s 4m -.Pp -Create a disk named -.Pa /dev/md4 -with +Create a disk with .Pa /tmp/boot.flp -as backing storage: +as backing storage. +The name of the allocated unit will be printed on stdout, such as +.Dq Li md0 : +.Bd -literal -offset indent +mdconfig /tmp/boot.flp +.Ed .Pp -.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4 +Create a 1 gigabyte swap backed memory disk named +.Dq Li md3 : +.Bd -literal -offset indent +mdconfig -s 1g -u md3 +.Ed .Pp Detach and free all resources used by -.Pa /dev/md4 : +.Pa /dev/md3 : +.Bd -literal -offset indent +mdconfig -du md3 +.Ed +.Pp +Show detailed information on current memory disks: +.Bd -literal -offset indent +mdconfig -lv +.Ed .Pp -.Dl mdconfig -d -u md4 +Resize the +.Dq Li md3 +memory disk to 2 gigabytes: +.Bd -literal -offset indent +mdconfig -rs 2g -u md3 +.Ed .Pp -Create a 128MByte swap backed disk, initialize an +Create a 1 gigabyte swap backed disk, initialize an .Xr ffs 7 file system on it, and mount it on .Pa /tmp : .Bd -literal -offset indent -mdconfig -a -t swap -s 128M -u md10 +mdconfig -s 1g -u md10 newfs -U /dev/md10 mount /dev/md10 /tmp chmod 1777 /tmp .Ed .Pp -Create a 5MB file-backed disk -.Po Fl a -and -.Fl t Ar vnode -are implied -.Pc : -.Bd -literal -offset indent -dd if=/dev/zero of=somebackingfile bs=1k count=5k -mdconfig -f somebackingfile -u md0 -bsdlabel -w md0 auto -newfs md0c -mount /dev/md0c /mnt -.Ed -.Pp -Create an -.Xr md 4 -device out of an ISO 9660 CD image file -.Po Fl a -and -.Fl t Ar vnode -are implied -.Pc , using the first available +Create a memory disk out of an ISO 9660 CD image file, +using the first available .Xr md 4 -device, and then mount the new memory disk: +device, and then mount it: .Bd -literal -offset indent mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt -.Pp .Ed +.Pp Create a file-backed device from a hard disk image that begins with 512K of raw header information. .Xr gnop 8 @@ -298,7 +297,7 @@ is used to skip over the header informat .Pa md1.nop to the start of the filesystem in the image. .Bd -literal -offset indent -mdconfig -f diskimage.img -u md1 +mdconfig -u md1 -f diskimage.img gnop create -o 512K md1 mount /dev/md1.nop /mnt .Ed From owner-svn-src-all@freebsd.org Sun Oct 18 14:57:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE110A18C47; Sun, 18 Oct 2015 14:57:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7BC237C; Sun, 18 Oct 2015 14:57:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEvgMR099625; Sun, 18 Oct 2015 14:57:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEvgdC099624; Sun, 18 Oct 2015 14:57:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181457.t9IEvgdC099624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289518 - stable/10/sbin/mount_unionfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:57:44 -0000 Author: trasz Date: Sun Oct 18 14:57:42 2015 New Revision: 289518 URL: https://svnweb.freebsd.org/changeset/base/289518 Log: MFC 287397: Fix markup. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mount_unionfs/mount_unionfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_unionfs/mount_unionfs.8 ============================================================================== --- stable/10/sbin/mount_unionfs/mount_unionfs.8 Sun Oct 18 14:55:09 2015 (r289517) +++ stable/10/sbin/mount_unionfs/mount_unionfs.8 Sun Oct 18 14:57:42 2015 (r289518) @@ -83,7 +83,7 @@ becomes the upper layer. However, .Ar uniondir remains the mount point. -.It Sm Cm copymode No = Cm traditional | transparent | masquerade Sm +.It Cm copymode No = Cm traditional | transparent | masquerade Specifies the way to create a file or a directory in the upper layer automatically when needed. The @@ -98,7 +98,7 @@ For behavior of the mode, see .Sx MASQUERADE MODE below. -.It Sm Cm whiteout No = Cm always | whenneeded Sm +.It Cm whiteout No = Cm always | whenneeded Specifies whether whiteouts should always be made in the upper layer when removing a file or directory or only when it already exists in the lower layer. From owner-svn-src-all@freebsd.org Sun Oct 18 14:59:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C170CA18CC0; Sun, 18 Oct 2015 14:59:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4B9796; Sun, 18 Oct 2015 14:59:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IExcIS099746; Sun, 18 Oct 2015 14:59:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IExcqg099743; Sun, 18 Oct 2015 14:59:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181459.t9IExcqg099743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289519 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:59:39 -0000 Author: trasz Date: Sun Oct 18 14:59:38 2015 New Revision: 289519 URL: https://svnweb.freebsd.org/changeset/base/289519 Log: MFC r287951: The "automount" rc script should depend on "automountd", not the other way around. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/rc.d/automount stable/10/etc/rc.d/automountd stable/10/etc/rc.d/autounmountd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/automount ============================================================================== --- stable/10/etc/rc.d/automount Sun Oct 18 14:57:42 2015 (r289518) +++ stable/10/etc/rc.d/automount Sun Oct 18 14:59:38 2015 (r289519) @@ -4,7 +4,7 @@ # # PROVIDE: automount -# REQUIRE: nfsclient +# REQUIRE: nfsclient automountd # KEYWORD: nojail shutdown . /etc/rc.subr Modified: stable/10/etc/rc.d/automountd ============================================================================== --- stable/10/etc/rc.d/automountd Sun Oct 18 14:57:42 2015 (r289518) +++ stable/10/etc/rc.d/automountd Sun Oct 18 14:59:38 2015 (r289519) @@ -4,7 +4,7 @@ # # PROVIDE: automountd -# REQUIRE: automount +# REQUIRE: DAEMON # KEYWORD: nojail . /etc/rc.subr Modified: stable/10/etc/rc.d/autounmountd ============================================================================== --- stable/10/etc/rc.d/autounmountd Sun Oct 18 14:57:42 2015 (r289518) +++ stable/10/etc/rc.d/autounmountd Sun Oct 18 14:59:38 2015 (r289519) @@ -4,7 +4,7 @@ # # PROVIDE: autounmountd -# REQUIRE: nfsclient +# REQUIRE: DAEMON # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-all@freebsd.org Sun Oct 18 15:02:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30E1EA18E17; Sun, 18 Oct 2015 15:02:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 090CBA8A; Sun, 18 Oct 2015 15:02:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IF28YD001954; Sun, 18 Oct 2015 15:02:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IF27E1001950; Sun, 18 Oct 2015 15:02:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181502.t9IF27E1001950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 15:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289520 - in stable/10: sbin/geom/class/nop sys/geom/nop X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 15:02:09 -0000 Author: trasz Date: Sun Oct 18 15:02:07 2015 New Revision: 289520 URL: https://svnweb.freebsd.org/changeset/base/289520 Log: MFC r287827: Add a way to specify stripesize and stripeoffset to gnop(8). This makes it possible to "simulate" 4K media, to eg test alignment handling. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/geom/class/nop/geom_nop.c stable/10/sbin/geom/class/nop/gnop.8 stable/10/sys/geom/nop/g_nop.c stable/10/sys/geom/nop/g_nop.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/nop/geom_nop.c ============================================================================== --- stable/10/sbin/geom/class/nop/geom_nop.c Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sbin/geom/class/nop/geom_nop.c Sun Oct 18 15:02:07 2015 (r289520) @@ -43,14 +43,16 @@ struct g_command class_commands[] = { { { 'e', "error", "-1", G_TYPE_NUMBER }, { 'o', "offset", "0", G_TYPE_NUMBER }, + { 'p', "stripesize", "0", G_TYPE_NUMBER }, + { 'P', "stripeoffset", "0", G_TYPE_NUMBER }, { 'r', "rfailprob", "-1", G_TYPE_NUMBER }, { 's', "size", "0", G_TYPE_NUMBER }, { 'S', "secsize", "0", G_TYPE_NUMBER }, { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] " - "[-S secsize] [-w wfailprob] dev ..." + "[-v] [-e error] [-o offset] [-p stripesize] [-P stripeoffset] " + "[-r rfailprob] [-s size] [-S secsize] [-w wfailprob] dev ..." }, { "configure", G_FLAG_VERBOSE, NULL, { Modified: stable/10/sbin/geom/class/nop/gnop.8 ============================================================================== --- stable/10/sbin/geom/class/nop/gnop.8 Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sbin/geom/class/nop/gnop.8 Sun Oct 18 15:02:07 2015 (r289520) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2013 +.Dd September 15, 2015 .Dt GNOP 8 .Os .Sh NAME @@ -36,6 +36,8 @@ .Op Fl v .Op Fl e Ar error .Op Fl o Ar offset +.Op Fl p Ar stripesize +.Op Fl P Ar stripeoffset .Op Fl r Ar rfailprob .Op Fl s Ar size .Op Fl S Ar secsize @@ -115,6 +117,10 @@ Specifies the error number to return on Force the removal of the specified provider. .It Fl o Ar offset Where to begin on the original provider. +.It Fl p Ar stripesize +Value of the stripesize property of the transparent provider. +.It Fl P Ar stripeoffset +Value of the stripeoffset property of the transparent provider. .It Fl r Ar rfailprob Specifies read failure probability in percent. .It Fl s Ar size Modified: stable/10/sys/geom/nop/g_nop.c ============================================================================== --- stable/10/sys/geom/nop/g_nop.c Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sys/geom/nop/g_nop.c Sun Oct 18 15:02:07 2015 (r289520) @@ -162,7 +162,7 @@ g_nop_access(struct g_provider *pp, int static int g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, int ioerror, u_int rfailprob, u_int wfailprob, off_t offset, off_t size, - u_int secsize) + u_int secsize, u_int stripesize, u_int stripeoffset) { struct g_nop_softc *sc; struct g_geom *gp; @@ -208,6 +208,18 @@ g_nop_create(struct gctl_req *req, struc return (EINVAL); } size -= size % secsize; + if ((stripesize % pp->sectorsize) != 0) { + gctl_error(req, "Invalid stripesize for provider %s.", pp->name); + return (EINVAL); + } + if ((stripeoffset % pp->sectorsize) != 0) { + gctl_error(req, "Invalid stripeoffset for provider %s.", pp->name); + return (EINVAL); + } + if (stripesize != 0 && stripeoffset >= stripesize) { + gctl_error(req, "stripeoffset is too big."); + return (EINVAL); + } snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX); LIST_FOREACH(gp, &mp->geom, geom) { if (strcmp(gp->name, name) == 0) { @@ -219,6 +231,8 @@ g_nop_create(struct gctl_req *req, struc sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_offset = offset; sc->sc_explicitsize = explicitsize; + sc->sc_stripesize = stripesize; + sc->sc_stripeoffset = stripeoffset; sc->sc_error = ioerror; sc->sc_rfailprob = rfailprob; sc->sc_wfailprob = wfailprob; @@ -238,6 +252,8 @@ g_nop_create(struct gctl_req *req, struc newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; newpp->mediasize = size; newpp->sectorsize = secsize; + newpp->stripesize = stripesize; + newpp->stripeoffset = stripeoffset; cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; @@ -304,7 +320,8 @@ static void g_nop_ctl_create(struct gctl_req *req, struct g_class *mp) { struct g_provider *pp; - intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size; + intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size, + *stripesize, *stripeoffset; const char *name; char param[16]; int i, *nargs; @@ -370,6 +387,24 @@ g_nop_ctl_create(struct gctl_req *req, s gctl_error(req, "Invalid '%s' argument", "secsize"); return; } + stripesize = gctl_get_paraml(req, "stripesize", sizeof(*stripesize)); + if (stripesize == NULL) { + gctl_error(req, "No '%s' argument", "stripesize"); + return; + } + if (*stripesize < 0) { + gctl_error(req, "Invalid '%s' argument", "stripesize"); + return; + } + stripeoffset = gctl_get_paraml(req, "stripeoffset", sizeof(*stripeoffset)); + if (stripeoffset == NULL) { + gctl_error(req, "No '%s' argument", "stripeoffset"); + return; + } + if (*stripeoffset < 0) { + gctl_error(req, "Invalid '%s' argument", "stripeoffset"); + return; + } for (i = 0; i < *nargs; i++) { snprintf(param, sizeof(param), "arg%d", i); @@ -390,7 +425,8 @@ g_nop_ctl_create(struct gctl_req *req, s *error == -1 ? EIO : (int)*error, *rfailprob == -1 ? 0 : (u_int)*rfailprob, *wfailprob == -1 ? 0 : (u_int)*wfailprob, - (off_t)*offset, (off_t)*size, (u_int)*secsize) != 0) { + (off_t)*offset, (off_t)*size, (u_int)*secsize, + (u_int)*stripesize, (u_int)*stripeoffset) != 0) { return; } } Modified: stable/10/sys/geom/nop/g_nop.h ============================================================================== --- stable/10/sys/geom/nop/g_nop.h Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sys/geom/nop/g_nop.h Sun Oct 18 15:02:07 2015 (r289520) @@ -59,6 +59,8 @@ struct g_nop_softc { int sc_error; off_t sc_offset; off_t sc_explicitsize; + off_t sc_stripesize; + off_t sc_stripeoffset; u_int sc_rfailprob; u_int sc_wfailprob; uintmax_t sc_reads; From owner-svn-src-all@freebsd.org Sun Oct 18 15:03:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AE6BA18EA9; Sun, 18 Oct 2015 15:03:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5303FCD9; Sun, 18 Oct 2015 15:03:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IF3l2Y002664; Sun, 18 Oct 2015 15:03:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IF3lTW002663; Sun, 18 Oct 2015 15:03:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181503.t9IF3lTW002663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 15:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289521 - stable/10/usr.bin/rctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 15:03:48 -0000 Author: trasz Date: Sun Oct 18 15:03:47 2015 New Revision: 289521 URL: https://svnweb.freebsd.org/changeset/base/289521 Log: MFC r287785: Make it clear that 'swapuse' is swap reservation and not actual swap usage. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/rctl/rctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/rctl/rctl.8 ============================================================================== --- stable/10/usr.bin/rctl/rctl.8 Sun Oct 18 15:02:07 2015 (r289520) +++ stable/10/usr.bin/rctl/rctl.8 Sun Oct 18 15:03:47 2015 (r289521) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2014 +.Dd September 14, 2015 .Dt RCTL 8 .Os .Sh NAME @@ -193,7 +193,7 @@ resource would be .It Sy openfiles Ta "file descriptor table size" .It Sy vmemoryuse Ta "address space limit, in bytes" .It Sy pseudoterminals Ta "number of PTYs" -.It Sy swapuse Ta "swap usage, in bytes" +.It Sy swapuse Ta "swap space that may be reserved or used, in bytes" .It Sy nthr Ta "number of threads" .It Sy msgqqueued Ta "number of queued SysV messages" .It Sy msgqsize Ta "SysV message queue size, in bytes" From owner-svn-src-all@freebsd.org Sun Oct 18 16:19:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 542E8A18BE4 for ; Sun, 18 Oct 2015 16:19:42 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 347D1833 for ; Sun, 18 Oct 2015 16:19:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 18 Oct 2015 16:19:52 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9IGJd4w008353; Sun, 18 Oct 2015 10:19:39 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445185179.71631.50.camel@freebsd.org> Subject: Re: svn commit: r289477 - head/sys/arm/mv From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 18 Oct 2015 10:19:39 -0600 In-Reply-To: <20151018094602.GF2257@kib.kiev.ua> References: <201510180103.t9I13h0w056671@repo.freebsd.org> <20151018094602.GF2257@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 16:19:42 -0000 On Sun, 2015-10-18 at 12:46 +0300, Konstantin Belousov wrote: > On Sun, Oct 18, 2015 at 01:03:43AM +0000, Ian Lepore wrote: > > Author: ian > > Date: Sun Oct 18 01:03:43 2015 > > New Revision: 289477 > > URL: https://svnweb.freebsd.org/changeset/base/289477 > > > > Log: > > Fix a strange macro re-definition compile error. If the > > VM_MAXUSER_ADDRESS > > value is defined as a config option the definition is emitted > > into > > opt_global.h which is force-included into everything. In > > addition, the > > symbol is emitted by the genassym mechanism, but that by its > > nature reduces > > the value to a 0xnnnnnnnn number. When compiling a .S file you > > end up > > with two different definitions of the macro (they evaluate to the > > same > > number, but the text is different, upsetting the compiler). > > > > Nothing has changed about this code for a while but the compile > > error is > > new, so this must be fallout from the clang 3.7 update or > > something. > > > > Modified: > > head/sys/arm/mv/std-pj4b.mv > > > > Modified: head/sys/arm/mv/std-pj4b.mv > > =================================================================== > > =========== > > --- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015 > > (r289476) > > +++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015 > > (r289477) > > @@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B > > machine arm armv6 > > makeoptions CONF_CFLAGS="-march=armv7a" > > > > -options VM_MAXUSER_ADDRESS="(KERNBASE > > -(1024*1024*1024))" > > +# This was originally defined as "(KERNBASE-(1024*1024*1024))" but > > that > > +# (in opt_global.h) clashed with the value emitted by genassym > > which > > +# reduces the original macro text to its numeric value. The only > > way > > +# to avoid that is to define it here as the numeric value genassym > > emits. > > +options VM_MAXUSER_ADDRESS="0x80000000" > > Genassym started to generate VM_MAXUSER_ADDRESS after r289372. > Strange that I did not saw the error. > > Why does marvell need this override ? > That is a very good question, to which I found no answer in the svn history... this value was in the file from day one and the commit message just says it was obtained from Marvell and Semihalf. There's other strange stuff in the arm/mv hierarchy that nobody (except maybe marvell and semihalf) knows why it's different. I finally bought myself an ARMADAXP-based system (which this config is for) about six months ago, but I literally haven't had a chance to take it out of the box since it arrived. ::sigh:: -- Ian From owner-svn-src-all@freebsd.org Sun Oct 18 16:54:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C547A18498; Sun, 18 Oct 2015 16:54:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E115ACF; Sun, 18 Oct 2015 16:54:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IGsZZC034701; Sun, 18 Oct 2015 16:54:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IGsYqa034689; Sun, 18 Oct 2015 16:54:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181654.t9IGsYqa034689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 16:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289522 - in head/sys/arm: allwinner/a20 altera/socfpga amlogic/aml8726 annapurna/alpine arm freescale/imx include qemu rockchip samsung/exynos ti/omap4 xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 16:54:36 -0000 Author: ian Date: Sun Oct 18 16:54:34 2015 New Revision: 289522 URL: https://svnweb.freebsd.org/changeset/base/289522 Log: Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is the name the function will have when the new ARM_INTRNG code is integrated, and doing this rename first will make it easier to toggle the new interrupt handling code on/off with a config option for debugging. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/annapurna/alpine/alpine_machdep_mp.c head/sys/arm/arm/gic.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/intr.h head/sys/arm/qemu/virt_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/allwinner/a20/a20_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -61,7 +61,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -87,7 +87,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -351,7 +351,7 @@ platform_mp_init_secondary(void) * each AP. */ - arm_init_secondary_ic(); + arm_pic_init_secondary(); } Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -122,7 +122,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/arm/gic.c Sun Oct 18 16:54:34 2015 (r289522) @@ -492,7 +492,7 @@ arm_get_next_irq(int last_irq) } void -arm_init_secondary_ic(void) +arm_pic_init_secondary(void) { arm_gic_init_secondary(arm_gic_sc->gic_dev); Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/freescale/imx/imx6_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -69,7 +69,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/include/intr.h Sun Oct 18 16:54:34 2015 (r289522) @@ -85,7 +85,7 @@ extern int (*arm_config_irq)(int irq, en void arm_irq_memory_barrier(uintptr_t); -void arm_init_secondary_ic(void); +void arm_pic_init_secondary(void); int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, int *trig, int *pol); Modified: head/sys/arm/qemu/virt_mp.c ============================================================================== --- head/sys/arm/qemu/virt_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/qemu/virt_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -108,7 +108,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/rockchip/rk30xx_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -82,7 +82,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -73,7 +73,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/ti/omap4/omap4_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/xilinx/zy7_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -49,7 +49,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void From owner-svn-src-all@freebsd.org Sun Oct 18 17:13:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0A00A18A5F; Sun, 18 Oct 2015 17:13:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA5211361; Sun, 18 Oct 2015 17:13:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHDfAl040461; Sun, 18 Oct 2015 17:13:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHDfO7040460; Sun, 18 Oct 2015 17:13:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510181713.t9IHDfO7040460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Oct 2015 17:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289523 - head/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 17:13:43 -0000 Author: dim Date: Sun Oct 18 17:13:41 2015 New Revision: 289523 URL: https://svnweb.freebsd.org/changeset/base/289523 Log: Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger): Refactor library decision for -fopenmp support from Darwin into a function for sharing with other platforms. Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger): Push OpenMP linker flags after linker input on Darwin. Don't add any libraries if -nostdlib is specified. Test. Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger): Support linking against OpenMP runtime on NetBSD. Pull in r250657 from upstream clang trunk (by Dimitry Andric): Support linking against OpenMP runtime on FreeBSD. Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sun Oct 18 16:54:34 2015 (r289522) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sun Oct 18 17:13:41 2015 (r289523) @@ -2460,6 +2460,28 @@ static OpenMPRuntimeKind getOpenMPRuntim return RT; } +static void addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, + const ArgList &Args) { + if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) + return; + + switch (getOpenMPRuntime(TC, Args)) { + case OMPRT_OMP: + CmdArgs.push_back("-lomp"); + break; + case OMPRT_GOMP: + CmdArgs.push_back("-lgomp"); + break; + case OMPRT_IOMP5: + CmdArgs.push_back("-liomp5"); + break; + case OMPRT_Unknown: + // Already diagnosed. + break; + } +} + static void addSanitizerRuntime(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, StringRef Sanitizer, bool IsShared) { @@ -6527,24 +6549,6 @@ void darwin::Linker::ConstructJob(Compil Args.AddAllArgs(CmdArgs, options::OPT_L); - if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, - options::OPT_fno_openmp, false)) { - switch (getOpenMPRuntime(getToolChain(), Args)) { - case OMPRT_OMP: - CmdArgs.push_back("-lomp"); - break; - case OMPRT_GOMP: - CmdArgs.push_back("-lgomp"); - break; - case OMPRT_IOMP5: - CmdArgs.push_back("-liomp5"); - break; - case OMPRT_Unknown: - // Already diagnosed. - break; - } - } - AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs); // Build the input file for -filelist (list of linker input files) in case we // need it later @@ -6563,6 +6567,10 @@ void darwin::Linker::ConstructJob(Compil InputFileList.push_back(II.getFilename()); } + if (!Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) + addOpenMPRuntime(CmdArgs, getToolChain(), Args); + if (isObjCRuntimeLinked(Args) && !Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { // We use arclite library for both ARC and subscripting support. @@ -7358,6 +7366,7 @@ void freebsd::Linker::ConstructJob(Compi if (!Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { + addOpenMPRuntime(CmdArgs, ToolChain, Args); if (D.CCCIsCXX()) { ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if (Args.hasArg(options::OPT_pg)) @@ -7673,6 +7682,7 @@ void netbsd::Linker::ConstructJob(Compil if (!Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { + addOpenMPRuntime(CmdArgs, getToolChain(), Args); if (D.CCCIsCXX()) { getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); CmdArgs.push_back("-lm"); From owner-svn-src-all@freebsd.org Sun Oct 18 17:14:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FC5EA18AA2; Sun, 18 Oct 2015 17:14:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 540B01516; Sun, 18 Oct 2015 17:14:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHEjUk040540; Sun, 18 Oct 2015 17:14:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHEjM1040539; Sun, 18 Oct 2015 17:14:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510181714.t9IHEjM1040539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Oct 2015 17:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289524 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 17:14:46 -0000 Author: dim Date: Sun Oct 18 17:14:45 2015 New Revision: 289524 URL: https://svnweb.freebsd.org/changeset/base/289524 Log: Add clang patch corresponding to r289523. Added: head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff Added: head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff Sun Oct 18 17:14:45 2015 (r289524) @@ -0,0 +1,182 @@ +Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger): + + Refactor library decision for -fopenmp support from Darwin into a + function for sharing with other platforms. + +Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger): + + Push OpenMP linker flags after linker input on Darwin. Don't add any + libraries if -nostdlib is specified. Test. + +Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger): + + Support linking against OpenMP runtime on NetBSD. + +Pull in r250657 from upstream clang trunk (by Dimitry Andric): + + Support linking against OpenMP runtime on FreeBSD. + +Introduced here: http://svnweb.freebsd.org/changeset/base/289523 + +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -2460,6 +2460,28 @@ static OpenMPRuntimeKind getOpenMPRuntime(const To + return RT; + } + ++static void addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, ++ const ArgList &Args) { ++ if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, ++ options::OPT_fno_openmp, false)) ++ return; ++ ++ switch (getOpenMPRuntime(TC, Args)) { ++ case OMPRT_OMP: ++ CmdArgs.push_back("-lomp"); ++ break; ++ case OMPRT_GOMP: ++ CmdArgs.push_back("-lgomp"); ++ break; ++ case OMPRT_IOMP5: ++ CmdArgs.push_back("-liomp5"); ++ break; ++ case OMPRT_Unknown: ++ // Already diagnosed. ++ break; ++ } ++} ++ + static void addSanitizerRuntime(const ToolChain &TC, const ArgList &Args, + ArgStringList &CmdArgs, StringRef Sanitizer, + bool IsShared) { +@@ -6527,24 +6549,6 @@ void darwin::Linker::ConstructJob(Compilation &C, + + Args.AddAllArgs(CmdArgs, options::OPT_L); + +- if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, +- options::OPT_fno_openmp, false)) { +- switch (getOpenMPRuntime(getToolChain(), Args)) { +- case OMPRT_OMP: +- CmdArgs.push_back("-lomp"); +- break; +- case OMPRT_GOMP: +- CmdArgs.push_back("-lgomp"); +- break; +- case OMPRT_IOMP5: +- CmdArgs.push_back("-liomp5"); +- break; +- case OMPRT_Unknown: +- // Already diagnosed. +- break; +- } +- } +- + AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs); + // Build the input file for -filelist (list of linker input files) in case we + // need it later +@@ -6563,6 +6567,10 @@ void darwin::Linker::ConstructJob(Compilation &C, + InputFileList.push_back(II.getFilename()); + } + ++ if (!Args.hasArg(options::OPT_nostdlib) && ++ !Args.hasArg(options::OPT_nodefaultlibs)) ++ addOpenMPRuntime(CmdArgs, getToolChain(), Args); ++ + if (isObjCRuntimeLinked(Args) && !Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) { + // We use arclite library for both ARC and subscripting support. +@@ -7358,6 +7366,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, + + if (!Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) { ++ addOpenMPRuntime(CmdArgs, ToolChain, Args); + if (D.CCCIsCXX()) { + ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); + if (Args.hasArg(options::OPT_pg)) +@@ -7673,6 +7682,7 @@ void netbsd::Linker::ConstructJob(Compilation &C, + + if (!Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) { ++ addOpenMPRuntime(CmdArgs, getToolChain(), Args); + if (D.CCCIsCXX()) { + getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); + CmdArgs.push_back("-lm"); +Index: tools/clang/test/Driver/fopenmp.c +=================================================================== +--- tools/clang/test/Driver/fopenmp.c ++++ tools/clang/test/Driver/fopenmp.c +@@ -1,6 +1,15 @@ + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-apple-darwin -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-apple-darwin -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP ++// RUN: %clang -target x86_64-apple-darwin -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-freebsd -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-freebsd -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP ++// RUN: %clang -target x86_64-freebsd -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP + // + // CHECK-CC1-OPENMP: "-cc1" + // CHECK-CC1-OPENMP: "-fopenmp" +@@ -12,6 +21,30 @@ + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 + // ++// RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// ++// RUN: %clang -target x86_64-darwin -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP ++// RUN: %clang -target x86_64-darwin -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP ++// RUN: %clang -target x86_64-darwin -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 ++// ++// RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// ++// RUN: %clang -target x86_64-netbsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 ++// ++// RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// ++// RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// + // CHECK-LD-OMP: "{{.*}}ld{{(.exe)?}}" + // CHECK-LD-OMP: "-lomp" + // +@@ -21,6 +54,15 @@ + // CHECK-LD-IOMP5: "{{.*}}ld{{(.exe)?}}" + // CHECK-LD-IOMP5: "-liomp5" + // ++// CHECK-NO-OMP: "{{.*}}ld{{(.exe)?}}" ++// CHECK-NO-OMP-NOT: "-lomp" ++// ++// CHECK-NO-GOMP: "{{.*}}ld{{(.exe)?}}" ++// CHECK-NO-GOMP-NOT: "-lgomp" ++// ++// CHECK-NO-IOMP5: "{{.*}}ld{{(.exe)?}}" ++// CHECK-NO-IOMP5-NOT: "-liomp5" ++// + // We'd like to check that the default is sane, but until we have the ability + // to *always* semantically analyze OpenMP without always generating runtime + // calls (in the event of an unsupported runtime), we don't have a good way to +@@ -28,6 +70,9 @@ + // OpenMP runtime. + // + // RUN: %clang -target x86_64-linux-gnu -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY ++// RUN: %clang -target x86_64-darwin -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY ++// RUN: %clang -target x86_64-freebsd -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY ++// RUN: %clang -target x86_64-netbsd -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY + // + // CHECK-LD-ANY: "{{.*}}ld{{(.exe)?}}" + // CHECK-LD-ANY: "-l{{(omp|gomp|iomp5)}}" From owner-svn-src-all@freebsd.org Sun Oct 18 17:18:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A8B8A18B39; Sun, 18 Oct 2015 17:18:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3045E17F6; Sun, 18 Oct 2015 17:18:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHIKRh040716; Sun, 18 Oct 2015 17:18:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHIK8Q040714; Sun, 18 Oct 2015 17:18:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510181718.t9IHIK8Q040714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Oct 2015 17:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289525 - in head/lib/clang/include: clang/Config llvm/Config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 17:18:21 -0000 Author: dim Date: Sun Oct 18 17:18:19 2015 New Revision: 289525 URL: https://svnweb.freebsd.org/changeset/base/289525 Log: Switch the default OpenMP runtime for clang to libomp (from the LLVM project), as libgomp is not supported anyway. You can use the devel/llvm-devel port to install a recent copy of the OpenMP runtime. Modified: head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/config.h Modified: head/lib/clang/include/clang/Config/config.h ============================================================================== --- head/lib/clang/include/clang/Config/config.h Sun Oct 18 17:14:45 2015 (r289524) +++ head/lib/clang/include/clang/Config/config.h Sun Oct 18 17:18:19 2015 (r289525) @@ -11,7 +11,7 @@ #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" /* Default OpenMP runtime used by -fopenmp. */ -#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp" +#define CLANG_DEFAULT_OPENMP_RUNTIME "libomp" /* Multilib suffix for libdir. */ #define CLANG_LIBDIR_SUFFIX "" Modified: head/lib/clang/include/llvm/Config/config.h ============================================================================== --- head/lib/clang/include/llvm/Config/config.h Sun Oct 18 17:14:45 2015 (r289524) +++ head/lib/clang/include/llvm/Config/config.h Sun Oct 18 17:18:19 2015 (r289525) @@ -15,7 +15,7 @@ #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" /* Default OpenMP runtime used by -fopenmp. */ -#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp" +#define CLANG_DEFAULT_OPENMP_RUNTIME "libomp" /* Define if we have libxml2 */ /* #undef CLANG_HAVE_LIBXML */ From owner-svn-src-all@freebsd.org Sun Oct 18 17:57:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD36F9D140F; Sun, 18 Oct 2015 17:57:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9055691B; Sun, 18 Oct 2015 17:57:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHvgEJ052292; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHvgww052291; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181757.t9IHvgww052291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 17:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289526 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 17:57:43 -0000 Author: mav Date: Sun Oct 18 17:57:42 2015 New Revision: 289526 URL: https://svnweb.freebsd.org/changeset/base/289526 Log: 5561 support root pools on EFI/GPT partitioned disks 5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks) Reviewed by: Jean McCormack Reviewed by: Josef 'Jeff' Sipek Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sun Oct 18 17:18:19 2015 (r289525) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sun Oct 18 17:57:42 2015 (r289526) @@ -3245,8 +3245,6 @@ vdev_is_bootable(vdev_t *vd) strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) { return (B_FALSE); } - } else if (vd->vdev_wholedisk == 1) { - return (B_FALSE); } for (int c = 0; c < vd->vdev_children; c++) { From owner-svn-src-all@freebsd.org Sun Oct 18 17:57:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E2E19D1412; Sun, 18 Oct 2015 17:57:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD35491C; Sun, 18 Oct 2015 17:57:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHvgVH052298; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHvg70052297; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181757.t9IHvg70052297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 17:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289526 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 17:57:44 -0000 Author: mav Date: Sun Oct 18 17:57:42 2015 New Revision: 289526 URL: https://svnweb.freebsd.org/changeset/base/289526 Log: 5561 support root pools on EFI/GPT partitioned disks 5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks) Reviewed by: Jean McCormack Reviewed by: Josef 'Jeff' Sipek Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962 Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 17:18:19 2015 (r289525) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 17:57:42 2015 (r289526) @@ -373,27 +373,6 @@ bootfs_name_valid(const char *pool, char return (B_FALSE); } -/* - * Inspect the configuration to determine if any of the devices contain - * an EFI label. - */ -static boolean_t -pool_uses_efi(nvlist_t *config) -{ - nvlist_t **child; - uint_t c, children; - - if (nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_CHILDREN, - &child, &children) != 0) - return (read_efi_label(config, NULL) >= 0); - - for (c = 0; c < children; c++) { - if (pool_uses_efi(child[c])) - return (B_TRUE); - } - return (B_FALSE); -} - boolean_t zpool_is_bootable(zpool_handle_t *zhp) { @@ -422,7 +401,6 @@ zpool_valid_proplist(libzfs_handle_t *hd char *slash, *check; struct stat64 statbuf; zpool_handle_t *zhp; - nvlist_t *nvroot; if (nvlist_alloc(&retprops, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); @@ -541,21 +519,6 @@ zpool_valid_proplist(libzfs_handle_t *hd (void) zfs_error(hdl, EZFS_OPENFAILED, errbuf); goto error; } - verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), - ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); - - /* - * bootfs property cannot be set on a disk which has - * been EFI labeled. - */ - if (pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "property '%s' not supported on " - "EFI labeled devices"), propname); - (void) zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf); - zpool_close(zhp); - goto error; - } zpool_close(zhp); break; @@ -1293,25 +1256,6 @@ zpool_add(zpool_handle_t *zhp, nvlist_t return (zfs_error(hdl, EZFS_BADVERSION, msg)); } - if (zpool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot, - ZPOOL_CONFIG_SPARES, &spares, &nspares) == 0) { - uint64_t s; - - for (s = 0; s < nspares; s++) { - char *path; - - if (nvlist_lookup_string(spares[s], ZPOOL_CONFIG_PATH, - &path) == 0 && pool_uses_efi(spares[s])) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "device '%s' contains an EFI label and " - "cannot be used on root pools."), - zpool_vdev_name(hdl, NULL, spares[s], - B_FALSE)); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - } - } - if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) < SPA_VERSION_L2CACHE && nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, @@ -2326,11 +2270,9 @@ zpool_get_config_physpath(nvlist_t *conf return (EZFS_INVALCONFIG); /* - * root pool can not have EFI labeled disks and can only have - * a single top-level vdev. + * root pool can only have a single top-level vdev. */ - if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1 || - pool_uses_efi(vdev_root)) + if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1) return (EZFS_POOL_INVALARG); (void) vdev_get_physpaths(child[0], physpath, phypath_size, &rsz, @@ -2632,16 +2574,6 @@ zpool_vdev_attach(zpool_handle_t *zhp, (void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN, "cannot attach %s to %s"), new_disk, old_disk); - /* - * If this is a root pool, make sure that we're not attaching an - * EFI labeled device. - */ - if (rootpool && pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); if ((tgt = zpool_find_vdev(zhp, old_disk, &avail_spare, &l2cache, &islog)) == 0) @@ -3917,13 +3849,6 @@ zpool_label_disk(libzfs_handle_t *hdl, z if (zhp) { nvlist_t *nvroot; - if (zpool_is_bootable(zhp)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root " - "pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf)); - } - verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); From owner-svn-src-all@freebsd.org Sun Oct 18 18:08:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F9D59D1676; Sun, 18 Oct 2015 18:08:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05F36DDD; Sun, 18 Oct 2015 18:08:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9II8YJ9055123; Sun, 18 Oct 2015 18:08:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9II8X3G055121; Sun, 18 Oct 2015 18:08:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181808.t9II8X3G055121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289527 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:08:35 -0000 Author: mav Date: Sun Oct 18 18:08:33 2015 New Revision: 289527 URL: https://svnweb.freebsd.org/changeset/base/289527 Log: MFV r289526: 5561 support root pools on EFI/GPT partitioned disks 5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks) Reviewed by: Jean McCormack Reviewed by: Josef 'Jeff' Sipek Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962 This is NOP changes for FreeBSD. Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 17:57:42 2015 (r289526) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 18:08:33 2015 (r289527) @@ -402,29 +402,6 @@ bootfs_name_valid(const char *pool, char return (B_FALSE); } -/* - * Inspect the configuration to determine if any of the devices contain - * an EFI label. - */ -static boolean_t -pool_uses_efi(nvlist_t *config) -{ -#ifdef illumos - nvlist_t **child; - uint_t c, children; - - if (nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_CHILDREN, - &child, &children) != 0) - return (read_efi_label(config, NULL) >= 0); - - for (c = 0; c < children; c++) { - if (pool_uses_efi(child[c])) - return (B_TRUE); - } -#endif /* illumos */ - return (B_FALSE); -} - boolean_t zpool_is_bootable(zpool_handle_t *zhp) { @@ -453,7 +430,6 @@ zpool_valid_proplist(libzfs_handle_t *hd char *slash, *check; struct stat64 statbuf; zpool_handle_t *zhp; - nvlist_t *nvroot; if (nvlist_alloc(&retprops, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); @@ -572,23 +548,6 @@ zpool_valid_proplist(libzfs_handle_t *hd (void) zfs_error(hdl, EZFS_OPENFAILED, errbuf); goto error; } - verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), - ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); - -#ifdef illumos - /* - * bootfs property cannot be set on a disk which has - * been EFI labeled. - */ - if (pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "property '%s' not supported on " - "EFI labeled devices"), propname); - (void) zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf); - zpool_close(zhp); - goto error; - } -#endif /* illumos */ zpool_close(zhp); break; @@ -1326,25 +1285,6 @@ zpool_add(zpool_handle_t *zhp, nvlist_t return (zfs_error(hdl, EZFS_BADVERSION, msg)); } - if (zpool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot, - ZPOOL_CONFIG_SPARES, &spares, &nspares) == 0) { - uint64_t s; - - for (s = 0; s < nspares; s++) { - char *path; - - if (nvlist_lookup_string(spares[s], ZPOOL_CONFIG_PATH, - &path) == 0 && pool_uses_efi(spares[s])) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "device '%s' contains an EFI label and " - "cannot be used on root pools."), - zpool_vdev_name(hdl, NULL, spares[s], - B_FALSE)); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - } - } - if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) < SPA_VERSION_L2CACHE && nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, @@ -2365,11 +2305,9 @@ zpool_get_config_physpath(nvlist_t *conf return (EZFS_INVALCONFIG); /* - * root pool can not have EFI labeled disks and can only have - * a single top-level vdev. + * root pool can only have a single top-level vdev. */ - if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1 || - pool_uses_efi(vdev_root)) + if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1) return (EZFS_POOL_INVALARG); (void) vdev_get_physpaths(child[0], physpath, phypath_size, &rsz, @@ -2673,16 +2611,6 @@ zpool_vdev_attach(zpool_handle_t *zhp, (void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN, "cannot attach %s to %s"), new_disk, old_disk); - /* - * If this is a root pool, make sure that we're not attaching an - * EFI labeled device. - */ - if (rootpool && pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); if ((tgt = zpool_find_vdev(zhp, old_disk, &avail_spare, &l2cache, &islog)) == 0) @@ -3996,13 +3924,6 @@ zpool_label_disk(libzfs_handle_t *hdl, z if (zhp) { nvlist_t *nvroot; - if (zpool_is_bootable(zhp)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root " - "pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf)); - } - verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Oct 18 17:57:42 2015 (r289526) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Oct 18 18:08:33 2015 (r289527) @@ -3412,8 +3412,6 @@ vdev_is_bootable(vdev_t *vd) strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) { return (B_FALSE); } - } else if (vd->vdev_wholedisk == 1) { - return (B_FALSE); } for (int c = 0; c < vd->vdev_children; c++) { From owner-svn-src-all@freebsd.org Sun Oct 18 18:25:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E9CD9D1A8E; Sun, 18 Oct 2015 18:25:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05F3A7D8; Sun, 18 Oct 2015 18:25:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIP1nf060756; Sun, 18 Oct 2015 18:25:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIP1bD060755; Sun, 18 Oct 2015 18:25:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181825.t9IIP1bD060755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289528 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:25:02 -0000 Author: mav Date: Sun Oct 18 18:25:00 2015 New Revision: 289528 URL: https://svnweb.freebsd.org/changeset/base/289528 Log: Reduce diff from upstream. Should be no functional change. Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 18:08:33 2015 (r289527) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 18:25:00 2015 (r289528) @@ -3729,17 +3729,18 @@ zpool_history_unpack(char *buf, uint64_t int zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp) { - char *buf = NULL; - uint64_t bufsize = HIS_BUF_LEN_DEF; + char *buf; + uint64_t buflen = HIS_BUF_LEN_DEF; uint64_t off = 0; nvlist_t **records = NULL; uint_t numrecords = 0; int err, i; - if ((buf = malloc(bufsize)) == NULL) + buf = malloc(buflen); + if (buf == NULL) return (ENOMEM); do { - uint64_t bytes_read = bufsize; + uint64_t bytes_read = buflen; uint64_t leftover; if ((err = get_history(zhp, buf, &off, &bytes_read)) != 0) @@ -3753,18 +3754,16 @@ zpool_get_history(zpool_handle_t *zhp, n &leftover, &records, &numrecords)) != 0) break; off -= leftover; - - /* - * If the history block is too big, double the buffer - * size and try again. - */ if (leftover == bytes_read) { + /* + * no progress made, because buffer is not big enough + * to hold this record; resize and retry. + */ + buflen *= 2; free(buf); buf = NULL; - - bufsize <<= 1; - if ((bufsize >= HIS_BUF_LEN_MAX) || - ((buf = malloc(bufsize)) == NULL)) { + if ((buflen >= HIS_BUF_LEN_MAX) || + ((buf = malloc(buflen)) == NULL)) { err = ENOMEM; break; } @@ -3772,6 +3771,7 @@ zpool_get_history(zpool_handle_t *zhp, n /* CONSTCOND */ } while (1); + free(buf); if (!err) { From owner-svn-src-all@freebsd.org Sun Oct 18 18:26:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F05719D1B61; Sun, 18 Oct 2015 18:26:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1EF098B; Sun, 18 Oct 2015 18:26:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIQJQ1060844; Sun, 18 Oct 2015 18:26:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIQJrA060841; Sun, 18 Oct 2015 18:26:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181826.t9IIQJrA060841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 18:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289529 - in head/sys: arm/arm arm/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:26:21 -0000 Author: ian Date: Sun Oct 18 18:26:19 2015 New Revision: 289529 URL: https://svnweb.freebsd.org/changeset/base/289529 Log: Import ARM_INTRNG, the "next generation" interrupt architecture for arm and armv6 architecures. The primary enhancement over the old design is support for hierarchical interrupt controllers (such as a gpio driver which can receive interrupts from a root PIC and act as a PIC itself for clients interested in handling a change of gpio pin state as an interrupt). The new code also provides an infrastructure for mapping interrupts described in metadata in the form of a "controller reference plus interrupt number" tuple into the simple "0-n" flat numeric space understood by rman and the bus resource mechanisms. Use of the new code is enabled by setting the ARM_INTRNG option, and by making a few simple changes to the platform's support code. In addition each existing PIC driver needs changes to be ready for INTRNG; this commit contains the changes for the arm/gic driver, which most armv6 SoCs use, but it does not enable the new code yet on any platform. This project has been many years in the making, starting as a GSoC project by Jakub Klama (jceel@) in 2012. That didn't get committed right away and the source base evolved out from under it to some degree. In 2014 I rebased the diffs to then -current and did some enhancements in the area of mapping interrupt numbers and storing associated fdt data, then the project went cold again for a while. Eventually Svata Kraus took that work in progress and did another big round of work on it, removing most of the remaining rough edges. Finally I took that and made one more pass through it, mostly disabling the "INTR_SOLO" feature for now, pending further design discussions on how to most efficiently dispatch a pending interrupt through more than one layer of PIC. The current code with the INTR_SOLO feature disabled uses approximate 100 extra cpu cycles for each cascaded PIC the interrupt has to be passed to, so what's left to do is about efficiency, not correct operation. Differential Revision: https://reviews.freebsd.org/D2047 Added: head/sys/arm/arm/intrng.c (contents, props changed) head/sys/arm/arm/pic_if.m (contents, props changed) Modified: head/sys/arm/arm/gic.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/nexus.c head/sys/arm/include/fdt.h head/sys/arm/include/intr.h head/sys/arm/include/smp.h head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Oct 18 18:25:00 2015 (r289528) +++ head/sys/arm/arm/gic.c Sun Oct 18 18:26:19 2015 (r289529) @@ -34,18 +34,25 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include #include #include #include +#include #include #include #include #include #include #include +#include +#ifdef ARM_INTRNG +#include +#endif #include #include #include @@ -55,6 +62,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef ARM_INTRNG +#include "pic_if.h" +#endif + /* We are using GICv2 register naming */ /* Distributor Registers */ @@ -83,8 +94,8 @@ __FBSDID("$FreeBSD$"); #define GICC_ABPR 0x001C /* v1 ICCABPR */ #define GICC_IIDR 0x00FC /* v1 ICCIIDR*/ -#define GIC_FIRST_IPI 0 /* Irqs 0-15 are SGIs/IPIs. */ -#define GIC_LAST_IPI 15 +#define GIC_FIRST_SGI 0 /* Irqs 0-15 are SGIs/IPIs. */ +#define GIC_LAST_SGI 15 #define GIC_FIRST_PPI 16 /* Irqs 16-31 are private (per */ #define GIC_LAST_PPI 31 /* core) peripheral interrupts. */ #define GIC_FIRST_SPI 32 /* Irqs 32+ are shared peripherals. */ @@ -102,8 +113,18 @@ __FBSDID("$FreeBSD$"); #define GIC_DEFAULT_ICFGR_INIT 0x00000000 #endif +#ifdef ARM_INTRNG +static u_int gic_irq_cpu; +static int arm_gic_intr(void *); +static int arm_gic_bind(device_t dev, struct arm_irqsrc *isrc); +#endif + struct arm_gic_softc { device_t gic_dev; +#ifdef ARM_INTRNG + void * gic_intrhand; + struct arm_irqsrc ** gic_irqs; +#endif struct resource * gic_res[3]; bus_space_tag_t gic_c_bst; bus_space_tag_t gic_d_bst; @@ -117,10 +138,13 @@ struct arm_gic_softc { static struct resource_spec arm_gic_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Distributor registers */ { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* CPU Interrupt Intf. registers */ +#ifdef ARM_INTRNG + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_OPTIONAL }, /* Parent interrupt */ +#endif { -1, 0 } }; -static struct arm_gic_softc *arm_gic_sc = NULL; +static struct arm_gic_softc *gic_sc = NULL; #define gic_c_read_4(_sc, _reg) \ bus_space_read_4((_sc)->gic_c_bst, (_sc)->gic_c_bsh, (_reg)) @@ -128,12 +152,16 @@ static struct arm_gic_softc *arm_gic_sc bus_space_write_4((_sc)->gic_c_bst, (_sc)->gic_c_bsh, (_reg), (_val)) #define gic_d_read_4(_sc, _reg) \ bus_space_read_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg)) +#define gic_d_write_1(_sc, _reg, _val) \ + bus_space_write_1((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val)) #define gic_d_write_4(_sc, _reg, _val) \ bus_space_write_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val)) +#ifndef ARM_INTRNG static int gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol); static void gic_post_filter(void *); +#endif static struct ofw_compat_data compat_data[] = { {"arm,gic", true}, /* Non-standard, used in FreeBSD dts. */ @@ -159,6 +187,72 @@ arm_gic_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +#ifdef ARM_INTRNG +static inline void +gic_irq_unmask(struct arm_gic_softc *sc, u_int irq) +{ + + gic_d_write_4(sc, GICD_ISENABLER(irq >> 5), (1UL << (irq & 0x1F))); +} + +static inline void +gic_irq_mask(struct arm_gic_softc *sc, u_int irq) +{ + + gic_d_write_4(sc, GICD_ICENABLER(irq >> 5), (1UL << (irq & 0x1F))); +} +#endif + +#ifdef SMP +#ifdef ARM_INTRNG +static void +arm_gic_init_secondary(device_t dev) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + struct arm_irqsrc *isrc; + u_int irq; + + for (irq = 0; irq < sc->nirqs; irq += 4) + gic_d_write_4(sc, GICD_IPRIORITYR(irq >> 2), 0); + + /* Set all the interrupts to be in Group 0 (secure) */ + for (irq = 0; irq < sc->nirqs; irq += 32) { + gic_d_write_4(sc, GICD_IGROUPR(irq >> 5), 0); + } + + /* Enable CPU interface */ + gic_c_write_4(sc, GICC_CTLR, 1); + + /* Set priority mask register. */ + gic_c_write_4(sc, GICC_PMR, 0xff); + + /* Enable interrupt distribution */ + gic_d_write_4(sc, GICD_CTLR, 0x01); + + /* Unmask attached SGI interrupts. */ + for (irq = GIC_FIRST_SGI; irq <= GIC_LAST_SGI; irq++) { + isrc = sc->gic_irqs[irq]; + if (isrc != NULL && isrc->isrc_handlers != 0) { + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + gic_irq_unmask(sc, irq); + } + } + + /* Unmask attached PPI interrupts. */ + for (irq = GIC_FIRST_PPI; irq <= GIC_LAST_PPI; irq++) { + isrc = sc->gic_irqs[irq]; + if (isrc == NULL || isrc->isrc_handlers == 0) + continue; + if (isrc->isrc_flags & ARM_ISRCF_BOUND) { + if (CPU_ISSET(PCPU_GET(cpuid), &isrc->isrc_cpu)) + gic_irq_unmask(sc, irq); + } else { + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + gic_irq_unmask(sc, irq); + } + } +} +#else static void arm_gic_init_secondary(device_t dev) { @@ -189,7 +283,10 @@ arm_gic_init_secondary(device_t dev) gic_d_write_4(sc, GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F))); gic_d_write_4(sc, GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F))); } - +#endif /* ARM_INTRNG */ +#endif /* SMP */ + +#ifndef ARM_INTRNG int gic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, int *trig, int *pol) @@ -234,6 +331,19 @@ gic_decode_fdt(uint32_t iparent, uint32_ } return (0); } +#endif + +#ifdef ARM_INTRNG +static inline intptr_t +gic_xref(device_t dev) +{ +#ifdef FDT + return (OF_xref_from_node(ofw_bus_get_node(dev))); +#else + return (0); +#endif +} +#endif static int arm_gic_attach(device_t dev) @@ -241,8 +351,11 @@ arm_gic_attach(device_t dev) struct arm_gic_softc *sc; int i; uint32_t icciidr; +#ifdef ARM_INTRNG + intptr_t xref = gic_xref(dev); +#endif - if (arm_gic_sc) + if (gic_sc) return (ENXIO); sc = device_get_softc(dev); @@ -253,7 +366,7 @@ arm_gic_attach(device_t dev) } sc->gic_dev = dev; - arm_gic_sc = sc; + gic_sc = sc; /* Initialize mutex */ mtx_init(&sc->mutex, "GIC lock", "", MTX_SPIN); @@ -273,9 +386,14 @@ arm_gic_attach(device_t dev) sc->nirqs = gic_d_read_4(sc, GICD_TYPER); sc->nirqs = 32 * ((sc->nirqs & 0x1f) + 1); +#ifdef ARM_INTRNG + sc->gic_irqs = malloc(sc->nirqs * sizeof (*sc->gic_irqs), M_DEVBUF, + M_WAITOK | M_ZERO); +#else /* Set up function pointers */ arm_post_filter = gic_post_filter; arm_config_irq = gic_config_irq; +#endif icciidr = gic_c_read_4(sc, GICC_IIDR); device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x irqs %u\n", @@ -311,11 +429,456 @@ arm_gic_attach(device_t dev) /* Enable interrupt distribution */ gic_d_write_4(sc, GICD_CTLR, 0x01); +#ifndef ARM_INTRNG + return (0); +#else + /* + * Now, when everything is initialized, it's right time to + * register interrupt controller to interrupt framefork. + */ + if (arm_pic_register(dev, xref) != 0) { + device_printf(dev, "could not register PIC\n"); + goto cleanup; + } + + if (sc->gic_res[2] == NULL) { + if (arm_pic_claim_root(dev, xref, arm_gic_intr, sc, + GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { + device_printf(dev, "could not set PIC as a root\n"); + arm_pic_unregister(dev, xref); + goto cleanup; + } + } else { + if (bus_setup_intr(dev, sc->gic_res[2], INTR_TYPE_CLK, + arm_gic_intr, NULL, sc, &sc->gic_intrhand)) { + device_printf(dev, "could not setup irq handler\n"); + arm_pic_unregister(dev, xref); + goto cleanup; + } + } + + return (0); + +cleanup: + /* + * XXX - not implemented arm_gic_detach() should be called ! + */ + if (sc->gic_irqs != NULL) + free(sc->gic_irqs, M_DEVBUF); + bus_release_resources(dev, arm_gic_spec, sc->gic_res); + return(ENXIO); +#endif +} + +#ifdef ARM_INTRNG +static int +arm_gic_intr(void *arg) +{ + struct arm_gic_softc *sc = arg; + struct arm_irqsrc *isrc; + uint32_t irq_active_reg, irq; + struct trapframe *tf; + + irq_active_reg = gic_c_read_4(sc, GICC_IAR); + irq = irq_active_reg & 0x3FF; + + /* + * 1. We do EOI here because recent read value from active interrupt + * register must be used for it. Another approach is to save this + * value into associated interrupt source. + * 2. EOI must be done on same CPU where interrupt has fired. Thus + * we must ensure that interrupted thread does not migrate to + * another CPU. + * 3. EOI cannot be delayed by any preemption which could happen on + * critical_exit() used in MI intr code, when interrupt thread is + * scheduled. See next point. + * 4. IPI_RENDEZVOUS assumes that no preemption is permitted during + * an action and any use of critical_exit() could break this + * assumption. See comments within smp_rendezvous_action(). + * 5. We always return FILTER_HANDLED as this is an interrupt + * controller dispatch function. Otherwise, in cascaded interrupt + * case, the whole interrupt subtree would be masked. + */ + + if (irq >= sc->nirqs) { + device_printf(sc->gic_dev, "Spurious interrupt detected\n"); + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + return (FILTER_HANDLED); + } + + tf = curthread->td_intr_frame; +dispatch_irq: + isrc = sc->gic_irqs[irq]; + if (isrc == NULL) { + device_printf(sc->gic_dev, "Stray interrupt %u detected\n", irq); + gic_irq_mask(sc, irq); + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + goto next_irq; + } + + /* + * Note that GIC_FIRST_SGI is zero and is not used in 'if' statement + * as compiler complains that comparing u_int >= 0 is always true. + */ + if (irq <= GIC_LAST_SGI) { +#ifdef SMP + /* Call EOI for all IPI before dispatch. */ + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + arm_ipi_dispatch(isrc, tf); + goto next_irq; +#else + printf("SGI %u on UP system detected\n", irq - GIC_FIRST_SGI); + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + goto next_irq; +#endif + } + + if (isrc->isrc_trig == INTR_TRIGGER_EDGE) + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + + arm_irq_dispatch(isrc, tf); + +next_irq: +// arm_irq_memory_barrier(irq); /* XXX */ +// irq_active_reg = gic_c_read_4(sc, GICC_IAR); +// irq = irq_active_reg & 0x3FF; + if (0 && irq < sc->nirqs) + goto dispatch_irq; + + return (FILTER_HANDLED); +} + +static int +gic_attach_isrc(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int irq) +{ + const char *name; + + /* + * 1. The link between ISRC and controller must be set atomically. + * 2. Just do things only once in rare case when consumers + * of shared interrupt came here at the same moment. + */ + mtx_lock_spin(&sc->mutex); + if (sc->gic_irqs[irq] != NULL) { + mtx_unlock_spin(&sc->mutex); + return (sc->gic_irqs[irq] == isrc ? 0 : EEXIST); + } + sc->gic_irqs[irq] = isrc; + isrc->isrc_data = irq; + mtx_unlock_spin(&sc->mutex); + + name = device_get_nameunit(sc->gic_dev); + if (irq <= GIC_LAST_SGI) + arm_irq_set_name(isrc, "%s,i%u", name, irq - GIC_FIRST_SGI); + else if (irq <= GIC_LAST_PPI) + arm_irq_set_name(isrc, "%s,p%u", name, irq - GIC_FIRST_PPI); + else + arm_irq_set_name(isrc, "%s,s%u", name, irq - GIC_FIRST_SPI); + return (0); +} + +static int +gic_detach_isrc(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int irq) +{ + + mtx_lock_spin(&sc->mutex); + if (sc->gic_irqs[irq] != isrc) { + mtx_unlock_spin(&sc->mutex); + return (sc->gic_irqs[irq] == NULL ? 0 : EINVAL); + } + sc->gic_irqs[irq] = NULL; + isrc->isrc_data = 0; + mtx_unlock_spin(&sc->mutex); + + arm_irq_set_name(isrc, ""); + return (0); +} + +static void +gic_config(struct arm_gic_softc *sc, u_int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + uint32_t reg; + uint32_t mask; + + if (irq < GIC_FIRST_SPI) + return; + + mtx_lock_spin(&sc->mutex); + + reg = gic_d_read_4(sc, GICD_ICFGR(irq >> 4)); + mask = (reg >> 2*(irq % 16)) & 0x3; + + if (pol == INTR_POLARITY_LOW) { + mask &= ~GICD_ICFGR_POL_MASK; + mask |= GICD_ICFGR_POL_LOW; + } else if (pol == INTR_POLARITY_HIGH) { + mask &= ~GICD_ICFGR_POL_MASK; + mask |= GICD_ICFGR_POL_HIGH; + } + + if (trig == INTR_TRIGGER_LEVEL) { + mask &= ~GICD_ICFGR_TRIG_MASK; + mask |= GICD_ICFGR_TRIG_LVL; + } else if (trig == INTR_TRIGGER_EDGE) { + mask &= ~GICD_ICFGR_TRIG_MASK; + mask |= GICD_ICFGR_TRIG_EDGE; + } + + /* Set mask */ + reg = reg & ~(0x3 << 2*(irq % 16)); + reg = reg | (mask << 2*(irq % 16)); + gic_d_write_4(sc, GICD_ICFGR(irq >> 4), reg); + + mtx_unlock_spin(&sc->mutex); +} +static int +gic_bind(struct arm_gic_softc *sc, u_int irq, cpuset_t *cpus) +{ + uint32_t cpu, end, mask; + + end = min(mp_ncpus, 8); + for (cpu = end; cpu < MAXCPU; cpu++) + if (CPU_ISSET(cpu, cpus)) + return (EINVAL); + + for (mask = 0, cpu = 0; cpu < end; cpu++) + if (CPU_ISSET(cpu, cpus)) + mask |= 1 << cpu; + + gic_d_write_1(sc, GICD_ITARGETSR(0) + irq, mask); return (0); } static int +gic_irq_from_nspc(struct arm_gic_softc *sc, u_int type, u_int num, u_int *irqp) +{ + + switch (type) { + case ARM_IRQ_NSPC_PLAIN: + *irqp = num; + return (*irqp < sc->nirqs ? 0 : EINVAL); + + case ARM_IRQ_NSPC_IRQ: + *irqp = num + GIC_FIRST_PPI; + return (*irqp < sc->nirqs ? 0 : EINVAL); + + case ARM_IRQ_NSPC_IPI: + *irqp = num + GIC_FIRST_SGI; + return (*irqp < GIC_LAST_SGI ? 0 : EINVAL); + + default: + return (EINVAL); + } +} + +static int +gic_map_nspc(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int *irqp) +{ + int error; + + error = gic_irq_from_nspc(sc, isrc->isrc_nspc_type, isrc->isrc_nspc_num, + irqp); + if (error != 0) + return (error); + return (gic_attach_isrc(sc, isrc, *irqp)); +} + +#ifdef FDT +static int +gic_map_fdt(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int *irqp) +{ + u_int irq, tripol; + enum intr_trigger trig; + enum intr_polarity pol; + int error; + + if (isrc->isrc_ncells == 1) { + irq = isrc->isrc_cells[0]; + pol = INTR_POLARITY_CONFORM; + trig = INTR_TRIGGER_CONFORM; + } else if (isrc->isrc_ncells == 3) { + if (isrc->isrc_cells[0] == 0) + irq = isrc->isrc_cells[1] + GIC_FIRST_SPI; + else + irq = isrc->isrc_cells[1] + GIC_FIRST_PPI; + + /* + * In intr[2], bits[3:0] are trigger type and level flags. + * 1 = low-to-high edge triggered + * 2 = high-to-low edge triggered + * 4 = active high level-sensitive + * 8 = active low level-sensitive + * The hardware only supports active-high-level or rising-edge. + */ + tripol = isrc->isrc_cells[2]; + if (tripol & 0x0a) { + printf("unsupported trigger/polarity configuration " + "0x%2x\n", tripol & 0x0f); + return (ENOTSUP); + } + pol = INTR_POLARITY_CONFORM; + if (tripol & 0x01) + trig = INTR_TRIGGER_EDGE; + else + trig = INTR_TRIGGER_LEVEL; + } else + return (EINVAL); + + if (irq >= sc->nirqs) + return (EINVAL); + + error = gic_attach_isrc(sc, isrc, irq); + if (error != 0) + return (error); + + isrc->isrc_nspc_type = ARM_IRQ_NSPC_PLAIN; + isrc->isrc_nspc_num = irq; + isrc->isrc_trig = trig; + isrc->isrc_pol = pol; + + *irqp = irq; + return (0); +} +#endif + +static int +arm_gic_register(device_t dev, struct arm_irqsrc *isrc, boolean_t *is_percpu) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq; + int error; + + if (isrc->isrc_type == ARM_ISRCT_NAMESPACE) + error = gic_map_nspc(sc, isrc, &irq); +#ifdef FDT + else if (isrc->isrc_type == ARM_ISRCT_FDT) + error = gic_map_fdt(sc, isrc, &irq); +#endif + else + return (EINVAL); + + if (error == 0) + *is_percpu = irq < GIC_FIRST_SPI ? TRUE : FALSE; + return (error); +} + +static void +arm_gic_enable_intr(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + if (isrc->isrc_trig == INTR_TRIGGER_CONFORM) + isrc->isrc_trig = INTR_TRIGGER_LEVEL; + + /* + * XXX - In case that per CPU interrupt is going to be enabled in time + * when SMP is already started, we need some IPI call which + * enables it on others CPUs. Further, it's more complicated as + * pic_enable_source() and pic_disable_source() should act on + * per CPU basis only. Thus, it should be solved here somehow. + */ + if (isrc->isrc_flags & ARM_ISRCF_PERCPU) + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + + gic_config(sc, irq, isrc->isrc_trig, isrc->isrc_pol); + arm_gic_bind(dev, isrc); +} + +static void +arm_gic_enable_source(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + arm_irq_memory_barrier(irq); + gic_irq_unmask(sc, irq); +} + +static void +arm_gic_disable_source(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + gic_irq_mask(sc, irq); +} + +static int +arm_gic_unregister(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + return (gic_detach_isrc(sc, isrc, irq)); +} + +static void +arm_gic_pre_ithread(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + arm_gic_disable_source(dev, isrc); + gic_c_write_4(sc, GICC_EOIR, isrc->isrc_data); +} + +static void +arm_gic_post_ithread(device_t dev, struct arm_irqsrc *isrc) +{ + + arm_irq_memory_barrier(0); + arm_gic_enable_source(dev, isrc); +} + +static void +arm_gic_post_filter(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + /* EOI for edge-triggered done earlier. */ + if (isrc->isrc_trig == INTR_TRIGGER_EDGE) + return; + + arm_irq_memory_barrier(0); + gic_c_write_4(sc, GICC_EOIR, isrc->isrc_data); +} + +#ifdef SMP +static int +arm_gic_bind(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + uint32_t irq = isrc->isrc_data; + + if (irq < GIC_FIRST_SPI) + return (EINVAL); + + if (CPU_EMPTY(&isrc->isrc_cpu)) { + gic_irq_cpu = arm_irq_next_cpu(gic_irq_cpu, &all_cpus); + CPU_SETOF(gic_irq_cpu, &isrc->isrc_cpu); + } + return (gic_bind(sc, irq, &isrc->isrc_cpu)); +} + +static void +arm_gic_ipi_send(device_t dev, struct arm_irqsrc *isrc, cpuset_t cpus) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + uint32_t irq, val = 0, i; + + irq = isrc->isrc_data; + + for (i = 0; i < MAXCPU; i++) + if (CPU_ISSET(i, &cpus)) + val |= 1 << (16 + i); + + gic_d_write_4(sc, GICD_SGIR(0), val | irq); +} +#endif +#else +static int arm_gic_next_irq(struct arm_gic_softc *sc, int last_irq) { uint32_t active_irq; @@ -327,7 +890,7 @@ arm_gic_next_irq(struct arm_gic_softc *s * bits (ie CPU number), not just the IRQ number, and we do not * have this information later. */ - if ((active_irq & 0x3ff) <= GIC_LAST_IPI) + if ((active_irq & 0x3ff) <= GIC_LAST_SGI) gic_c_write_4(sc, GICC_EOIR, active_irq); active_irq &= 0x3FF; @@ -400,7 +963,7 @@ arm_gic_mask(device_t dev, int irq) struct arm_gic_softc *sc = device_get_softc(dev); gic_d_write_4(sc, GICD_ICENABLER(irq >> 5), (1UL << (irq & 0x1F))); - gic_c_write_4(sc, GICC_EOIR, irq); + gic_c_write_4(sc, GICC_EOIR, irq); /* XXX - not allowed */ } static void @@ -408,7 +971,7 @@ arm_gic_unmask(device_t dev, int irq) { struct arm_gic_softc *sc = device_get_softc(dev); - if (irq > GIC_LAST_IPI) + if (irq > GIC_LAST_SGI) arm_irq_memory_barrier(irq); gic_d_write_4(sc, GICD_ISENABLER(irq >> 5), (1UL << (irq & 0x1F))); @@ -455,10 +1018,10 @@ arm_gic_ipi_clear(device_t dev, int ipi) static void gic_post_filter(void *arg) { - struct arm_gic_softc *sc = arm_gic_sc; + struct arm_gic_softc *sc = gic_sc; uintptr_t irq = (uintptr_t) arg; - if (irq > GIC_LAST_IPI) + if (irq > GIC_LAST_SGI) arm_irq_memory_barrier(irq); gic_c_write_4(sc, GICC_EOIR, irq); } @@ -467,64 +1030,81 @@ static int gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol) { - return (arm_gic_config(arm_gic_sc->gic_dev, irq, trig, pol)); + return (arm_gic_config(gic_sc->gic_dev, irq, trig, pol)); } void arm_mask_irq(uintptr_t nb) { - arm_gic_mask(arm_gic_sc->gic_dev, nb); + arm_gic_mask(gic_sc->gic_dev, nb); } void arm_unmask_irq(uintptr_t nb) { - arm_gic_unmask(arm_gic_sc->gic_dev, nb); + arm_gic_unmask(gic_sc->gic_dev, nb); } int arm_get_next_irq(int last_irq) { - return (arm_gic_next_irq(arm_gic_sc, last_irq)); + return (arm_gic_next_irq(gic_sc, last_irq)); } +#ifdef SMP void arm_pic_init_secondary(void) { - arm_gic_init_secondary(arm_gic_sc->gic_dev); + arm_gic_init_secondary(gic_sc->gic_dev); } -#ifdef SMP void pic_ipi_send(cpuset_t cpus, u_int ipi) { - arm_gic_ipi_send(arm_gic_sc->gic_dev, cpus, ipi); + arm_gic_ipi_send(gic_sc->gic_dev, cpus, ipi); } int pic_ipi_read(int i) { - return (arm_gic_ipi_read(arm_gic_sc->gic_dev, i)); + return (arm_gic_ipi_read(gic_sc->gic_dev, i)); } void pic_ipi_clear(int ipi) { - arm_gic_ipi_clear(arm_gic_sc->gic_dev, ipi); + arm_gic_ipi_clear(gic_sc->gic_dev, ipi); } #endif +#endif /* ARM_INTRNG */ static device_method_t arm_gic_methods[] = { /* Device interface */ DEVMETHOD(device_probe, arm_gic_probe), DEVMETHOD(device_attach, arm_gic_attach), +#ifdef ARM_INTRNG + /* Interrupt controller interface */ + DEVMETHOD(pic_disable_source, arm_gic_disable_source), + DEVMETHOD(pic_enable_intr, arm_gic_enable_intr), + DEVMETHOD(pic_enable_source, arm_gic_enable_source), + DEVMETHOD(pic_post_filter, arm_gic_post_filter), + DEVMETHOD(pic_post_ithread, arm_gic_post_ithread), + DEVMETHOD(pic_pre_ithread, arm_gic_pre_ithread), + DEVMETHOD(pic_register, arm_gic_register), + DEVMETHOD(pic_unregister, arm_gic_unregister), +#ifdef SMP + DEVMETHOD(pic_bind, arm_gic_bind), + DEVMETHOD(pic_init_secondary, arm_gic_init_secondary), + DEVMETHOD(pic_ipi_send, arm_gic_ipi_send), +#endif +#endif { 0, 0 } }; Added: head/sys/arm/arm/intrng.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/intrng.c Sun Oct 18 18:26:19 2015 (r289529) @@ -0,0 +1,1458 @@ +/*- + * Copyright (c) 2012-2014 Jakub Wojciech Klama . + * Copyright (c) 2015 Svatopluk Kraus + * Copyright (c) 2015 Michal Meloun + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * ARM Interrupt Framework + * + * TODO: - to support IPI (PPI) enabling on other CPUs if already started + * - to complete things for removable PICs + */ + +#include "opt_ddb.h" +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#ifdef DDB +#include +#endif + +#include "pic_if.h" + +#define INTRNAME_LEN (2*MAXCOMLEN + 1) + +#ifdef DEBUG +#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ + printf(fmt,##args); } while (0) +#else +#define debugf(fmt, args...) +#endif + +MALLOC_DECLARE(M_INTRNG); +MALLOC_DEFINE(M_INTRNG, "intrng", "ARM interrupt handling"); + +/* Main ARM interrupt handler called from assembler -> 'hidden' for C code. */ +void arm_irq_handler(struct trapframe *tf); + +/* Root interrupt controller stuff. */ +static struct arm_irqsrc *irq_root_isrc; +static device_t irq_root_dev; +static arm_irq_filter_t *irq_root_filter; +static void *irq_root_arg; +static u_int irq_root_ipicount; + +/* Interrupt controller definition. */ +struct arm_pic { + SLIST_ENTRY(arm_pic) pic_next; + intptr_t pic_xref; /* hardware identification */ + device_t pic_dev; +}; + +static struct mtx pic_list_lock; +static SLIST_HEAD(, arm_pic) pic_list; + +static struct arm_pic *pic_lookup(device_t dev, intptr_t xref); + +/* Interrupt source definition. */ +static struct mtx isrc_table_lock; +static struct arm_irqsrc *irq_sources[NIRQ]; +u_int irq_next_free; + +#define IRQ_INVALID nitems(irq_sources) + +#ifdef SMP +static boolean_t irq_assign_cpu = FALSE; + +static struct arm_irqsrc ipi_sources[ARM_IPI_COUNT]; +static u_int ipi_next_num; +#endif + +/* + * - 2 counters for each I/O interrupt. + * - MAXCPU counters for each IPI counters for SMP. + */ +#ifdef SMP +#define INTRCNT_COUNT (NIRQ * 2 + ARM_IPI_COUNT * MAXCPU) +#else +#define INTRCNT_COUNT (NIRQ * 2) +#endif + +/* Data for MI statistics reporting. */ +u_long intrcnt[INTRCNT_COUNT]; +char intrnames[INTRCNT_COUNT * INTRNAME_LEN]; +size_t sintrcnt = sizeof(intrcnt); +size_t sintrnames = sizeof(intrnames); +static u_int intrcnt_index; + +/* + * Interrupt framework initialization routine. + */ +static void +arm_irq_init(void *dummy __unused) +{ + + SLIST_INIT(&pic_list); + mtx_init(&pic_list_lock, "arm pic list", NULL, MTX_DEF); + mtx_init(&isrc_table_lock, "arm isrc table", NULL, MTX_DEF); +} +SYSINIT(arm_irq_init, SI_SUB_INTR, SI_ORDER_FIRST, arm_irq_init, NULL); + +static void +intrcnt_setname(const char *name, int index) +{ + + snprintf(intrnames + INTRNAME_LEN * index, INTRNAME_LEN, "%-*s", + INTRNAME_LEN - 1, name); +} + +/* + * Update name for interrupt source with interrupt event. + */ +static void +intrcnt_updatename(struct arm_irqsrc *isrc) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 18:30:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 114D09D1C6F; Sun, 18 Oct 2015 18:30:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF49BC38; Sun, 18 Oct 2015 18:30:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIUldF061039; Sun, 18 Oct 2015 18:30:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIUlH6061038; Sun, 18 Oct 2015 18:30:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181830.t9IIUlH6061038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289530 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:30:49 -0000 Author: mav Date: Sun Oct 18 18:30:47 2015 New Revision: 289530 URL: https://svnweb.freebsd.org/changeset/base/289530 Log: 5847 libzfs_diff should check zfs_prop_get() return Reviewed by: Matthew Ahrens Reviewed by: Albert Lee Approved by: Dan McDonald Author: Alexander Eremin illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:26:19 2015 (r289529) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:30:47 2015 (r289530) @@ -21,6 +21,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* @@ -616,9 +617,12 @@ get_snapshot_names(differ_info_t *di, co zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM); while (zhp != NULL) { - (void) zfs_prop_get(zhp, ZFS_PROP_ORIGIN, - origin, sizeof (origin), &src, NULL, 0, B_FALSE); - + if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin, + sizeof (origin), &src, NULL, 0, B_FALSE) != 0) { + (void) zfs_close(zhp); + zhp = NULL; + break; + } if (strncmp(origin, fromsnap, fsnlen) == 0) break; From owner-svn-src-all@freebsd.org Sun Oct 18 18:32:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AA279D1E02; Sun, 18 Oct 2015 18:32:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50DF6FF3; Sun, 18 Oct 2015 18:32:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIWMVX063801; Sun, 18 Oct 2015 18:32:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIWMWM063800; Sun, 18 Oct 2015 18:32:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181832.t9IIWMWM063800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289531 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:32:23 -0000 Author: mav Date: Sun Oct 18 18:32:22 2015 New Revision: 289531 URL: https://svnweb.freebsd.org/changeset/base/289531 Log: MFV r289530: 5847 libzfs_diff should check zfs_prop_get() return Reviewed by: Matthew Ahrens Reviewed by: Albert Lee Approved by: Dan McDonald Author: Alexander Eremin illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:30:47 2015 (r289530) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:32:22 2015 (r289531) @@ -21,6 +21,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* @@ -624,9 +625,12 @@ get_snapshot_names(differ_info_t *di, co zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM); while (zhp != NULL) { - (void) zfs_prop_get(zhp, ZFS_PROP_ORIGIN, - origin, sizeof (origin), &src, NULL, 0, B_FALSE); - + if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin, + sizeof (origin), &src, NULL, 0, B_FALSE) != 0) { + (void) zfs_close(zhp); + zhp = NULL; + break; + } if (strncmp(origin, fromsnap, fsnlen) == 0) break; From owner-svn-src-all@freebsd.org Sun Oct 18 18:37:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 579B29D1F8C; Sun, 18 Oct 2015 18:37:53 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C6A0512A1; Sun, 18 Oct 2015 18:37:52 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t9IIbpxn082550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Oct 2015 11:37:51 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t9IIbpKm082549; Sun, 18 Oct 2015 11:37:51 -0700 (PDT) (envelope-from jmg) Date: Sun, 18 Oct 2015 11:37:51 -0700 From: John-Mark Gurney To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md sys/sys Message-ID: <20151018183751.GB65715@funkthat.com> References: <201510181452.t9IEqVh9099329@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510181452.t9IEqVh9099329@repo.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 18 Oct 2015 11:37:51 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:37:53 -0000 Edward Tomasz Napierala wrote this message on Sun, Oct 18, 2015 at 14:52 +0000: > Author: trasz > Date: Sun Oct 18 14:52:31 2015 > New Revision: 289516 > URL: https://svnweb.freebsd.org/changeset/base/289516 > > Log: > MFC r258909: The following description doesn't match what r258909 says: https://svnweb.freebsd.org/base?view=revision&revision=r258909 wrong commit or wrong message? > Tweak mdconfig(8) manual page, in particular revise the EXAMPLES > section. This removes stuff that doesn't really belong there, > and simplifies examples for the basic operations. > > Sponsored by: The FreeBSD Foundation > > Modified: > stable/10/sbin/mdconfig/mdconfig.8 > stable/10/sbin/mdconfig/mdconfig.c > stable/10/sys/dev/md/md.c > stable/10/sys/sys/mdioctl.h > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sbin/mdconfig/mdconfig.8 > ============================================================================== > --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:52:31 2015 (r289516) > @@ -41,7 +41,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 26, 2013 > +.Dd November 30, 2013 > .Dt MDCONFIG 8 > .Os > .Sh NAME > @@ -122,6 +122,8 @@ Using > backing is generally preferred instead of using > .Cm malloc > backing. > +.It Cm null > +Bitsink; all writes do nothing, all reads return zeroes. > .El > .It Fl f Ar file > Filename to use for the vnode type memory disk. > > Modified: stable/10/sbin/mdconfig/mdconfig.c > ============================================================================== > --- stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:52:31 2015 (r289516) > @@ -155,6 +155,9 @@ main(int argc, char **argv) > } else if (!strcmp(optarg, "swap")) { > mdio.md_type = MD_SWAP; > mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; > + } else if (!strcmp(optarg, "null")) { > + mdio.md_type = MD_NULL; > + mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; > } else > errx(1, "unknown type: %s", optarg); > break; > @@ -287,9 +290,10 @@ main(int argc, char **argv) > } > } > > - if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) && > - sflag == NULL) > - errx(1, "must specify -s for -t malloc or -t swap"); > + if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP || > + mdio.md_type == MD_NULL) && sflag == NULL) > + errx(1, "must specify -s for -t malloc, -t swap, " > + "or -t null"); > if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0') > errx(1, "must specify -f for -t vnode"); > } else { > > Modified: stable/10/sys/dev/md/md.c > ============================================================================== > --- stable/10/sys/dev/md/md.c Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sys/dev/md/md.c Sun Oct 18 14:52:31 2015 (r289516) > @@ -911,6 +911,22 @@ mdstart_swap(struct md_s *sc, struct bio > return (rv != VM_PAGER_ERROR ? 0 : ENOSPC); > } > > +static int > +mdstart_null(struct md_s *sc, struct bio *bp) > +{ > + > + switch (bp->bio_cmd) { > + case BIO_READ: > + bzero(bp->bio_data, bp->bio_length); > + cpu_flush_dcache(bp->bio_data, bp->bio_length); > + break; > + case BIO_WRITE: > + break; > + } > + bp->bio_resid = 0; > + return (0); > +} > + > static void > md_kthread(void *arg) > { > @@ -1030,6 +1046,7 @@ mdinit(struct md_s *sc) > pp->flags |= G_PF_ACCEPT_UNMAPPED; > break; > case MD_PRELOAD: > + case MD_NULL: > break; > } > sc->gp = gp; > @@ -1248,6 +1265,7 @@ mdresize(struct md_s *sc, struct md_ioct > > switch (sc->type) { > case MD_VNODE: > + case MD_NULL: > break; > case MD_SWAP: > if (mdio->md_mediasize <= 0 || > @@ -1342,6 +1360,19 @@ mdcreate_swap(struct md_s *sc, struct md > return (error); > } > > +static int > +mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) > +{ > + > + /* > + * Range check. Disallow negative sizes or any size less then the > + * size of a page. Then round to a page. > + */ > + if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) > + return (EDOM); > + > + return (0); > +} > > static int > xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) > @@ -1374,6 +1405,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd > case MD_PRELOAD: > case MD_VNODE: > case MD_SWAP: > + case MD_NULL: > break; > default: > return (EINVAL); > @@ -1419,6 +1451,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd > sc->start = mdstart_swap; > error = mdcreate_swap(sc, mdio, td); > break; > + case MD_NULL: > + sc->start = mdstart_null; > + error = mdcreate_null(sc, mdio, td); > + break; > } > if (error != 0) { > mddestroy(sc, td); > @@ -1589,6 +1625,9 @@ g_md_dumpconf(struct sbuf *sb, const cha > case MD_SWAP: > type = "swap"; > break; > + case MD_NULL: > + type = "null"; > + break; > default: > type = "unknown"; > break; > > Modified: stable/10/sys/sys/mdioctl.h > ============================================================================== > --- stable/10/sys/sys/mdioctl.h Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sys/sys/mdioctl.h Sun Oct 18 14:52:31 2015 (r289516) > @@ -43,7 +43,7 @@ > #ifndef _SYS_MDIOCTL_H_ > #define _SYS_MDIOCTL_H_ > > -enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP}; > +enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL}; > > /* > * Ioctl definitions for memory disk pseudo-device. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sun Oct 18 18:39:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78522A18026; Sun, 18 Oct 2015 18:39:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42F72144B; Sun, 18 Oct 2015 18:39:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIdHgu064078; Sun, 18 Oct 2015 18:39:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIdHOJ064075; Sun, 18 Oct 2015 18:39:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181839.t9IIdHOJ064075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 18:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289532 - in head/sys/arm: conf ti ti/omap4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:39:18 -0000 Author: ian Date: Sun Oct 18 18:39:16 2015 New Revision: 289532 URL: https://svnweb.freebsd.org/changeset/base/289532 Log: Enable ARM_INTRNG on the pandaboard platform. Differential Revision: https://reviews.freebsd.org/D2048 Modified: head/sys/arm/conf/PANDABOARD head/sys/arm/ti/omap4/std.omap4 head/sys/arm/ti/ti_common.c Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Sun Oct 18 18:32:22 2015 (r289531) +++ head/sys/arm/conf/PANDABOARD Sun Oct 18 18:39:16 2015 (r289532) @@ -30,6 +30,8 @@ hints "PANDABOARD.hints" include "std.armv6" include "../ti/omap4/pandaboard/std.pandaboard" +options ARM_INTRNG # new interrupt framework + options HZ=100 options SCHED_ULE # ULE scheduler options PLATFORM Modified: head/sys/arm/ti/omap4/std.omap4 ============================================================================== --- head/sys/arm/ti/omap4/std.omap4 Sun Oct 18 18:32:22 2015 (r289531) +++ head/sys/arm/ti/omap4/std.omap4 Sun Oct 18 18:39:16 2015 (r289532) @@ -17,7 +17,3 @@ makeoptions KERNVIRTADDR=0xc0200000 options SOC_OMAP4 options ARM_L2_PIPT - -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - Modified: head/sys/arm/ti/ti_common.c ============================================================================== --- head/sys/arm/ti/ti_common.c Sun Oct 18 18:32:22 2015 (r289531) +++ head/sys/arm/ti/ti_common.c Sun Oct 18 18:39:16 2015 (r289532) @@ -70,7 +70,7 @@ fdt_aintc_decode_ic(phandle_t node, pcel #endif fdt_pic_decode_t fdt_pic_table[] = { -#ifdef SOC_OMAP4 +#if defined(SOC_OMAP4) && !defined(ARM_INTRNG) &gic_decode_fdt, #endif #ifdef SOC_TI_AM335X From owner-svn-src-all@freebsd.org Sun Oct 18 18:40:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7136EA1808F; Sun, 18 Oct 2015 18:40:12 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B5B1617; Sun, 18 Oct 2015 18:40:12 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIeBqL064164; Sun, 18 Oct 2015 18:40:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIeBkN064163; Sun, 18 Oct 2015 18:40:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510181840.t9IIeBkN064163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 18 Oct 2015 18:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289533 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:40:12 -0000 Author: sbruno Date: Sun Oct 18 18:40:11 2015 New Revision: 289533 URL: https://svnweb.freebsd.org/changeset/base/289533 Log: Add VM_KMEM_SIZE_SCALE=1 as these systems are going to have super small amount of RAM, e.g. 16M or 32M Reviewed by: adrian Modified: head/sys/mips/conf/AR933X_BASE Modified: head/sys/mips/conf/AR933X_BASE ============================================================================== --- head/sys/mips/conf/AR933X_BASE Sun Oct 18 18:39:16 2015 (r289532) +++ head/sys/mips/conf/AR933X_BASE Sun Oct 18 18:40:11 2015 (r289533) @@ -40,6 +40,9 @@ options SCSI_NO_OP_STRINGS # .. And no sysctl strings options NO_SYSCTL_DESCR +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + # Limit IO size options NBUF=128 From owner-svn-src-all@freebsd.org Sun Oct 18 18:41:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 557C5A18132; Sun, 18 Oct 2015 18:41:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2091019D7; Sun, 18 Oct 2015 18:41:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIfV5H066047; Sun, 18 Oct 2015 18:41:31 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIfVoT066046; Sun, 18 Oct 2015 18:41:31 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510181841.t9IIfVoT066046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 18 Oct 2015 18:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289534 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:41:32 -0000 Author: sbruno Date: Sun Oct 18 18:41:30 2015 New Revision: 289534 URL: https://svnweb.freebsd.org/changeset/base/289534 Log: Remove geom_uncompress from TP-MR3020 config. Its now using root on USB and there's no need for it now. Modified: head/sys/mips/conf/TP-MR3020 Modified: head/sys/mips/conf/TP-MR3020 ============================================================================== --- head/sys/mips/conf/TP-MR3020 Sun Oct 18 18:40:11 2015 (r289533) +++ head/sys/mips/conf/TP-MR3020 Sun Oct 18 18:41:30 2015 (r289534) @@ -44,9 +44,6 @@ device arswitch # redboot stuff. options AR71XX_ENV_UBOOT -# uzip - to boot natively from flash -device geom_uncompress - # Used for the static uboot partition map device geom_map From owner-svn-src-all@freebsd.org Sun Oct 18 18:56:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F047CA18450; Sun, 18 Oct 2015 18:56:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A98811ED8; Sun, 18 Oct 2015 18:56:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIum3S069706; Sun, 18 Oct 2015 18:56:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIumk0069705; Sun, 18 Oct 2015 18:56:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181856.t9IIumk0069705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289535 - vendor/illumos/dist/cmd/zpool X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 18:56:50 -0000 Author: mav Date: Sun Oct 18 18:56:48 2015 New Revision: 289535 URL: https://svnweb.freebsd.org/changeset/base/289535 Log: 5767 fix several problems with zfs test suite Reviewed by: Matthew Ahrens Reviewed by: Christopher Siden Approved by: Gordon Ross Author: John Wren Kennedy illumos/illumos-gate@52244c0958bdf281ca42932b449f644b4decfdc2 Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c =========================