svn commit: r248545 - svnadmin/conf

2013-03-20 Thread Peter Grehan
Author: grehan
Date: Wed Mar 20 06:35:03 2013
New Revision: 248545
URL: http://svnweb.freebsd.org/changeset/base/248545

Log:
  Release Bryan from mentorship and allow him to go full-blast
  with his excellent contributions.

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Wed Mar 20 05:49:09 2013(r248544)
+++ svnadmin/conf/mentors   Wed Mar 20 06:35:03 2013(r248545)
@@ -15,7 +15,7 @@ anchiebz
 artavg Co-mentor: marcel
 benl   philip  Co-mentor: simon
 bgray  cognet
-bryanv grehan
+bryanv
 carl   jimharris
 davidcsgnn
 eadler cperciva
___
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: r248546 - stable/9/sys/net

2013-03-20 Thread Alexander V. Chernikov
Author: melifaro
Date: Wed Mar 20 07:20:00 2013
New Revision: 248546
URL: http://svnweb.freebsd.org/changeset/base/248546

Log:
  Merge r247842.
  
  Write lock is not required for findcompare operation.

Modified:
  stable/9/sys/net/route.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/net/   (props changed)

Modified: stable/9/sys/net/route.c
==
--- stable/9/sys/net/route.cWed Mar 20 06:35:03 2013(r248545)
+++ stable/9/sys/net/route.cWed Mar 20 07:20:00 2013(r248546)
@@ -1503,7 +1503,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int
if (rnh == NULL)
/* this table doesn't exist but others might */
continue;
-   RADIX_NODE_HEAD_LOCK(rnh);
+   RADIX_NODE_HEAD_RLOCK(rnh);
 #ifdef RADIX_MPATH
if (rn_mpath_capable(rnh)) {
 
@@ -1532,7 +1532,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int
(rn-rn_flags  RNF_ROOT) ||
RNTORT(rn)-rt_ifa != ifa ||
!sa_equal((struct sockaddr *)rn-rn_key, dst));
-   RADIX_NODE_HEAD_UNLOCK(rnh);
+   RADIX_NODE_HEAD_RUNLOCK(rnh);
if (error) {
/* this is only an error if bad on ALL tables */
continue;
___
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: r248547 - in stable/9: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2013-03-20 Thread Martin Matuska
Author: mm
Date: Wed Mar 20 08:26:16 2013
New Revision: 248547
URL: http://svnweb.freebsd.org/changeset/base/248547

Log:
  MFC r242845, r247592:
  
  MFC r242845 (delphij):
Illumos r13840:97fd5cdf328a:
  3145 single-copy arc
  3212 ztest: race condition between vdev_online() and spa_vdev_remove()
  
Illumos r13849:3468a95b27cd:
  3258 ztest's use of file descriptors is unstable
  
  MFC r247592 (delphij):
Import a fix tighten assertion on SPA versions from vendor (Illumos).
  
Illumos ZFS issue:
  3543 Feature flags causes assertion in spa.c to miss certain cases
  
  Approved by:  delphij

Modified:
  stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==
--- stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 20 07:20:00 
2013(r248546)
+++ stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 20 08:26:16 
2013(r248547)
@@ -121,8 +121,8 @@
 #include sys/fs/zfs.h
 #include libnvpair.h
 
-#defineZTEST_FD_DATA 3
-#defineZTEST_FD_RAND 4
+static int ztest_fd_data = -1;
+static int ztest_fd_rand = -1;
 
 typedef struct ztest_shared_hdr {
uint64_tzh_hdr_size;
@@ -713,14 +713,17 @@ process_options(int argc, char **argv)
UINT64_MAX  2);
 
if (strlen(altdir)  0) {
-   char cmd[MAXNAMELEN];
-   char realaltdir[MAXNAMELEN];
+   char *cmd;
+   char *realaltdir;
char *bin;
char *ztest;
char *isa;
int isalen;
 
-   (void) realpath(getexecname(), cmd);
+   cmd = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
+   realaltdir = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
+
+   VERIFY(NULL != realpath(getexecname(), cmd));
if (0 != access(altdir, F_OK)) {
ztest_dump_core = B_FALSE;
fatal(B_TRUE, invalid alternate ztest path: %s,
@@ -751,6 +754,9 @@ process_options(int argc, char **argv)
fatal(B_TRUE, invalid alternate lib directory %s,
zo-zo_alt_libpath);
}
+
+   umem_free(cmd, MAXPATHLEN);
+   umem_free(realaltdir, MAXPATHLEN);
}
 }
 
@@ -767,10 +773,12 @@ ztest_random(uint64_t range)
 {
uint64_t r;
 
+   ASSERT3S(ztest_fd_rand, =, 0);
+
if (range == 0)
return (0);
 
-   if (read(ZTEST_FD_RAND, r, sizeof (r)) != sizeof (r))
+   if (read(ztest_fd_rand, r, sizeof (r)) != sizeof (r))
fatal(1, short read from /dev/urandom);
 
return (r % range);
@@ -4836,7 +4844,18 @@ ztest_fault_inject(ztest_ds_t *zd, uint6
if (islog)
(void) rw_unlock(ztest_name_lock);
} else {
+   /*
+* Ideally we would like to be able to randomly
+* call vdev_[on|off]line without holding locks
+* to force unpredictable failures but the side
+* effects of vdev_[on|off]line prevent us from
+* doing so. We grab the ztest_vdev_lock here to
+* prevent a race between injection testing and
+* aux_vdev removal.
+*/
+   VERIFY(mutex_lock(ztest_vdev_lock) == 0);
(void) vdev_online(spa, guid0, 0, NULL);
+   VERIFY(mutex_unlock(ztest_vdev_lock) == 0);
}
}
 
@@ -5795,29 +5814,16 @@ ztest_init(ztest_shared_t *zs)
 }
 
 static void
