svn commit: r302036 - head/tests/sys/acl

2016-06-20 Thread Alan Somers
Author: asomers
Date: Mon Jun 20 23:17:00 2016
New Revision: 302036
URL: https://svnweb.freebsd.org/changeset/base/302036

Log:
  Skip sys/acl tests on systems lacking perl
  
  tests/sys/acl/Makefile
add perl to the required_programs for all tests in this directory
  
  Reviewed by:  ngie
  Approved by:  re (gjb)
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D6870

Modified:
  head/tests/sys/acl/Makefile

Modified: head/tests/sys/acl/Makefile
==
--- head/tests/sys/acl/Makefile Mon Jun 20 22:45:19 2016(r302035)
+++ head/tests/sys/acl/Makefile Mon Jun 20 23:17:00 2016(r302036)
@@ -27,11 +27,11 @@ TEST_METADATA.$t+=  required_user="root"
 _ACL_PROGS=getfacl setfacl
 
 .for t in 01 03 04
-TEST_METADATA.$t+= required_programs="zpool ${_ACL_PROGS}"
+TEST_METADATA.$t+= required_programs="perl zpool ${_ACL_PROGS}"
 .endfor
 
 .for t in 00 02
-TEST_METADATA.$t+= required_programs="${_ACL_PROGS}"
+TEST_METADATA.$t+= required_programs="perl ${_ACL_PROGS}"
 .endfor
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r302035 - head/sys/dev/rtwn

2016-06-20 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Jun 20 22:45:19 2016
New Revision: 302035
URL: https://svnweb.freebsd.org/changeset/base/302035

Log:
  rtwn: fix Tx processing, add some busdma synchronization.
  
  1) Unload mbuf instead of descriptor in rtwn_tx_done().
  2) Add more synchronization for device visible mappings before
  touching the memory.
  3) Improve watchdog timer logic.
  
  Reported and tested by:   mva
  
  Approved by:  re (gjb)

Modified:
  head/sys/dev/rtwn/if_rtwn.c

Modified: head/sys/dev/rtwn/if_rtwn.c
==
--- head/sys/dev/rtwn/if_rtwn.c Mon Jun 20 22:39:32 2016(r302034)
+++ head/sys/dev/rtwn/if_rtwn.c Mon Jun 20 22:45:19 2016(r302035)
@@ -586,6 +586,9 @@ rtwn_free_rx_list(struct rtwn_softc *sc)
 
