Re: svn commit: r254859 - stable/9/sys/geom/eli

2013-08-26 Thread John-Mark Gurney
Ollivier Robert wrote this message on Sun, Aug 25, 2013 at 14:29 +:
 Author: roberto
 Date: Sun Aug 25 14:29:47 2013
 New Revision: 254859
 URL: http://svnweb.freebsd.org/changeset/base/254859
 
 Log:
   MFC r226840: AESNI-related commit, from a long time ago:
   
   Before this change when GELI detected hardware crypto acceleration it will
   start only one worker thread. For software crypto it will start by default
   N worker threads where N is the number of available CPUs.
   
   This is not optimal if hardware crypto is AES-NI, which uses CPU for AES
   calculations.
   
   Change that to always start one worker thread for every available CPU.
   Number of worker threads per GELI provider can be easly reduced with
   kern.geom.eli.threads sysctl/tunable and even for software crypto it
   should be reduced when using more providers.
   
   While here, when number of threads exceeds number of CPUs avilable don't
   reduce this number, assume the user knows what he is doing.
   
   Submitted by:   Michael Moll kved...@kvedulv.de

I'll just point out that if you have a large number of geli volumes,
that this turns out to hurt performance rather than help it..  At
least in my testing on a 6 core machine w/ an 8 disk zfs pool where
all 8 disks are encrypted...

I think the problem is that we launch threads on a per geli/disk instead
of just having a generic set of threads that can work with any geli
volume...  When you have 17 geli volumes (like I do on my machine) * 6
threads, thats a lot of threads, imagine if the box had 32 or 64 cores?
You're looking at 500-1000 threads just for encryption...

In case someone asks, 8 zfs disks + 2 spares, swap, l2arc * 2, zil * 2
and zfs mirrored root all encrypted volumes...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254894 - head/sys/dev/drm2/radeon

2013-08-26 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Mon Aug 26 06:31:57 2013
New Revision: 254894
URL: http://svnweb.freebsd.org/changeset/base/254894

Log:
  drm/radeon: Rename the (S)DEBUG macros in atom.c to avoid conflicts
  
  For instance, DEBUG is already defined in the LINT kernel configuration.
  This fixes the build of LINT.

Modified:
  head/sys/dev/drm2/radeon/atom.c

Modified: head/sys/dev/drm2/radeon/atom.c
==
--- head/sys/dev/drm2/radeon/atom.c Mon Aug 26 00:28:57 2013
(r254893)
+++ head/sys/dev/drm2/radeon/atom.c Mon Aug 26 06:31:57 2013
(r254894)
@@ -89,11 +89,11 @@ static void debug_print_spaces(int n)
printf(   );
 }
 
-#define DEBUG(...) do if (atom_debug) { printf(__FILE__ __VA_ARGS__); } while 
(0)
-#define SDEBUG(...) do if (atom_debug) { printf(__FILE__); 
debug_print_spaces(debug_depth); printf(__VA_ARGS__); } while (0)
+#define ATOM_DEBUG_PRINT(...) do if (atom_debug) { printf(__FILE__ 
__VA_ARGS__); } while (0)
+#define ATOM_SDEBUG_PRINT(...) do if (atom_debug) { printf(__FILE__); 
debug_print_spaces(debug_depth); printf(__VA_ARGS__); } while (0)
 #else
-#define DEBUG(...) do { } while (0)
-#define SDEBUG(...) do { } while (0)
+#define ATOM_DEBUG_PRINT(...) do { } while (0)
+#define ATOM_SDEBUG_PRINT(...) do { } while (0)
 #endif
 
 static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