-setup_fds(void)
+setup_data_fd(void)
 {
-   int fd;
-#ifdef illumos
-
-   char *tmp = tempnam(NULL, NULL);
-   fd = open(tmp, O_RDWR | O_CREAT, 0700);
-   ASSERT3U(fd, ==, ZTEST_FD_DATA);
-   (void) unlink(tmp);
-   free(tmp);
-#else
-   char tmp[MAXPATHLEN];
-
-   strlcpy(tmp, ztest_opts.zo_dir, MAXPATHLEN);
-   strlcat(tmp, /ztest.XX, MAXPATHLEN);
-   fd = mkstemp(tmp);
-   ASSERT3U(fd, ==, ZTEST_FD_DATA);
-#endif
+   static char ztest_name_data[] = /tmp/ztest.data.XX;
 
-   fd = open(/dev/urandom, O_RDONLY);
-   ASSERT3U(fd, ==, ZTEST_FD_RAND);
+   ztest_fd_data = mkstemp(ztest_name_data);
+   ASSERT3S(ztest_fd_data, =, 0);
+   (void) unlink(ztest_name_data);
 }
 
+
 static int
 

svn commit: r248548 - head/contrib/llvm/tools/clang/lib/Driver

2013-03-20 Thread Andrew Turner
Author: andrew
Date: Wed Mar 20 08:34:30 2013
New Revision: 248548
URL: http://svnweb.freebsd.org/changeset/base/248548

Log:
  Pull in r177252 from upstream clang trunk:
  
   Make sure to use same EABI version for external assembler as for
   integrated as.
  
  This allows us to use gcc on a world built with clang on ARM.