if (rx_ring->desc_dmat != NULL) {
if (rx_ring->desc != NULL) {
+   bus_dmamap_sync(rx_ring->desc_dmat,
+   rx_ring->desc_map,
+   BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(rx_ring->desc_dmat,
rx_ring->desc_map);
bus_dmamem_free(rx_ring->desc_dmat, rx_ring->desc,
@@ -600,6 +603,8 @@ rtwn_free_rx_list(struct rtwn_softc *sc)
rx_data = _ring->rx_data[i];
 
if (rx_data->m != NULL) {
+   bus_dmamap_sync(rx_ring->data_dmat,
+   rx_data->map, BUS_DMASYNC_POSTREAD);
bus_dmamap_unload(rx_ring->data_dmat, rx_data->map);
m_freem(rx_data->m);
rx_data->m = NULL;
@@ -643,6 +648,8 @@ rtwn_alloc_tx_list(struct rtwn_softc *sc
device_printf(sc->sc_dev, "could not load desc DMA map\n");
goto fail;
}
+   bus_dmamap_sync(tx_ring->desc_dmat, tx_ring->desc_map,
+   BUS_DMASYNC_PREWRITE);
 
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
@@ -691,6 +698,8 @@ rtwn_reset_tx_list(struct rtwn_softc *sc
sizeof(desc->nextdescaddr)));
 
if (tx_data->m != NULL) {
+   bus_dmamap_sync(tx_ring->data_dmat, tx_data->map,
+   BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(tx_ring->data_dmat, tx_data->map);
m_freem(tx_data->m);
tx_data->m = NULL;
@@ -718,6 +727,8 @@ rtwn_free_tx_list(struct rtwn_softc *sc,
 
if (tx_ring->desc_dmat != NULL) {
if (tx_ring->desc != NULL) {
+   bus_dmamap_sync(tx_ring->desc_dmat,
+   tx_ring->desc_map, BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(tx_ring->desc_dmat,
tx_ring->desc_map);
bus_dmamem_free(tx_ring->desc_dmat, tx_ring->desc,
@@ -730,6 +741,8 @@ rtwn_free_tx_list(struct rtwn_softc *sc,
tx_data = _ring->tx_data[i];
 
if (tx_data->m != NULL) {
+   bus_dmamap_sync(tx_ring->data_dmat, tx_data->map,
+   BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(tx_ring->data_dmat, tx_data->map);
m_freem(tx_data->m);
tx_data->m = NULL;
@@ -1761,7 +1774,10 @@ rtwn_tx_done(struct rtwn_softc *sc, int 
if (le32toh(tx_desc->txdw0) & R92C_TXDW0_OWN)
continue;
 
-   bus_dmamap_unload(tx_ring->desc_dmat, tx_ring->desc_map);
+   /* Unmap and free mbuf. */
+   bus_dmamap_sync(tx_ring->data_dmat, tx_data->map,
+   BUS_DMASYNC_POSTWRITE);
+   bus_dmamap_unload(tx_ring->data_dmat, tx_data->map);
 
/*
 * XXX TODO: figure out whether the transmit succeeded or not.
@@ -1771,8 +1787,10 @@ rtwn_tx_done(struct rtwn_softc *sc, int 
tx_data->ni = NULL;
tx_data->m = NULL;
 
-   sc->sc_tx_timer = 0;
-   tx_ring->queued--;
+   if (--tx_ring->queued)
+   sc->sc_tx_timer = 5;
+   else
+   sc->sc_tx_timer = 0;
}
 
if (tx_ring->queued < (RTWN_TX_LIST_COUNT - 1))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r302034 - head/sys/dev/urtwn

2016-06-20 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Jun 20 22:39:32 2016
New Revision: 302034
URL: https://svnweb.freebsd.org/changeset/base/302034

Log:
  urtwn: fix panic on device detach.
  
  Remove frames from active/pending Tx queues and free related node
  references when vap is destroyed to prevent various use-after-free
  scenarios.
  
  Reported and tested by: Aleksander Alekseev 
  PR:   208632
  Approved by:  re (gjb)

Modified:
  head/sys/dev/urtwn/if_urtwn.c

Modified: head/sys/dev/urtwn/if_urtwn.c
==
--- head/sys/dev/urtwn/if_urtwn.c   Mon Jun 20 22:05:59 2016
(r302033)
+++ head/sys/dev/urtwn/if_urtwn.c   Mon Jun 20 22:39:32 2016
(r302034)
@@ -208,6 +208,10 @@ static struct ieee80211vap *urtwn_vap_cr
 const uint8_t [IEEE80211_ADDR_LEN],
 const uint8_t [IEEE80211_ADDR_LEN]);
 static voidurtwn_vap_delete(struct ieee80211vap *);
+static voidurtwn_vap_clear_tx(struct urtwn_softc *,
+   struct ieee80211vap *);
+static voidurtwn_vap_clear_tx_queue(struct urtwn_softc *,
+   urtwn_datahead *, struct ieee80211vap *);
 static struct mbuf *   urtwn_rx_copy_to_mbuf(struct urtwn_softc *,
struct r92c_rx_stat *, int);
 static struct mbuf *   urtwn_report_intr(struct usb_xfer *,
@@ -824,8 +828,16 @@ urtwn_vap_delete(struct ieee80211vap *va
struct urtwn_softc *sc = ic->ic_softc;
struct urtwn_vap *uvp = URTWN_VAP(vap);
 
+   /* Guarantee that nothing will go through this vap. */
+   ieee80211_new_state(vap, IEEE80211_S_INIT, -1);
+   ieee80211_draintask(ic, >iv_nstate_task);
+
+   URTWN_LOCK(sc);
if (uvp->bcn_mbuf != NULL)
m_freem(uvp->bcn_mbuf);
+   /* Cancel any unfinished Tx. */
+   urtwn_vap_clear_tx(sc, vap);
+   URTWN_UNLOCK(sc);
if (vap->iv_opmode == IEEE80211_M_IBSS)
ieee80211_draintask(ic, >tsf_task_adhoc);
if (URTWN_CHIP_HAS_RATECTL(sc))
@@ -834,6 +846,41 @@ urtwn_vap_delete(struct ieee80211vap *va
free(uvp, M_80211_VAP);
 }
 
+static void
+urtwn_vap_clear_tx(struct urtwn_softc *sc, struct ieee80211vap *vap)
+{
+
+   URTWN_ASSERT_LOCKED(sc);
+
+   urtwn_vap_clear_tx_queue(sc, >sc_tx_active, vap);
+   urtwn_vap_clear_tx_queue(sc, >sc_tx_pending, vap);
+}
+
+static void
+urtwn_vap_clear_tx_queue(struct urtwn_softc *sc, urtwn_datahead *head,
+struct ieee80211vap *vap)
+{
+   struct urtwn_data *dp, *tmp;
+
+   STAILQ_FOREACH_SAFE(dp, head, next, tmp) {
+   if (dp->ni != NULL) {
+   if (dp->ni->ni_vap == vap) {
+   ieee80211_free_node(dp->ni);
+   dp->ni = NULL;
+
+   if (dp->m != NULL) {
+   m_freem(dp->m);
+   dp->m = NULL;
+   }
+
+   STAILQ_REMOVE(head, dp, urtwn_data, next);
+   STAILQ_INSERT_TAIL(>sc_tx_inactive, dp,
+   next);
+   }
+   }
+   }
+}
+
 static struct mbuf *
 urtwn_rx_copy_to_mbuf(struct urtwn_softc *sc, struct r92c_rx_stat *stat,
 int totlen)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r302026 - in head: share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale/tools

2016-06-20 Thread Baptiste Daroussin
On Mon, Jun 20, 2016 at 10:14:04PM +0300, Andrey Chernov wrote:
> On 20.06.2016 9:45, Baptiste Daroussin wrote:
> > Author: bapt
> > Date: Mon Jun 20 06:45:42 2016
> > New Revision: 302026
> > URL: https://svnweb.freebsd.org/changeset/base/302026
> > 
> > Log:
> >   Fix generation of locales with multiple variants
> 
> Thanx.
> Just want to note, even if we stay with RFC 5646 language tags instead
> of ISO 639 ones with @modifier (per ISO 15897), current tags are
> incorrect because have "_" instead of "-" which makes parsing harder,
> because "_" is territory separator and someone may not expect several
> "_" exists. Per RFC 5646 we need names like
> sr-Cyrl_RS.UTF-8.src
> and not
> sr_Cyrl_RS.UTF-8.src
> 

I'm going to move to the @modifier, just it needs a first step which was fixing
the locales with multiple variants. Just give me a bit of time

Best regards,
Bapt


signature.asc
Description: PGP signature


Re: svn commit: r302026 - in head: share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale/tools

2016-06-20 Thread Andrey Chernov
On 20.06.2016 9:45, Baptiste Daroussin wrote:
> Author: bapt
> Date: Mon Jun 20 06:45:42 2016
> New Revision: 302026
> URL: https://svnweb.freebsd.org/changeset/base/302026
> 
> Log:
>   Fix generation of locales with multiple variants

Thanx.
Just want to note, even if we stay with RFC 5646 language tags instead
of ISO 639 ones with @modifier (per ISO 15897), current tags are
incorrect because have "_" instead of "-" which makes parsing harder,
because "_" is territory separator and someone may not expect several
"_" exists. Per RFC 5646 we need names like
sr-Cyrl_RS.UTF-8.src
and not
sr_Cyrl_RS.UTF-8.src

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r302031 - head/sys/dev/mps

2016-06-20 Thread Stephen McConnell
Author: slm
Date: Mon Jun 20 18:14:51 2016
New Revision: 302031
URL: https://svnweb.freebsd.org/changeset/base/302031

Log:
  - No log bit in IOCStatus and endian-safe changes.
  
  Use MPI2_IOCSTATUS_MASK when checking IOCStatus to mask off the log bit, and
  make a few more things endian-safe.
  
  - Fix possible use of invalid pointer.
  
  It was possible to use an invalid pointer to get the target ID value. To fix
  this, initialize a local Target ID variable to an invalid value and change 
that
  variable to a valid value only if the pointer to the Target ID is not NULL.
  
  - No need to set the MPSSAS_SHUTDOWN flag because it's never used.
  
  - done_ccb pointer can be used if it is NULL.
  
  To prevent this, move check for done_ccb == NULL to before done_ccb is used in
  mpssas_stop_unit_done().
  
  - Disks can go missing until a reboot is done in some cases.
  
  This is due to the DevHandle not being released, which causes the Firmware to
  not allow that disk to be re-added.
  
  Reviewed by:  ken
  Approved by:  re (gjb), ken, scottl, ambrisko (mentors)
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D6872

Modified:
  head/sys/dev/mps/mps.c
  head/sys/dev/mps/mps_config.c
  head/sys/dev/mps/mps_sas.c
  head/sys/dev/mps/mps_sas_lsi.c
  head/sys/dev/mps/mps_user.c
  head/sys/dev/mps/mpsvar.h

Modified: head/sys/dev/mps/mps.c
==
--- head/sys/dev/mps/mps.c  Mon Jun 20 16:12:27 2016(r302030)
+++ head/sys/dev/mps/mps.c  Mon Jun 20 18:14:51 2016(r302031)
@@ -1922,9 +1922,10 @@ mps_intr_locked(void *data)
 */
rel_rep =
(MPI2_DIAG_RELEASE_REPLY *)reply;
-   if (le16toh(rel_rep->IOCStatus) ==
+   if ((le16toh(rel_rep->IOCStatus) &
+   MPI2_IOCSTATUS_MASK) ==
MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED)
-   {
+   {
pBuffer =
>fw_diag_buffer_list[
rel_rep->BufferType];

Modified: head/sys/dev/mps/mps_config.c
==
--- head/sys/dev/mps/mps_config.c   Mon Jun 20 16:12:27 2016
(r302030)
+++ head/sys/dev/mps/mps_config.c   Mon Jun 20 18:14:51 2016
(r302031)
@@ -499,7 +499,8 @@ mps_wd_config_pages(struct mps_softc *sc
 */
if (mps_config_get_raid_volume_pg0(sc, _reply,
raid_vol_pg0, (u32)raid_vol_pg0->DevHandle)) {
-   if (mpi_reply.IOCStatus !=
+   if ((le16toh(mpi_reply.IOCStatus) &
+   MPI2_IOCSTATUS_MASK) !=
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) {
mps_dprint(sc, MPS_FAULT,
"Multiple RAID Volume Page0! Direct Drive "

Modified: head/sys/dev/mps/mps_sas.c
==
--- head/sys/dev/mps/mps_sas.c  Mon Jun 20 16:12:27 2016(r302030)
+++ head/sys/dev/mps/mps_sas.c  Mon Jun 20 18:14:51 2016(r302031)
@@ -241,6 +241,8 @@ mpssas_alloc_tm(struct mps_softc *sc)
 void
 mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm)
 {
+   int target_id = 0x;
+ 
if (tm == NULL)
return;
 
@@ -251,10 +253,11 @@ mpssas_free_tm(struct mps_softc *sc, str
 */
if (tm->cm_targ != NULL) {
tm->cm_targ->flags &= ~MPSSAS_TARGET_INRESET;
+   target_id = tm->cm_targ->tid;
}
if (tm->cm_ccb) {
mps_dprint(sc, MPS_INFO, "Unfreezing devq for target ID %d\n",
-   tm->cm_targ->tid);
+   target_id);
xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE);
xpt_free_path(tm->cm_ccb->ccb_h.path);
xpt_free_ccb(tm->cm_ccb);
@@ -372,12 +375,11 @@ mpssas_remove_volume(struct mps_softc *s
return;
}
 
-   if (reply->IOCStatus != MPI2_IOCSTATUS_SUCCESS) {
-   mps_dprint(sc, MPS_FAULT,
+   if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) !=
+   MPI2_IOCSTATUS_SUCCESS) {
+   mps_dprint(sc, MPS_ERROR,
   "IOCStatus = 0x%x while resetting device 0x%x\n",
-  reply->IOCStatus, handle);
-   mpssas_free_tm(sc, tm);
-   return;
+  le16toh(reply->IOCStatus), handle);
}
 
mps_dprint(sc, MPS_XINFO,
@@ -394,7 +396,8 @@ 

svn commit: r302030 - head/sys/contrib/dev/ath/ath_hal/ar9300

2016-06-20 Thread Adrian Chadd
Author: adrian
Date: Mon Jun 20 16:12:27 2016
New Revision: 302030
URL: https://svnweb.freebsd.org/changeset/base/302030

Log:
  [ath] implement TX queue configuration extensions for the AR9380 HAL.
  
  Among other things, this introduces the idea of DBA-gated queues that
  aren't the CABQ.  The TDMA support requires this.
  
  Tested:
  
  * AR9580 (hostap mode)
  * AR9380 (sta mode)
  
  Approved by:  re (gjb)

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c   Mon Jun 20 
15:45:50 2016(r302029)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c   Mon Jun 20 
16:12:27 2016(r302030)
@@ -368,19 +368,40 @@ ar9300_reset_tx_queue(struct ath_hal *ah
 OS_REG_WRITE(ah, AR_DCHNTIME(q), SM(qi->tqi_burstTime, AR_D_CHNTIME_DUR) |
 (qi->tqi_burstTime ? AR_D_CHNTIME_EN : 0));
 
-if (qi->tqi_burstTime &&
-(qi->tqi_qflags & HAL_TXQ_RDYTIME_EXP_POLICY_ENABLE))
-{
+if (qi->tqi_readyTime &&
+  (qi->tqi_qflags & HAL_TXQ_RDYTIME_EXP_POLICY_ENABLE))
 qmisc |= AR_Q_MISC_RDYTIME_EXP_POLICY;
+if (qi->tqi_qflags & HAL_TXQ_DBA_GATED)
+qmisc = (qmisc &~ AR_Q_MISC_FSP) | AR_Q_MISC_FSP_DBA_GATED;
+if (MS(qmisc, AR_Q_MISC_FSP) != AR_Q_MISC_FSP_ASAP) {
+/*
+* These are meangingful only when not scheduled asap.
+*/
+if (qi->tqi_qflags & HAL_TXQ_CBR_DIS_BEMPTY)
+qmisc |= AR_Q_MISC_CBR_INCR_DIS0;
+else
+qmisc &= ~AR_Q_MISC_CBR_INCR_DIS0;
+if (qi->tqi_qflags & HAL_TXQ_CBR_DIS_QEMPTY)
+qmisc |= AR_Q_MISC_CBR_INCR_DIS1;
+else
+qmisc &= ~AR_Q_MISC_CBR_INCR_DIS1;
 }
 
-if (qi->tqi_qflags & HAL_TXQ_BACKOFF_DISABLE) {
+if (qi->tqi_qflags & HAL_TXQ_BACKOFF_DISABLE)
 dmisc |= AR_D_MISC_POST_FR_BKOFF_DIS;
-}
-
-if (qi->tqi_qflags & HAL_TXQ_FRAG_BURST_BACKOFF_ENABLE) {
+if (qi->tqi_qflags & HAL_TXQ_FRAG_BURST_BACKOFF_ENABLE)
 dmisc |= AR_D_MISC_FRAG_BKOFF_EN;
-}
+if (qi->tqi_qflags & HAL_TXQ_ARB_LOCKOUT_GLOBAL)
+dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL,
+AR_D_MISC_ARB_LOCKOUT_CNTRL);
+else if (qi->tqi_qflags & HAL_TXQ_ARB_LOCKOUT_INTRA)
+dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_INTRA_FR,
+AR_D_MISC_ARB_LOCKOUT_CNTRL);
+if (qi->tqi_qflags & HAL_TXQ_IGNORE_VIRTCOL)
+dmisc |= SM(AR_D_MISC_VIR_COL_HANDLING_IGNORE,
+AR_D_MISC_VIR_COL_HANDLING);
+if (qi->tqi_qflags & HAL_TXQ_SEQNUM_INC_DIS)
+dmisc |= AR_D_MISC_SEQ_NUM_INCR_DIS;
 
 switch (qi->tqi_type) {
 case HAL_TX_QUEUE_BEACON:   /* beacon frames */
@@ -433,9 +454,8 @@ ar9300_reset_tx_queue(struct ath_hal *ah
   SM(TU_TO_USEC(value), AR_Q_RDYTIMECFG_DURATION) |
   AR_Q_RDYTIMECFG_EN);
 }
-
-dmisc |= (AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL <<
-AR_D_MISC_ARB_LOCKOUT_CNTRL_S);
+dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL,
+AR_D_MISC_ARB_LOCKOUT_CNTRL);
 break;
 case HAL_TX_QUEUE_PSPOLL:
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r302029 - head/sys/kern

2016-06-20 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 20 15:45:50 2016
New Revision: 302029
URL: https://svnweb.freebsd.org/changeset/base/302029

Log:
  Fix typo.  Note that atomic is still required even for interlocked case.
  
  Sponsored by: The FreeBSD Foundation
  Approved by:  re (marius)

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cMon Jun 20 09:15:03 2016(r302028)
+++ head/sys/kern/vfs_subr.cMon Jun 20 15:45:50 2016(r302029)
@@ -2494,9 +2494,10 @@ v_decr_devcount(struct vnode *vp)
  *
  * Notes on lockless counter manipulation:
  * _vhold, vputx and other routines make various decisions based
- * on either holdcnt or usecount being 0. As long as either contuner
+ * on either holdcnt or usecount being 0. As long as either counter
  * is not transitioning 0->1 nor 1->0, the manipulation can be done
- * with atomic operations. Otherwise the interlock is taken.
+ * with atomic operations. Otherwise the interlock is taken covering
+ * both the atomic and additional actions.
  */
 int
 vget(struct vnode *vp, int flags, struct thread *td)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r300881 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs geom

2016-06-20 Thread Kristof Provost


On 20 Jun 2016, at 17:34, Allan Jude wrote:
> Looking at the backtrace, do you have one or more ZVOLs?
>
No, there are no zvols:

% zfs list -t volume
no datasets available

Regards,
Kristof
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r300881 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs geom

2016-06-20 Thread Allan Jude
On 2016-06-20 11:31, Kristof Provost wrote:
> No, it’s an HP Microserver. 4 data disks and that’s it.
> 
> Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210409
> 
> Regards,
> Kristof
> 
> On 20 Jun 2016, at 17:27, Alan Somers wrote:
> 
> You say it's a 4-disk RAIDZ1. Anything topologically weird, like a
> log, cache or spare device? SAS or SATA? Any SAS expanders? Please
> open a bug for this and assign to me so we can be sure to get this
> fixed in time for 11.0.
> 
> -Alan
> 
> On Mon, Jun 20, 2016 at 8:59 AM, Kristof Provost k...@freebsd.org
>  wrote:
> 
> Hi,
> 
> It looks like this change breaks boot on my machine.
> I’m running a root-on-ZFS system and reliably see this panic
> during boot.
> It’s a 4 disk raidz-1.
> 
> It’s now running r302028 with r300881 backed out, and booting fine.
> 
> The panic:
> panic: solaris assert: refcount(count(>spa_refcount) >=
> spa->spa_minref
> ||
> MUTEX_HELD(_namespace_lock), file:
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c,
> line:
> 863
> 
> Unfortunately I can’t get a dump, but here’s a picture of the
> backtrace:
> https://people.freebsd.org/~kp/zfs_panic.jpg
> 
> 
> Regards,
> Kristof
> 
> 

Looking at the backtrace, do you have one or more ZVOLs?

-- 
Allan Jude
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r300881 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs geom

2016-06-20 Thread Kristof Provost

No, it’s an HP Microserver. 4 data disks and that’s it.

Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210409

Regards,
Kristof

On 20 Jun 2016, at 17:27, Alan Somers wrote:


You say it's a 4-disk RAIDZ1.  Anything topologically weird, like a
log, cache or spare device?  SAS or SATA?  Any SAS expanders?  Please
open a bug for this and assign to me so we can be sure to get this
fixed in time for 11.0.

-Alan

On Mon, Jun 20, 2016 at 8:59 AM, Kristof Provost  
wrote:

Hi,

It looks like this change breaks boot on my machine.
I’m running a root-on-ZFS system and reliably see this panic during 
boot.

It’s a 4 disk raidz-1.

It’s now running r302028 with r300881 backed out, and booting fine.

The panic:
panic: solaris assert: refcount(count(>spa_refcount) >= 
spa->spa_minref

||
MUTEX_HELD(_namespace_lock), file:
/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c, 
line:

863

Unfortunately I can’t get a dump, but here’s a picture of the 
backtrace:

https://people.freebsd.org/~kp/zfs_panic.jpg

Regards,
Kristof

On 28 May 2016, at 0:32, Alan Somers wrote:

Author: asomers
Date: Fri May 27 22:32:44 2016
New Revision: 300881
URL: https://svnweb.freebsd.org/changeset/base/300881

Log:
Avoid issuing spa config updates for physical path when not necessary

ZFS's configuration needs to be updated whenever the physical path 
for a
device changes, but not when a new device is introduced. This is 
because new
devices necessarily cause config updates, but only if they are 
actually

accepted into the pool.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Split vdev_geom_set_physpath out of vdev_geom_attrchanged. When
setting the vdev's physical path, only request a config update if
the physical path has changed. Don't request it when opening a
device for the first time, because the config sync will happen
anyway upstack.

sys/geom/geom_dev.c
Split g_dev_set_physpath and g_dev_set_media out of
g_dev_attrchanged

Submitted by: will, asomers
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6428

Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
head/sys/geom/geom_dev.c

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r300881 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs geom

2016-06-20 Thread Alan Somers
You say it's a 4-disk RAIDZ1.  Anything topologically weird, like a
log, cache or spare device?  SAS or SATA?  Any SAS expanders?  Please
open a bug for this and assign to me so we can be sure to get this
fixed in time for 11.0.

-Alan

On Mon, Jun 20, 2016 at 8:59 AM, Kristof Provost  wrote:
> Hi,
>
> It looks like this change breaks boot on my machine.
> I’m running a root-on-ZFS system and reliably see this panic during boot.
> It’s a 4 disk raidz-1.
>
> It’s now running r302028 with r300881 backed out, and booting fine.
>
> The panic:
> panic: solaris assert: refcount(count(>spa_refcount) >= spa->spa_minref
> ||
> MUTEX_HELD(_namespace_lock), file:
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c, line:
> 863
>
> Unfortunately I can’t get a dump, but here’s a picture of the backtrace:
> https://people.freebsd.org/~kp/zfs_panic.jpg
>
> Regards,
> Kristof
>
> On 28 May 2016, at 0:32, Alan Somers wrote:
>
> Author: asomers
> Date: Fri May 27 22:32:44 2016
> New Revision: 300881
> URL: https://svnweb.freebsd.org/changeset/base/300881
>
> Log:
> Avoid issuing spa config updates for physical path when not necessary
>
> ZFS's configuration needs to be updated whenever the physical path for a
> device changes, but not when a new device is introduced. This is because new
> devices necessarily cause config updates, but only if they are actually
> accepted into the pool.
>
> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
> Split vdev_geom_set_physpath out of vdev_geom_attrchanged. When
> setting the vdev's physical path, only request a config update if
> the physical path has changed. Don't request it when opening a
> device for the first time, because the config sync will happen
> anyway upstack.
>
> sys/geom/geom_dev.c
> Split g_dev_set_physpath and g_dev_set_media out of
> g_dev_attrchanged
>
> Submitted by: will, asomers
> MFC after: 4 weeks
> Sponsored by: Spectra Logic Corp
> Differential Revision: https://reviews.freebsd.org/D6428
>
> Modified:
> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
> head/sys/geom/geom_dev.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r300881 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs geom

2016-06-20 Thread Kristof Provost

Hi,

It looks like this change breaks boot on my machine.
I’m running a root-on-ZFS system and reliably see this panic during 
boot. It’s a 4 disk raidz-1.


It’s now running r302028 with r300881 backed out, and booting fine.

The panic:
panic: solaris assert: refcount(count(>spa_refcount) >= 
spa->spa_minref ||
MUTEX_HELD(_namespace_lock), file: 
/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c, 
line: 863


Unfortunately I can’t get a dump, but here’s a picture of the 
backtrace:

https://people.freebsd.org/~kp/zfs_panic.jpg


Regards,
Kristof

On 28 May 2016, at 0:32, Alan Somers wrote:


Author: asomers
Date: Fri May 27 22:32:44 2016
New Revision: 300881
URL: https://svnweb.freebsd.org/changeset/base/300881

Log:
  Avoid issuing spa config updates for physical path when not 
necessary


  ZFS's configuration needs to be updated whenever the physical path 
for a
  device changes, but not when a new device is introduced. This is 
because new
  devices necessarily cause config updates, but only if they are 
actually

  accepted into the pool.

  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Split vdev_geom_set_physpath out of vdev_geom_attrchanged.  When
setting the vdev's physical path, only request a config update if
the physical path has changed.  Don't request it when opening a
device for the first time, because the config sync will happen
anyway upstack.

  sys/geom/geom_dev.c
Split g_dev_set_physpath and g_dev_set_media out of
g_dev_attrchanged

  Submitted by: will, asomers
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D6428

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  head/sys/geom/geom_dev.c

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r302026 - in head: share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale/tools

2016-06-20 Thread Baptiste Daroussin
Author: bapt
Date: Mon Jun 20 06:45:42 2016
New Revision: 302026
URL: https://svnweb.freebsd.org/changeset/base/302026

Log:
  Fix generation of locales with multiple variants
  
  Serbian locales have triple components to represent the 2 variations of the
  locale: Latin and Cyrillic. Previously the tools generatic the locale were
  appending both definitions instead of differentiating them.
  
  Reported by:  ache
  Approved by:  re (gjb)

Added:
  head/share/msgdef/sr_Cyrl_RS.UTF-8.src   (contents, props changed)
  head/share/timedef/sr_Cyrl_RS.UTF-8.src   (contents, props changed)
Deleted:
  head/share/msgdef/bg_BG.UTF-8.src
  head/share/msgdef/sl_SI.UTF-8.src
  head/share/msgdef/sr_Latn_RS.ISO8859-2.src
  head/share/numericdef/sr_Latn_RS.UTF-8.src
  head/share/timedef/en_HK.UTF-8.src
Modified:
  head/share/monetdef/sr_Latn_RS.UTF-8.src
  head/share/msgdef/Makefile
  head/share/msgdef/sr_Cyrl_RS.ISO8859-5.src
  head/share/msgdef/sr_Latn_RS.UTF-8.src
  head/share/numericdef/Makefile
  head/share/timedef/Makefile
  head/share/timedef/sr_Cyrl_RS.ISO8859-5.src
  head/share/timedef/sr_Latn_RS.ISO8859-2.src   (contents, props changed)
  head/share/timedef/sr_Latn_RS.UTF-8.src   (contents, props changed)
  head/tools/tools/locale/tools/cldr2def.pl

Modified: head/share/monetdef/sr_Latn_RS.UTF-8.src
==
--- head/share/monetdef/sr_Latn_RS.UTF-8.srcMon Jun 20 06:40:58 2016
(r302025)
+++ head/share/monetdef/sr_Latn_RS.UTF-8.srcMon Jun 20 06:45:42 2016
(r302026)
@@ -4,47 +4,47 @@
 # -
 #
 # int_curr_symbol (last character always SPACE)
-RSD ""RSD 
+RSD 
 #
 # currency_symbol
-RSD""RSD
+RSD
 #
 # mon_decimal_point
-,"",
+,
 #
 # mon_thousands_sep
-."".
+.
 #
 # mon_grouping
-33
+3
 #
 # positive_sign
-""
+
 #
 # negative_sign
--""-
+-
 #
 # int_frac_digits
-00
+0
 #
 # frac_digits
-00
+0
 #
 # p_cs_precedes
-00
+0
 #
 # p_sep_by_space
-11
+1
 #
 # n_cs_precedes
-00
+0
 #
 # n_sep_by_space
-11
+1
 #
 # p_sign_posn
-11
+1
 #
 # n_sign_posn
-11
+1
 # EOF

Modified: head/share/msgdef/Makefile
==
--- head/share/msgdef/Makefile  Mon Jun 20 06:40:58 2016(r302025)
+++ head/share/msgdef/Makefile  Mon Jun 20 06:45:42 2016(r302026)
@@ -16,7 +16,6 @@ LOCALES+= be_BY.CP1251
 LOCALES+=  be_BY.ISO8859-5
 LOCALES+=  be_BY.UTF-8
 LOCALES+=  bg_BG.CP1251
-LOCALES+=  bg_BG.UTF-8
 LOCALES+=  cs_CZ.UTF-8
 LOCALES+=  de_DE.UTF-8
 LOCALES+=  el_GR.ISO8859-7
@@ -64,9 +63,8 @@ LOCALES+= ru_RU.UTF-8
 LOCALES+=  se_NO.UTF-8
 LOCALES+=  sk_SK.ISO8859-2
 LOCALES+=  sk_SK.UTF-8
-LOCALES+=  sl_SI.UTF-8
 LOCALES+=  sr_Cyrl_RS.ISO8859-5
-LOCALES+=  sr_Latn_RS.ISO8859-2
+LOCALES+=  sr_Cyrl_RS.UTF-8
 LOCALES+=  sr_Latn_RS.UTF-8
 LOCALES+=  sv_SE.UTF-8
 LOCALES+=  tr_TR.ISO8859-9
@@ -97,6 +95,7 @@ SAME+=ar_SA.UTF-8 ar_MA.UTF-8
 SAME+= ar_SA.UTF-8 ar_JO.UTF-8
 SAME+= ar_SA.UTF-8 ar_EG.UTF-8
 SAME+= ar_SA.UTF-8 ar_AE.UTF-8
+SAME+= sr_Cyrl_RS.UTF-8 bg_BG.UTF-8
 SAME+= es_MX.ISO8859-1 es_ES.ISO8859-15
 SAME+= es_MX.ISO8859-1 es_ES.ISO8859-1
 SAME+= es_MX.ISO8859-1 es_AR.ISO8859-1
@@ -179,9 +178,11 @@ SAME+= fr_FR.UTF-8 fr_CA.ISO8859-1
 SAME+= fr_FR.UTF-8 fr_BE.UTF-8
 SAME+= fr_FR.UTF-8 fr_BE.ISO8859-15
 SAME+= fr_FR.UTF-8 fr_BE.ISO8859-1
-SAME+= sl_SI.UTF-8 sl_SI.ISO8859-2
-SAME+= sl_SI.UTF-8 hr_HR.UTF-8
-SAME+= sl_SI.UTF-8 hr_HR.ISO8859-2
+SAME+= sr_Latn_RS.UTF-8 sr_Latn_RS.ISO8859-2
+SAME+= sr_Latn_RS.UTF-8 sl_SI.UTF-8
+SAME+= sr_Latn_RS.UTF-8 sl_SI.ISO8859-2
+SAME+= sr_Latn_RS.UTF-8 hr_HR.UTF-8
+SAME+= sr_Latn_RS.UTF-8 hr_HR.ISO8859-2
 SAME+= hu_HU.UTF-8 hu_HU.ISO8859-2
 SAME+= is_IS.ISO8859-15 is_IS.ISO8859-1
 SAME+= it_IT.ISO8859-15 it_IT.ISO8859-1
@@ -199,7 +200,6 @@ SAME+=  pt_PT.ISO8859-15 pt_BR.ISO8859-1
 SAME+= pt_PT.UTF-8 pt_BR.UTF-8
 SAME+= ro_RO.UTF-8 ro_RO.ISO8859-2
 SAME+= se_NO.UTF-8 se_FI.UTF-8
-SAME+= sr_Latn_RS.UTF-8 sr_Cyrl_RS.UTF-8
 SAME+= zh_Hans_CN.GBK zh_Hans_CN.GB18030
 SAME+= zh_Hans_CN.GBK zh_Hans_CN.eucCN
 SAME+= ko_KR.eucKR ko_KR.CP949 # legacy (same charset)

Modified: head/share/msgdef/sr_Cyrl_RS.ISO8859-5.src
==
--- head/share/msgdef/sr_Cyrl_RS.ISO8859-5.src  Mon Jun 20 06:40:58 2016
(r302025)
+++ head/share/msgdef/sr_Cyrl_RS.ISO8859-5.src  Mon Jun 20 06:45:42 2016
(r302026)
@@ -4,14 +4,14 @@
 # -
 #
 # yesexpr

svn commit: r302025 - head/usr.sbin/bsdinstall/partedit

2016-06-20 Thread Wojciech Macek
Author: wma
Date: Mon Jun 20 06:40:58 2016
New Revision: 302025
URL: https://svnweb.freebsd.org/changeset/base/302025

Log:
  ARM64: bsdinstall support for creating EFI partitions
  
  This patch enables bsdinstall to create EFI partition during installation 
and uploading it's contents,
  making the ARM64 FreeBSD installation bootable.
  
  Obtained from: Semihalf
  Sponsored by:  Cavium
  Approved by:   re
  Reviewed by:   allanjude, emaste, nwhitehorn, wma
  Differential Revision: https://reviews.freebsd.org/D6853

Added:
  head/usr.sbin/bsdinstall/partedit/partedit_arm64.c   (contents, props changed)
Modified:
  head/usr.sbin/bsdinstall/partedit/gpart_ops.c

Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c
==
--- head/usr.sbin/bsdinstall/partedit/gpart_ops.c   Mon Jun 20 02:04:40 
2016(r302024)
+++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c   Mon Jun 20 06:40:58 
2016(r302025)
@@ -218,7 +218,7 @@ choose_part_type(const char *def_scheme)
{"BSD", "BSD Labels",
"Bootable on most x86 systems", 0 },
{"GPT", "GUID Partition Table",
-   "Bootable on most x86 systems", 0 },
+   "Bootable on most x86 systems and EFI aware ARM64", 0 },
{"MBR", "DOS Partitions",
"Bootable on most x86 systems", 0 },
{"PC98", "NEC PC9801 Partition Table",

Added: head/usr.sbin/bsdinstall/partedit/partedit_arm64.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.sbin/bsdinstall/partedit/partedit_arm64.c  Mon Jun 20 06:40:58 
2016(r302025)
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2016 Cavium Inc.
+ * All rights reserved.
+ *
+ * Developed by Semihalf.
+ * Based on work by Nathan Whitehorn.
+ *
+ * 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 
+#include 
+
+#include "partedit.h"
+
+/* EFI partition size in KB */
+#defineEFI_BOOTPART_SIZE   (50 * 1024)
+#defineEFI_BOOTPART_PATH   "/boot/boot1.efifat"
+
+const char *
+default_scheme(void)
+{
+
+   return ("GPT");
+}
+
+int
+is_scheme_bootable(const char *part_type)
+{
+
+   if (strcmp(part_type, "GPT") == 0)
+   return (1);
+
+   return (0);
+}
+
+int
+is_fs_bootable(const char *part_type, const char *fs)
+{
+
+   if (strcmp(fs, "freebsd-ufs") == 0)
+   return (1);
+
+   return (0);
+}
+
+size_t
+bootpart_size(const char *scheme)
+{
+
+   /* We only support GPT with EFI */
+   if (strcmp(scheme, "GPT") != 0)
+   return (0);
+
+   return ((EFI_BOOTPART_SIZE) * 1024);
+}
+
+const char *
+bootpart_type(const char *scheme)
+{
+
+   /* Only EFI is supported as boot partition */
+   return ("efi");
+}
+
+const char *
+bootcode_path(const char *part_type)
+{
+
+   return (NULL);
+}
+
+const char *
+partcode_path(const char *part_type, const char *fs_type)
+{
+
+   if (strcmp(part_type, "GPT") == 0)
+   return (EFI_BOOTPART_PATH);
+
+   /* No boot partition data for non-GPT */
+   return (NULL);
+}
+
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"