@@ -183,7 +183,7 @@ static uint32_t atom_get_src_int(atom_ex
idx = U16(*ptr);
(*ptr) += 2;
if (print)
-   DEBUG(REG[0x%04X], idx);
+   ATOM_DEBUG_PRINT(REG[0x%04X], idx);
idx += gctx-reg_block;
switch (gctx-io_mode) {
case ATOM_IO_MM:
@@ -221,13 +221,13 @@ static uint32_t atom_get_src_int(atom_ex
 * tables, noticed on a DEC Alpha. */
val = get_unaligned_le32((u32 *)ctx-ps[idx]);
if (print)
-   DEBUG(PS[0x%02X,0x%04X], idx, val);
+   ATOM_DEBUG_PRINT(PS[0x%02X,0x%04X], idx, val);
break;
case ATOM_ARG_WS:
idx = U8(*ptr);
(*ptr)++;
if (print)
-   DEBUG(WS[0x%02X], idx);
+   ATOM_DEBUG_PRINT(WS[0x%02X], idx);
switch (idx) {
case ATOM_WS_QUOTIENT:
val = gctx-divmul[0];
@@ -265,9 +265,9 @@ static uint32_t atom_get_src_int(atom_ex
(*ptr) += 2;
if (print) {
if (gctx-data_block)
-   DEBUG(ID[0x%04X+%04X], idx, gctx-data_block);
+   ATOM_DEBUG_PRINT(ID[0x%04X+%04X], idx, 
gctx-data_block);
else
-   DEBUG(ID[0x%04X], idx);
+   ATOM_DEBUG_PRINT(ID[0x%04X], idx);
}
val = U32(idx + gctx-data_block);
break;
@@ -281,7 +281,7 @@ static uint32_t atom_get_src_int(atom_ex
} else
val = gctx-scratch[(gctx-fb_base / 4) + idx];
if (print)
-   DEBUG(FB[0x%02X], idx);
+   ATOM_DEBUG_PRINT(FB[0x%02X], idx);
break;
case ATOM_ARG_IMM:
switch (align) {
@@ -289,7 +289,7 @@ static uint32_t atom_get_src_int(atom_ex
val = U32(*ptr);
(*ptr) += 4;
if (print)
-   DEBUG(IMM 0x%08X\n, val);
+   ATOM_DEBUG_PRINT(IMM 0x%08X\n, val);
return val;
case ATOM_SRC_WORD0:
case ATOM_SRC_WORD8:
@@ -297,7 +297,7 @@ static uint32_t atom_get_src_int(atom_ex
val = U16(*ptr);
(*ptr) += 2;
if (print)
-   DEBUG(IMM 0x%04X\n, val);
+   ATOM_DEBUG_PRINT(IMM 0x%04X\n, val);
return val;
case ATOM_SRC_BYTE0:
case ATOM_SRC_BYTE8:
@@ -306,7 +306,7 @@ static uint32_t atom_get_src_int(atom_ex
val = U8(*ptr);
(*ptr)++;
if (print)
-   DEBUG(IMM 0x%02X\n, val);
+   ATOM_DEBUG_PRINT(IMM 0x%02X\n, val);
return val;
}
return 0;
@@ -314,14 +314,14 @@ static uint32_t atom_get_src_int(atom_ex
idx = U8(*ptr);
(*ptr)++;
if (print)
-   DEBUG(PLL[0x%02X], idx);
+   ATOM_DEBUG_PRINT(PLL[0x%02X], idx);
val = gctx-card-pll_read(gctx-card, idx);
break;
case 

svn commit: r254899 - head/sys/modules/drm2

2013-08-26 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Mon Aug 26 09:17:21 2013
New Revision: 254899
URL: http://svnweb.freebsd.org/changeset/base/254899

Log:
  drm/radeon: Disable build on i386/pc98

Modified:
  head/sys/modules/drm2/Makefile

Modified: head/sys/modules/drm2/Makefile
==
--- head/sys/modules/drm2/Makefile  Mon Aug 26 07:48:50 2013
(r254898)
+++ head/sys/modules/drm2/Makefile  Mon Aug 26 09:17:21 2013
(r254899)
@@ -2,14 +2,26 @@
 
 .include bsd.own.mk
 
-.if ${MK_SOURCELESS_UCODE} != no
+.if ${MACHINE_CPUARCH} == amd64
+_radeonkms=radeonkms
+. if ${MK_SOURCELESS_UCODE} != no
 _radeonkmsfw=  radeonkmsfw
+. endif
+.endif
+
+.if ${MACHINE_CPUARCH} == i386
+. if ${MACHINE} != pc98
+_radeonkms=radeonkms
+.  if ${MK_SOURCELESS_UCODE} != no
+_radeonkmsfw=  radeonkmsfw
+.  endif
+. endif
 .endif
 
 SUBDIR = \
drm2 \
i915kms \
-   radeonkms \
+   ${_radeonkms} \
${_radeonkmsfw}
 
 .include bsd.subdir.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254527 - in head/sys: net80211 netinet sys

2013-08-26 Thread Gleb Smirnoff
A Author: andre
A Date: Mon Aug 19 14:25:11 2013
A New Revision: 254527
A URL: http://svnweb.freebsd.org/changeset/base/254527
A 
A Log:
A   Reorder the mbuf defines to make more sense and group related flags
A   together.
A   
A   Add M_FLAG_PRINTF for use with printf(9) %b indentifier.
A   
A   Use the generic mbuf flags print names in the net80211 code and adjust
A   the protocol specific bits for their new positions.
A   
A   Change SCTP M_PROTO mapping from 5 to 1 to fit within the 16bit field
A   they use internally to store some additional information.
A   
A   Discussed with:trociny, glebius

The first part: reorder the mbuf flag defines wasn't actually discussed.

Tossing values of M_BCAST, M_MCAST, M_VLANTAG for no value except code
tidyness isn't a safe idea. These are the flags that device drivers use.
After this change binary drivers are still loadable but would be buggy.

We allow ourselves ABI changes in head, but this doesn't mean that we
should do them for no important reason.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254900 - head/sys/net80211

2013-08-26 Thread Adrian Chadd
Author: adrian
Date: Mon Aug 26 09:52:05 2013
New Revision: 254900
URL: http://svnweb.freebsd.org/changeset/base/254900

Log:
  Migrate the ff_encap1() routine out into the normal output code.
  
  This will eventually be used by the A-MSDU encapsulation code that
  I'm writing - the sub-frame encapsulation requirement is the same.

Modified:
  head/sys/net80211/ieee80211_output.c
  head/sys/net80211/ieee80211_proto.h
  head/sys/net80211/ieee80211_superg.c

Modified: head/sys/net80211/ieee80211_output.c
==
--- head/sys/net80211/ieee80211_output.cMon Aug 26 09:17:21 2013
(r254899)
+++ head/sys/net80211/ieee80211_output.cMon Aug 26 09:52:05 2013
(r254900)
@@ -3316,3 +3316,40 @@ ieee80211_beacon_update(struct ieee80211
 
return len_changed;
 }
+
+/*
+ * Do Ethernet-LLC encapsulation for each payload in a fast frame
+ * tunnel encapsulation.  The frame is assumed to have an Ethernet
+ * header at the front that must be stripped before prepending the
+ * LLC followed by the Ethernet header passed in (with an Ethernet
+ * type that specifies the payload size).
+ */
+struct mbuf *
+ieee80211_ff_encap1(struct ieee80211vap *vap, struct mbuf *m,
+   const struct ether_header *eh)
+{
+   struct llc *llc;
+   uint16_t payload;
+
+   /* XXX optimize by combining m_adj+M_PREPEND */
+   m_adj(m, sizeof(struct ether_header) - sizeof(struct llc));
+   llc = mtod(m, struct llc *);
+   llc-llc_dsap = llc-llc_ssap = LLC_SNAP_LSAP;
+   llc-llc_control = LLC_UI;
+   llc-llc_snap.org_code[0] = 0;
+   llc-llc_snap.org_code[1] = 0;
+   llc-llc_snap.org_code[2] = 0;
+   llc-llc_snap.ether_type = eh-ether_type;
+   payload = m-m_pkthdr.len;  /* NB: w/o Ethernet header */
+
+   M_PREPEND(m, sizeof(struct ether_header), M_NOWAIT);
+   if (m == NULL) {/* XXX cannot happen */
+   IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG,
+   %s: no space for ether_header\n, __func__);
+   vap-iv_stats.is_tx_nobuf++;
+   return NULL;
+   }
+   ETHER_HEADER_COPY(mtod(m, void *), eh);
+   mtod(m, struct ether_header *)-ether_type = htons(payload);
+   return m;
+}

Modified: head/sys/net80211/ieee80211_proto.h
==
--- head/sys/net80211/ieee80211_proto.h Mon Aug 26 09:17:21 2013
(r254899)
+++ head/sys/net80211/ieee80211_proto.h Mon Aug 26 09:52:05 2013
(r254900)
@@ -125,6 +125,9 @@ int ieee80211_send_probereq(struct ieee8
const uint8_t da[IEEE80211_ADDR_LEN],
const uint8_t bssid[IEEE80211_ADDR_LEN],
const uint8_t *ssid, size_t ssidlen);
+struct mbuf *  ieee80211_ff_encap1(struct ieee80211vap *, struct mbuf *,
+   const struct ether_header *);
+
 /*
  * The formation of ProbeResponse frames requires guidance to
  * deal with legacy clients.  When the client is identified as

Modified: head/sys/net80211/ieee80211_superg.c
==
--- head/sys/net80211/ieee80211_superg.cMon Aug 26 09:17:21 2013
(r254899)
+++ head/sys/net80211/ieee80211_superg.cMon Aug 26 09:52:05 2013
(r254900)
@@ -330,43 +330,6 @@ ieee80211_ff_decap(struct ieee80211_node
 }
 
 /*
- * Do Ethernet-LLC encapsulation for each payload in a fast frame
- * tunnel encapsulation.  The frame is assumed to have an Ethernet
- * header at the front that must be stripped before prepending the
- * LLC followed by the Ethernet header passed in (with an Ethernet
- * type that specifies the payload size).
- */
-static struct mbuf *
-ff_encap1(struct ieee80211vap *vap, struct mbuf *m,
-   const struct ether_header *eh)
-{
-   struct llc *llc;
-   uint16_t payload;
-
-   /* XXX optimize by combining m_adj+M_PREPEND */
-   m_adj(m, sizeof(struct ether_header) - sizeof(struct llc));
-   llc = mtod(m, struct llc *);
-   llc-llc_dsap = llc-llc_ssap = LLC_SNAP_LSAP;
-   llc-llc_control = LLC_UI;
-   llc-llc_snap.org_code[0] = 0;
-   llc-llc_snap.org_code[1] = 0;
-   llc-llc_snap.org_code[2] = 0;
-   llc-llc_snap.ether_type = eh-ether_type;
-   payload = m-m_pkthdr.len;  /* NB: w/o Ethernet header */
-
-   M_PREPEND(m, sizeof(struct ether_header), M_NOWAIT);
-   if (m == NULL) {/* XXX cannot happen */
-   IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG,
-   %s: no space for ether_header\n, __func__);
-   vap-iv_stats.is_tx_nobuf++;
-   return NULL;
-   }
-   ETHER_HEADER_COPY(mtod(m, void *), eh);
-   mtod(m, struct ether_header *)-ether_type = htons(payload);
-   return m;
-}
-
-/*
  * Fast frame encapsulation.  There must be two packets
  

svn commit: r254901 - head/sys/arm/arm

2013-08-26 Thread Andrew Turner
Author: andrew
Date: Mon Aug 26 10:24:59 2013
New Revision: 254901
URL: http://svnweb.freebsd.org/changeset/base/254901

Log:
  Revert r251370 as it contains a deadlock.

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Mon Aug 26 09:52:05 2013(r254900)
+++ head/sys/arm/arm/pmap-v6.c  Mon Aug 26 10:24:59 2013(r254901)
@@ -2944,126 +2944,6 @@ void
 pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
 vm_size_t len, vm_offset_t src_addr)
 {
-   struct l2_bucket *l2b_src, *l2b_dst;
-   struct pv_entry *pve;
-   vm_offset_t addr;
-   vm_offset_t end_addr;
-   vm_offset_t next_bucket;
-   u_int flags;
-   boolean_t l2b_alloc;
-
-   CTR4(KTR_PMAP, %s: VA = 0x%08x, len = 0x%08x. Will %s\n, __func__,
-   src_addr, len, (dst_addr != src_addr) ? exit : copy);
-
-   if (dst_addr != src_addr)
-   return;
-
-   rw_wlock(pvh_global_lock);
-   if (dst_pmap  src_pmap) {
-   PMAP_LOCK(dst_pmap);
-   PMAP_LOCK(src_pmap);
-   } else {
-   PMAP_LOCK(src_pmap);
-   PMAP_LOCK(dst_pmap);
-   }
-
-   end_addr = src_addr + len;
-   addr = src_addr;
-   /*
-* Iterate through all used l2_buckets in a given range.
-*/
-   while (addr  end_addr) {
-   pt_entry_t *src_ptep, *dst_ptep;
-   pt_entry_t src_pte;
-
-   next_bucket = L2_NEXT_BUCKET(addr);
-   /*
-* If the next bucket VA is out of the
-* copy range then set it to end_addr in order
-* to copy all mappings until the given limit.
-*/ 
-   if (next_bucket  end_addr)
-   next_bucket = end_addr;
-
-   l2b_src = pmap_get_l2_bucket(src_pmap, addr);
-   if (l2b_src == NULL) {
-   addr = next_bucket;
-   continue;
-   }
-   src_ptep = l2b_src-l2b_kva[l2pte_index(addr)];
-
-   while (addr  next_bucket) {
-   vm_page_t srcmpte;
-
-   src_pte = *src_ptep;
-   srcmpte = PHYS_TO_VM_PAGE(l2pte_pa(src_pte));
-   /*
-* We only virtual copy managed pages
-*/
-   if (srcmpte  (srcmpte-oflags  VPO_UNMANAGED) == 0) {
-   l2b_alloc = FALSE;
-   l2b_dst = pmap_get_l2_bucket(dst_pmap, addr);
-   /*
-* Check if the allocation of another
-* l2_bucket is necessary.
-*/
-   if (l2b_dst == NULL) {
-   l2b_dst = pmap_alloc_l2_bucket(dst_pmap,
-   addr);
-   l2b_alloc = TRUE;
-   }
-   if (l2b_dst == NULL)
-   goto out;
-
-   dst_ptep = l2b_dst-l2b_kva[l2pte_index(addr)];
-
-   if (*dst_ptep == 0 
-   (pve = pmap_get_pv_entry(dst_pmap, TRUE))) {
-   /*
-* Check whether the source mapping is
-* writable and set the proper flag
-* for a copied mapping so that right
-* permissions could be set on the
-* access fault.
-*/
-   flags = 0;
-   if ((src_pte  L2_APX) == 0)
-   flags = PVF_WRITE;
-   pmap_enter_pv(srcmpte, pve, dst_pmap,
-   addr, flags);
-   /*
-* Clear the modified and
-* accessed (referenced) flags
-* and don't set the wired flag
-* during the copy.
-*/
-   *dst_ptep = src_pte;
-   *dst_ptep = ~L2_S_REF;
-   *dst_ptep |= L2_APX;
-   /*
-* Update stats
-*/
-  

svn commit: r254902 - head/sys/arm/conf

2013-08-26 Thread Andrew Turner
Author: andrew
Date: Mon Aug 26 10:27:15 2013
New Revision: 254902
URL: http://svnweb.freebsd.org/changeset/base/254902

Log:
  Update the root device to be correct for use with crochet.

Modified:
  head/sys/arm/conf/VERSATILEPB

Modified: head/sys/arm/conf/VERSATILEPB
==
--- head/sys/arm/conf/VERSATILEPB   Mon Aug 26 10:24:59 2013
(r254901)
+++ head/sys/arm/conf/VERSATILEPB   Mon Aug 26 10:27:15 2013
(r254902)
@@ -53,7 +53,7 @@ options   SYSVMSG #SYSV-style message q
 optionsSYSVSEM #SYSV-style semaphores
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev
-options ROOTDEVNAME=\ufs:da0s2a\
+optionsROOTDEVNAME=\ufs:da0s1a\
 optionsVFP # vfp/neon
 
 optionsPREEMPTION
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254779 - head/sys/kern

2013-08-26 Thread Gleb Smirnoff
On Sat, Aug 24, 2013 at 12:24:59PM +, Andre Oppermann wrote:
A Author: andre
A Date: Sat Aug 24 12:24:58 2013
A New Revision: 254779
A URL: http://svnweb.freebsd.org/changeset/base/254779
A 
A Log:
A   Avoid code duplication for mbuf initialization and use m_init() instead
A   in mb_ctor_mbuf() and mb_ctor_pack().

m_init() is inline, but it calls m_pkthdr_init() which isn't inline. It
might be that compiler inline it due to m_pkthdr_init() living in the same
file as mb_ctor_mbuf() and mb_ctor_pack(), but not sure.

m_pkthdr_init() zeroes much more than deleted code did. Some zeroing
operations are definitely superfluous job.

The change is definitely not an no-op change. It might have pessimized
the mbuf allocation performance.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254805 - head/sys/sys

2013-08-26 Thread Gleb Smirnoff
On Sat, Aug 24, 2013 at 07:58:36PM +, Andre Oppermann wrote:
A Author: andre
A Date: Sat Aug 24 19:58:36 2013
A New Revision: 254805
A URL: http://svnweb.freebsd.org/changeset/base/254805
A 
A Log:
A   Add mtodo(m, o) macro taking an additional offset into the mbuf data 
section.
A   
A   Sponsored by:  The FreeBSD Foundation
A 
A Modified:
A   head/sys/sys/mbuf.h
A 
A Modified: head/sys/sys/mbuf.h
A 
==
A --- head/sys/sys/mbuf.h  Sat Aug 24 19:51:18 2013(r254804)
A +++ head/sys/sys/mbuf.h  Sat Aug 24 19:58:36 2013(r254805)
A @@ -67,8 +67,10 @@
A   * type:
A   *
A   * mtod(m, t)   -- Convert mbuf pointer to data pointer of correct type.
A + * mtodo(m, o) -- Same as above but with offset 'o' into data.
A   */
A  #define mtod(m, t)  ((t)((m)-m_data))
A +#define mtodo(m, o) ((void *)(((m)-m_data) + (o)))

IMO, having a typecast would be better. Then mtodo() would be really same as
mtod(), as stated in comment.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254823 - head/sys/net

2013-08-26 Thread Gleb Smirnoff
On Sun, Aug 25, 2013 at 01:55:15AM +, Alfred Perlstein wrote:
A Author: alfred
A Date: Sun Aug 25 01:55:14 2013
A New Revision: 254823
A URL: http://svnweb.freebsd.org/changeset/base/254823
A 
A Log:
A   Remove the #ifdef OFED from the 20 byte mac in struct llentry.
A   
A   With this change it is now possible to build the entire infiniband
A   stack as modules and load it dynamically including IP over IB.
A 
A Modified:
A   head/sys/net/if_llatbl.h
A 
A Modified: head/sys/net/if_llatbl.h
A 
==
A --- head/sys/net/if_llatbl.h Sun Aug 25 00:34:44 2013(r254822)
A +++ head/sys/net/if_llatbl.h Sun Aug 25 01:55:14 2013(r254823)
A @@ -75,9 +75,7 @@ struct llentry {
A  union {
A  uint64_tmac_aligned;
A  uint16_tmac16[3];
A -#ifdef OFED
A  uint8_t mac8[20];   /* IB needs 20 bytes. */
A -#endif
A  } ll_addr;
A  
A  /* XXX af-private? */

#include opt_ofed.h should be removed from the file as well.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254906 - head/usr.sbin/mfiutil

2013-08-26 Thread Sean Bruno
Author: sbruno
Date: Mon Aug 26 12:05:38 2013
New Revision: 254906
URL: http://svnweb.freebsd.org/changeset/base/254906

Log:
  Add support to reconfigure a drive as SYSPD (real JBOD in LSI
  terminology).
  
  Adds command mfiutil syspd drive# to change a drive to SYSPD.  Drive
  will then be scanned/reported immediately as /dev/mfisyspdX by the host.
  
  mfiutil good drive# clears SYSPD mode, remove /dev/mfisyspdX and
  sets disk into UNCONFIGURED mode.
  
  Tested on Dell H310 SAS/SATA RAID controller.
  
  MFC after:2 weeks
  Sponsored by: Yahoo! Inc.

Modified:
  head/usr.sbin/mfiutil/mfi_drive.c
  head/usr.sbin/mfiutil/mfiutil.8
  head/usr.sbin/mfiutil/mfiutil.c

Modified: head/usr.sbin/mfiutil/mfi_drive.c
==
--- head/usr.sbin/mfiutil/mfi_drive.c   Mon Aug 26 12:04:22 2013
(r254905)
+++ head/usr.sbin/mfiutil/mfi_drive.c   Mon Aug 26 12:05:38 2013
(r254906)
@@ -474,6 +474,20 @@ rebuild_drive(int ac, char **av)
 MFI_COMMAND(top, rebuild, rebuild_drive);
 
 static int
+syspd_drive(int ac, char **av)
+{
+
+   if (ac != 2) {
+   warnx(syspd: %s, ac  2 ? extra arguments :
+   drive required);
+   return (EINVAL);
+   }
+
+   return (drive_set_state(av[1], MFI_PD_STATE_SYSTEM));
+}
+MFI_COMMAND(top, syspd, syspd_drive);
+
+static int
 start_rebuild(int ac, char **av)
 {
struct mfi_pd_info info;

Modified: head/usr.sbin/mfiutil/mfiutil.8
==
--- head/usr.sbin/mfiutil/mfiutil.8 Mon Aug 26 12:04:22 2013
(r254905)
+++ head/usr.sbin/mfiutil/mfiutil.8 Mon Aug 26 12:05:38 2013
(r254906)
@@ -91,6 +91,9 @@
 .Cm rebuild Ar drive
 .Nm
 .Op Fl u Ar unit
+.Cm syspd Ar drive
+.Nm
+.Op Fl u Ar unit
 .Cm drive progress Ar drive
 .Nm
 .Op Fl u Ar unit
@@ -372,6 +375,11 @@ Mark a failed
 that is still part of an array as a good drive suitable for a rebuild.
 The firmware should kick off an array rebuild on its own if a failed drive
 is marked as a rebuild drive.
+.It Cm syspd Ar drive
+Present the drive to the host operating system as a disk SYSPD block device in
+the format /dev/mfisyspdX.  Clear this flag with
+.Cm good
+.Ar drive
 .It Cm drive progress Ar drive
 Report the current progress and estimated completion time of drive operations
 such as rebuilds or patrol reads.
@@ -679,6 +687,10 @@ Add the drive in slot 2 in the main chas
 .Pp
 .Dl Nm Cm add s2 mfid0
 .Pp
+Reconfigure a disk as a SYSPD block device with no RAID
+.Pp
+.Dl Nm Cm syspd 0
+.Pp
 Configure the adapter to run periodic patrol reads once a week with the first
 patrol read starting in 5 minutes:
 .Pp

Modified: head/usr.sbin/mfiutil/mfiutil.c
==
--- head/usr.sbin/mfiutil/mfiutil.c Mon Aug 26 12:04:22 2013
(r254905)
+++ head/usr.sbin/mfiutil/mfiutil.c Mon Aug 26 12:05:38 2013
(r254906)
@@ -66,8 +66,9 @@ usage(void)
fprintf(stderr, show patrol   - display patrol read 
status\n);
fprintf(stderr, show progress - display status of 
active operations\n);
fprintf(stderr, fail drive  - fail a physical 
drive\n);
-   fprintf(stderr, good drive  - mark a bad physical 
drive as good\n);
+   fprintf(stderr, good drive  - set a failed/SYSPD 
drive as UNCONFIGURED\n);
fprintf(stderr, rebuild drive   - mark failed drive 
ready for rebuild\n);
+   fprintf(stderr, syspd drive - set drive into use as 
SYSPD JBOD\n);
fprintf(stderr, drive progress drive- display status of 
active operations\n);
fprintf(stderr, drive clear drive start|stop - clear a drive 
with all 0x00\n);
fprintf(stderr, start rebuild drive\n);
@@ -103,7 +104,7 @@ static int
 version(int ac __unused, char **av __unused)
 {
 
-   printf(mfiutil version 1.0.14);
+   printf(mfiutil version 1.0.15);
 #ifdef DEBUG
printf( (DEBUG));
 #endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254910 - head/sys/dev/xen/netback

2013-08-26 Thread Andre Oppermann
Author: andre
Date: Mon Aug 26 13:17:37 2013
New Revision: 254910
URL: http://svnweb.freebsd.org/changeset/base/254910

Log:
  Fix mbuf debugging printf()'s after the recent mbuf header changes.

Modified:
  head/sys/dev/xen/netback/netback.c

Modified: head/sys/dev/xen/netback/netback.c
==
--- head/sys/dev/xen/netback/netback.c  Mon Aug 26 13:00:25 2013
(r254909)
+++ head/sys/dev/xen/netback/netback.c  Mon Aug 26 13:17:37 2013
(r254910)
@@ -587,14 +587,14 @@ xnb_dump_mbuf(const struct mbuf *m)
if (m-m_flags  M_PKTHDR) {
printf(flowid=%10d, csum_flags=%#8x, csum_data=%#8x, 
   tso_segsz=%5hd\n,
-  m-m_pkthdr.flowid, m-m_pkthdr.csum_flags,
+  m-m_pkthdr.flowid, (int)m-m_pkthdr.csum_flags,
   m-m_pkthdr.csum_data, m-m_pkthdr.tso_segsz);
-   printf(rcvif=%16p,  header=%18p, len=%19d\n,
-  m-m_pkthdr.rcvif, m-m_pkthdr.header, m-m_pkthdr.len);
+   printf(rcvif=%16p,  len=%19d\n,
+  m-m_pkthdr.rcvif, m-m_pkthdr.len);
}
printf(m_next=%16p, m_nextpk=%16p, m_data=%16p\n,
   m-m_next, m-m_nextpkt, m-m_data);
-   printf(m_len=%17d, m_flags=%#15x, m_type=%18hd\n,
+   printf(m_len=%17d, m_flags=%#15x, m_type=%18u\n,
   m-m_len, m-m_flags, m-m_type);
 
len = m-m_len;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254527 - in head/sys: net80211 netinet sys

2013-08-26 Thread Andre Oppermann

On 26.08.2013 11:43, Gleb Smirnoff wrote:

A Author: andre
A Date: Mon Aug 19 14:25:11 2013
A New Revision: 254527
A URL: http://svnweb.freebsd.org/changeset/base/254527
A
A Log:
A   Reorder the mbuf defines to make more sense and group related flags
A   together.
A
A   Add M_FLAG_PRINTF for use with printf(9) %b indentifier.
A
A   Use the generic mbuf flags print names in the net80211 code and adjust
A   the protocol specific bits for their new positions.
A
A   Change SCTP M_PROTO mapping from 5 to 1 to fit within the 16bit field
A   they use internally to store some additional information.
A
A   Discussed with: trociny, glebius

The first part: reorder the mbuf flag defines wasn't actually discussed.


It was part of the patch to the email I sent you, and a couple of others,
to which you replied with no objection to the M_FLAGS cleanup.  It wasn't
explicitly spelled out but very visible in the patch.


Tossing values of M_BCAST, M_MCAST, M_VLANTAG for no value except code
tidyness isn't a safe idea. These are the flags that device drivers use.
After this change binary drivers are still loadable but would be buggy.


As I already explained elsewhere, on -current only KLD's compiled at the same
time/revision as the kernel are supported.  It has been this way as long as
I can remember.  There never was any guarantee, not even implicit, that a KLD
from r254000 will continue to work with a kernel from r254527.  In fact, if
it were, it would be almost impossible to develop anything on -current.

On -stable we do have this ABI+API guarantee, so a KLD from 9.0 is supposed
to work on 9.2 as well and we generally keep that promise.


We allow ourselves ABI changes in head, but this doesn't mean that we
should do them for no important reason.


The important reason are the later updates to the mbuf headers and that
it simply doesn't make sense to keep the defines spaghetti while the whole
thing is being overhauled.

It seems from a technical point of view both arguments, maintain bits vs.
reordering, are rather weak and prone to bike-shedding. ;)  It certainly
doesn't make sense to change again and revert it just for the sake of it.

--
Andre

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


Re: svn commit: r254823 - head/sys/net

2013-08-26 Thread Alfred Perlstein

Thanks Gleb.  Will do.

-Alfred

On 8/26/13 4:52 AM, Gleb Smirnoff wrote:

On Sun, Aug 25, 2013 at 01:55:15AM +, Alfred Perlstein wrote:
A Author: alfred
A Date: Sun Aug 25 01:55:14 2013
A New Revision: 254823
A URL: http://svnweb.freebsd.org/changeset/base/254823
A
A Log:
A   Remove the #ifdef OFED from the 20 byte mac in struct llentry.
A
A   With this change it is now possible to build the entire infiniband
A   stack as modules and load it dynamically including IP over IB.
A
A Modified:
A   head/sys/net/if_llatbl.h
A
A Modified: head/sys/net/if_llatbl.h
A 
==
A --- head/sys/net/if_llatbl.h  Sun Aug 25 00:34:44 2013(r254822)
A +++ head/sys/net/if_llatbl.h  Sun Aug 25 01:55:14 2013(r254823)
A @@ -75,9 +75,7 @@ struct llentry {
A   union {
A   uint64_tmac_aligned;
A   uint16_tmac16[3];
A -#ifdef OFED
A   uint8_t mac8[20];   /* IB needs 20 bytes. */
A -#endif
A   } ll_addr;
A
A   /* XXX af-private? */

#include opt_ofed.h should be removed from the file as well.



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


svn commit: r254911 - head/sys/vm

2013-08-26 Thread Gleb Smirnoff
Author: glebius
Date: Mon Aug 26 14:14:25 2013
New Revision: 254911
URL: http://svnweb.freebsd.org/changeset/base/254911

Log:
  Remove comment that is no longer relevant since r254182.

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Mon Aug 26 13:17:37 2013(r254910)
+++ head/sys/vm/vm_page.c   Mon Aug 26 14:14:25 2013(r254911)
@@ -1753,10 +1753,6 @@ retry:
if (drop != NULL) {
/*
 * Enqueue the vnode for deferred vdrop().
-*
-* Once the pages are removed from the free
-* page list, pageq can be safely abused to
-* construct a short-lived list of vnodes.
 */
m-plinks.s.pv = drop;
SLIST_INSERT_HEAD(deferred_vdrop_list, m,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254779 - head/sys/kern

2013-08-26 Thread Andre Oppermann

On 26.08.2013 12:50, Gleb Smirnoff wrote:

On Sat, Aug 24, 2013 at 12:24:59PM +, Andre Oppermann wrote:
A Author: andre
A Date: Sat Aug 24 12:24:58 2013
A New Revision: 254779
A URL: http://svnweb.freebsd.org/changeset/base/254779
A
A Log:
A   Avoid code duplication for mbuf initialization and use m_init() instead
A   in mb_ctor_mbuf() and mb_ctor_pack().

m_init() is inline, but it calls m_pkthdr_init() which isn't inline. It
might be that compiler inline it due to m_pkthdr_init() living in the same
file as mb_ctor_mbuf() and mb_ctor_pack(), but not sure.


It depends on the optimization level.


m_pkthdr_init() zeroes much more than deleted code did. Some zeroing
operations are definitely superfluous job.


It's exactly the same for mb_ctor_mbuf() and one more for mb_ctor_pack().

Overall it has become more because we've got a couple more (small) fields
in the mbuf headers now.  Looking at the size of the headers it may be
faster to just bzero() it instead of doing it one by one.

The overall problem is that replicating the same operations in multiple
places is dangerous from a consistency point of view.


The change is definitely not an no-op change. It might have pessimized
the mbuf allocation performance.


Heavy inlining is not always an advantage and cause i-cache bloat.  But
you're right I haven't benchmarked it (yet) and thus we don't know.

I've been setting up my 10G benchmark environment but had to re-prioritize
due to the impeding freeze on -current.  If the benchmarking shows a conclusive
pessimization I'm more than happy to compensate for it, either by inlining
m_pkthdr_init() as well or some form of macro.  Such changes can still be
done during API freeze, but before BETA1.

--
Andre

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


Re: svn commit: r254805 - head/sys/sys

2013-08-26 Thread Andre Oppermann

On 26.08.2013 13:00, Gleb Smirnoff wrote:

On Sat, Aug 24, 2013 at 07:58:36PM +, Andre Oppermann wrote:
A Author: andre
A Date: Sat Aug 24 19:58:36 2013
A New Revision: 254805
A URL: http://svnweb.freebsd.org/changeset/base/254805
A
A Log:
A   Add mtodo(m, o) macro taking an additional offset into the mbuf data 
section.
A
A   Sponsored by:   The FreeBSD Foundation
A
A Modified:
A   head/sys/sys/mbuf.h
A
A Modified: head/sys/sys/mbuf.h
A 
==
A --- head/sys/sys/mbuf.h   Sat Aug 24 19:51:18 2013(r254804)
A +++ head/sys/sys/mbuf.h   Sat Aug 24 19:58:36 2013(r254805)
A @@ -67,8 +67,10 @@
A   * type:
A   *
A   * mtod(m, t)-- Convert mbuf pointer to data pointer of correct type.
A + * mtodo(m, o) -- Same as above but with offset 'o' into data.
A   */
A  #define  mtod(m, t)  ((t)((m)-m_data))
A +#define  mtodo(m, o) ((void *)(((m)-m_data) + (o)))

IMO, having a typecast would be better. Then mtodo() would be really same as
mtod(), as stated in comment.


There was a big discussion about 10 month back when I did this change in my
tcp_workqueue branch with the typecast in.  The conclusion was that a typecast
is really not necessary and only causes one to type a lot more for the compiler
to throw away anyway.  But yes, the comment isn't perfect in that sense.

--
Andre

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


svn commit: r254913 - head/sys/arm/arm

2013-08-26 Thread Rafal Jaworowski
Author: raj
Date: Mon Aug 26 15:38:27 2013
New Revision: 254913
URL: http://svnweb.freebsd.org/changeset/base/254913

Log:
  Add missing TAILQ initializer (omitted in r250634).
  
  Submitted by: Zbigniew Bodek z...@semihalf.com
  Reviewed by:  alc
  Sponsored by: The FreeBSD Foundation, Semihalf

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Mon Aug 26 15:34:18 2013(r254912)
+++ head/sys/arm/arm/pmap-v6.c  Mon Aug 26 15:38:27 2013(r254913)
@@ -1143,6 +1143,7 @@ pmap_pinit0(struct pmap *pmap)
bcopy(kernel_pmap, pmap, sizeof(*pmap));
bzero(pmap-pm_mtx, sizeof(pmap-pm_mtx));
PMAP_LOCK_INIT(pmap);
+   TAILQ_INIT(pmap-pm_pvchunk);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2013-08-26 Thread Andriy Gapon
on 26/08/2013 01:15 Jeremie Le Hen said the following:
 Hi Xin,
 
 On Tue, Aug 20, 2013 at 10:31:14PM +, Xin LI wrote:
 Author: delphij
 Date: Tue Aug 20 22:31:13 2013
 New Revision: 254585
 URL: http://svnweb.freebsd.org/changeset/base/254585

 Log:
   MFV r254220:
   
   Illumos ZFS issues:
 4039 zfs_rename()/zfs_link() needs stronger test for XDEV

 Modified:
   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 Directory Properties:
   head/sys/cddl/contrib/opensolaris/   (props changed)

 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 ==
 --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  Tue Aug 
 20 21:47:07 2013(r254584)
 +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  Tue Aug 
 20 22:31:13 2013(r254585)
 @@ -21,6 +21,7 @@
  /*
   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights 
 reserved.
   * Copyright (c) 2013 by Delphix. All rights reserved.
 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
   */
  
  /* Portions Copyright 2007 Jeremy Teo */
 @@ -3727,13 +3728,18 @@ zfs_rename(vnode_t *sdvp, char *snm, vno
  if (VOP_REALVP(tdvp, realvp, ct) == 0)
  tdvp = realvp;
  
 -if (tdvp-v_vfsp != sdvp-v_vfsp || zfsctl_is_node(tdvp)) {
 +tdzp = VTOZ(tdvp);

The problem with this change, at least on FreeBSD, is that tdvp may not belong
to ZFS.  In that case VTOZ(tdvp) does not make any sense and would produce
garbage or trigger an assert.  Previously tdvp-v_vfsp != sdvp-v_vfsp check
would catch that situations.

Two side notes:
- v_vfsp is actually v_mount on FreeBSD
- VOP_REALVP is a glorified nop on FreeBSD

Another unrelated problem that existed before this change and has been noted by
Davide Italiano is that sdvp is not locked and so it can potentially be recycled
before ZFS_ENTER() enter and for that reason sdzp and zfsvfs could be invalid.
Because sdvp is referenced, this problem can currently occur only if a forced
unmount runs concurrently to zfs_rename.
tdvp should be locked and thus could be used instead of sdvp as a source for 
zfsvfs.

 I suspect this leads to a panic on my -CURRENT machine:
 
 
 #1  0x8033a664 in db_fncall_generic (addr=-2138557936,
 rv=0xfe00e5a30c90, nargs=0, args=0xfe00e5a30ca0)
 at /usr/src/sys/ddb/db_command.c:578
 #2  0x8033a34a in db_fncall (dummy1=-2138210939, dummy2=0, dummy3=-1,
 dummy4=0xfe00e5a30d80 ) at /usr/src/sys/ddb/db_command.c:630
 #3  0x80339fe1 in db_command (last_cmdp=0x812b7850,
 cmd_table=0x0, dopager=0) at /usr/src/sys/ddb/db_command.c:449
 #4  0x8033a0c2 in db_command_script (
 command=0x812b8754 call doadump)
 at /usr/src/sys/ddb/db_command.c:520
 #5  0x80340b09 in db_script_exec (
 scriptname=0xfe00e5a30f50 kdb.enter.panic, warnifnotfound=0)
 at /usr/src/sys/ddb/db_script.c:302
 #6  0x8034096c in db_script_kdbenter (
 eventname=0x80f7cd55 panic) at /usr/src/sys/ddb/db_script.c:324
 #7  0x8033dee1 in db_trap (type=3, code=0)
 at /usr/src/sys/ddb/db_main.c:230
 #8  0x808d84b6 in kdb_trap (type=3, code=0, tf=0xfe00e5a31390)
 at /usr/src/sys/kern/subr_kdb.c:654
 #9  0x80dbc22a in trap (frame=0xfe00e5a31390)
 at /usr/src/sys/amd64/amd64/trap.c:579
 #10 0x80d99282 in calltrap ()
 at /usr/src/sys/amd64/amd64/exception.S:232
 #11 0x808d7d85 in breakpoint () at cpufunc.h:63
 #12 0x808d79eb in kdb_enter (why=0x80f7cd55 panic,
 msg=0x80f7cd55 panic) at /usr/src/sys/kern/subr_kdb.c:445
 #13 0x808838b3 in vpanic (
 fmt=0x81b05389 solaris assert: %s, file: %s, line: %d,
 ap=0xfe00e5a31530) at /usr/src/sys/kern/kern_shutdown.c:747
 #14 0x80883960 in panic (
 fmt=0x81b05389 solaris assert: %s, file: %s, line: %d)
 at /usr/src/sys/kern/kern_shutdown.c:683
 #15 0x81b0443c in assfail (
 a=0x819ab3cc zp == NULL || zp-z_vnode == NULL || zp-z_vnode == 
 vp,
 f=0x819ab403 
 /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h,
  l=248)
 at 
 /usr/src/sys/modules/opensolaris/../../cddl/compat/opensolaris/kern/opensolaris_cmn_err.c:81
 #16 0x8191b111 in VTOZ (vp=0xf800967f5b10) at zfs_znode.h:248
 #17 0x8192372c in zfs_rename (sdvp=0xf800911bf3b0,
 snm=0xf80004a9d806 patchoHq2mGI, tdvp=0xf800967f5b10,
 tnm=0xf8000451780f periodic.conf.5, cr=0xf80011d4ce00, ct=0x0,
 flags=0)
 at 
 /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:3731
 #18 0x8191ec06 in zfs_freebsd_rename (ap=0xfe00e5a317a8)
 at 
 /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:6253
 #19 

svn commit: r254921 - in head: . tools/build/mk

2013-08-26 Thread Antoine Brodin
Author: antoine
Date: Mon Aug 26 17:21:40 2013
New Revision: 254921
URL: http://svnweb.freebsd.org/changeset/base/254921

Log:
  Add more obsolete files.

Modified:
  head/ObsoleteFiles.inc
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Aug 26 17:18:21 2013(r254920)
+++ head/ObsoleteFiles.inc  Mon Aug 26 17:21:40 2013(r254921)
@@ -38,6 +38,14 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20130822: bind 9.9.3-P2 import
+OLD_LIBS+=usr/lib/liblwres.so.80
+# 20130814: vm_page_busy(9)
+OLD_FILES+=usr/share/man/man9/vm_page_flash.9.gz
+OLD_FILES+=usr/share/man/man9/vm_page_io.9.gz
+OLD_FILES+=usr/share/man/man9/vm_page_io_finish.9.gz
+OLD_FILES+=usr/share/man/man9/vm_page_io_start.9.gz
+OLD_FILES+=usr/share/man/man9/vm_page_wakeup.9.gz
 # 20130710: libkvm version bump 
 OLD_LIBS+=lib/libkvm.so.5
 OLD_LIBS+=usr/lib32/libkvm.so.5
@@ -114,6 +122,7 @@ OLD_FILES+=usr/include/clang/3.2/xmmintr
 OLD_FILES+=usr/include/clang/3.2/xopintrin.h
 OLD_DIRS+=usr/include/clang/3.2
 # 20130404: legacy ATA stack removed
+OLD_FILES+=etc/periodic/daily/405.status-ata-raid
 OLD_FILES+=rescue/atacontrol
 OLD_FILES+=sbin/atacontrol
 OLD_FILES+=usr/share/man/man8/atacontrol.8.gz

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Aug 26 17:18:21 
2013(r254920)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Aug 26 17:21:40 
2013(r254921)
@@ -1600,6 +1600,11 @@ OLD_FILES+=usr/share/man/man1/gdbserver.
 OLD_FILES+=usr/share/man/man1/kgdb.1.gz
 .endif
 
+.if ${MK_GNU_PATCH} == no
+OLD_FILES+=usr/bin/bsdpatch
+OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz
+.endif
+
 .if ${MK_GPIB} == no
 OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h
 OLD_FILES+=usr/include/dev/ieee488/ugpib.h
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254922 - head/usr.bin/kdump

2013-08-26 Thread Jilles Tjoelker
Author: jilles
Date: Mon Aug 26 17:22:51 2013
New Revision: 254922
URL: http://svnweb.freebsd.org/changeset/base/254922

Log:
  kdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair().

Modified:
  head/usr.bin/kdump/kdump.c
  head/usr.bin/kdump/mksubr

Modified: head/usr.bin/kdump/kdump.c
==
--- head/usr.bin/kdump/kdump.c  Mon Aug 26 17:21:40 2013(r254921)
+++ head/usr.bin/kdump/kdump.c  Mon Aug 26 17:22:51 2013(r254922)
@@ -830,7 +830,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
ip++;
narg--;
putchar(',');
-   socktypename(*ip);
+   socktypenamewithflags(*ip);
ip++;
narg--;
if (sockdomain == PF_INET ||
@@ -908,7 +908,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
ip++;
narg--;
putchar(',');
-   socktypename(*ip);
+   socktypenamewithflags(*ip);
ip++;
narg--;
c = ',';

Modified: head/usr.bin/kdump/mksubr
==
--- head/usr.bin/kdump/mksubr   Mon Aug 26 17:21:40 2013(r254921)
+++ head/usr.bin/kdump/mksubr   Mon Aug 26 17:22:51 2013(r254922)
@@ -368,6 +368,19 @@ vmprotname (int type)
if_print_or(type, VM_PROT_EXECUTE, or);
if_print_or(type, VM_PROT_COPY, or);
 }
+
+/*
+ * MANUAL
+ */
+void
+socktypenamewithflags(int type)
+{
+   if (type  SOCK_CLOEXEC)
+   printf(SOCK_CLOEXEC|), type = ~SOCK_CLOEXEC;
+   if (type  SOCK_NONBLOCK)
+   printf(SOCK_NONBLOCK|), type = ~SOCK_NONBLOCK;
+   socktypename(type);
+}
 _EOF_
 
 auto_or_type accessmodename  [A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+  
   sys/unistd.h
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254923 - head/share/misc

2013-08-26 Thread John-Mark Gurney
Author: jmg
Date: Mon Aug 26 17:36:55 2013
New Revision: 254923
URL: http://svnweb.freebsd.org/changeset/base/254923

Log:
  Joerg was my mentor way back when...

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Mon Aug 26 17:22:51 2013
(r254922)
+++ head/share/misc/committers-src.dot  Mon Aug 26 17:36:55 2013
(r254923)
@@ -187,6 +187,7 @@ jkim [label=Jung-uk Kim\njkim@FreeBSD.o
 jkoshy [label=A. Joseph Koshy\njko...@freebsd.org\n1998/05/13]
 jlh [label=Jeremie Le Hen\n...@freebsd.org\n2012/04/22]
 jls [label=Jordan Sissel\n...@freebsd.org\n2006/12/06]
+jmg [label=John-Mark Gurney\n...@freebsd.org\n1997/02/13]
 joerg [label=Joerg Wunsch\njo...@freebsd.org\n1993/11/14]
 jon [label=Jonathan Chen\n...@freebsd.org\n2000/10/17]
 jonathan [label=Jonathan Anderson\njonat...@freebsd.org\n2010/10/07]
@@ -495,6 +496,7 @@ jlemon - brooks
 
 joerg - brian
 joerg - eik
+joerg - jmg
 joerg - le
 joerg - netchild
 joerg - schweikh
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254924 - head/sys/dev/amdtemp

2013-08-26 Thread John-Mark Gurney
Author: jmg
Date: Mon Aug 26 17:38:36 2013
New Revision: 254924
URL: http://svnweb.freebsd.org/changeset/base/254924

Log:
  Add support for my:
  CPU: AMD A10-5700 APU with Radeon(tm) HD Graphics(3393.89-MHz K8-class 
CPU)

Modified:
  head/sys/dev/amdtemp/amdtemp.c

Modified: head/sys/dev/amdtemp/amdtemp.c
==
--- head/sys/dev/amdtemp/amdtemp.c  Mon Aug 26 17:36:55 2013
(r254923)
+++ head/sys/dev/amdtemp/amdtemp.c  Mon Aug 26 17:38:36 2013
(r254924)
@@ -76,6 +76,7 @@ struct amdtemp_softc {
 #defineDEVICEID_AMD_MISC0F 0x1103
 #defineDEVICEID_AMD_MISC10 0x1203
 #defineDEVICEID_AMD_MISC11 0x1303
+#defineDEVICEID_AMD_MISC12 0x1403
 #defineDEVICEID_AMD_MISC14 0x1703
 #defineDEVICEID_AMD_MISC15 0x1603
 
@@ -86,6 +87,7 @@ static struct amdtemp_product {
{ VENDORID_AMD, DEVICEID_AMD_MISC0F },
{ VENDORID_AMD, DEVICEID_AMD_MISC10 },
{ VENDORID_AMD, DEVICEID_AMD_MISC11 },
+   { VENDORID_AMD, DEVICEID_AMD_MISC12 },
{ VENDORID_AMD, DEVICEID_AMD_MISC14 },
{ VENDORID_AMD, DEVICEID_AMD_MISC15 },
{ 0, 0 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254925 - in head/sys: fs/nfs net netinet netinet6 netipsec sys

2013-08-26 Thread John Baldwin
Author: jhb
Date: Mon Aug 26 18:16:05 2013
New Revision: 254925
URL: http://svnweb.freebsd.org/changeset/base/254925

Log:
  Remove most of the remaining sysctl name list macros.  They were only
  ever intended for use in sysctl(8) and it has not used them for many
  years.
  
  Reviewed by:  bde
  Tested by:exp-run by bdrewery

Modified:
  head/sys/fs/nfs/nfs.h
  head/sys/net/if_pfsync.h
  head/sys/netinet/icmp_var.h
  head/sys/netinet/igmp_var.h
  head/sys/netinet/in.h
  head/sys/netinet/pim_var.h
  head/sys/netinet/tcp_var.h
  head/sys/netinet/udp_var.h
  head/sys/netinet6/pim6_var.h
  head/sys/netipsec/ipsec.h
  head/sys/netipsec/key_var.h
  head/sys/sys/socket.h
  head/sys/sys/sysctl.h

Modified: head/sys/fs/nfs/nfs.h
==
--- head/sys/fs/nfs/nfs.h   Mon Aug 26 17:38:36 2013(r254924)
+++ head/sys/fs/nfs/nfs.h   Mon Aug 26 18:16:05 2013(r254925)
@@ -335,11 +335,6 @@ struct nfsreferral {
  */
 #defineNFS_NFSSTATS1   /* struct: struct nfsstats */
 
-#defineFS_NFS_NAMES {  
\
-  { 0, 0 },\
-  { nfsstats, CTLTYPE_STRUCT },  \
-}
-
 /*
  * Here is the definition of the attribute bits array and macros that
  * manipulate it.

Modified: head/sys/net/if_pfsync.h
==
--- head/sys/net/if_pfsync.hMon Aug 26 17:38:36 2013(r254924)
+++ head/sys/net/if_pfsync.hMon Aug 26 18:16:05 2013(r254925)
@@ -211,11 +211,6 @@ struct pfsync_tdb {
 #definePFSYNCCTL_STATS 1   /* PFSYNC stats */
 #definePFSYNCCTL_MAXID 2
 
-#definePFSYNCCTL_NAMES { \
-   { 0, 0 }, \
-   { stats, CTLTYPE_STRUCT }, \
-}
-
 struct pfsyncstats {
u_int64_t   pfsyncs_ipackets;   /* total input packets, IPv4 */
u_int64_t   pfsyncs_ipackets6;  /* total input packets, IPv6 */

Modified: head/sys/netinet/icmp_var.h
==
--- head/sys/netinet/icmp_var.h Mon Aug 26 17:38:36 2013(r254924)
+++ head/sys/netinet/icmp_var.h Mon Aug 26 18:16:05 2013(r254925)
@@ -85,13 +85,6 @@ void kmod_icmpstat_inc(int statnum);
 #define ICMPCTL_ICMPLIM3
 #define ICMPCTL_MAXID  4
 
-#define ICMPCTL_NAMES { \
-   { 0, 0 }, \
-   { maskrepl, CTLTYPE_INT }, \
-   { stats, CTLTYPE_STRUCT }, \
-   { icmplim, CTLTYPE_INT }, \
-}
-
 #ifdef _KERNEL
 SYSCTL_DECL(_net_inet_icmp);
 

Modified: head/sys/netinet/igmp_var.h
==
--- head/sys/netinet/igmp_var.h Mon Aug 26 17:38:36 2013(r254924)
+++ head/sys/netinet/igmp_var.h Mon Aug 26 18:16:05 2013(r254925)
@@ -218,8 +218,4 @@ SYSCTL_DECL(_net_inet_igmp);
 #define IGMPCTL_STATS  1   /* statistics (read-only) */
 #define IGMPCTL_MAXID  2
 
-#define IGMPCTL_NAMES { \
-   { 0, 0 }, \
-   { stats, CTLTYPE_STRUCT } \
-}
 #endif

Modified: head/sys/netinet/in.h
==
--- head/sys/netinet/in.h   Mon Aug 26 17:38:36 2013(r254924)
+++ head/sys/netinet/in.h   Mon Aug 26 18:16:05 2013(r254925)
@@ -699,24 +699,6 @@ intgetsourcefilter(int, uint32_t, struc
 #defineIPCTL_GIF_TTL   16  /* default TTL for gif encap 
packet */
 #defineIPCTL_MAXID 17
 
-#defineIPCTL_NAMES { \
-   { 0, 0 }, \
-   { forwarding, CTLTYPE_INT }, \
-   { redirect, CTLTYPE_INT }, \
-   { ttl, CTLTYPE_INT }, \
-   { mtu, CTLTYPE_INT }, \
-   { rtexpire, CTLTYPE_INT }, \
-   { rtminexpire, CTLTYPE_INT }, \
-   { rtmaxcache, CTLTYPE_INT }, \
-   { sourceroute, CTLTYPE_INT }, \
-   { directed-broadcast, CTLTYPE_INT }, \
-   { intr-queue-maxlen, CTLTYPE_INT }, \
-   { intr-queue-drops, CTLTYPE_INT }, \
-   { stats, CTLTYPE_STRUCT }, \
-   { accept_sourceroute, CTLTYPE_INT }, \
-   { fastforwarding, CTLTYPE_INT }, \
-}
-
 #endif /* __BSD_VISIBLE */
 
 #ifdef _KERNEL

Modified: head/sys/netinet/pim_var.h
==
--- head/sys/netinet/pim_var.h  Mon Aug 26 17:38:36 2013(r254924)
+++ head/sys/netinet/pim_var.h  Mon Aug 26 18:16:05 2013(r254925)
@@ -71,11 +71,6 @@ struct pimstat {
 #define PIMCTL_STATS   1   /* statistics (read-only) */
 #define PIMCTL_MAXID   2
 
-#define PIMCTL_NAMES { \
-   { 0, 0 },   \
-   { stats, CTLTYPE_STRUCT },\
-}
-
 #ifdef _KERNEL
 
 void pim_input(struct mbuf *, int);

Modified: head/sys/netinet/tcp_var.h

Re: svn commit: r254925 - in head/sys: fs/nfs net netinet netinet6 netipsec sys

2013-08-26 Thread John Baldwin
On Monday, August 26, 2013 2:16:05 pm John Baldwin wrote:
 Author: jhb
 Date: Mon Aug 26 18:16:05 2013
 New Revision: 254925
 URL: http://svnweb.freebsd.org/changeset/base/254925
 
 Log:
   Remove most of the remaining sysctl name list macros.  They were only
   ever intended for use in sysctl(8) and it has not used them for many
   years.
   
   Reviewed by:bde
   Tested by:  exp-run by bdrewery

There is one remaining macro that is (ab)used by the security/prelude-pflogger 
port.  I have a patch to fix it to use getprotobynumber(3) (ports/181488).  If 
that goes in I will remove the remaining macro.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254882 - head/sys/dev/pci

2013-08-26 Thread John Baldwin
On Sunday, August 25, 2013 2:09:12 pm Jean-Sebastien Pedron wrote:
 Author: dumbbell
 Date: Sun Aug 25 18:09:11 2013
 New Revision: 254882
 URL: http://svnweb.freebsd.org/changeset/base/254882
 
 Log:
   vga_pci: Add API to map the Video BIOS
   
   Here are two new functions to map and unmap the Video BIOS:
   void * vga_pci_map_bios(device_t dev, size_t *size);
   void   vga_pci_unmap_bios(device_t dev, void *bios);
   
   The BIOS is either taken from the shadow copy made by the System BIOS at
   boot time if the given device was used for the default display (i386,
   amd64 and ia64 only), or from the PCI expansion ROM.
   
   Additionally, one can determine if a given device was the default
   display at boot time using the following new function:
   void   vga_pci_unmap_bios(device_t dev, void *bios);
 
 Modified:
   head/sys/dev/pci/pcivar.h
   head/sys/dev/pci/vga_pci.c
 
 Modified: head/sys/dev/pci/pcivar.h
 
==
 --- head/sys/dev/pci/pcivar.h Sun Aug 25 17:26:05 2013(r254881)
 +++ head/sys/dev/pci/pcivar.h Sun Aug 25 18:09:11 2013(r254882)
 @@ -517,4 +517,11 @@ extern uint32_t  pci_generation;
  struct pci_map *pci_find_bar(device_t dev, int reg);
  int  pci_bar_enabled(device_t dev, struct pci_map *pm);
  
 +#define  VGA_PCI_BIOS_SHADOW_ADDR0xC
 +#define  VGA_PCI_BIOS_SHADOW_SIZE131072
 +
 +int  vga_pci_is_boot_display(device_t dev);
 +void *   vga_pci_map_bios(device_t dev, size_t *size);
 +void vga_pci_unmap_bios(device_t dev, void *bios);
 +
  #endif /* _PCIVAR_H_ */
 
 Modified: head/sys/dev/pci/vga_pci.c
 
==
 --- head/sys/dev/pci/vga_pci.cSun Aug 25 17:26:05 2013
 (r254881)
 +++ head/sys/dev/pci/vga_pci.cSun Aug 25 18:09:11 2013
 (r254882)
 @@ -46,6 +46,11 @@ __FBSDID($FreeBSD$);
  #include sys/sysctl.h
  #include sys/systm.h
  
 +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__)
 +#include vm/vm.h
 +#include vm/pmap.h
 +#endif
 +
  #include dev/pci/pcireg.h
  #include dev/pci/pcivar.h
  
 @@ -67,6 +72,99 @@ TUNABLE_INT(hw.pci.default_vgapci_unit
  SYSCTL_INT(_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RDTUN,
  vga_pci_default_unit, -1, Default VGA-compatible display);
  
 +int
 +vga_pci_is_boot_display(device_t dev)
 +{
 +
 + /*
 +  * Return true if the given device is the default display used
 +  * at boot time.
 +  */
 +
 + return (
 + (pci_get_class(dev) == PCIC_DISPLAY ||
 +  (pci_get_class(dev) == PCIC_OLD 
 +   pci_get_subclass(dev) == PCIS_OLD_VGA)) 
 + device_get_unit(dev) == vga_pci_default_unit);
 +}
 +
 +void *
 +vga_pci_map_bios(device_t dev, size_t *size)
 +{
 + int rid;
 + struct resource *res;
 +
 +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__)
 + if (vga_pci_is_boot_display(dev)) {
 + /*
 +  * On x86, the System BIOS copy the default display
 +  * device's Video BIOS at a fixed location in system
 +  * memory (0xC, 128 kBytes long) at boot time.
 +  *
 +  * We use this copy for the default boot device, because
 +  * the original ROM may not be valid after boot.
 +  */
 +
 + printf(%s: Mapping BIOS shadow\n, __func__);
 + *size = VGA_PCI_BIOS_SHADOW_SIZE;
 + return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size));
 + }
 +#endif
 +
 + printf(%s: Mapping PCI expansion ROM\n, __func__);
 + rid = PCIR_BIOS;
 + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE);
 + if (res == NULL) {
 + return (NULL);
 + }
 +
 + *size = rman_get_size(res);
 + return (rman_get_virtual(res));
 +}
 +
 +void
 +vga_pci_unmap_bios(device_t dev, void *bios)
 +{
 + int rid;
 + struct resource *res;
 +
 + if (bios == NULL) {
 + return;
 + }
 +
 +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__)
 + if (vga_pci_is_boot_display(dev)) {
 + /* We mapped the BIOS shadow copy located at 0xC. */
 + printf(%s: Unmapping BIOS shadow\n, __func__);
 + pmap_unmapdev((vm_offset_t)bios, VGA_PCI_BIOS_SHADOW_SIZE);
 +
 + return;
 + }
 +#endif
 +
 + /*
 +  * FIXME: We returned only the virtual address of the resource
 +  * to the caller. Now, to get the resource struct back, we
 +  * allocate it again: the struct exists once in memory in
 +  * device softc. Therefore, we release twice now to release the
 +  * reference we just obtained to get the structure back and the
 +  * caller's reference.
 +  */

This won't actually work (the PCI bus will panic when you do the duplicate 
alloc).  Why not put this in the softc of the vga_pci device?  In fact, it is 

Re: svn commit: r254703 - in head: share/man/man9 sys/sys

2013-08-26 Thread Davide Italiano
On Fri, Aug 23, 2013 at 9:58 AM, John Baldwin j...@freebsd.org wrote:
 On Friday, August 23, 2013 11:29:45 am Davide Italiano wrote:
 On Fri, Aug 23, 2013 at 4:51 PM, John Baldwin j...@freebsd.org wrote:
  On Friday, August 23, 2013 10:12:39 am Davide Italiano wrote:
  Author: davide
  Date: Fri Aug 23 14:12:39 2013
  New Revision: 254703
  URL: http://svnweb.freebsd.org/changeset/base/254703
 
  Log:
Introduce callout_init_rm() so that callouts can be used in conjunction
with rmlocks. This works only with non-sleepable rm because handlers run
in SWI context. While here, document the new KPI in the timeout(9)
manpage.
 
  It also only works with exclusive locks.  (lc_unlock/lc_lock only handle
  write locks for rmlocks).
 
  --
  John Baldwin

 Thanks for pointing out this.
 I think it would be nice to have lc_lock/lc_unlock working both for
 shared and exclusive locks but I'm not 100% sure about all the
 implications/complications. From what I see for rwlocks asserting if a
 lock is held in read-mode is really cheap (check against a flag) while
 for rmlocks the assertion relies on traversing the tracker list for
 the rmlock so I'm worried this operation could be expensive. What's
 your opinion about?

 The much bigger problem is you need an rmtracker object to pass to the
 lock/unlock routines.

 You could make this work hackishly in the callout case by special casing
 rm locks that use read locking and using a tracker on softclock's stack,
 but it is much harder to fix this for the rm_sleep() case where the
 sequence is lc_unlock/lc_lock.

 --
 John Baldwin

I see. I would really like to go for a clean solution if possible, and
if the timeframe for 10 doesn't allow this just revert the commit
until a better solution would be available. FWIW, I pondered a bit
about this and the only way I was able to think is that of augmenting
'struct lock_object' with a 'void *arg' field  that in this case could
be used to store a pointer to something, which in this case is a
pointer to a rmtracker object, and this could allow easily to retrieve
the needed information (as far as I see something similar is done to
store WITNESS information). This, OTOH, could be overkill just to fix
this case though.

Thanks,

-- 
Davide

There are no solved problems; there are only problems that are more
or less solved -- Henri Poincare
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254929 - head/share/man/man4

2013-08-26 Thread John-Mark Gurney
Author: jmg
Date: Mon Aug 26 18:47:10 2013
New Revision: 254929
URL: http://svnweb.freebsd.org/changeset/base/254929

Log:
  none of the drivers in the tree support CDIOCCAPABILITY or CDIOCPITCH..
  remove the documentation so people won't get confused and think they
  are supported...

Modified:
  head/share/man/man4/cd.4

Modified: head/share/man/man4/cd.4
==
--- head/share/man/man4/cd.4Mon Aug 26 18:35:21 2013(r254928)
+++ head/share/man/man4/cd.4Mon Aug 26 18:47:10 2013(r254929)
@@ -113,69 +113,6 @@ read from the scsi inquiry commands, and
 the information printed at boot.
 This structure is defined in the header file
 .In sys/disklabel.h .
-.It Dv CDIOCCAPABILITY
-.Pq Li struct ioc_capability
-Retrieve information from the drive on what features it supports.
-The information is returned in the following structure:
-.Bd -literal -offset indent
-struct ioc_capability {
-   u_long  play_function;
-#define CDDOPLAYTRK0x0001
-   /* Can play tracks/index */
-#defineCDDOPLAYMSF 0x0002
-   /* Can play msf to msf */
-#defineCDDOPLAYBLOCKS  0x0004
-   /* Can play range of blocks */
-#defineCDDOPAUSE   0x0100
-   /* Output can be paused */
-#defineCDDORESUME  0x0200
-   /* Output can be resumed */
-#defineCDDORESET   0x0400
-   /* Drive can be completely reset */
-#defineCDDOSTART   0x0800
-   /* Audio can be started */
-#define CDDOSTOP   0x1000
-   /* Audio can be stopped */
-#define CDDOPITCH  0x2000
-   /* Audio pitch can be changed */
-
-   u_long  routing_function;
-#define CDREADVOLUME   0x0001
-   /* Volume settings can be read */
-#define CDSETVOLUME0x0002
-   /* Volume settings can be set */
-#defineCDSETMONO   0x0100
-   /* Output can be set to mono */
-#define CDSETSTEREO0x0200
-   /* Output can be set to stereo (def) */
-#defineCDSETLEFT   0x0400
-   /* Output can be set to left only */
-#defineCDSETRIGHT  0x0800
-   /* Output can be set to right only */
-#defineCDSETMUTE   0x1000
-   /* Output can be muted */
-#define CDSETPATCH 0x8000
-   /* Direct routing control allowed */
-
-   u_long  special_function;
-#defineCDDOEJECT   0x0001
-   /* The tray can be opened */
-#defineCDDOCLOSE   0x0002
-   /* The tray can be closed */
-#defineCDDOLOCK0x0004
-   /* The tray can be locked */
-#define CDREADHEADER   0x0100
-   /* Can read Table of Contents */
-#defineCDREADENTRIES   0x0200
-   /* Can read TOC Entries */
-#defineCDREADSUBQ  0x0200
-   /* Can read Subchannel info */
-#define CDREADRW   0x0400
-   /* Can read subcodes R-W */
-#defineCDHASDEBUG  0x4000
-   /* The tray has dynamic debugging */
-};
-.Ed
 .It Dv CDIOCPLAYTRACKS
 .Pq Li struct ioc_play_track
 Start audio playback given a track address and length.
@@ -320,24 +257,6 @@ Eject the
 .It Dv CDIOCCLOSE
 Tell the drive to close its door and load the media.
 Not all drives support this feature.
-.It Dv CDIOCPITCH
-.Pq Li struct ioc_pitch
-For drives that support it, this command instructs the drive to play
-the audio at a faster or slower rate than normal.
-Values of
-.Li speed
-between -32767 and -1 result in slower playback; a zero value
-indicates normal speed; and values from 1 to 32767 give faster
-playback.
-Drives with less than 16 bits of resolution will silently
-ignore less-significant bits.
-The structure is defined thusly:
-.Bd -literal -offset indent
-struct ioc_pitch
-{
-   short   speed;
-};
-.Ed
 .El
 .Sh NOTES
 When a
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254930 - head/share/man/man4

2013-08-26 Thread John-Mark Gurney
Author: jmg
Date: Mon Aug 26 18:50:40 2013
New Revision: 254930
URL: http://svnweb.freebsd.org/changeset/base/254930

Log:
  fix up my copyright..

Modified:
  head/share/man/man4/sysmouse.4

Modified: head/share/man/man4/sysmouse.4
==
--- head/share/man/man4/sysmouse.4  Mon Aug 26 18:47:10 2013
(r254929)
+++ head/share/man/man4/sysmouse.4  Mon Aug 26 18:50:40 2013
(r254930)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 1997
-.\John-Mark Gurney.  All rights reserved.
+.\ Copyright 1997 John-Mark Gurney.  All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254932 - head/sys/kern

2013-08-26 Thread John-Mark Gurney
Author: jmg
Date: Mon Aug 26 18:53:19 2013
New Revision: 254932
URL: http://svnweb.freebsd.org/changeset/base/254932

Log:
  fix up some comments and a white space issue...
  
  MFC after:3 days

Modified:
  head/sys/kern/kern_event.c

Modified: head/sys/kern/kern_event.c
==
--- head/sys/kern/kern_event.c  Mon Aug 26 18:51:48 2013(r254931)
+++ head/sys/kern/kern_event.c  Mon Aug 26 18:53:19 2013(r254932)
@@ -565,7 +565,7 @@ filt_timerattach(struct knote *kn)
memory_order_relaxed));
 
kn-kn_flags |= EV_CLEAR;   /* automatically set */
-   kn-kn_status = ~KN_DETACHED;  /* knlist_add usually sets it */
+   kn-kn_status = ~KN_DETACHED;  /* knlist_add clears it */
calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK);
callout_init(calloutp, CALLOUT_MPSAFE);
kn-kn_hook = calloutp;
@@ -587,7 +587,7 @@ filt_timerdetach(struct knote *kn)
free(calloutp, M_KQUEUE);
old = atomic_fetch_sub_explicit(kq_ncallouts, 1, memory_order_relaxed);
KASSERT(old  0, (Number of callouts cannot become negative));
-   kn-kn_status |= KN_DETACHED;   /* knlist_remove usually clears it */
+   kn-kn_status |= KN_DETACHED;   /* knlist_remove sets it */
 }
 
 static int
@@ -1467,7 +1467,7 @@ retry:
*kevp = kn-kn_kevent;
KQ_LOCK(kq);
KQ_GLOBAL_UNLOCK(kq_global, haskqglobal);
-   if (kn-kn_flags  (EV_CLEAR |  EV_DISPATCH)) {
+   if (kn-kn_flags  (EV_CLEAR | EV_DISPATCH)) {
/* 
 * Manually clear knotes who weren't 
 * 'touch'ed.
@@ -1859,7 +1859,7 @@ knlist_remove_kq(struct knlist *knl, str
 }
 
 /*
- * remove all knotes from a specified klist
+ * remove knote from the specified knlist
  */
 void
 knlist_remove(struct knlist *knl, struct knote *kn, int islocked)
@@ -1869,7 +1869,7 @@ knlist_remove(struct knlist *knl, struct
 }
 
 /*
- * remove knote from a specified klist while in f_event handler.
+ * remove knote from the specified knlist while in f_event handler.
  */
 void
 knlist_remove_inevent(struct knlist *knl, struct knote *kn)
@@ -2002,7 +2002,7 @@ knlist_destroy(struct knlist *knl)
 #ifdef INVARIANTS
/*
 * if we run across this error, we need to find the offending
-* driver and have it call knlist_clear.
+* driver and have it call knlist_clear or knlist_delete.
 */
if (!SLIST_EMPTY(knl-kl_list))
printf(WARNING: destroying knlist w/ knotes on it!\n);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254931 - head/usr.bin/brandelf

2013-08-26 Thread John-Mark Gurney
Author: jmg
Date: Mon Aug 26 18:51:48 2013
New Revision: 254931
URL: http://svnweb.freebsd.org/changeset/base/254931

Log:
  fix up my copyright and remove third clause..

Modified:
  head/usr.bin/brandelf/brandelf.1

Modified: head/usr.bin/brandelf/brandelf.1
==
--- head/usr.bin/brandelf/brandelf.1Mon Aug 26 18:50:40 2013
(r254930)
+++ head/usr.bin/brandelf/brandelf.1Mon Aug 26 18:51:48 2013
(r254931)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 1997
-.\John-Mark Gurney.  All rights reserved.
+.\ Copyright 1997 John-Mark Gurney.  All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -9,9 +8,6 @@
 .\ 2. Redistributions in binary form must reproduce the above copyright
 .\notice, this list of conditions and the following disclaimer in the
 .\documentation and/or other materials provided with the distribution.
-.\ 3. Neither the name of the author nor the names of any co-contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written permission.
 .\
 .\ THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS''
 .\ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254933 - head/sys/dev/cxgbe

2013-08-26 Thread Navdeep Parhar
Author: np
Date: Mon Aug 26 19:02:52 2013
New Revision: 254933
URL: http://svnweb.freebsd.org/changeset/base/254933

Log:
  Use correct mailbox and PCIe PF number when querying RDMA parameters.

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cMon Aug 26 18:53:19 2013
(r254932)
+++ head/sys/dev/cxgbe/t4_main.cMon Aug 26 19:02:52 2013
(r254933)
@@ -2492,7 +2492,7 @@ get_params__post_init(struct adapter *sc
param[3] = FW_PARAM_PFVF(CQ_END);
param[4] = FW_PARAM_PFVF(OCQ_START);
param[5] = FW_PARAM_PFVF(OCQ_END);
-   rc = -t4_query_params(sc, 0, 0, 0, 6, param, val);
+   rc = -t4_query_params(sc, sc-mbox, sc-pf, 0, 6, param, val);
if (rc != 0) {
device_printf(sc-dev,
failed to query RDMA parameters(2): %d.\n, rc);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254703 - in head: share/man/man9 sys/sys

2013-08-26 Thread John Baldwin
On Monday, August 26, 2013 2:33:41 pm Davide Italiano wrote:
 On Fri, Aug 23, 2013 at 9:58 AM, John Baldwin j...@freebsd.org wrote:
  On Friday, August 23, 2013 11:29:45 am Davide Italiano wrote:
  On Fri, Aug 23, 2013 at 4:51 PM, John Baldwin j...@freebsd.org wrote:
   On Friday, August 23, 2013 10:12:39 am Davide Italiano wrote:
   Author: davide
   Date: Fri Aug 23 14:12:39 2013
   New Revision: 254703
   URL: http://svnweb.freebsd.org/changeset/base/254703
  
   Log:
 Introduce callout_init_rm() so that callouts can be used in 
conjunction
 with rmlocks. This works only with non-sleepable rm because handlers 
run
 in SWI context. While here, document the new KPI in the timeout(9)
 manpage.
  
   It also only works with exclusive locks.  (lc_unlock/lc_lock only 
handle
   write locks for rmlocks).
  
   --
   John Baldwin
 
  Thanks for pointing out this.
  I think it would be nice to have lc_lock/lc_unlock working both for
  shared and exclusive locks but I'm not 100% sure about all the
  implications/complications. From what I see for rwlocks asserting if a
  lock is held in read-mode is really cheap (check against a flag) while
  for rmlocks the assertion relies on traversing the tracker list for
  the rmlock so I'm worried this operation could be expensive. What's
  your opinion about?
 
  The much bigger problem is you need an rmtracker object to pass to the
  lock/unlock routines.
 
  You could make this work hackishly in the callout case by special casing
  rm locks that use read locking and using a tracker on softclock's stack,
  but it is much harder to fix this for the rm_sleep() case where the
  sequence is lc_unlock/lc_lock.
 
  --
  John Baldwin
 
 I see. I would really like to go for a clean solution if possible, and
 if the timeframe for 10 doesn't allow this just revert the commit
 until a better solution would be available. FWIW, I pondered a bit
 about this and the only way I was able to think is that of augmenting
 'struct lock_object' with a 'void *arg' field  that in this case could
 be used to store a pointer to something, which in this case is a
 pointer to a rmtracker object, and this could allow easily to retrieve
 the needed information (as far as I see something similar is done to
 store WITNESS information). This, OTOH, could be overkill just to fix
 this case though.

Well, I've thought about changing lc_lock/unlock to return a uintptr_t or
void * instead of an int and then I could make rm_sleep work fine.  However, 
that still doesn't solve the callout case.  The callout case can't be fixed
easily without explicitly allocating storage in the softclock thread itself.

Also, I don't think you want a pointer in a lock_object.  Imagine if two 
threads both locked and then slept on the same rm lock in succession while
waiting for a wakeup.  You would have two trackers to keep track of, but only
one pointer in the lock_object.

I'm not sure you need to revert your commit.  It should pretty much panic
instantly if someone tries to use it with a read lock instead of a write
lock, even without INVARIANTS.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254936 - head/sys/geom/zero

2013-08-26 Thread Alexander Motin
Author: mav
Date: Mon Aug 26 20:39:02 2013
New Revision: 254936
URL: http://svnweb.freebsd.org/changeset/base/254936

Log:
  MFprojects/camlock r254895:
  Add unmapped BIO support to GEOM ZERO if kern.geom.zero.clear is cleared.

Modified:
  head/sys/geom/zero/g_zero.c

Modified: head/sys/geom/zero/g_zero.c
==
--- head/sys/geom/zero/g_zero.c Mon Aug 26 20:03:44 2013(r254935)
+++ head/sys/geom/zero/g_zero.c Mon Aug 26 20:39:02 2013(r254936)
@@ -41,16 +41,37 @@ __FBSDID($FreeBSD$);
 
 #defineG_ZERO_CLASS_NAME   ZERO
 
+static int g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS);
+
 SYSCTL_DECL(_kern_geom);
 static SYSCTL_NODE(_kern_geom, OID_AUTO, zero, CTLFLAG_RW, 0,
 GEOM_ZERO stuff);
 static int g_zero_clear = 1;
-SYSCTL_INT(_kern_geom_zero, OID_AUTO, clear, CTLFLAG_RW, g_zero_clear, 0,
-Clear read data buffer);
+SYSCTL_PROC(_kern_geom_zero, OID_AUTO, clear, CTLTYPE_INT|CTLFLAG_RW,
+g_zero_clear, 0, g_zero_clear_sysctl, I, Clear read data buffer);
 static int g_zero_byte = 0;
 SYSCTL_INT(_kern_geom_zero, OID_AUTO, byte, CTLFLAG_RW, g_zero_byte, 0,
 Byte (octet) value to clear the buffers with);
 
+static struct g_provider *gpp;
+
+static int
+g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS)
+{
+   int error;
+
+   error = sysctl_handle_int(oidp, g_zero_clear, 0, req);
+   if (error != 0 || req-newptr == NULL)
+   return (error);
+   if (gpp == NULL)
+   return (ENXIO);
+   if (g_zero_clear)
+   gpp-flags = ~G_PF_ACCEPT_UNMAPPED;
+   else
+   gpp-flags |= G_PF_ACCEPT_UNMAPPED;
+   return (0);
+}
+
 static void
 g_zero_start(struct bio *bp)
 {
@@ -58,7 +79,7 @@ g_zero_start(struct bio *bp)
 
switch (bp-bio_cmd) {
case BIO_READ:
-   if (g_zero_clear)
+   if (g_zero_clear  (bp-bio_flags  BIO_UNMAPPED) == 0)
memset(bp-bio_data, g_zero_byte, bp-bio_length);
/* FALLTHROUGH */
case BIO_DELETE:
@@ -84,7 +105,9 @@ g_zero_init(struct g_class *mp)
gp = g_new_geomf(mp, gzero);
gp-start = g_zero_start;
gp-access = g_std_access;
-   pp = g_new_providerf(gp, %s, gp-name);
+   gpp = pp = g_new_providerf(gp, %s, gp-name);
+   if (!g_zero_clear)
+   pp-flags |= G_PF_ACCEPT_UNMAPPED;
pp-mediasize = 1152921504606846976LLU;
pp-sectorsize = 512;
g_error_provider(pp, 0);
@@ -104,6 +127,7 @@ g_zero_destroy_geom(struct gctl_req *req
return (0);
if (pp-acr  0 || pp-acw  0 || pp-ace  0)
return (EBUSY);
+   gpp = NULL;
g_wither_geom(gp, ENXIO);
return (0);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254937 - head/sys/dev/fdc

2013-08-26 Thread Joerg Wunsch
Author: joerg
Date: Mon Aug 26 21:15:50 2013
New Revision: 254937
URL: http://svnweb.freebsd.org/changeset/base/254937

Log:
  Reimplement the FDOPT_NOERROR feature that was kicked out in r134081.
  
  It is needed for fdread(1) in order to be able to recover from CRC
  errors in the data field of a floppy sector (by returning the sector
  data that failed CRC, rather than inventing dummy data).
  
  When closing the device, clear all transient device options.
  
  MFC after:1 week

Modified:
  head/sys/dev/fdc/fdc.c

Modified: head/sys/dev/fdc/fdc.c
==
--- head/sys/dev/fdc/fdc.c  Mon Aug 26 20:39:02 2013(r254936)
+++ head/sys/dev/fdc/fdc.c  Mon Aug 26 21:15:50 2013(r254937)
@@ -761,10 +761,13 @@ fdc_worker(struct fdc_data *fdc)
int i, nsect;
int st0, st3, cyl, mfm, steptrac, cylinder, descyl, sec;
int head;
+   int override_error;
static int need_recal;
struct fdc_readid *idp;
struct fd_formb *finfo;
 
+   override_error = 0;
+
/* Have we exhausted our retries ? */
bp = fdc-bp;
fd = fdc-fd;
@@ -1090,7 +1093,10 @@ fdc_worker(struct fdc_data *fdc)
fdc-status[3], fdc-status[4], fdc-status[5]);
}
retry_line = __LINE__;
-   return (1);
+   if (fd-options  FDOPT_NOERROR)
+   override_error = 1;
+   else
+   return (1);
}
/* All OK */
switch(bp-bio_cmd) {
@@ -,10 +1117,16 @@ fdc_worker(struct fdc_data *fdc)
bp-bio_resid -= fd-fd_iosize;
bp-bio_completed += fd-fd_iosize;
fd-fd_ioptr += fd-fd_iosize;
-   /* Since we managed to get something done, reset the retry */
-   fdc-retry = 0;
-   if (bp-bio_resid  0)
-   return (0);
+   if (override_error) {
+   if ((debugflags  4))
+   printf(FDOPT_NOERROR: returning bad data\n);
+   } else {
+   /* Since we managed to get something done,
+* reset the retry */
+   fdc-retry = 0;
+   if (bp-bio_resid  0)
+   return (0);
+   }
break;
case BIO_FMT:
break;
@@ -1406,6 +1418,7 @@ fd_access(struct g_provider *pp, int r, 
ae = e + pp-ace;
 
if (ar == 0  aw == 0  ae == 0) {
+   fd-options = ~(FDOPT_NORETRY | FDOPT_NOERRLOG | 
FDOPT_NOERROR);
device_unbusy(fd-dev);
return (0);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254938 - in stable/9/sys: cam dev/mps sys

2013-08-26 Thread Kenneth D. Merry
Author: ken
Date: Mon Aug 26 21:34:43 2013
New Revision: 254938
URL: http://svnweb.freebsd.org/changeset/base/254938

Log:
  MFC mps(4) driver changes 253460, 253549, 253550 and 254615.
  
  There are some slight changes here from the version in head.
  
  __FreeBSD_version has been bumped to 902502 for the inclusion of the
  PIM_RESCAN CAM path inquiry flag.  The ifdefs in the mps(4) driver
  have been changed accordingly.
  
  In head, the TDP_NOSLEEPING thread flag has been removed but it
  still exists in stable/9.
  

r253460 | scottl | 2013-07-18 18:12:41 -0600 (Thu, 18 Jul 2013) | 5 lines
  
Overhaul error, information, and debug logging.
  
Obtained from:  Netflix
  

r253549 | ken | 2013-07-22 12:37:07 -0600 (Mon, 22 Jul 2013) | 57 lines
  
CAM and mps(4) driver scanning changes.
  
Add a PIM_NOSCAN flag to the CAM path inquiry CCB.  This tells CAM
not to perform a rescan on a bus when it is registered.
  
We now use this flag in the mps(4) driver.  Since it knows what
devices it has attached, it is more efficient for it to just issue
a target rescan on the targets that are attached.
  
Also, remove the private rescan thread from the mps(4) driver in
favor of the rescan thread already built into CAM.  Without this
change, but with the change above, the MPS scanner could run before
or during CAM's initial setup, which would cause duplicate device
reprobes and announcements.
  
sys/param.h:
Bump __FreeBSD_version to 139 for the inclusion of the
PIM_RESCAN CAM path inquiry flag.
  
sys/cam/cam_ccb.h:
sys/cam/cam_xpt.c:
Added a PIM_NOSCAN flag.  If a SIM sets this in the path
inquiry ccb, then CAM won't rescan the bus in
xpt_bus_regsister.
  
sys/dev/mps/mps_sas.c
For versions of FreeBSD that have the PIM_NOSCAN path
inquiry flag, don't freeze the sim queue during scanning,
because CAM won't be scanning this bus.  Instead, hold
up the boot.  Don't call mpssas_rescan_target in
mpssas_startup_decrement; it's redundant and I don't
know why it was in there.
  
Set PIM_NOSCAN in path inquiry CCBs.
  
Remove methods related to the internal rescan daemon.
  
Always use async events to trigger a probe for EEDP support.
In older versions of FreeBSD where AC_ADVINFO_CHANGED is
not available, use AC_FOUND_DEVICE and issue the
necessary READ CAPACITY manually.
  
Provide a path to xpt_register_async() so that we only
receive events for our own SCSI domain.
  
Improve error reporting in cases where setup for EEDP
detection fails.
  
sys/dev/mps/mps_sas.h:
Remove softc flags and data related to the scanner thread.
  
sys/dev/mps/mps_sas_lsi.c:
Unconditionally rescan the target whenever a device is added.
  
Sponsored by:   Spectra Logic
  

r253550 | ken | 2013-07-22 12:41:53 -0600 (Mon, 22 Jul 2013) | 93 lines
  
Merge in phase 14+ - 16 mps driver fixes from LSI:
  
---
System panics during a Port reset with ouststanding I/O
---
It is possible to call mps_mapping_free_memory after this
memory is already freed, causing a panic. Removed this extra
call to mps_mappiing_free_memory and call mps_mapping_exit
in place of the mps_mapping_free_memory call so that any
outstanding mapping items can be flushed before memory is
freed.
  
---
Correct memory leak during a Port reset with ouststanding I/O
---
In mps_reinit function, the mapping memory was not being
freed before being re-allocated. Added line to call the
memory free function for mapping memory.
  
---
Use CAM_SIM_QUEUED flag in Driver IO path.
---
This flag informs the XPT that successful abort of a CCB
requires an abort ccb to be issued to the SIM.  While
processing SCSI IO's, set the CAM_SIM_QUEUED flag in the
status for the IO. When the command completes, clear this
flag.
  
---
Check for CAM_REQ_INPROG in I/O path.
---
Added a check in mpssas_action_scsiio for the In Progress
status for the IO. If this flag is set, the IO has already
been aborted by the upper 

Re: svn commit: r253550 - head/sys/dev/mps

2013-08-26 Thread Kenneth D. Merry
On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote:
 On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote:
 
  If you really want one now, I've attached a patch from stable/9 on June
  27th.  It may or may not apply now.
 
 Its apply witch litle edit.
 
Now that it's done, I hope to merge that change to stable/9 this week.
   
   Also, I see strange behaviour of LSI 9211-8i -- after some activity
   got timeout and HBA put in looped reset.
  
  That's not good.  Try with the newer driver and see whether if affects the
  behavior.
 
 Witch this driver I got same behavior: after intesive i/o got timeout,
 driver try re-init controller without success. On all HDD activity LED
 ON w/o blinking at this moment.

Do you have any logs or dmesg output showing the problem?

I have merged the latest driver changes to stable/9, including a bug fix
for out of chain frame handling.

Ken
-- 
Kenneth Merry
k...@freebsd.org
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r253550 - head/sys/dev/mps

2013-08-26 Thread Slawa Olhovchenkov
On Mon, Aug 26, 2013 at 03:40:27PM -0600, Kenneth D. Merry wrote:

 On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote:
  On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote:
  
   If you really want one now, I've attached a patch from stable/9 on June
   27th.  It may or may not apply now.
  
  Its apply witch litle edit.
  
 Now that it's done, I hope to merge that change to stable/9 this week.

Also, I see strange behaviour of LSI 9211-8i -- after some activity
got timeout and HBA put in looped reset.
   
   That's not good.  Try with the newer driver and see whether if affects the
   behavior.
  
  Witch this driver I got same behavior: after intesive i/o got timeout,
  driver try re-init controller without success. On all HDD activity LED
  ON w/o blinking at this moment.
 
 Do you have any logs or dmesg output showing the problem?

Currenly not awailable, but simmilar as here
http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041943.html
or here http://forums.freebsd.org/showthread.php?t=28252.

At the time of problem -- no any messages in the log or concole, just
stopping all operations. After some time (aprox 30-60 seconds) --
circular messages about timeout, reset and massive 'SCSI command
timeout'.


 I have merged the latest driver changes to stable/9, including a bug fix
 for out of chain frame handling.

Now I can't test anymore -- controller replaced to asr.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254939 - in vendor/ldns-host: . dist

2013-08-26 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Aug 26 22:25:55 2013
New Revision: 254939
URL: http://svnweb.freebsd.org/changeset/base/254939

Log:
  Import an LDNS-based implementation of host(1).

Added:
  vendor/ldns-host/
  vendor/ldns-host/README   (contents, props changed)
  vendor/ldns-host/dist/
  vendor/ldns-host/dist/Makefile   (contents, props changed)
  vendor/ldns-host/dist/ldns-host.1   (contents, props changed)
  vendor/ldns-host/dist/ldns-host.c   (contents, props changed)

Added: vendor/ldns-host/README
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/ldns-host/README Mon Aug 26 22:25:55 2013(r254939)
@@ -0,0 +1,13 @@
+This is an LDNS-based implementation of host(1) by Magerya Vitaly:
+
+   http://tx97.net/ldns-host/
+
+Use devel/mercurial to pull the latest sources:
+
+% hg clone http://hg.tx97.net/ldns-host
+
+Use the following command to generate the tag:
+
+% hg log --template hg-{date(date|localdate, '%Y%m%d-%H%M%S')}\n | head -1
+
+$FreeBSD$

Added: vendor/ldns-host/dist/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/ldns-host/dist/Makefile  Mon Aug 26 22:25:55 2013
(r254939)
@@ -0,0 +1,23 @@
+PROG=ldns-host
+SRC=ldns-host.c
+MAN=ldns-host.1
+
+LOCALBASE?=/usr/local
+PREFIX?=${LOCALBASE}
+MANDIR?=${PREFIX}/man
+
+XCFLAGS=${CFLAGS} -I${LOCALBASE}/include
+XLDFLAGS=${LDFLAGS} -L${LOCALBASE}/lib -lldns
+
+${PROG}: ${SRC}
+   ${CC} -o $@ ${XCFLAGS} ${XLDFLAGS} ${SRC}
+
+clean:
+   rm -f ${PROG}
+
+install: ${PROG}
+   cp ${PROG} ${PREFIX}/bin/
+   cp ${MAN} ${MANDIR}/man1/
+
+deinstall:
+   rm -f ${PREFIX}/bin/${PROG} ${MANDIR}/man1/${MAN}

Added: vendor/ldns-host/dist/ldns-host.1
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/ldns-host/dist/ldns-host.1   Mon Aug 26 22:25:55 2013
(r254939)
@@ -0,0 +1,246 @@
+.\ (c) Magerya Vitaly
+.\
+.\ Copying and distribution of this file, with or without modification,
+.\ are permitted in any medium without royalty provided the copyright
+.\ notice and this notice are preserved. This file is offered as-is,
+.\ without any warranty.
+.Dd Aug 27, 2012
+.Dt LDNS-HOST 1
+.Os
+.Sh NAME
+.Nm ldns-host
+.Nd DNS lookup utility
+.Sh SYNOPSIS
+.Nm
+.Op Fl aCdilrsTvw46
+.Op Fl c Ar class
+.Op Fl N Ar ndots
+.Op Fl R Ar number
+.Op Fl t Ar type
+.Op Fl W Ar wait
+.Ar name
+.Op Ar server
+.Sh DESCRIPTION
+.Nm
+is a simple utility for performing DNS lookups.  It is normally
+used to convert names to IP addresses and vice versa.
+.Pp
+.Ar name
+is the domain name that is to be looked up.  It can also be a
+dotted-decimal IPv4 address or a colon-delimited IPv6 address,
+in which case
+.Nm
+will by default perform a reverse lookup for that address.
+.Pp
+When
+.Ar name
+is not provided,
+.Nm
+prints a short summary of it's usage.
+.Pp
+.Ar server
+is an optional argument which is either a domain name or an IP
+address of the name server that
+.Nm
+should query instead of the server or servers listed in
+.Pa /etc/resolv.conf .
+When
+.Ar server
+is a domain name, system resolver is used to obtain it's address.
+.Pp
+Supported options:
+.Bl -tag -width indent
+.It Fl a
+Make a verbose query of type
+.Cm ANY .
+Equivalent to
+.Fl v Fl t Cm ANY .
+.It Fl C
+Query for
+.Cm SOA
+records for zone
+.Ar name
+from all of it's authoritative name servers.  The list of name
+servers is obtained via
+.Cm NS
+query for
+.Ar name .
+.It Fl c Ar class
+Perform DNS query of class
+.Ar class .
+Recognized classes are 
+.Cm IN Pq Internet ,
+.Cm CH Pq Chaosnet ,
+.Cm HS Pq Hesiod ,
+.Cm NONE ,
+.Cm ANY
+and
+.Cm CLASS Ns Ar N 
+(where
+.Ar N
+is a number from 1 to 255).  Default is
+.Cm IN .
+.It Fl d
+Produce verbose output.  This is a synonym for
+.Fl v ,
+and is provided for backward compatibility.
+.It Fl i
+Use IP6.INT domain for reverse lookups of IPv6 addresses (as
+defined in RFC1886; note that RFC4159 deprecates IP6.INT).
+By default IP6.ARPA is used.
+.It Fl l
+List all
+.Cm NS, PTR, A
+and
+.Cm 
+records in zone
+.Ar name
+by performing a zone transfer
+.Pq Cm AXFR .
+You can combine this option with
+.Fl a
+to print all records, or with
+.Fl t
+to only print specific ones.
+.It Fl N Ar ndots
+Consider names with at least this many dots as absolute.  That
+is, try to resolve them directly before consulting
+.Ic domain
+or
+.Ic search
+options from
+.Pa /etc/resolv.conf .
+.It Fl r
+Perform non-recursive query to the name server by clearing RD
+.Pq Dq recursion desired
+bit of the query.
+.It Fl R Ar number
+Retry this many times when a query does not receive an answer
+in time.  The default is 1 retry.  If
+.Ar number
+is negative or zero, 1 is used instead.
+.It Fl s
+Report SERVFAIL responses as they 

svn commit: r254940 - vendor/ldns-host/hg-20120826-233833

2013-08-26 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Aug 26 22:29:22 2013
New Revision: 254940
URL: http://svnweb.freebsd.org/changeset/base/254940

Log:
  Tag hg-20120826-233833

Added:
  vendor/ldns-host/hg-20120826-233833/
 - copied from r254939, vendor/ldns-host/dist/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254941 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2013-08-26 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Aug 26 22:29:42 2013
New Revision: 254941
URL: http://svnweb.freebsd.org/changeset/base/254941

Log:
  Merge various CTF fixes from illumos
  
  2942 CTF tools need to handle files which legitimately lack data
  2978 ctfconvert still needs to ignore legitimately dataless files on SPARC
  
  Illumos Revisions:13745:6b3106b4250f
13754:7231b684c18b
  
  Reference:
  
  https://www.illumos.org/issues/2942
  https://www.illumos.org/issues/2978
  
  MFC after:3 weeks

Modified:
  head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Mon Aug 26 22:29:22 
2013(r254940)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Mon Aug 26 22:29:42 
2013(r254941)
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident  %Z%%M% %I% %E% SMI
-
 /*
  * DWARF to tdata conversion
  *
@@ -1796,6 +1794,59 @@ die_resolve(dwarf_t *dw)
} while (dw-dw_nunres != 0);
 }
 
+/*
+ * Any object containing a function or object symbol at any scope should also
+ * contain DWARF data.
+ */
+static boolean_t
+should_have_dwarf(Elf *elf)
+{
+   Elf_Scn *scn = NULL;
+   Elf_Data *data = NULL;
+   GElf_Shdr shdr;
+   GElf_Sym sym;
+   uint32_t symdx = 0;
+   size_t nsyms = 0;
+   boolean_t found = B_FALSE;
+
+   while ((scn = elf_nextscn(elf, scn)) != NULL) {
+   gelf_getshdr(scn, shdr);
+
+   if (shdr.sh_type == SHT_SYMTAB) {
+   found = B_TRUE;
+   break;
+   }
+   }
+
+   if (!found)
+   terminate(cannot convert stripped objects\n);
+
+   data = elf_getdata(scn, NULL);
+   nsyms = shdr.sh_size / shdr.sh_entsize;
+
+   for (symdx = 0; symdx  nsyms; symdx++) {
+   gelf_getsym(data, symdx, sym);
+
+   if ((GELF_ST_TYPE(sym.st_info) == STT_FUNC) ||
+   (GELF_ST_TYPE(sym.st_info) == STT_TLS) ||
+   (GELF_ST_TYPE(sym.st_info) == STT_OBJECT)) {
+   char *name;
+
+   name = elf_strptr(elf, shdr.sh_link, sym.st_name);
+
+   /* Studio emits these local symbols regardless */
+   if ((strcmp(name, Bbss.bss) != 0) 
+   (strcmp(name, Ttbss.bss) != 0) 
+   (strcmp(name, Ddata.data) != 0) 
+   (strcmp(name, Ttdata.data) != 0) 
+   (strcmp(name, Drodata.rodata) != 0))
+   return (B_TRUE);
+   }
+   }
+
+   return (B_FALSE);
+}
+
 /*ARGSUSED*/
 int
 dw_read(tdata_t *td, Elf *elf, char *filename __unused)
@@ -1820,8 +1871,12 @@ dw_read(tdata_t *td, Elf *elf, char *fil
 
if ((rc = dwarf_elf_init(elf, DW_DLC_READ, dw.dw_dw,
dw.dw_err)) == DW_DLV_NO_ENTRY) {
-   errno = ENOENT;
-   return (-1);
+   if (should_have_dwarf(elf)) {
+   errno = ENOENT;
+   return (-1);
+   } else {
+   return (0);
+   }
} else if (rc != DW_DLV_OK) {
if (dwarf_errno(dw.dw_err) == DW_DLE_DEBUG_INFO_NULL) {
/*
@@ -1839,9 +1894,14 @@ dw_read(tdata_t *td, Elf *elf, char *fil
addrsz, nxthdr, dw.dw_err)) != DW_DLV_OK)
terminate(rc = %d %s\n, rc, dwarf_errmsg(dw.dw_err));
 
-   if ((cu = die_sibling(dw, NULL)) == NULL)
+   if ((cu = die_sibling(dw, NULL)) == NULL ||
+   (((child = die_child(dw, cu)) == NULL) 
+   should_have_dwarf(elf))) {
terminate(file does not contain dwarf type data 
(try compiling with -g)\n);
+   } else if (child == NULL) {
+   return (0);
+   }
 
dw.dw_maxoff = nxthdr - 1;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r253550 - head/sys/dev/mps

2013-08-26 Thread Kenneth D. Merry
On Tue, Aug 27, 2013 at 02:25:26 +0400, Slawa Olhovchenkov wrote:
 On Mon, Aug 26, 2013 at 03:40:27PM -0600, Kenneth D. Merry wrote:
 
  On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote:
   On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote:
   
If you really want one now, I've attached a patch from stable/9 on June
27th.  It may or may not apply now.
   
   Its apply witch litle edit.
   
  Now that it's done, I hope to merge that change to stable/9 this 
  week.
 
 Also, I see strange behaviour of LSI 9211-8i -- after some activity
 got timeout and HBA put in looped reset.

That's not good.  Try with the newer driver and see whether if affects 
the
behavior.
   
   Witch this driver I got same behavior: after intesive i/o got timeout,
   driver try re-init controller without success. On all HDD activity LED
   ON w/o blinking at this moment.
  
  Do you have any logs or dmesg output showing the problem?
 
 Currenly not awailable, but simmilar as here
 http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041943.html

That one is relatively recent, but all it shows is timeouts.  There are
lots of potential causes.

Without dmesg output, we don't know what firmware version he's running, and
that could be an issue.  As can SATA drives behind an expander.

 or here http://forums.freebsd.org/showthread.php?t=28252.

This one shows lots of IOC terminated errors, but it looks like his problem
was solved by upgrading his SSD firmware.

 At the time of problem -- no any messages in the log or concole, just
 stopping all operations. After some time (aprox 30-60 seconds) --
 circular messages about timeout, reset and massive 'SCSI command
 timeout'.

What was your topology?  i.e. mps(4) controller connected directly to the
drives, or via an expander?  SAS or SATA drives?

  I have merged the latest driver changes to stable/9, including a bug fix
  for out of chain frame handling.
 
 Now I can't test anymore -- controller replaced to asr.

An asr(4) controller?

Ken
-- 
Kenneth Merry
k...@freebsd.org
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r253550 - head/sys/dev/mps

2013-08-26 Thread Slawa Olhovchenkov
On Mon, Aug 26, 2013 at 04:43:35PM -0600, Kenneth D. Merry wrote:

 On Tue, Aug 27, 2013 at 02:25:26 +0400, Slawa Olhovchenkov wrote:
  On Mon, Aug 26, 2013 at 03:40:27PM -0600, Kenneth D. Merry wrote:
  
   On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote:
On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote:

 If you really want one now, I've attached a patch from stable/9 on 
 June
 27th.  It may or may not apply now.

Its apply witch litle edit.

   Now that it's done, I hope to merge that change to stable/9 this 
   week.
  
  Also, I see strange behaviour of LSI 9211-8i -- after some activity
  got timeout and HBA put in looped reset.
 
 That's not good.  Try with the newer driver and see whether if 
 affects the
 behavior.

Witch this driver I got same behavior: after intesive i/o got timeout,
driver try re-init controller without success. On all HDD activity LED
ON w/o blinking at this moment.
   
   Do you have any logs or dmesg output showing the problem?
  
  Currenly not awailable, but simmilar as here
  http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041943.html
 
 That one is relatively recent, but all it shows is timeouts.  There are
 lots of potential causes.

In my case only timeouts showed.

 Without dmesg output, we don't know what firmware version he's running, and
 that could be an issue.  As can SATA drives behind an expander.

firmware try bundled (v14 IR), v16 IR from LSI site,
v14 IT from supermicro site. No expander, but SATA drive.

  or here http://forums.freebsd.org/showthread.php?t=28252.
 
 This one shows lots of IOC terminated errors, but it looks like his problem
 was solved by upgrading his SSD firmware.

It's only as sample of dmesg output (in my dmesg no other questionably
information).
Firmware of SATA disk marked as compatible on LSI site (ST91000640NS SN02).

  At the time of problem -- no any messages in the log or concole, just
  stopping all operations. After some time (aprox 30-60 seconds) --
  circular messages about timeout, reset and massive 'SCSI command
  timeout'.
 
 What was your topology?  i.e. mps(4) controller connected directly to the
 drives, or via an expander?  SAS or SATA drives?

directly to 8 SATA drives. drives ST91000640NS SN02

   I have merged the latest driver changes to stable/9, including a bug fix
   for out of chain frame handling.
  
  Now I can't test anymore -- controller replaced to asr.
 
 An asr(4) controller?

Yes.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2013-08-26 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 08/26/13 08:35, Andriy Gapon wrote:
 on 26/08/2013 01:15 Jeremie Le Hen said the following:
 Hi Xin,
 
 On Tue, Aug 20, 2013 at 10:31:14PM +, Xin LI wrote:
 Author: delphij Date: Tue Aug 20 22:31:13 2013 New Revision:
 254585 URL: http://svnweb.freebsd.org/changeset/base/254585
 
 Log: MFV r254220:
 
 Illumos ZFS issues: 4039 zfs_rename()/zfs_link() needs stronger
 test for XDEV
 
 Modified: 
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

 
Directory Properties:
 head/sys/cddl/contrib/opensolaris/   (props changed)
 
 Modified:
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

 
==
 ---
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 Tue Aug 20 21:47:07 2013(r254584) +++
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 Tue Aug 20 22:31:13 2013(r254585) @@ -21,6 +21,7 @@ /* *
 Copyright (c) 2005, 2010, Oracle and/or its affiliates. All
 rights reserved. * Copyright (c) 2013 by Delphix. All rights
 reserved. + * Copyright 2013 Nexenta Systems, Inc.  All rights
 reserved. */
 
 /* Portions Copyright 2007 Jeremy Teo */ @@ -3727,13 +3728,18
 @@ zfs_rename(vnode_t *sdvp, char *snm, vno if
 (VOP_REALVP(tdvp, realvp, ct) == 0) tdvp = realvp;
 
 -   if (tdvp-v_vfsp != sdvp-v_vfsp || zfsctl_is_node(tdvp)) { +
 tdzp = VTOZ(tdvp);
 
 The problem with this change, at least on FreeBSD, is that tdvp may
 not belong to ZFS.  In that case VTOZ(tdvp) does not make any sense
 and would produce garbage or trigger an assert.  Previously
 tdvp-v_vfsp != sdvp-v_vfsp check would catch that situations. Two
 side notes: - v_vfsp is actually v_mount on FreeBSD

Ah that's good point.  Any objection in putting a change to their
_freebsd_ counterpart (zfs_freebsd_rename and zfs_freebsd_link) as
attached?

 - VOP_REALVP is a glorified nop on FreeBSD

It's not clear to me what was the intention for having a macro instead
of just ifdef'ing the code out -- maybe to prevent unwanted conflict
with upstream?  These two VOP's are the only consumers of VOP_REALVP
in tree.

 Another unrelated problem that existed before this change and has
 been noted by Davide Italiano is that sdvp is not locked and so it
 can potentially be recycled before ZFS_ENTER() enter and for that
 reason sdzp and zfsvfs could be invalid. Because sdvp is
 referenced, this problem can currently occur only if a forced 
 unmount runs concurrently to zfs_rename. tdvp should be locked and
 thus could be used instead of sdvp as a source for zfsvfs.

I think this would need more work, I'll take a look after we have this
regression fixed.

Cheers,
- -- 
Xin LI delp...@delphij.nethttps://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBCgAGBQJSG96rAAoJEG80Jeu8UPuzQG4IAK/Qw1McLNoy0egEzelYcsar
iBRwoGDXfJuufCy04TEXD5rEz78VdqOl+g0tFqhSMbKHzQj+qEa6P6DIKptEnSsW
AtQOQABs0gHY4SZ3MUdvdlEmFlWtyYPTqw471k2jIjRMNEM3wyslVn/SHvfymmwT
s9VTI40jkoHWCUMW217jvER5co/niQDU4QL9ZNPb8vzRT02obqiq7ugZ7eqgklAI
zqzB46Trn6Oplab+vNt/dWgSK/cuPwDaeTNeRBiw2YQ/uQMsOEdNPB2JqLUA5XgF
WezHnotyFT/vdiQCe6dHjatOaR5ui7qWTUKTAwcq4gUrLJQx9FYYV3Im9xmesSM=
=FjK7
-END PGP SIGNATURE-
Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
===
--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  (revision 
254924)
+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  (working copy)
@@ -6250,6 +6250,9 @@ zfs_freebsd_rename(ap)
ASSERT(ap-a_fcnp-cn_flags  (SAVENAME|SAVESTART));
ASSERT(ap-a_tcnp-cn_flags  (SAVENAME|SAVESTART));
 
+   if (fdvp-v_mount != tdvp-v_mount)
+   return (EXDEV);
+
error = zfs_rename(fdvp, ap-a_fcnp-cn_nameptr, tdvp,
ap-a_tcnp-cn_nameptr, ap-a_fcnp-cn_cred, NULL, 0);
 
@@ -6308,10 +6311,15 @@ zfs_freebsd_link(ap)
} */ *ap;
 {
struct componentname *cnp = ap-a_cnp;
+   vnode_t *vp = ap-a_vp;
+   vnode_t *tdvp = ap-a_tdvp;
 
+   if (tdvp-v_mount != vp-v_mount)
+   return (EXDEV);
+
ASSERT(cnp-cn_flags  SAVENAME);
 
-   return (zfs_link(ap-a_tdvp, ap-a_vp, cnp-cn_nameptr, cnp-cn_cred, 
NULL, 0));
+   return (zfs_link(tdvp, vp, cnp-cn_nameptr, cnp-cn_cred, NULL, 0));
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

svn commit: r254942 - head/sys/boot/forth

2013-08-26 Thread Devin Teske
Author: dteske
Date: Mon Aug 26 23:37:11 2013
New Revision: 254942
URL: http://svnweb.freebsd.org/changeset/base/254942

Log:
  Building upon SVN r254237, disable automated activation of alternate layouts
  and add support for default underride to $loader_version, acting as a way to
  name a release. Release text is not displayed for the aforementioned feature
  of alternate display layout (introduced in r254237); however, for all other
  layouts (incl. default), the release name is displayed at lower-right.
  
  See version.4th(8) for additional information and/or historical details.
  NOTE: Also a minor edit to version.4th(8) while we're here.

Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/version.4th
  head/sys/boot/forth/version.4th.8

Modified: head/sys/boot/forth/beastie.4th
==
--- head/sys/boot/forth/beastie.4th Mon Aug 26 22:29:42 2013
(r254941)
+++ head/sys/boot/forth/beastie.4th Mon Aug 26 23:37:11 2013
(r254942)
@@ -205,21 +205,9 @@ variable logoY
s loader_logo getenv dup -1 = if
logoX @ logoY @
loader_color? if
-   s tribute-logo
-   sfind if
-   execute
-   else
-   drop
-   orb-logo
-   then
+   orb-logo
else
-   s tributebw-logo
-   sfind if
-   execute
-   else
-   drop
-   orbbw-logo
-   then
+   orbbw-logo
then
drop exit
then
@@ -249,7 +237,7 @@ variable logoY
s tribute-logo sfind if
execute
else
-   orb-logo
+   drop orb-logo
then
2drop exit
then
@@ -258,7 +246,7 @@ variable logoY
s tributebw-logo sfind if
execute
else
-   orbbw-logo
+   drop orbbw-logo
then
2drop exit
then

Modified: head/sys/boot/forth/version.4th
==
--- head/sys/boot/forth/version.4th Mon Aug 26 22:29:42 2013
(r254941)
+++ head/sys/boot/forth/version.4th Mon Aug 26 23:37:11 2013
(r254942)
@@ -29,6 +29,9 @@ marker task-version.4th
 variable versionX
 variable versionY
 
+\ Default $loader_version value if not overridden or using tribute screen
+: str_loader_version ( -- C-ADDR/U|-1 ) -1 ;
+
 \ Initialize text placement to defaults
 80 versionX !  \ NOTE: this is the ending column (text is right-justified)
 24 versionY !
@@ -43,9 +46,33 @@ variable versionY
?number drop versionY ! -1
then drop
 
-   \ Exit if a version was not set
+   \ Default version if none was set
s loader_version getenv dup -1 = if
-   drop exit
+   drop
+   \ Default version if no logo is requested
+   s loader_logo getenv dup -1 = if
+   drop str_loader_version
+   else
+   2dup s tribute compare-insensitive 0= if
+   2drop
+   s tribute-logo sfind if
+   drop exit \ see beastie tribute-text
+   else
+   drop str_loader_version
+   then
+   else 2dup s tributebw compare-insensitive 0= if
+   2drop
+   s tributebw-logo sfind if
+   drop exit \ see beastie tribute-text
+   else
+   drop str_loader_version
+   then
+   else
+   2drop str_loader_version
+   then then
+   then
+   then dup -1 = if
+   drop exit \ default version (above) is disabled
then
 
\ Right justify the text

Modified: head/sys/boot/forth/version.4th.8
==
--- head/sys/boot/forth/version.4th.8   Mon Aug 26 22:29:42 2013
(r254941)
+++ head/sys/boot/forth/version.4th.8   Mon Aug 26 23:37:11 2013
(r254942)
@@ -91,7 +91,7 @@ causes the version to be printed without
 .Pq default is ANSI Cyan .
 .El
 .Sh FILES
-.Bl -tag -width /boot/loader.4th -compact
+.Bl -tag -width /boot/version.4th -compact
 .It Pa /boot/loader
 The
 .Xr 

svn commit: r254943 - in head: bin/ps sys/compat/freebsd32 sys/kern sys/sys

2013-08-26 Thread Will Andrews
Author: will
Date: Mon Aug 26 23:48:21 2013
New Revision: 254943
URL: http://svnweb.freebsd.org/changeset/base/254943

Log:
  Add the ability to display the default FIB number for a process to the
  ps(1) utility, e.g. ps -O fib.
  
  bin/ps/keyword.c:
Add the fib keyword and default its column name to FIB.
  
  bin/ps/ps.1:
Add fib as a supported keyword.
  
  sys/compat/freebsd32/freebsd32.h:
  sys/kern/kern_proc.c:
  sys/sys/user.h:
Add the default fib number for a process (p-p_fibnum)
to the user land accessible process data of struct kinfo_proc.
  
  Submitted by: Oliver Fromme o...@fromme.com, gibbs

Modified:
  head/bin/ps/keyword.c
  head/bin/ps/ps.1
  head/sys/compat/freebsd32/freebsd32.h
  head/sys/kern/kern_proc.c
  head/sys/sys/user.h

Modified: head/bin/ps/keyword.c
==
--- head/bin/ps/keyword.c   Mon Aug 26 23:37:11 2013(r254942)
+++ head/bin/ps/keyword.c   Mon Aug 26 23:48:21 2013(r254943)
@@ -87,6 +87,7 @@ static VAR var[] = {
{etimes, ELAPSED, NULL, USER, elapseds, 0, CHAR, NULL, 0},
{euid, , uid, 0, NULL, 0, CHAR, NULL, 0},
{f, F, NULL, 0, kvar, KOFF(ki_flag), INT, x, 0},
+   {fib, FIB, NULL, 0, kvar, KOFF(ki_fibnum), INT, d, 0},
{flags, , f, 0, NULL, 0, CHAR, NULL, 0},
{gid, GID, NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0},
{group, GROUP, NULL, LJUST, egroupname, 0, CHAR, NULL, 0},

Modified: head/bin/ps/ps.1
==
--- head/bin/ps/ps.1Mon Aug 26 23:37:11 2013(r254942)
+++ head/bin/ps/ps.1Mon Aug 26 23:48:21 2013(r254943)
@@ -512,6 +512,9 @@ elapsed running time, format
 minutes:seconds.
 .It Cm etimes
 elapsed running time, in decimal integer seconds
+.It Cm fib
+default FIB number, see
+.Xr setfib 1
 .It Cm flags
 the process flags, in hexadecimal (alias
 .Cm f )

Modified: head/sys/compat/freebsd32/freebsd32.h
==
--- head/sys/compat/freebsd32/freebsd32.h   Mon Aug 26 23:37:11 2013
(r254942)
+++ head/sys/compat/freebsd32/freebsd32.h   Mon Aug 26 23:48:21 2013
(r254943)
@@ -342,6 +342,7 @@ struct kinfo_proc32 {
charki_loginclass[LOGINCLASSLEN+1];
charki_sparestrings[50];
int ki_spareints[KI_NSPARE_INT];
+   int ki_fibnum;
u_int   ki_cr_flags;
int ki_jid;
int ki_numthreads;

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Mon Aug 26 23:37:11 2013(r254942)
+++ head/sys/kern/kern_proc.c   Mon Aug 26 23:48:21 2013(r254943)
@@ -862,6 +862,7 @@ fill_kinfo_proc_only(struct proc *p, str
kp-ki_swtime = (ticks - p-p_swtick) / hz;
kp-ki_pid = p-p_pid;
kp-ki_nice = p-p_nice;
+   kp-ki_fibnum = p-p_fibnum;
kp-ki_start = p-p_stats-p_start;
timevaladd(kp-ki_start, boottime);
PROC_SLOCK(p);
@@ -1160,6 +1161,7 @@ freebsd32_kinfo_proc_out(const struct ki
bcopy(ki-ki_comm, ki32-ki_comm, COMMLEN + 1);
bcopy(ki-ki_emul, ki32-ki_emul, KI_EMULNAMELEN + 1);
bcopy(ki-ki_loginclass, ki32-ki_loginclass, LOGINCLASSLEN + 1);
+   CP(*ki, *ki32, ki_fibnum);
CP(*ki, *ki32, ki_cr_flags);
CP(*ki, *ki32, ki_jid);
CP(*ki, *ki32, ki_numthreads);

Modified: head/sys/sys/user.h
==
--- head/sys/sys/user.h Mon Aug 26 23:37:11 2013(r254942)
+++ head/sys/sys/user.h Mon Aug 26 23:48:21 2013(r254943)
@@ -83,7 +83,7 @@
  * it in two places: function fill_kinfo_proc in sys/kern/kern_proc.c and
  * function kvm_proclist in lib/libkvm/kvm_proc.c .
  */
-#defineKI_NSPARE_INT   9
+#defineKI_NSPARE_INT   8
 #defineKI_NSPARE_LONG  12
 #defineKI_NSPARE_PTR   6
 
@@ -186,6 +186,7 @@ struct kinfo_proc {
 */
charki_sparestrings[50];/* spare string space */
int ki_spareints[KI_NSPARE_INT];/* spare room for growth */
+   int ki_fibnum;  /* Default FIB number */
u_int   ki_cr_flags;/* Credential flags */
int ki_jid; /* Process jail ID */
int ki_numthreads;  /* XXXKSE number of threads in total */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254944 - head/sys/mips/malta

2013-08-26 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Tue Aug 27 01:08:55 2013
New Revision: 254944
URL: http://svnweb.freebsd.org/changeset/base/254944

Log:
  - Initialize freq variable so we will not end up with random value
  if there is no YAMON present

Modified:
  head/sys/mips/malta/yamon.c

Modified: head/sys/mips/malta/yamon.c
==
--- head/sys/mips/malta/yamon.c Mon Aug 26 23:48:21 2013(r254943)
+++ head/sys/mips/malta/yamon.c Tue Aug 27 01:08:55 2013(r254944)
@@ -56,6 +56,7 @@ yamon_getcpufreq(void)
uint32_t freq;
int ret;
 
+   freq = 0;
ret = YAMON_SYSCON_READ(SYSCON_BOARD_CPU_CLOCK_FREQ_ID, freq,
sizeof(freq));
if (ret != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254945 - head/sys/kern

2013-08-26 Thread Konstantin Belousov
Author: kib
Date: Tue Aug 27 01:31:12 2013
New Revision: 254945
URL: http://svnweb.freebsd.org/changeset/base/254945

Log:
  When allocating a pbuf for the cluster write, do not sleep waiting
  for the available pbuf when passed vnode is backing md(4). Other i/o
  directed to the same md device might already hold pbufs, and then we
  could deadlock since only our progress can free a pbuf needed for
  wakeup.
  
  Obtained from:projects/vm6
  Reminded and tested by:   pho
  MFC after:1 week

Modified:
  head/sys/kern/vfs_cluster.c

Modified: head/sys/kern/vfs_cluster.c
==
--- head/sys/kern/vfs_cluster.c Tue Aug 27 01:08:55 2013(r254944)
+++ head/sys/kern/vfs_cluster.c Tue Aug 27 01:31:12 2013(r254945)
@@ -837,7 +837,9 @@ cluster_wbuild(struct vnode *vp, long si
  (tbp-b_bcount != tbp-b_bufsize) ||
  (tbp-b_bcount != size) ||
  (len == 1) ||
- ((bp = getpbuf(cluster_pbuf_freecnt)) == NULL)) {
+ ((bp = (vp-v_vflag  VV_MD) != 0 ?
+ trypbuf(cluster_pbuf_freecnt) :
+ getpbuf(cluster_pbuf_freecnt)) == NULL)) {
totalwritten += tbp-b_bufsize;
bawrite(tbp);
++start_lbn;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254946 - head/sys/mips/malta

2013-08-26 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Tue Aug 27 01:40:13 2013
New Revision: 254946
URL: http://svnweb.freebsd.org/changeset/base/254946

Log:
  Fixes for compatibility with QEMU:
  
  - Route PCI interrupt for NIC
  - Make no mapping warning more user-friendly: add device name and mention
  that it's IRQ mapping
  - Do not overlap ICUs' IO window with PCI devices' IO windows by starting
  IO rman at offset 0x100

Modified:
  head/sys/mips/malta/gt_pci.c

Modified: head/sys/mips/malta/gt_pci.c
==
--- head/sys/mips/malta/gt_pci.cTue Aug 27 01:31:12 2013
(r254945)
+++ head/sys/mips/malta/gt_pci.cTue Aug 27 01:40:13 2013
(r254946)
@@ -266,8 +266,12 @@ gt_pci_attach(device_t dev)
sc-sc_io = MIPS_PHYS_TO_KSEG1(MALTA_PCI0_IO_BASE);
sc-sc_io_rman.rm_type = RMAN_ARRAY;
sc-sc_io_rman.rm_descr = GT64120 PCI I/O Ports;
+   /* 
+* First 256 bytes are ISA's registers: e.g. i8259's
+* So do not use them for general purpose PCI I/O window
+*/
if (rman_init(sc-sc_io_rman) != 0 ||
-   rman_manage_region(sc-sc_io_rman, 0, 0x) != 0) {
+   rman_manage_region(sc-sc_io_rman, 0x100, 0x) != 0) {
panic(gt_pci_attach: failed to set up I/O rman);
}
 
@@ -568,8 +572,10 @@ gt_pci_route_interrupt(device_t pcib, de
 * PIIX4 IDE adapter. HW IRQ0
 */
return 0;
+   case 11: /* Ethernet */
+   return 10;
default:
-   printf(No mapping for %d/%d/%d/%d\n, bus, device, func, pin);
+   device_printf(pcib, no IRQ mapping for %d/%d/%d/%d\n, bus, 
device, func, pin);

}
return (0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254947 - stable/9/sys/kern

2013-08-26 Thread Konstantin Belousov
Author: kib
Date: Tue Aug 27 03:11:49 2013
New Revision: 254947
URL: http://svnweb.freebsd.org/changeset/base/254947

Log:
  Partial MFC of r253927 (by attilio):
  Remove unnecessary soft busy of the page before to do vn_rdwr() in
  kern_sendfile() which is unnecessary.
  
  MFC note:
  NFS implementation of VOP_READ() sometimes upgrades the vnode lock,
  which causes drop of the shared lock and sleep for exclusive.  As
  result, busying of the page before the call to vn_rdwr() makes NFS
  code to wait for vnode lock while page is busy, which contradicts the
  proper order of vnode lock - busy.
  
  The r250027, merged as part of r250907, started calling vm_page_grab()
  under the vnode lock.  The page grab waits for the page busy state to
  drain, which makes the parallel sendfile(2) invocations on the same
  vnode vulnerable to the LOR described above.
  
  Note that r250027 only exposed the problem, which might be caused by
  other means as well, e.g. by parallel sendfile(2) and truncate(2).
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/9/sys/kern/uipc_syscalls.c

Modified: stable/9/sys/kern/uipc_syscalls.c
==
--- stable/9/sys/kern/uipc_syscalls.c   Tue Aug 27 01:40:13 2013
(r254946)
+++ stable/9/sys/kern/uipc_syscalls.c   Tue Aug 27 03:11:49 2013
(r254947)
@@ -2124,11 +2124,6 @@ retry_space:
else {
ssize_t resid;
 
-   /*
-* Ensure that our page is still around
-* when the I/O completes.
-*/
-   vm_page_io_start(pg);
VM_OBJECT_UNLOCK(obj);
 
/*
@@ -2144,10 +2139,8 @@ retry_space:
IO_VMIO | ((MAXBSIZE / bsize)  
IO_SEQSHIFT),
td-td_ucred, NOCRED, resid, td);
VFS_UNLOCK_GIANT(vfslocked);
-   VM_OBJECT_LOCK(obj);
-   vm_page_io_finish(pg);
-   if (!error)
-   VM_OBJECT_UNLOCK(obj);
+   if (error)
+   VM_OBJECT_LOCK(obj);
mbstat.sf_iocnt++;
}
if (error) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2013-08-26 Thread Jeremie Le Hen
On Mon, Aug 26, 2013 at 04:03:08PM -0700, Xin Li wrote:
 Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 ===
 --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 (revision 254924)
 +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 (working copy)
 @@ -6250,6 +6250,9 @@ zfs_freebsd_rename(ap)
   ASSERT(ap-a_fcnp-cn_flags  (SAVENAME|SAVESTART));
   ASSERT(ap-a_tcnp-cn_flags  (SAVENAME|SAVESTART));
  
 + if (fdvp-v_mount != tdvp-v_mount)
 + return (EXDEV);
 +
   error = zfs_rename(fdvp, ap-a_fcnp-cn_nameptr, tdvp,
   ap-a_tcnp-cn_nameptr, ap-a_fcnp-cn_cred, NULL, 0);

I think this won't work with my setup where the target directory stands on a
nullfs-mounted zfs dataset.  I don't know anything about the VFS, but
here is what I see with kgdb(1):

(kgdb) print *tdvp
$1 = {v_tag = 0x80f5 null, v_op = 0x81235a80, 
  v_data = 0xf800adbb5440, v_mount = 0xf80015af5990, v_nmntvnodes = 
{
  [...]
  v_holdcnt = 3, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 
0, 
  v_hash = 4723827, v_type = VDIR}

(kgdb) print *fdvp
$2 = {v_tag = 0x819a37a5 zfs, v_op = 0x819b5f80, 
  v_data = 0xf80023ba3b80, v_mount = 0xf80011eae000, v_nmntvnodes = 
{
  [...]
  v_holdcnt = 4, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 
0, 
  v_hash = 2337681, v_type = VDIR}



Also, I got another panic.  I don't know if this is the same problem,
but the bottom of the stacktrace is pretty similar though:

Unread portion of the kernel message buffer:
panic: solaris assert: tx-tx_objset == NULL || dn-dn_objset == 
tx-tx_objset, file: 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c,
 line: 818
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2e/frame 
0xfe00e5ccbe50
kdb_backtrace() at kdb_backtrace+0x54/frame 0xfe00e5ccbf00
vpanic() at vpanic+0x1bf/frame 0xfe00e5ccbf70
kproc_shutdown() at kproc_shutdown/frame 0xfe00e5ccbfd0
assfail() at assfail+0x2c/frame 0xfe00e5ccc000
dmu_tx_dirty_buf() at dmu_tx_dirty_buf+0xcf/frame 0xfe00e5ccc0b0
dbuf_dirty() at dbuf_dirty+0xf2/frame 0xfe00e5ccc2a0
dbuf_will_dirty() at dbuf_will_dirty+0x11a/frame 0xfe00e5ccc2e0
sa_attr_op() at sa_attr_op+0x2be/frame 0xfe00e5ccc350
sa_bulk_update_impl() at sa_bulk_update_impl+0x105/frame 0xfe00e5ccc3b0
sa_bulk_update() at sa_bulk_update+0x81/frame 0xfe00e5ccc3f0
zfs_link_create() at zfs_link_create+0x3f6/frame 0xfe00e5ccc5b0
zfs_rename() at zfs_rename+0xc3c/frame 0xfe00e5ccc6e0
zfs_freebsd_rename() at zfs_freebsd_rename+0x116/frame 0xfe00e5ccc730
VOP_RENAME_APV() at VOP_RENAME_APV+0x22e/frame 0xfe00e5ccc790
VOP_RENAME() at VOP_RENAME+0x69/frame 0xfe00e5ccc810
kern_renameat() at kern_renameat+0x41e/frame 0xfe00e5ccca30
kern_rename() at kern_rename+0x33/frame 0xfe00e5ccca60
sys_rename() at sys_rename+0x2a/frame 0xfe00e5ccca80
syscallenter() at syscallenter+0x46e/frame 0xfe00e5cccaf0
amd64_syscall() at amd64_syscall+0x1f/frame 0xfe00e5cccbf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe00e5cccbf0
--- syscall (128, FreeBSD ELF64, sys_rename), rip = 0x80088a40a, rsp = 
0x7fffd0a8, rbp = 0x7fffd790 ---
KDB: enter: panic


(kgdb) frame 16
#16 0x818340ff in dmu_tx_dirty_buf (tx=0xf80008610600, 
db=0xf800c1627d20)
at 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c:818
818 ASSERT(tx-tx_objset == NULL || dn-dn_objset == 
tx-tx_objset);
(kgdb) print tx-tx_objset
$3 = (objset_t *) 0xf800046e4000
(kgdb) print dn-dn_objset
$4 = (struct objset *) 0xf800045fcc00



-- 
Jeremie Le Hen

Scientists say the world is made up of Protons, Neutrons and Electrons.
They forgot to mention Morons.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254948 - head/usr.sbin/bhyve

2013-08-26 Thread Peter Grehan
Author: grehan
Date: Tue Aug 27 03:49:47 2013
New Revision: 254948
URL: http://svnweb.freebsd.org/changeset/base/254948

Log:
  Fix off-by-1 error in assert.
  
  Submitted by: Tycho Nightingale (tycho.nighting...@pluribusnetworks.com)

Modified:
  head/usr.sbin/bhyve/pci_virtio_block.c

Modified: head/usr.sbin/bhyve/pci_virtio_block.c
==
--- head/usr.sbin/bhyve/pci_virtio_block.c  Tue Aug 27 03:11:49 2013
(r254947)
+++ head/usr.sbin/bhyve/pci_virtio_block.c  Tue Aug 27 03:49:47 2013
(r254948)
@@ -156,7 +156,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s
 * XXX - note - this fails on crash dump, which does a
 * VIRTIO_BLK_T_FLUSH with a zero transfer length
 */
-   assert (n = 3  n  VTBLK_MAXSEGS + 2);
+   assert (n = 3  n = VTBLK_MAXSEGS + 2);
 
assert((flags[0]  VRING_DESC_F_WRITE) == 0);
assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254949 - in head/cddl: lib/libzpool usr.bin/ztest usr.sbin/zdb

2013-08-26 Thread Will Andrews
Author: will
Date: Tue Aug 27 04:01:31 2013
New Revision: 254949
URL: http://svnweb.freebsd.org/changeset/base/254949

Log:
  Build all ZFS testing  debugging tools with -g.
  
  These programs and everything using libzpool rely on the embedded asserts to
  verify the correctness of operations.  Given that, the core dumps would be
  useless without debug symbols.

Modified:
  head/cddl/lib/libzpool/Makefile
  head/cddl/usr.bin/ztest/Makefile
  head/cddl/usr.sbin/zdb/Makefile

Modified: head/cddl/lib/libzpool/Makefile
==
--- head/cddl/lib/libzpool/Makefile Tue Aug 27 03:49:47 2013
(r254948)
+++ head/cddl/lib/libzpool/Makefile Tue Aug 27 04:01:31 2013
(r254949)
@@ -64,7 +64,9 @@ NO_PROFILE=
 
 CSTD=  c99
 
-CFLAGS+=   -DDEBUG=1
-#DEBUG_FLAGS+= -g
+# Since there are many asserts in this library, it makes no sense to compile
+# it without debugging.
+
+CFLAGS+=   -g -DDEBUG=1
 
 .include bsd.lib.mk

Modified: head/cddl/usr.bin/ztest/Makefile
==
--- head/cddl/usr.bin/ztest/MakefileTue Aug 27 03:49:47 2013
(r254948)
+++ head/cddl/usr.bin/ztest/MakefileTue Aug 27 04:01:31 2013
(r254949)
@@ -25,7 +25,8 @@ LDADD=-lgeom -lm -lnvpair -lumem -lzpoo
 
 CSTD=  c99
 
-CFLAGS+= -DDEBUG=1
-#DEBUG_FLAGS+= -g
+# Since there are many asserts in this program, it makes no sense to compile
+# it without debugging.
+CFLAGS+= -g -DDEBUG=1
 
 .include bsd.prog.mk

Modified: head/cddl/usr.sbin/zdb/Makefile
==
--- head/cddl/usr.sbin/zdb/Makefile Tue Aug 27 03:49:47 2013
(r254948)
+++ head/cddl/usr.sbin/zdb/Makefile Tue Aug 27 04:01:31 2013
(r254949)
@@ -27,7 +27,8 @@ DPADD=${LIBGEOM} ${LIBM} ${LIBNVPAIR} $
${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL}
 LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs_core -lzfs -lzpool
 
-CFLAGS+=   -DDEBUG=1
-#DEBUG_FLAGS+= -g
+# Since there are many asserts in this program, it makes no sense to compile
+# it without debugging.
+CFLAGS+=   -g -DDEBUG=1
 
 .include bsd.prog.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r254950 - head/sys/dev/vmware/vmxnet3

2013-08-26 Thread Bryan Venteicher
Author: bryanv
Date: Tue Aug 27 04:05:18 2013
New Revision: 254950
URL: http://svnweb.freebsd.org/changeset/base/254950

Log:
  Couple minor if_vmx tweaks
  
- Use queue size fields from the Tx/Rx queues in various places
  instead of (currently the same values) from the softc.
- Fix potential crash in detach if the attached failed to alloc
  queue memory.
- Move the VMXNET3_MAX_RX_SEGS define to a better spot.
- Tweak frame size calculation w.r.t. ETHER_ALIGN. This could be
  tweaked some more, or removed since it probably doesn't matter
  much for x86 (and the x86 class of machines this driver will
  be used on).

Modified:
  head/sys/dev/vmware/vmxnet3/if_vmx.c
  head/sys/dev/vmware/vmxnet3/if_vmxvar.h

Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c
==
--- head/sys/dev/vmware/vmxnet3/if_vmx.cTue Aug 27 04:01:31 2013
(r254949)
+++ head/sys/dev/vmware/vmxnet3/if_vmx.cTue Aug 27 04:05:18 2013
(r254950)
@@ -437,15 +437,15 @@ vmxnet3_check_version(struct vmxnet3_sof
device_printf(dev, unsupported hardware version %#x\n,
version);
return (ENOTSUP);
-   } else
-   vmxnet3_write_bar1(sc, VMXNET3_BAR1_VRRS, 1);
+   }
+   vmxnet3_write_bar1(sc, VMXNET3_BAR1_VRRS, 1);
 
version = vmxnet3_read_bar1(sc, VMXNET3_BAR1_UVRS);
if ((version  0x01) == 0) {
device_printf(dev, unsupported UPT version %#x\n, version);
return (ENOTSUP);
-   } else
-   vmxnet3_write_bar1(sc, VMXNET3_BAR1_UVRS, 1);
+   }
+   vmxnet3_write_bar1(sc, VMXNET3_BAR1_UVRS, 1);
 
return (0);
 }
@@ -781,10 +781,9 @@ vmxnet3_init_rxq(struct vmxnet3_softc *s
sizeof(struct vmxnet3_rxbuf), M_DEVBUF, M_NOWAIT | M_ZERO);
if (rxr-vxrxr_rxbuf == NULL)
return (ENOMEM);
-   }
 
-   rxq-vxrxq_comp_ring.vxcr_ndesc =
-   sc-vmx_nrxdescs * VMXNET3_RXRINGS_PERQ;
+   rxq-vxrxq_comp_ring.vxcr_ndesc += sc-vmx_nrxdescs;
+   }
 
return (0);
 }
@@ -1240,8 +1239,11 @@ static void
 vmxnet3_free_queue_data(struct vmxnet3_softc *sc)
 {
 
-   vmxnet3_free_rxq_data(sc);
-   vmxnet3_free_txq_data(sc);
+   if (sc-vmx_rxq != NULL)
+   vmxnet3_free_rxq_data(sc);
+
+   if (sc-vmx_txq != NULL)
+   vmxnet3_free_txq_data(sc);
 }
 
 static int
@@ -1325,9 +1327,9 @@ vmxnet3_init_shared_data(struct vmxnet3_
txs = txq-vxtxq_ts;
 
txs-cmd_ring = txq-vxtxq_cmd_ring.vxtxr_dma.dma_paddr;
-   txs-cmd_ring_len = sc-vmx_ntxdescs;
+   txs-cmd_ring_len = txq-vxtxq_cmd_ring.vxtxr_ndesc;
txs-comp_ring = txq-vxtxq_comp_ring.vxcr_dma.dma_paddr;
-   txs-comp_ring_len = sc-vmx_ntxdescs;
+   txs-comp_ring_len = txq-vxtxq_comp_ring.vxcr_ndesc;
txs-driver_data = vtophys(txq);
txs-driver_data_len = sizeof(struct vmxnet3_txqueue);
}
@@ -1342,8 +1344,7 @@ vmxnet3_init_shared_data(struct vmxnet3_
rxs-cmd_ring[1] = rxq-vxrxq_cmd_ring[1].vxrxr_dma.dma_paddr;
rxs-cmd_ring_len[1] = rxq-vxrxq_cmd_ring[1].vxrxr_ndesc;
rxs-comp_ring = rxq-vxrxq_comp_ring.vxcr_dma.dma_paddr;
-   rxs-comp_ring_len = rxq-vxrxq_cmd_ring[0].vxrxr_ndesc +
-   rxq-vxrxq_cmd_ring[1].vxrxr_ndesc;
+   rxs-comp_ring_len = rxq-vxrxq_comp_ring.vxcr_ndesc;
rxs-driver_data = vtophys(rxq);
rxs-driver_data_len = sizeof(struct vmxnet3_rxqueue);
}
@@ -1558,6 +1559,7 @@ vmxnet3_txq_eof(struct vmxnet3_txqueue *
txcd = txc-vxcr_u.txcd[txc-vxcr_next];
if (txcd-gen != txc-vxcr_gen)
break;
+   vmxnet3_barrier(sc, VMXNET3_BARRIER_RD);
 
if (++txc-vxcr_next == txc-vxcr_ndesc) {
txc-vxcr_next = 0;
@@ -1647,7 +1649,7 @@ vmxnet3_newbuf(struct vmxnet3_softc *sc,
BUS_DMA_NOWAIT);
if (error) {
m_freem(m);
-   sc-vmx_stats.vmst_mbuf_load_failed++;;
+   sc-vmx_stats.vmst_mbuf_load_failed++;
return (error);
}
KASSERT(nsegs == 1,
@@ -2119,19 +2121,19 @@ vmxnet3_rxinit(struct vmxnet3_softc *sc,
int i, populate, idx, frame_size, error;
 
ifp = sc-vmx_ifp;
-   frame_size = ifp-if_mtu + sizeof(struct ether_vlan_header);
+   frame_size = ETHER_ALIGN + sizeof(struct ether_vlan_header) +
+   ifp-if_mtu;
 
/*
-* If the MTU causes us to exceed what a regular sized cluster
-* can handle, we allocate a second MJUMPAGESIZE cluster after
-* it in ring 0. If in use, ring 1 always contains MJUMPAGESIZE
-* clusters.
+* If 

svn commit: r254951 - head/release/scripts

2013-08-26 Thread Will Andrews
Author: will
Date: Tue Aug 27 04:42:42 2013
New Revision: 254951
URL: http://svnweb.freebsd.org/changeset/base/254951

Log:
  Fix 'make release' on older hosts: use buildworld legacy utilities.
  
  Newer FreeBSD installs require an install(1) that supports the new flags.
  
  This adds ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp/legacy/{bin,usr/{bin,sbin}}
  to the PATH while generating an mtree database for 'make release'.
  
  Note that the problem only exists here because mm-mtree.sh generates
  its own object tree to avoid mucking with the existing one, which
  results in a PATH containing legacy utility dirs that are empty.

Modified:
  head/release/scripts/mm-mtree.sh

Modified: head/release/scripts/mm-mtree.sh
==
--- head/release/scripts/mm-mtree.shTue Aug 27 04:05:18 2013
(r254950)
+++ head/release/scripts/mm-mtree.shTue Aug 27 04:42:42 2013
(r254951)
@@ -81,6 +81,11 @@ if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a 
 fi
 
 # Setup make to use system files from SOURCEDIR
+objp=${MAKEOBJDIRPREFIX}
+[ -z ${objp} ]  objp=/usr/obj
+legacydir=${objp}${SOURCEDIR}/tmp/legacy
+legacypath=${legacydir}/usr/sbin:${legacydir}/usr/bin:${legacydir}/bin
+MM_MAKE_ARGS=${MM_MAKE_ARGS} PATH=${legacypath}:${PATH}
 MM_MAKE=make ${ARCHSTRING} ${MM_MAKE_ARGS} -m ${SOURCEDIR}/share/mk
 
 delete_temproot () {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org