Modified:
  head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp

Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==
--- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp  Wed Mar 20 08:26:16 
2013(r248547)
+++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp  Wed Mar 20 08:34:30 
2013(r248548)
@@ -5438,6 +5438,7 @@ void freebsd::Assemble::ConstructJob(Com
 switch(getToolChain().getTriple().getEnvironment()) {
 case llvm::Triple::GNUEABI:
 case llvm::Triple::EABI:
+  CmdArgs.push_back(-meabi=5);
   break;
 
 default:
___
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: r248549 - stable/9/sys/netinet6

2013-03-20 Thread Andrey V. Elsukov
Author: ae
Date: Wed Mar 20 09:12:28 2013
New Revision: 248549
URL: http://svnweb.freebsd.org/changeset/base/248549

Log:
  MFC r248180:
Take the inpcb rlock before calculating checksum, it was accidentally
moved in r191672.

Modified:
  stable/9/sys/netinet6/raw_ip6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet6/raw_ip6.c
==
--- stable/9/sys/netinet6/raw_ip6.c Wed Mar 20 08:34:30 2013
(r248548)
+++ stable/9/sys/netinet6/raw_ip6.c Wed Mar 20 09:12:28 2013
(r248549)
@@ -197,6 +197,7 @@ rip6_input(struct mbuf **mp, int *offp, 
ip6-ip6_dst) != 0)
continue;
}
+   INP_RLOCK(in6p);
if (in6p-in6p_cksum != -1) {
V_rip6stat.rip6s_isum++;
if (in6_cksum(m, proto, *offp,
@@ -206,7 +207,6 @@ rip6_input(struct mbuf **mp, int *offp, 
continue;
}
}
-   INP_RLOCK(in6p);
/*
 * If this raw socket has multicast state, and we
 * have received a multicast, check if this socket
___
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: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys

2013-03-20 Thread Gleb Smirnoff
On Tue, Mar 19, 2013 at 08:58:18PM +, Jilles Tjoelker wrote:
J Author: jilles
J Date: Tue Mar 19 20:58:17 2013
J New Revision: 248534
J URL: http://svnweb.freebsd.org/changeset/base/248534
J 
J Log:
J   Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.
J   
J   This change allows creating file descriptors with close-on-exec set in some
J   situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and
J   socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file
J   descriptors (SCM_RIGHTS) atomically close-on-exec.
J   
J   The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.
J   MSG_CMSG_CLOEXEC is the first free bit for MSG_*.
J   
J   The SOCK_* flags are not passed to MAC because this may cause incorrect
J   failures and can be done later via fcntl() anyway. On the other hand, audit
J   is expected to cope with the new flags.
J   
J   For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags
J   argument.

IMO, it won't hurt if changes like this (bringing in new functionality)
would bump __FreeBSD_version.

-- 
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: r248550 - head/sys/vm

2013-03-20 Thread Konstantin Belousov
Author: kib
Date: Wed Mar 20 09:44:23 2013
New Revision: 248550
URL: http://svnweb.freebsd.org/changeset/base/248550

Log:
  Fix the logic inversion in the r248512.
  
  Noted by: mckay

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==
--- head/sys/vm/vnode_pager.c   Wed Mar 20 09:12:28 2013(r248549)
+++ head/sys/vm/vnode_pager.c   Wed Mar 20 09:44:23 2013(r248550)
@@ -947,7 +947,7 @@ vnode_pager_generic_getpages(vp, m, byte
if ((bp-b_ioflags  BIO_ERROR) != 0)
error = EIO;
 
-   if (error != 0  size != count * PAGE_SIZE) {
+   if (error == 0  size != count * PAGE_SIZE) {
if ((bp-b_flags  B_UNMAPPED) != 0) {
bp-b_flags = ~B_UNMAPPED;
pmap_qenter(kva, m, count);
___
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: r248552 - in head: sbin/ipfw sys/netinet sys/netpfil/ipfw

2013-03-20 Thread Alexander V. Chernikov
Author: melifaro
Date: Wed Mar 20 10:35:33 2013
New Revision: 248552
URL: http://svnweb.freebsd.org/changeset/base/248552

Log:
  Add ipfw support for setting/matching DiffServ codepoints (DSCP).
  
  Setting DSCP support is done via O_SETDSCP which works for both
  IPv4 and IPv6 packets. Fast checksum recalculation (RFC 1624) is done for 
IPv4.
  Dscp can be specified by name (AFXY, CSX, BE, EF), by value
  (0..63) or via tablearg.
  
  Matching DSCP is done via another opcode (O_DSCP) which accepts several
  classes at once (af11,af22,be). Classes are stored in bitmask (2 u32 words).
  
  Many people made their variants of this patch, the ones I'm aware of are
  (in alphabetic order):
  
  Dmitrii Tejblum
  Marcelo Araujo
  Roman Bogorodskiy (novel)
  Sergey Matveichuk (sem)
  Sergey Ryabin
  
  PR:   kern/102471, kern/121122
  MFC after:2 weeks

Modified:
  head/sbin/ipfw/ipfw.8
  head/sbin/ipfw/ipfw2.c
  head/sbin/ipfw/ipfw2.h
  head/sys/netinet/ip_fw.h
  head/sys/netpfil/ipfw/ip_fw2.c
  head/sys/netpfil/ipfw/ip_fw_log.c
  head/sys/netpfil/ipfw/ip_fw_sockopt.c

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Wed Mar 20 09:56:20 2013(r248551)
+++ head/sbin/ipfw/ipfw.8   Wed Mar 20 10:35:33 2013(r248552)
@@ -960,6 +960,61 @@ It is possible to use the
 keyword with setfib.
 If the tablearg value is not within the compiled range of fibs,
 the packet's fib is set to 0.
+.It Cm setdscp Ar DSCP | number | tablearg
+Set specified DiffServ codepoint for an IPv4/IPv6 packet.
+Processing continues at the next rule.
+Supported values are:
+.Pp
+.Cm CS0
+.Pq Dv 00 ,
+.Cm CS1
+.Pq Dv 001000 ,
+.Cm CS2
+.Pq Dv 01 ,
+.Cm CS3
+.Pq Dv 011000 ,
+.Cm CS4
+.Pq Dv 10 ,
+.Cm CS5
+.Pq Dv 101000 ,
+.Cm CS6
+.Pq Dv 11 ,
+.Cm CS7
+.Pq Dv 111000 ,
+.Cm AF11
+.Pq Dv 001010 ,
+.Cm AF12
+.Pq Dv 001100 ,
+.Cm AF13
+.Pq Dv 001110 ,
+.Cm AF21
+.Pq Dv 010010 ,
+.Cm AF22
+.Pq Dv 010100 ,
+.Cm AF23
+.Pq Dv 010110 ,
+.Cm AF31
+.Pq Dv 011010 ,
+.Cm AF32
+.Pq Dv 011100 ,
+.Cm AF33
+.Pq Dv 00 ,
+.Cm AF41
+.Pq Dv 100010 ,
+.Cm AF42
+.Pq Dv 100100 ,
+.Cm AF43
+.Pq Dv 100110 ,
+.Cm EF
+.Pq Dv 101110 ,
+.Cm BE
+.Pq Dv 00 .
+Additionally, DSCP value can be specified by number (0..64).
+It is also possible to use the
+.Cm tablearg
+keyword with setdscp.
+If the tablearg value is not within the 0..64 range, lower 6 bits of supplied
+value are used.
 .It Cm reass
 Queue and reassemble IP fragments.
 If the packet is not fragmented, counters are updated and
@@ -1454,6 +1509,17 @@ The supported IP types of service are:
 The absence of a particular type may be denoted
 with a
 .Ql \! .
+.It Cm dscp spec Ns Op , Ns Ar spec
+Matches IPv4/IPv6 packets whose
+.Cm DS
+field value is contained in
+.Ar spec
+mask.
+Multiple values can be specified via 
+the comma separated list.
+Value can be one of keywords used in
+.Cm setdscp
+action or exact number.
 .It Cm ipttl Ar ttl-list
 Matches IPv4 packets whose time to live is included in
 .Ar ttl-list ,
@@ -2976,6 +3042,23 @@ configured on
 but coming in on
 .Li fxp1
 would be dropped.
+.Pp
+The
+.Cm setdscp
+option could be used to (re)mark user traffic,
+by adding the following to the appropriate place in ruleset:
+.Pp
+.Dl ipfw add setdscp be ip from any to any dscp af11,af21
+.Pp
+This rule drops all incoming packets that appear to be coming from another
+directly connected system but on the wrong interface.
+For example, a packet with a source address of
+.Li 192.168.0.0/24 ,
+configured on
+.Li fxp0 ,
+but coming in on
+.Li fxp1
+would be dropped.
 .Ss DYNAMIC RULES
 In order to protect a site from flood attacks involving fake
 TCP packets, it is safer to use dynamic rules:

Modified: head/sbin/ipfw/ipfw2.c
==
--- head/sbin/ipfw/ipfw2.c  Wed Mar 20 09:56:20 2013(r248551)
+++ head/sbin/ipfw/ipfw2.c  Wed Mar 20 10:35:33 2013(r248552)
@@ -167,6 +167,32 @@ static struct _s_x f_iptos[] = {
{ NULL, 0 }
 };
 
+static struct _s_x f_ipdscp[] = {
+   { af11, IPTOS_DSCP_AF11  2 },   /* 001010 */
+   { af12, IPTOS_DSCP_AF12  2 },   /* 001100 */
+   { af13, IPTOS_DSCP_AF13  2 },   /* 001110 */
+   { af21, IPTOS_DSCP_AF21  2 },   /* 010010 */
+   { af22, IPTOS_DSCP_AF22  2 },   /* 010100 */
+   { af23, IPTOS_DSCP_AF23  2 },   /* 010110 */
+   { af31, IPTOS_DSCP_AF31  2 },   /* 011010 */
+   { af32, IPTOS_DSCP_AF32  2 },   /* 011100 */
+   { af33, IPTOS_DSCP_AF33  2 },   /* 00 */
+   { af41, IPTOS_DSCP_AF41  2 },   /* 100010 */
+   { af42, IPTOS_DSCP_AF42  2 },   /* 100100 */
+   { af43, IPTOS_DSCP_AF43  2 },   /* 100110 */
+   { be, IPTOS_DSCP_CS0  2 },  /* 00 */
+   { ef, IPTOS_DSCP_EF  2 },   /* 101110 */
+   { cs0, IPTOS_DSCP_CS0  2 }, /* 00 */
+ 

svn commit: r248553 - head/sbin/ipfw

2013-03-20 Thread Alexander V. Chernikov
Author: melifaro
Date: Wed Mar 20 10:36:38 2013
New Revision: 248553
URL: http://svnweb.freebsd.org/changeset/base/248553

Log:
  Remove unused variable.

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==
--- head/sbin/ipfw/ipfw2.c  Wed Mar 20 10:35:33 2013(r248552)
+++ head/sbin/ipfw/ipfw2.c  Wed Mar 20 10:36:38 2013(r248553)
@@ -4122,10 +4122,9 @@ ipfw_table_handler(int ac, char *av[])
int do_add;
int is_all;
size_t len;
-   uint32_t a, mask;
+   uint32_t a;
uint32_t tables_max;
 
-   mask = 0;   // XXX uninitialized ?
len = sizeof(tables_max);
if (sysctlbyname(net.inet.ip.fw.tables_max, tables_max, len,
NULL, 0) == -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


svn commit: r248554 - head/sys/dev/usb/controller

2013-03-20 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Mar 20 11:51:26 2013
New Revision: 248554
URL: http://svnweb.freebsd.org/changeset/base/248554

Log:
  Fix spelling.

Modified:
  head/sys/dev/usb/controller/xhci.c

Modified: head/sys/dev/usb/controller/xhci.c
==
--- head/sys/dev/usb/controller/xhci.c  Wed Mar 20 10:36:38 2013
(r248553)
+++ head/sys/dev/usb/controller/xhci.c  Wed Mar 20 11:51:26 2013
(r248554)
@@ -36,7 +36,8 @@
 /*
  * A few words about the design implementation: This driver emulates
  * the concept about TDs which is found in EHCI specification. This
- * way we avoid too much diveration among USB drivers.
+ * way we achieve that the USB controller drivers look similar to
+ * eachother which makes it easier to understand the code.
  */
 
 #ifdef USB_GLOBAL_INCLUDE_FILE
___
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: r248555 - svnadmin/conf

2013-03-20 Thread Peter Grehan
Author: grehan
Date: Wed Mar 20 13:45:15 2013
New Revision: 248555
URL: http://svnweb.freebsd.org/changeset/base/248555

Log:
  Really release Bryan this time :)
  
  Pointed out by: many

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Wed Mar 20 11:51:26 2013(r248554)
+++ svnadmin/conf/mentors   Wed Mar 20 13:45:15 2013(r248555)
@@ -15,7 +15,6 @@ anchiebz
 artavg Co-mentor: marcel
 benl   philip  Co-mentor: simon
 bgray  cognet
-bryanv
 carl   jimharris
 davidcsgnn
 eadler cperciva
___
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: r248557 - in head/sys: arm/conf arm/freescale arm/freescale/imx boot/fdt/dts dev/ata/chipsets dev/uart dev/usb/controller

2013-03-20 Thread Aleksandr Rybalko
Author: ray
Date: Wed Mar 20 15:39:27 2013
New Revision: 248557
URL: http://svnweb.freebsd.org/changeset/base/248557

Log:
  Integrate Efika MX project back to home.
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/sys/arm/conf/EFIKA_MX   (contents, props changed)
  head/sys/arm/freescale/
  head/sys/arm/freescale/imx/
  head/sys/arm/freescale/imx/bus_space.c   (contents, props changed)
  head/sys/arm/freescale/imx/common.c   (contents, props changed)
  head/sys/arm/freescale/imx/console.c   (contents, props changed)
  head/sys/arm/freescale/imx/i2c.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx.files   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_ccm.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_ccmreg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_ccmvar.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_dpllreg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_gpio.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_iomux.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_iomuxreg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_iomuxvar.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_ipuv3.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_ipuv3reg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_sdmareg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_ssireg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx51_tzicreg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx_gpt.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx_gptreg.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx_gptvar.h   (contents, props changed)
  head/sys/arm/freescale/imx/imx_machdep.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx_wdog.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx_wdogreg.h   (contents, props changed)
  head/sys/arm/freescale/imx/std.imx   (contents, props changed)
  head/sys/arm/freescale/imx/tzic.c   (contents, props changed)
  head/sys/boot/fdt/dts/efikamx.dts   (contents, props changed)
  head/sys/boot/fdt/dts/imx51x.dtsi   (contents, props changed)
  head/sys/dev/ata/chipsets/ata-fsl.c   (contents, props changed)
  head/sys/dev/uart/uart_dev_imx.c   (contents, props changed)
  head/sys/dev/uart/uart_dev_imx5xx.h   (contents, props changed)
  head/sys/dev/usb/controller/ehci_imx.c   (contents, props changed)
Modified:
  head/sys/dev/uart/uart.h
  head/sys/dev/uart/uart_bus_fdt.c

Added: head/sys/arm/conf/EFIKA_MX
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/EFIKA_MX  Wed Mar 20 15:39:27 2013(r248557)
@@ -0,0 +1,177 @@
+# Kernel configuration for Efika MX Smarttop/Smartbook boards
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident  EFIKA_MX
+
+include../freescale/imx/std.imx
+
+makeoptionsWITHOUT_MODULES=ahc
+
+makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
+#options   DEBUG
+
+optionsSCHED_4BSD  # 4BSD scheduler
+#options   PREEMPTION  # Enable kernel thread preemption
+optionsINET# InterNETworking
+#options   INET6   # IPv6 communications protocols
+#options   SCTP# Stream Control Transmission Protocol
+optionsFFS # Berkeley Fast Filesystem
+optionsSOFTUPDATES # Enable FFS soft updates support
+optionsUFS_ACL # Support for access control lists
+optionsUFS_DIRHASH # Improve performance on big directories
+optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+#options   MD_ROOT # MD is a potential root device
+optionsNFSCL   # New Network Filesystem Client
+#options   NFSD# New Network Filesystem Server
+optionsNFSLOCKD# Network Lock Manager
+optionsNFS_ROOT# NFS usable as /, requires NFSCL
+optionsMSDOSFS # MSDOS 

svn commit: r248561 - in head/sys: kern sys ufs/ufs

2013-03-20 Thread Kirk McKusick
Author: mckusick
Date: Wed Mar 20 17:57:00 2013
New Revision: 248561
URL: http://svnweb.freebsd.org/changeset/base/248561

Log:
  When renaming a directory from one parent directory to another,
  we need to call ufs_checkpath() to walk from our new location to
  the root of the filesystem to ensure that we do not encounter
  ourselves along the way. Until now, we accomplished this by reading
  the .. entries of each directory in our path until we reached
  the root (or encountered an error). This change tries to avoid the
  I/O of reading the .. entries by first looking them up in the
  name cache and only doing the I/O when the name cache lookup fails.
  
  Reviewed by: kib
  Tested by:   Peter Holm
  MFC after:   4 weeks

Modified:
  head/sys/kern/vfs_cache.c
  head/sys/sys/vnode.h
  head/sys/ufs/ufs/ufs_lookup.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Mar 20 16:30:17 2013(r248560)
+++ head/sys/kern/vfs_cache.c   Wed Mar 20 17:57:00 2013(r248561)
@@ -1359,6 +1359,28 @@ vn_fullpath1(struct thread *td, struct v
return (0);
 }
 
+struct vnode *
+vn_dir_dd_ino(struct vnode *vp)
+{
+   struct namecache *ncp;
+   struct vnode *ddvp;
+
+   ASSERT_VOP_LOCKED(vp, vn_dir_dd_ino);
+   CACHE_RLOCK();
+   TAILQ_FOREACH(ncp, (vp-v_cache_dst), nc_dst) {
+   if ((ncp-nc_flag  NCF_ISDOTDOT) != 0)
+   continue;
+   ddvp = ncp-nc_dvp;
+   VI_LOCK(ddvp);
+   CACHE_RUNLOCK();
+   if (vget(ddvp, LK_INTERLOCK | LK_SHARED | LK_NOWAIT, curthread))
+   return (NULL);
+   return (ddvp);
+   }
+   CACHE_RUNLOCK();
+   return (NULL);
+}
+
 int
 vn_commname(struct vnode *vp, char *buf, u_int buflen)
 {

Modified: head/sys/sys/vnode.h
==
--- head/sys/sys/vnode.hWed Mar 20 16:30:17 2013(r248560)
+++ head/sys/sys/vnode.hWed Mar 20 17:57:00 2013(r248561)
@@ -622,6 +622,8 @@ int vn_fullpath(struct thread *td, struc
char **retbuf, char **freebuf);
 intvn_fullpath_global(struct thread *td, struct vnode *vn,
char **retbuf, char **freebuf);
+struct vnode *
+   vn_dir_dd_ino(struct vnode *vp);
 intvn_commname(struct vnode *vn, char *buf, u_int buflen);
 intvn_path_to_global_path(struct thread *td, struct vnode *vp,
char *path, u_int pathlen);

Modified: head/sys/ufs/ufs/ufs_lookup.c
==
--- head/sys/ufs/ufs/ufs_lookup.c   Wed Mar 20 16:30:17 2013
(r248560)
+++ head/sys/ufs/ufs/ufs_lookup.c   Wed Mar 20 17:57:00 2013
(r248561)
@@ -1387,13 +1387,29 @@ ufs_dirempty(ip, parentino, cred)
 }
 
 static int
-ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino)
+ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino,
+struct vnode **dd_vp)
 {
struct dirtemplate dirbuf;
+   struct vnode *ddvp;
int error, namlen;
 
+   ASSERT_VOP_LOCKED(vp, ufs_dir_dd_ino);
if (vp-v_type != VDIR)
return (ENOTDIR);
+   /*
+* First check to see if we have it in the name cache.
+*/
+   if ((ddvp = vn_dir_dd_ino(vp)) != NULL) {
+   KASSERT(ddvp-v_mount == vp-v_mount,
+   (ufs_dir_dd_ino: Unexpected mount point crossing));
+   *dd_ino = VTOI(ddvp)-i_number;
+   *dd_vp = ddvp;
+   return (0);
+   }
+   /*
+* Have to read the directory.
+*/
error = vn_rdwr(UIO_READ, vp, (caddr_t)dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL, NULL);
@@ -1411,6 +1427,7 @@ ufs_dir_dd_ino(struct vnode *vp, struct 
dirbuf.dotdot_name[1] != '.')
return (ENOTDIR);
*dd_ino = dirbuf.dotdot_ino;
+   *dd_vp = NULL;
return (0);
 }
 
@@ -1435,7 +1452,7 @@ ufs_checkpath(ino_t source_ino, ino_t pa
if (target-i_number == ROOTINO)
return (0);
for (;;) {
-   error = ufs_dir_dd_ino(vp, cred, dd_ino);
+   error = ufs_dir_dd_ino(vp, cred, dd_ino, vp1);
if (error != 0)
break;
if (dd_ino == source_ino) {
@@ -1446,22 +1463,16 @@ ufs_checkpath(ino_t source_ino, ino_t pa
break;
if (dd_ino == parent_ino)
break;
-   error = VFS_VGET(mp, dd_ino, LK_SHARED | LK_NOWAIT, vp1);
-   if (error != 0) {
-   *wait_ino = dd_ino;
-   break;
-   }
-   /* Recheck that .. still points to vp1 after relock of vp */
- 

Re: svn commit: r248352 - in stable/9: etc share/mk

2013-03-20 Thread John Baldwin
On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote:
 On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote:
  On Tue, 19 Mar 2013, Brooks Davis wrote:
  
   Replace all known uses of ln in the build process with appropriate
   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
   variables.

It seems this merge breaks ``make distribution'' and hence mergemaster 
if your 
base system is not updated yet (for example, while updating jail):
   
   Sorry for the delay in responding.  I missed this yesterday.
   
   It works for me on a older 9.0-STABLE system where the base install
   doesn't support -l.  Did you build world or run make toolchain in that
   source tree to build the bootstrap copy of install?
  
  Yes, this is after full ``make buildworld buildkernel'' process.
 
 I've found the problem thanks to misc/177055.  It is that mergemaster
 (and etcupdate) set MAKEOBJDIRPREFIX to something in their
 temporary directory and thus deprive themselves of bootstrap tools.
 Unfortunately, I don't see a trivial fix so I've backed this out for
 now and will work on this in HEAD.

Hu.  In the case of etcupdate you can use 'etcupdate -B'.  That is actually 
safe
to do in the common case where you've just updated /usr/src and built the 
corresponding
world in /usr/obj.  It should possibly even by the default for etcupdate if a 
DESTDIR
is not specified.

-- 
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: r248563 - head/sys/kern

2013-03-20 Thread Konstantin Belousov
Author: kib
Date: Wed Mar 20 21:08:00 2013
New Revision: 248563
URL: http://svnweb.freebsd.org/changeset/base/248563

Log:
  In bufwrite(), a dirty buffer is moved to the clean queue before the
  bufobj counter of the writes in progress is incremented.  Other thread
  inspecting the bufobj would consider it clean.
  
  For the regular vnodes, the vnode lock is typically held both by the
  thread performing the bufwrite() and an other thread doing syncing,
  which prevents the situation.  On the other hand, writes to the VCHR
  vnodes are done without holding vnode lock.
  
  Increment the write ref counter for the buffer object before calling
  bundirty().
  
  Sponsored by: The FreeBSD Foundation
  Tested by:pho
  MFC after:2 weeks

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Wed Mar 20 21:07:49 2013(r248562)
+++ head/sys/kern/vfs_bio.c Wed Mar 20 21:08:00 2013(r248563)
@@ -1044,7 +1044,13 @@ bufwrite(struct buf *bp)
else
vp_md = 0;
 
-   /* Mark the buffer clean */
+   /*
+* Mark the buffer clean.  Increment the bufobj write count
+* before bundirty() call, to prevent other thread from seeing
+* empty dirty list and zero counter for writes in progress,
+* falsely indicating that the bufobj is clean.
+*/
+   bufobj_wref(bp-b_bufobj);
bundirty(bp);
 
bp-b_flags = ~B_DONE;
@@ -1052,7 +1058,6 @@ bufwrite(struct buf *bp)
bp-b_flags |= B_CACHE;
bp-b_iocmd = BIO_WRITE;
 
-   bufobj_wref(bp-b_bufobj);
vfs_busy_pages(bp, 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


svn commit: r248562 - head/sys/kern

2013-03-20 Thread Konstantin Belousov
Author: kib
Date: Wed Mar 20 21:07:49 2013
New Revision: 248562
URL: http://svnweb.freebsd.org/changeset/base/248562

Log:
  When the journaled FFS volume is suspended due to the journal space
  becoming too low, the softdep flush thread processes the workitems,
  which frees the space in journal, and then unsuspends the fs.  The
  softdep_flush() and other workitem processing functions busy the
  filesystem before iterating over the worklist, to prevent the parallel
  unmount from freeing the mount data. The vfs_busy() is called with
  MBF_NOWAIT flag.
  
  Now, if the unmount is already started and the filesystem is suspended
  due to low journal space, the journal is never flushed and filesystem
  is never unsuspended, because vfs_busy(MBF_NOWAIT) call cannot succeed
  for the unmounting fs, and softdep_flush() does not process the
  workitems. Unmount needs to write metadata, where it hangs in the
  suspfs state.
  
  Move the vn_start_write() call in the dounmount() before setting the
  MNTK_UNMOUNT flag. This practically ensures that softdep_flush()
  processed the pending journal writes by making dounmount() wait for
  the lift of the suspension.
  
  Sponsored by: The FreeBSD Foundation
  Reported and tested by:   pho
  MFC after:2 weeks

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Wed Mar 20 17:57:00 2013(r248561)
+++ head/sys/kern/vfs_mount.c   Wed Mar 20 21:07:49 2013(r248562)
@@ -1256,12 +1256,14 @@ dounmount(mp, flags, td)
return (error);
}
 
+   vn_start_write(NULL, mp, V_WAIT);
MNT_ILOCK(mp);
if ((mp-mnt_kern_flag  MNTK_UNMOUNT) != 0 ||
!TAILQ_EMPTY(mp-mnt_uppers)) {
MNT_IUNLOCK(mp);
if (coveredvp)
VOP_UNLOCK(coveredvp, 0);
+   vn_finished_write(mp);
return (EBUSY);
}
mp-mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ;
@@ -1281,7 +1283,6 @@ dounmount(mp, flags, td)
KASSERT(error == 0,
(%s: invalid return value for msleep in the drain path @ %s:%d,
__func__, __FILE__, __LINE__));
-   vn_start_write(NULL, mp, V_WAIT);
 
if (mp-mnt_flag  MNT_EXPUBLIC)
vfs_setpublicfs(NULL, NULL, NULL);
___
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: r248564 - head/tools/tools/netrate/netreceive

2013-03-20 Thread Neel Natu
Author: neel
Date: Wed Mar 20 21:47:05 2013
New Revision: 248564
URL: http://svnweb.freebsd.org/changeset/base/248564

Log:
  Set WARNS=3 so this actually compiles.

Modified:
  head/tools/tools/netrate/netreceive/Makefile

Modified: head/tools/tools/netrate/netreceive/Makefile
==
--- head/tools/tools/netrate/netreceive/MakefileWed Mar 20 21:08:00 
2013(r248563)
+++ head/tools/tools/netrate/netreceive/MakefileWed Mar 20 21:47:05 
2013(r248564)
@@ -6,4 +6,6 @@ PROG=   netreceive
 NO_MAN=
 LDFLAGS += -lpthread
 
+WARNS?=3
+
 .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


Re: svn commit: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys

2013-03-20 Thread Jilles Tjoelker
On Wed, Mar 20, 2013 at 01:18:56PM +0400, Gleb Smirnoff wrote:
 On Tue, Mar 19, 2013 at 08:58:18PM +, Jilles Tjoelker wrote:
 J Author: jilles
 J Date: Tue Mar 19 20:58:17 2013
 J New Revision: 248534
 J URL: http://svnweb.freebsd.org/changeset/base/248534

 J Log:
 J   Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.

 J   This change allows creating file descriptors with close-on-exec set in 
 some
 J   situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and
 J   socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes 
 file
 J   descriptors (SCM_RIGHTS) atomically close-on-exec.

 J   The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.
 J   MSG_CMSG_CLOEXEC is the first free bit for MSG_*.

 J   The SOCK_* flags are not passed to MAC because this may cause incorrect
 J   failures and can be done later via fcntl() anyway. On the other hand, 
 audit
 J   is expected to cope with the new flags.

 J   For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags
 J   argument.

 IMO, it won't hurt if changes like this (bringing in new functionality)
 would bump __FreeBSD_version.

This change can be detected via the new #defines, and I plan to add
similar changes in the near future (see the hackers@ mail about this
patch; some of them cannot be detected via the preprocessor or even at
compile time). Therefore, I think a __FreeBSD_version bump is not yet
appropriate.

-- 
Jilles Tjoelker
___
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