svn commit: r272676 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: araujo (ports committer) Date: Tue Oct 7 06:00:09 2014 New Revision: 272676 URL: https://svnweb.freebsd.org/changeset/base/272676 Log: Make external NFS clients know when files have their attributes changed and avoid cache the file's state indefinitely. The va_filerev is what is sent to the client as the change attribute, the client is periodically fetching the attributes and without this option the attribute remains as some garbage value. Phabric: D905 Reported by: Kevin Buhr b...@asaurus.net Reviewed by: rmacklem, delphij Approved by: delphij Obtained from:r272467 Sponsored by: QNAP Systems Inc. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 04:59:11 2014(r272675) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 06:00:09 2014(r272676) @@ -2827,6 +2827,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #endif vap-va_seq = zp-z_seq; vap-va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ + vap-va_filerev = zp-z_seq; /* * Add in any requested optional attributes and the create time. ___ 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: r272677 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: araujo (ports committer) Date: Tue Oct 7 06:00:32 2014 New Revision: 272677 URL: https://svnweb.freebsd.org/changeset/base/272677 Log: Make external NFS clients know when files have their attributes changed and avoid cache the file's state indefinitely. The va_filerev is what is sent to the client as the change attribute, the client is periodically fetching the attributes and without this option the attribute remains as some garbage value. Phabric: D905 Reported by: Kevin Buhr b...@asaurus.net Reviewed by: rmacklem, delphij Approved by: delphij Obtained from:r272467 Sponsored by: QNAP Systems Inc. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 06:00:09 2014(r272676) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 06:00:32 2014(r272677) @@ -2812,6 +2812,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #endif vap-va_seq = zp-z_seq; vap-va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ + vap-va_filerev = zp-z_seq; /* * Add in any requested optional attributes and the create time. ___ 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: r272678 - head/lib/libc/stdtime
Author: ache Date: Tue Oct 7 06:02:08 2014 New Revision: 272678 URL: https://svnweb.freebsd.org/changeset/base/272678 Log: Back out timegm error check from r272562. POSIX treats negative time_t as undefined (i.e. may be valid too, depends on system's policy we don't have) and we don't set EOVERFLOW in mktime/timegm as POSIX requires to surely distinguish -1 return as valid negative time from -1 as error return. Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c == --- head/lib/libc/stdtime/strptime.cTue Oct 7 06:00:32 2014 (r272677) +++ head/lib/libc/stdtime/strptime.cTue Oct 7 06:02:08 2014 (r272678) @@ -676,8 +676,6 @@ strptime_l(const char * __restrict buf, if (ret gmt) { time_t t = timegm(tm); - if (t == -1) - return (NULL); localtime_r(t, tm); } ___ 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: r272679 - head/lib/libc/stdtime
Author: ache Date: Tue Oct 7 06:34:05 2014 New Revision: 272679 URL: https://svnweb.freebsd.org/changeset/base/272679 Log: 1) Fix the case we have less arguments for format string than we expected. 2) Return error on unsupported format specs. (both according to POSIX) PR: 93197 Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c == --- head/lib/libc/stdtime/strptime.cTue Oct 7 06:02:08 2014 (r272678) +++ head/lib/libc/stdtime/strptime.cTue Oct 7 06:34:05 2014 (r272679) @@ -103,9 +103,6 @@ _strptime(const char *buf, const char *f ptr = fmt; while (*ptr != 0) { - if (*buf == 0) - break; - c = *ptr++; if (c != '%') { @@ -123,7 +120,6 @@ _strptime(const char *buf, const char *f label: c = *ptr++; switch (c) { - case 0: case '%': if (*buf++ != '%') return (NULL); @@ -600,6 +596,9 @@ label: while (isspace_l((unsigned char)*buf, locale)) buf++; break; + + default: + return (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
Re: svn commit: r272673 - in head: include lib/libc/string sys/conf sys/libkern sys/sys
Xin LI delp...@freebsd.org writes: Log: Add explicit_bzero(3) and its kernel counterpart. I would much prefer that we add memset_s(3) from C11, which predates explicit_bzero(3) by either three or five years (depending on whether you count from the publication date or the proposal date). In the longer term, we should also consider adding the rest of annex K. Here's a patch for NetBSD (which was never accepted): https://mail-index.netbsd.org/tech-userlevel/2012/02/24/msg006125.html I realize that these extensions are controversial, but I still believe that having them is better than not having them. As the WG points out, the intention with gets_s(3) and scanf_s(3) is not to encourage the use of those interfaces, but to make it easier to retrofit code that uses gets(3) and scanf(3). DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r272680 - stable/10/sys/net
Author: ae Date: Tue Oct 7 07:52:47 2014 New Revision: 272680 URL: https://svnweb.freebsd.org/changeset/base/272680 Log: MFC r272176: Keep list of lagg ports sorted by if_index. Modified: stable/10/sys/net/if_lagg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_lagg.c == --- stable/10/sys/net/if_lagg.c Tue Oct 7 06:34:05 2014(r272679) +++ stable/10/sys/net/if_lagg.c Tue Oct 7 07:52:47 2014(r272680) @@ -565,7 +565,7 @@ static int lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) { struct lagg_softc *sc_ptr; - struct lagg_port *lp; + struct lagg_port *lp, *tlp; int error = 0; LAGG_WLOCK_ASSERT(sc); @@ -672,8 +672,18 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc-sc_ifp)); } - /* Insert into the list of ports */ - SLIST_INSERT_HEAD(sc-sc_ports, lp, lp_entries); + /* Insert into the list of ports. Keep ports sorted by if_index. */ + SLIST_FOREACH(tlp, sc-sc_ports, lp_entries) { + if (tlp-lp_ifp-if_index ifp-if_index ( + SLIST_NEXT(tlp, lp_entries) == NULL || + SLIST_NEXT(tlp, lp_entries)-lp_ifp-if_index + ifp-if_index)) + break; + } + if (tlp != NULL) + SLIST_INSERT_AFTER(tlp, lp, lp_entries); + else + SLIST_INSERT_HEAD(sc-sc_ports, lp, lp_entries); sc-sc_count++; /* Update lagg capabilities */ ___ 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: r272681 - stable/9/sys/net
Author: ae Date: Tue Oct 7 08:19:21 2014 New Revision: 272681 URL: https://svnweb.freebsd.org/changeset/base/272681 Log: MFC r272176: Keep list of lagg ports sorted by if_index. Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_lagg.c == --- stable/9/sys/net/if_lagg.c Tue Oct 7 07:52:47 2014(r272680) +++ stable/9/sys/net/if_lagg.c Tue Oct 7 08:19:21 2014(r272681) @@ -523,7 +523,7 @@ static int lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) { struct lagg_softc *sc_ptr; - struct lagg_port *lp; + struct lagg_port *lp, *tlp; int error = 0; LAGG_WLOCK_ASSERT(sc); @@ -630,8 +630,18 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc-sc_ifp)); } - /* Insert into the list of ports */ - SLIST_INSERT_HEAD(sc-sc_ports, lp, lp_entries); + /* Insert into the list of ports. Keep ports sorted by if_index. */ + SLIST_FOREACH(tlp, sc-sc_ports, lp_entries) { + if (tlp-lp_ifp-if_index ifp-if_index ( + SLIST_NEXT(tlp, lp_entries) == NULL || + SLIST_NEXT(tlp, lp_entries)-lp_ifp-if_index + ifp-if_index)) + break; + } + if (tlp != NULL) + SLIST_INSERT_AFTER(tlp, lp, lp_entries); + else + SLIST_INSERT_HEAD(sc-sc_ports, lp, lp_entries); sc-sc_count++; /* Update lagg capabilities */ ___ 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: r272682 - releng/10.1/bin/pkill/tests
Author: rodrigc Date: Tue Oct 7 08:23:37 2014 New Revision: 272682 URL: https://svnweb.freebsd.org/changeset/base/272682 Log: MFC r272549: Fix pkill unit test Approved by: re (gjb) Modified: releng/10.1/bin/pkill/tests/pgrep-j_test.sh releng/10.1/bin/pkill/tests/pkill-j_test.sh Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/bin/pkill/tests/pgrep-j_test.sh == --- releng/10.1/bin/pkill/tests/pgrep-j_test.sh Tue Oct 7 08:19:21 2014 (r272681) +++ releng/10.1/bin/pkill/tests/pgrep-j_test.sh Tue Oct 7 08:23:37 2014 (r272682) @@ -1,7 +1,23 @@ #!/bin/sh # $FreeBSD$ -base=`basename $0` +jail_name_to_jid() +{ + local check_name=$1 + ( + line=$(jls -n 2 /dev/null | grep name=$check_name ) + for nv in $line; do + local name=${nv%=*} + if [ ${name} = jid ]; then + eval $nv + echo $jid + break + fi + done + ) +} + +base=pgrep_j_test echo 1..3 @@ -9,21 +25,25 @@ name=pgrep -j jid if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 - chpid2=$! - $sleep 5 - chpid3=$! - sleep 0.5 - jid=`jls | awk /127\\.0\\.0\\.1.*${base}-1/ {print \$1}` - pid=`pgrep -f -j $jid $sleep` - if [ $pid = $chpid ]; then + jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 + + jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 + + jid1=$(jail_name_to_jid ${base}_1_1) + jid2=$(jail_name_to_jid ${base}_1_2) + jid=${jid1},${jid2} + pid1=$(pgrep -f -x -j $jid $sleep 5 | sort) + pid2=$(printf %s\n%s $(cat ${PWD}/${base}_1_1.pid) \ + $(cat ${PWD}/${base}_1_2.pid) | sort) + if [ $pid1 = $pid2 ]; then echo ok 1 - $name else echo not ok 1 - $name fi - kill $chpid $chpid2 $chpid3 + [ -f ${PWD}/${base}_1_1.pid ] kill $(cat ${PWD}/${base}_1_1.pid) + [ -f ${PWD}/${base}_1_2.pid ] kill $(cat ${PWD}/${base}_1_2.pid) rm -f $sleep else echo ok 1 - $name # skip Test needs uid 0. @@ -33,21 +53,23 @@ name=pgrep -j any if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 - chpid2=$! - $sleep 5 - chpid3=$! - sleep 0.5 - pids=`pgrep -f -j any $sleep | sort` - refpids=`{ echo $chpid; echo $chpid2; } | sort` - if [ $pids = $refpids ]; then + jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 + + jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 + + sleep 2 + pid1=$(pgrep -f -x -j any $sleep 5 | sort) + pid2=$(printf %s\n%s $(cat ${PWD}/${base}_2_1.pid) \ + $(cat ${PWD}/${base}_2_2.pid) | sort) + if [ $pid1 = $pid2 ]; then echo ok 2 - $name else echo not ok 2 - $name fi - kill $chpid $chpid2 $chpid3 + [ -f ${PWD}/${base}_2_1.pid ] kill $(cat ${PWD}/${base}_2_1.pid) + [ -f ${PWD}/${base}_2_2.pid ] kill $(cat ${PWD}/${base}_2_2.pid) rm -f $sleep else echo ok 2 - $name # skip Test needs uid 0. @@ -57,19 +79,19 @@ name=pgrep -j none if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - $sleep 5 - chpid=$! - jail / $base 127.0.0.1 $sleep 5 - chpid2=$! - sleep 0.5 - pid=`pgrep -f -j none $sleep` - if [ $pid = $chpid ]; then + daemon -p ${PWD}/${base}_3_1.pid $sleep 5 + jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 + sleep 2 + pid=$(pgrep -f -x -j none $sleep 5) + if [ $pid = $(cat ${PWD}/${base}_3_1.pid) ]; then echo ok 3 - $name else echo not ok 3 - $name fi - kill $chpid $chpid2 rm -f $sleep + [ -f ${PWD}/${base}_3_1.pid ] kill $(cat $PWD/${base}_3_1.pid) + [ -f ${PWD}/${base}_3_2.pid ] kill $(cat $PWD/${base}_3_2.pid) else echo ok 3 - $name # skip Test needs uid 0. fi Modified: releng/10.1/bin/pkill/tests/pkill-j_test.sh == --- releng/10.1/bin/pkill/tests/pkill-j_test.sh Tue Oct
Re: svn commit: r272483 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm
- Original Message - From: Adam McDougall mcdou...@egr.msu.edu On 10/03/2014 16:34, Steven Hartland wrote: Author: smh Date: Fri Oct 3 20:34:55 2014 New Revision: 272483 URL: https://svnweb.freebsd.org/changeset/base/272483 Log: Refactor ZFS ARC reclaim checks and limits Remove previously added kmem methods in favour of defines which allow diff minimisation between upstream code base. Rebalance ARC free target to be vm_pageout_wakeup_thresh by default which eliminates issue where ARC gets minimised instead of balancing with VM pageout. The restores the target point prior to r270759. Bring in missing upstream only changes which move unused code to further eliminate code differences. Add additional DTRACE probe to aid monitoring of ARC behaviour. Enable upstream i386 code paths on platforms which don't define UMA_MD_SMALL_ALLOC. Fix mixture of byte an page values in arc_memory_throttle i386 code path value assignment of available_memory. PR: 187594 Review: D702 Reviewed by: avg MFC after: 1 week X-MFC-With: r270759 r270861 Sponsored by: Multiplay Two days ago I started running a r272549 kernel from 11 and tonight I am swapping again when I open too many apps but I have plenty of ARC in use: last pid: 5471; load averages: 0.96, 0.53, 0.35up 1+12:18:43 22:53:55 82 processes: 1 running, 81 sleeping CPU: 2.1% user, 0.0% nice, 2.4% system, 0.0% interrupt, 95.5% idle Mem: 1536M Active, 457M Inact, 1667M Wired, 8640K Cache, 85M Free ARC: 909M Total, 97M MFU, 556M MRU, 3344K Anon, 19M Header, 234M Other Swap: 8192M Total, 19M Used, 8172M Free PID USERNAMETHR PRI NICE SIZERES STATE C TIMEWCPU COMMAND 1135 mcdouga9 97 210 1818M 959M select 1 151:35 3.66% firefox 1128 mcdouga9 41 200 867M 384M select 0 19:24 0.00% thunderbi 5454 mcdouga9 8 200 1006M 169M uwait 0 0:03 0.98% chrome 5455 mcdouga9 9 200 1041M 168M uwait 3 0:03 0.68% chrome 5452 mcdouga9 31 200 558M 128M select 1 0:03 0.20% chrome 5456 mcdouga9 9 200 1012M 121M uwait 2 0:03 0.98% chrome 5453 mcdouga9 3 200 503M 105M kqread 3 0:01 0.10% chrome 5457 mcdouga9 8 200 962M 86936K uwait 2 0:01 0.20% chrome 1088 mcdouga9 4 200 268M 23508K select 3 3:01 0.00% xfce4-ter 1060 mcdouga9 1 200 189M 17524K select 2 19:30 0.68% Xorg 1085 mcdouga9 3 200 254M 16196K select 2 0:24 0.00% xfce4-pan 1098 mcdouga9 1 200 169M 15092K select 0 0:33 0.00% wrapper 1082 mcdouga9 1 200 157M 13784K select 1 0:16 0.00% xfwm4 1087 mcdouga9 3 200 258M 13308K select 0 0:28 0.00% xfdesktop 1086 mcdouga9 2 200 175M 12120K select 2 0:09 0.00% xfsetting Earlier today it was over 200M into swap, I noticed churning when I opened chromium (forgot to check memory stats first). I closed chromium, ran swapoff and swapon, and used my computer for a little while before reporting this, so this is definitely new swap use. Thats expected behaviour, if said processes are idle. You should however see ARC reduce at ~ the same time that swapping occurs as prior to r270759. I opened a new tab in chromium to my twitter account and now I'm at: Mem: 1686M Active, 439M Inact, 1548M Wired, 8640K Cache, 72M Free ARC: 793M Total, 94M MFU, 451M MRU, 4148K Anon, 19M Header, 225M Other Swap: 8192M Total, 190M Used, 8002M Free, 2% Inuse Should I be expected to be tuning variables? I was previously running a patch I applied in June or July to my satisfaction (rarely swapping, ARC shrinking when beneficial for a workstation). Can I help? Just hoping to help arrive at a balanced outcome for 10.1. Thanks. Having ARC start reduce before the pagedaemon triggers, as prior to commit, could result in ARC pegging back to min. There's will to be on going work to improve this but my current proposal is to get this and the previous changes MFC and hopefully into 10.1 so at least the sysctl is there that people can use. If for your use you would prefer ARC to reduce instead of idle processes swap then you could increase vfs.zfs.arc_free_target slightly but be very aware this is known to cause issues with certain work loads. The current code includes quite a few new dtrace points which will enable you to monitor ARC's behaviour, so if you want to investigate its behaviour this is you best bet. You can find a number of useful dtrace scripts on the related PR. Regards Steve ___ 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: r272683 - in head/sys/ofed: drivers/net/mlx4 include/linux/mlx4
Author: hselasky Date: Tue Oct 7 10:04:25 2014 New Revision: 272683 URL: https://svnweb.freebsd.org/changeset/base/272683 Log: Fix compile warning when compiling with GCC. MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/net/mlx4/mlx4.h head/sys/ofed/include/linux/mlx4/device.h Modified: head/sys/ofed/drivers/net/mlx4/mlx4.h == --- head/sys/ofed/drivers/net/mlx4/mlx4.h Tue Oct 7 08:23:37 2014 (r272682) +++ head/sys/ofed/drivers/net/mlx4/mlx4.h Tue Oct 7 10:04:25 2014 (r272683) @@ -1234,6 +1234,7 @@ int mlx4_trans_to_dmfs_attach(struct mlx u8 gid[16], u8 port, int block_mcast_loopback, enum mlx4_protocol prot, u64 *reg_id); +int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode); int mlx4_SET_MCAST_FLTR_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, Modified: head/sys/ofed/include/linux/mlx4/device.h == --- head/sys/ofed/include/linux/mlx4/device.h Tue Oct 7 08:23:37 2014 (r272682) +++ head/sys/ofed/include/linux/mlx4/device.h Tue Oct 7 10:04:25 2014 (r272683) @@ -1208,7 +1208,6 @@ int mlx4_multicast_promisc_add(struct ml int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); -int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode); int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac); void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac); ___ 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: r272684 - releng/10.1/sys/cam/ctl
Author: mav Date: Tue Oct 7 10:36:06 2014 New Revision: 272684 URL: https://svnweb.freebsd.org/changeset/base/272684 Log: MFC r272224: Fix page length reported for Block Limits VPD page. Approved by: re (marius) Modified: releng/10.1/sys/cam/ctl/ctl.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/cam/ctl/ctl.c == --- releng/10.1/sys/cam/ctl/ctl.c Tue Oct 7 10:04:25 2014 (r272683) +++ releng/10.1/sys/cam/ctl/ctl.c Tue Oct 7 10:36:06 2014 (r272684) @@ -10173,7 +10173,7 @@ ctl_inquiry_evpd_block_limits(struct ctl bl_ptr-device = (SID_QUAL_LU_OFFLINE 5) | T_DIRECT; bl_ptr-page_code = SVPD_BLOCK_LIMITS; - scsi_ulto2b(sizeof(*bl_ptr), bl_ptr-page_length); + scsi_ulto2b(sizeof(*bl_ptr) - 4, bl_ptr-page_length); bl_ptr-max_cmp_write_len = 0xff; scsi_ulto4b(0x, bl_ptr-max_txfer_len); if (lun != 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: r272688 - stable/10/cddl/contrib/opensolaris/cmd/zpool
Author: avg Date: Tue Oct 7 13:20:04 2014 New Revision: 272688 URL: https://svnweb.freebsd.org/changeset/base/272688 Log: MFC r261892: zpool.8: fix typo in option description of labelclear command Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 == --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8Tue Oct 7 13:18:28 2014(r272687) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8Tue Oct 7 13:20:04 2014(r272688) @@ -1353,7 +1353,7 @@ The .Ar device must not be part of an active pool configuration. .Bl -tag -width indent -.It Fl v +.It Fl f Treat exported or foreign devices as inactive. .El .It Xo ___ 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: r272689 - stable/9/cddl/contrib/opensolaris/cmd/zpool
Author: avg Date: Tue Oct 7 13:20:28 2014 New Revision: 272689 URL: https://svnweb.freebsd.org/changeset/base/272689 Log: MFC r261892: zpool.8: fix typo in option description of labelclear command Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 == --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Oct 7 13:20:04 2014(r272688) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Oct 7 13:20:28 2014(r272689) @@ -1347,7 +1347,7 @@ The .Ar device must not be part of an active pool configuration. .Bl -tag -width indent -.It Fl v +.It Fl f Treat exported or foreign devices as inactive. .El .It Xo ___ 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: r272691 - stable/9/cddl/contrib/opensolaris/cmd/zfs
Author: avg Date: Tue Oct 7 13:24:07 2014 New Revision: 272691 URL: https://svnweb.freebsd.org/changeset/base/272691 Log: MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command line Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 7 13:23:52 2014(r272690) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 7 13:24:07 2014(r272691) @@ -2610,7 +2610,7 @@ option to verify the name the receive op Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by -.Qq Nm Cm send Fl R Fi iI ) , +.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) , destroy snapshots and file systems that do not exist on the sending side. .El .It Xo ___ 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: r272690 - stable/10/cddl/contrib/opensolaris/cmd/zfs
Author: avg Date: Tue Oct 7 13:23:52 2014 New Revision: 272690 URL: https://svnweb.freebsd.org/changeset/base/272690 Log: MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command line Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8Tue Oct 7 13:20:28 2014(r272689) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8Tue Oct 7 13:23:52 2014(r272690) @@ -2745,7 +2745,7 @@ option to verify the name the receive op Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by -.Qq Nm Cm send Fl R Fi iI ) , +.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) , destroy snapshots and file systems that do not exist on the sending side. .El .It Xo ___ 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: r272693 - in stable/10/etc: . devd
Author: avg Date: Tue Oct 7 13:30:15 2014 New Revision: 272693 URL: https://svnweb.freebsd.org/changeset/base/272693 Log: MFC r261894: move devd rules for zfs events into a separate file ... and fix stale event types Added: stable/10/etc/devd/zfs.conf - copied unchanged from r261894, head/etc/devd/zfs.conf Modified: stable/10/etc/devd.conf stable/10/etc/devd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd.conf == --- stable/10/etc/devd.conf Tue Oct 7 13:25:59 2014(r272692) +++ stable/10/etc/devd.conf Tue Oct 7 13:30:15 2014(r272693) @@ -246,37 +246,6 @@ notify 10 { action logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'; }; -# Sample ZFS problem reports handling. -notify 10 { - match system ZFS; - match typezpool; - action logger -p kern.err 'ZFS: failed to load zpool $pool'; -}; - -notify 10 { - match system ZFS; - match typevdev; - action logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'; -}; - -notify 10 { - match system ZFS; - match typedata; - action logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'; -}; - -notify 10 { - match system ZFS; - match typeio; - action logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'; -}; - -notify 10 { - match system ZFS; - match typechecksum; - action logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'; -}; - # User requested suspend, so perform preparation steps and then execute # the actual suspend process. notify 10 { Modified: stable/10/etc/devd/Makefile == --- stable/10/etc/devd/Makefile Tue Oct 7 13:25:59 2014(r272692) +++ stable/10/etc/devd/Makefile Tue Oct 7 13:30:15 2014(r272693) @@ -2,7 +2,7 @@ .include bsd.own.mk -FILES= uath.conf usb.conf +FILES= uath.conf usb.conf zfs.conf .if ${MACHINE} == powerpc FILES+=apple.conf Copied: stable/10/etc/devd/zfs.conf (from r261894, head/etc/devd/zfs.conf) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/devd/zfs.conf Tue Oct 7 13:30:15 2014(r272693, copy of r261894, head/etc/devd/zfs.conf) @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# Sample ZFS problem reports handling. + +notify 10 { + match system ZFS; + match typefs.zfs.checksum; + action logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.io; + action logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.data; + action logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.zpool; + action logger -p kern.err -t ZFS 'failed to load zpool $pool'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.vdev\..*; + action logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.io_failure; + action logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.probe_failure; + action logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.log_replay; + action logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.config_cache_write; + action logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'; +}; + + +notify 10 { + match system ZFS; + match typeresource.fs.zfs.removed; + action logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'; +}; + +notify 10 { + match system ZFS; + match typeresource.fs.zfs.autoreplace; + action logger -p kern.info -t ZFS 'autoreplace is configured for vdev,
svn commit: r272694 - in stable/9/etc: . devd
Author: avg Date: Tue Oct 7 13:30:42 2014 New Revision: 272694 URL: https://svnweb.freebsd.org/changeset/base/272694 Log: MFC r261894: move devd rules for zfs events into a separate file ... and fix stale event types Added: stable/9/etc/devd/zfs.conf - copied unchanged from r261894, head/etc/devd/zfs.conf Modified: stable/9/etc/devd.conf stable/9/etc/devd/Makefile Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd.conf == --- stable/9/etc/devd.conf Tue Oct 7 13:30:15 2014(r272693) +++ stable/9/etc/devd.conf Tue Oct 7 13:30:42 2014(r272694) @@ -246,37 +246,6 @@ notify 10 { action logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'; }; -# Sample ZFS problem reports handling. -notify 10 { - match system ZFS; - match typezpool; - action logger -p kern.err 'ZFS: failed to load zpool $pool'; -}; - -notify 10 { - match system ZFS; - match typevdev; - action logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'; -}; - -notify 10 { - match system ZFS; - match typedata; - action logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'; -}; - -notify 10 { - match system ZFS; - match typeio; - action logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'; -}; - -notify 10 { - match system ZFS; - match typechecksum; - action logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'; -}; - # User requested suspend, so perform preparation steps and then execute # the actual suspend process. notify 10 { Modified: stable/9/etc/devd/Makefile == --- stable/9/etc/devd/Makefile Tue Oct 7 13:30:15 2014(r272693) +++ stable/9/etc/devd/Makefile Tue Oct 7 13:30:42 2014(r272694) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= uath.conf usb.conf +FILES= uath.conf usb.conf zfs.conf .if ${MACHINE} == powerpc FILES+=apple.conf Copied: stable/9/etc/devd/zfs.conf (from r261894, head/etc/devd/zfs.conf) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/etc/devd/zfs.conf Tue Oct 7 13:30:42 2014(r272694, copy of r261894, head/etc/devd/zfs.conf) @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# Sample ZFS problem reports handling. + +notify 10 { + match system ZFS; + match typefs.zfs.checksum; + action logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.io; + action logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.data; + action logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.zpool; + action logger -p kern.err -t ZFS 'failed to load zpool $pool'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.vdev\..*; + action logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.io_failure; + action logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.probe_failure; + action logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.log_replay; + action logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'; +}; + +notify 10 { + match system ZFS; + match typefs.zfs.config_cache_write; + action logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'; +}; + + +notify 10 { + match system ZFS; + match typeresource.fs.zfs.removed; + action logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'; +}; + +notify 10 { + match system ZFS; + match typeresource.fs.zfs.autoreplace; + action logger -p kern.info -t ZFS 'autoreplace is configured for vdev,
svn commit: r272695 - head/sys/net
Author: ae Date: Tue Oct 7 13:31:04 2014 New Revision: 272695 URL: https://svnweb.freebsd.org/changeset/base/272695 Log: Our packet filters use mbuf's rcvif pointer to determine incoming interface. Change mbuf's rcvif to enc0 and restore it after pfil processing. PR: 110959 Sponsored by: Yandex LLC Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c == --- head/sys/net/if_enc.c Tue Oct 7 13:30:42 2014(r272694) +++ head/sys/net/if_enc.c Tue Oct 7 13:31:04 2014(r272695) @@ -230,6 +230,7 @@ ipsec_filter(struct mbuf **mp, int dir, { int error, i; struct ip *ip; + struct ifnet *rcvif; KASSERT(encif != NULL, (%s: encif is null, __func__)); KASSERT(flags (ENC_IN|ENC_OUT), @@ -268,6 +269,8 @@ ipsec_filter(struct mbuf **mp, int dir, } error = 0; + rcvif = (*mp)-m_pkthdr.rcvif; + (*mp)-m_pkthdr.rcvif = encif; ip = mtod(*mp, struct ip *); switch (ip-ip_v) { #ifdef INET @@ -298,6 +301,7 @@ ipsec_filter(struct mbuf **mp, int dir, if (error != 0) goto bad; + (*mp)-m_pkthdr.rcvif = rcvif; return (error); bad: ___ 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: r272696 - in stable/10/sys/boot: common i386/gptzfsboot i386/zfsboot
Author: avg Date: Tue Oct 7 13:35:34 2014 New Revision: 272696 URL: https://svnweb.freebsd.org/changeset/base/272696 Log: MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages Added: stable/10/sys/boot/common/zfsloader.8 - copied unchanged from r271609, head/sys/boot/common/zfsloader.8 stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8 stable/10/sys/boot/i386/zfsboot/zfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/zfsboot/zfsboot.8 Modified: stable/10/sys/boot/common/Makefile.inc stable/10/sys/boot/i386/gptzfsboot/Makefile stable/10/sys/boot/i386/zfsboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/Makefile.inc == --- stable/10/sys/boot/common/Makefile.inc Tue Oct 7 13:31:04 2014 (r272695) +++ stable/10/sys/boot/common/Makefile.inc Tue Oct 7 13:35:34 2014 (r272696) @@ -73,3 +73,6 @@ CFLAGS+= -DBOOT_PROMPT_123 .endif MAN+= loader.8 +.if ${MK_ZFS} != no +MAN+= zfsloader.8 +.endif Copied: stable/10/sys/boot/common/zfsloader.8 (from r271609, head/sys/boot/common/zfsloader.8) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/common/zfsloader.8 Tue Oct 7 13:35:34 2014 (r272696, copy of r271609, head/sys/boot/common/zfsloader.8) @@ -0,0 +1,109 @@ +.\ Copyright (c) 2014 Andriy Gapon a...@freebsd.org +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\ SUCH DAMAGE. +.\ +.\ $FreeBSD$ +.\ +.Dd September 15, 2014 +.Dt ZFSLOADER 8 +.Os +.Sh NAME +.Nm zfsloader +.Nd kernel bootstrapping final stage +.Sh DESCRIPTION +.Nm +is an extended variant of +.Xr loader 8 +with added support for booting from ZFS. +This document describes only differences from +.Xr loader 8 . +.Sh ZFS FEATURES +.Nm +supports the following format for specifying ZFS filesystems which +can be used wherever +.Xr loader 8 +refers to a device specification: +.Pp +.Ar zfs:pool/filesystem: +.Pp +where +.Pa pool/filesystem +is a ZFS filesystem name as described in +.Xr zfs 8 . +.Pp +If +.Pa /etc/fstab +does not have an entry for the root filesystem and +.Va vfs.root.mountfrom +is not set, but +.Va currdev +refers to a ZFS filesystem, then +.Nm +will instruct kernel to use that filesystem as the root filesystem. +.Sh ZFS COMMAND EXTENSIONS +.Bl -tag -width Ds -compact +.Pp +.It Ic lsdev Op Fl v +Lists ZFS pools in addition to disks and partitions. +Adding +.Fl v +shows more ZFS pool details in a format that resembles +.Nm zpool Cm status +output. +.Pp +.It Ic lszfs Ar filesystem +A ZFS extended command that can be used to explore the ZFS filesystem +hierarchy in a pool. +Lists the immediate children of the +.Ar filesystem . +The filesystem hierarchy is rooted at a filesystem with the same name +as the pool. +.El +.Sh FILES +.Bl -tag -width /boot/zfsloader -compact +.It Pa /boot/zfsloader +.Nm +itself. +.El +.Sh EXAMPLES +Set the default device used for loading a kernel from a ZFS filesystem: +.Pp +.Bd -literal -offset indent +set currdev=zfs:tank/ROOT/knowngood: +.Ed +.Pp +.Sh SEE ALSO +.Xr gptzfsboot 8 , +.Xr loader 8 , +.Xr zfs 8 , +.Xr zfsboot 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +The +.Nm +first appeared in +.Fx 7.3 . +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq a...@freebsd.org . Modified: stable/10/sys/boot/i386/gptzfsboot/Makefile == ---
svn commit: r272697 - in stable/9/sys/boot: common i386/gptzfsboot i386/zfsboot
Author: avg Date: Tue Oct 7 13:37:10 2014 New Revision: 272697 URL: https://svnweb.freebsd.org/changeset/base/272697 Log: MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages Added: stable/9/sys/boot/common/zfsloader.8 - copied unchanged from r271609, head/sys/boot/common/zfsloader.8 stable/9/sys/boot/i386/gptzfsboot/gptzfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8 stable/9/sys/boot/i386/zfsboot/zfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/zfsboot/zfsboot.8 Modified: stable/9/sys/boot/common/Makefile.inc stable/9/sys/boot/i386/gptzfsboot/Makefile stable/9/sys/boot/i386/zfsboot/Makefile Directory Properties: stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/Makefile.inc == --- stable/9/sys/boot/common/Makefile.inc Tue Oct 7 13:35:34 2014 (r272696) +++ stable/9/sys/boot/common/Makefile.inc Tue Oct 7 13:37:10 2014 (r272697) @@ -73,3 +73,6 @@ CFLAGS+= -DBOOT_PROMPT_123 .endif MAN+= loader.8 +.if ${MK_ZFS} != no +MAN+= zfsloader.8 +.endif Copied: stable/9/sys/boot/common/zfsloader.8 (from r271609, head/sys/boot/common/zfsloader.8) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/boot/common/zfsloader.8Tue Oct 7 13:37:10 2014 (r272697, copy of r271609, head/sys/boot/common/zfsloader.8) @@ -0,0 +1,109 @@ +.\ Copyright (c) 2014 Andriy Gapon a...@freebsd.org +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\ SUCH DAMAGE. +.\ +.\ $FreeBSD$ +.\ +.Dd September 15, 2014 +.Dt ZFSLOADER 8 +.Os +.Sh NAME +.Nm zfsloader +.Nd kernel bootstrapping final stage +.Sh DESCRIPTION +.Nm +is an extended variant of +.Xr loader 8 +with added support for booting from ZFS. +This document describes only differences from +.Xr loader 8 . +.Sh ZFS FEATURES +.Nm +supports the following format for specifying ZFS filesystems which +can be used wherever +.Xr loader 8 +refers to a device specification: +.Pp +.Ar zfs:pool/filesystem: +.Pp +where +.Pa pool/filesystem +is a ZFS filesystem name as described in +.Xr zfs 8 . +.Pp +If +.Pa /etc/fstab +does not have an entry for the root filesystem and +.Va vfs.root.mountfrom +is not set, but +.Va currdev +refers to a ZFS filesystem, then +.Nm +will instruct kernel to use that filesystem as the root filesystem. +.Sh ZFS COMMAND EXTENSIONS +.Bl -tag -width Ds -compact +.Pp +.It Ic lsdev Op Fl v +Lists ZFS pools in addition to disks and partitions. +Adding +.Fl v +shows more ZFS pool details in a format that resembles +.Nm zpool Cm status +output. +.Pp +.It Ic lszfs Ar filesystem +A ZFS extended command that can be used to explore the ZFS filesystem +hierarchy in a pool. +Lists the immediate children of the +.Ar filesystem . +The filesystem hierarchy is rooted at a filesystem with the same name +as the pool. +.El +.Sh FILES +.Bl -tag -width /boot/zfsloader -compact +.It Pa /boot/zfsloader +.Nm +itself. +.El +.Sh EXAMPLES +Set the default device used for loading a kernel from a ZFS filesystem: +.Pp +.Bd -literal -offset indent +set currdev=zfs:tank/ROOT/knowngood: +.Ed +.Pp +.Sh SEE ALSO +.Xr gptzfsboot 8 , +.Xr loader 8 , +.Xr zfs 8 , +.Xr zfsboot 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +The +.Nm +first appeared in +.Fx 7.3 . +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq a...@freebsd.org . Modified: stable/9/sys/boot/i386/gptzfsboot/Makefile == ---
svn commit: r272698 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: avg Date: Tue Oct 7 13:42:34 2014 New Revision: 272698 URL: https://svnweb.freebsd.org/changeset/base/272698 Log: MFC r246531: zfs: update comments about zfid_long_t to match the FreeBSD definitions Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Oct 7 13:37:10 2014(r272697) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Oct 7 13:42:34 2014(r272698) @@ -110,7 +110,7 @@ typedef struct zfid_short { } zfid_short_t; /* - * Filesystems under .zfs/snapshot have a total file ID size of 22 bytes + * Filesystems under .zfs/snapshot have a total file ID size of 22[*] bytes * (including the length field). This makes files under .zfs/snapshot * accessible by NFSv3 and NFSv4, but not NFSv2. * @@ -120,10 +120,13 @@ typedef struct zfid_short { * 6 bytes object number (48 bits) * 4 bytes generation number (32 bits) * 6 bytes objset id (48 bits) - * 4 bytes currently just zero (32 bits) + * 4 bytes[**] currently just zero (32 bits) * * We reserve only 48 bits for the object number and objset id, as these are * the limits currently defined and imposed by the DMU. + * + * [*] 20 bytes on FreeBSD to fit into the size of struct fid. + * [**] 2 bytes on FreeBSD for the above reason. */ typedef struct zfid_long { zfid_short_tz_fid; ___ 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: r272699 - stable/9/sys/kern
Author: avg Date: Tue Oct 7 13:47:54 2014 New Revision: 272699 URL: https://svnweb.freebsd.org/changeset/base/272699 Log: MFC r235978: device_add_child: protect against child device with no driver but fixed unit number Modified: stable/9/sys/kern/subr_bus.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_bus.c == --- stable/9/sys/kern/subr_bus.cTue Oct 7 13:42:34 2014 (r272698) +++ stable/9/sys/kern/subr_bus.cTue Oct 7 13:47:54 2014 (r272699) @@ -1812,6 +1812,8 @@ device_add_child_ordered(device_t dev, u PDEBUG((%s at %s with order %u as unit %d, name, DEVICENAME(dev), order, unit)); + KASSERT(name != NULL || unit == -1, + (child device with wildcard name and specific unit number)); child = make_device(dev, name, unit); if (child == 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
Re: svn commit: r272695 - head/sys/net
On Tue, 7 Oct 2014 13:31:05 + Andrey V. Elsukov a...@freebsd.org wrote: Author: ae Date: Tue Oct 7 13:31:04 2014 New Revision: 272695 URL: https://svnweb.freebsd.org/changeset/base/272695 Log: Our packet filters use mbuf's rcvif pointer to determine incoming interface. Change mbuf's rcvif to enc0 and restore it after pfil processing. Will this work / was this tested with options VIMAGE, where m_pkthdr.rcvif-if_vnet will no longer match curvnet, except in vnet0? Marko PR: 110959 Sponsored by: Yandex LLC Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c == --- head/sys/net/if_enc.c Tue Oct 7 13:30:42 2014 (r272694) +++ head/sys/net/if_enc.c Tue Oct 7 13:31:04 2014 (r272695) @@ -230,6 +230,7 @@ ipsec_filter(struct mbuf **mp, int dir, { int error, i; struct ip *ip; + struct ifnet *rcvif; KASSERT(encif != NULL, (%s: encif is null, __func__)); KASSERT(flags (ENC_IN|ENC_OUT), @@ -268,6 +269,8 @@ ipsec_filter(struct mbuf **mp, int dir, } error = 0; + rcvif = (*mp)-m_pkthdr.rcvif; + (*mp)-m_pkthdr.rcvif = encif; ip = mtod(*mp, struct ip *); switch (ip-ip_v) { #ifdef INET @@ -298,6 +301,7 @@ ipsec_filter(struct mbuf **mp, int dir, if (error != 0) goto bad; + (*mp)-m_pkthdr.rcvif = rcvif; return (error); bad: ___ 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: r272701 - head/sys/cddl/compat/opensolaris/sys
Author: avg Date: Tue Oct 7 14:15:50 2014 New Revision: 272701 URL: https://svnweb.freebsd.org/changeset/base/272701 Log: make userland __assfail from opensolaris compat honor 'aok' variable This should allow zdb -A option to actually make difference. MFC after:2 weeks Modified: head/sys/cddl/compat/opensolaris/sys/assfail.h Modified: head/sys/cddl/compat/opensolaris/sys/assfail.h == --- head/sys/cddl/compat/opensolaris/sys/assfail.h Tue Oct 7 14:09:05 2014(r272700) +++ head/sys/cddl/compat/opensolaris/sys/assfail.h Tue Oct 7 14:15:50 2014(r272701) @@ -46,20 +46,24 @@ void assfail3(const char *, uintmax_t, c #else /* !defined(_KERNEL) */ #ifndef HAVE_ASSFAIL +extern int aok; + static __inline int __assfail(const char *expr, const char *file, int line) { (void)fprintf(stderr, Assertion failed: (%s), file %s, line %d.\n, expr, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); return (0); } #define assfail __assfail #endif #ifndef HAVE_ASSFAIL3 +extern int aok; + static __inline void __assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv, const char *file, int line) { @@ -67,8 +71,8 @@ __assfail3(const char *expr, uintmax_t l (void)fprintf(stderr, Assertion failed: %s (0x%jx %s 0x%jx), file %s, line %d.\n, expr, lv, op, rv, file, line); -abort(); -/* NOTREACHED */ + if (!aok) + abort(); } #define assfail3 __assfail3 #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
Re: svn commit: r272695 - head/sys/net
On 07.10.2014 18:04, Marko Zec wrote: On Tue, 7 Oct 2014 13:31:05 + Andrey V. Elsukov a...@freebsd.org wrote: Author: ae Date: Tue Oct 7 13:31:04 2014 New Revision: 272695 URL: https://svnweb.freebsd.org/changeset/base/272695 Log: Our packet filters use mbuf's rcvif pointer to determine incoming interface. Change mbuf's rcvif to enc0 and restore it after pfil processing. Will this work / was this tested with options VIMAGE, where m_pkthdr.rcvif-if_vnet will no longer match curvnet, except in vnet0? I tested only without VIMAGE. ipfw and pf use if_xname field to compare interfaces. So will this work? -- WBR, Andrey V. Elsukov ___ 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: r272702 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Oct 7 14:30:24 2014 New Revision: 272702 URL: https://svnweb.freebsd.org/changeset/base/272702 Log: reduce L2ARC_WRITE_SIZE on FreeBSD FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS data lists (currently both are 16) while illumos has just a single list of each kind. L2ARC_WRITE_SIZE determines the default value of l2arc_write_max which defines limits on how much data is scanned and written to a cache device during each run of the l2arc feed thread. The limits are applied on the per buffer list basis. Because FreeBSD has more lists we proportionally reduce the limits. Reviewed by: Brendan Gregg (earlier version) MFC after:2 weeks Sponsored by: HybridCluster Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Oct 7 14:15:50 2014(r272701) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Oct 7 14:30:24 2014(r272702) @@ -711,7 +711,9 @@ uint64_t zfs_crc64_table[256]; * Level 2 ARC */ -#defineL2ARC_WRITE_SIZE(8 * 1024 * 1024) /* initial write max */ +/* initial write max */ +#defineL2ARC_WRITE_SIZE\ +(8 * 1024 * 1024 * 2 / (ARC_BUFC_NUMMETADATALISTS + ARC_BUFC_NUMDATALISTS)) #defineL2ARC_HEADROOM 2 /* num of writes */ /* * If we discover during ARC scan any buffers to be compressed, we boost ___ 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: r272695 - head/sys/net
On Tue, 7 Oct 2014 18:17:18 +0400 Andrey V. Elsukov a...@freebsd.org wrote: On 07.10.2014 18:04, Marko Zec wrote: On Tue, 7 Oct 2014 13:31:05 + Andrey V. Elsukov a...@freebsd.org wrote: Author: ae Date: Tue Oct 7 13:31:04 2014 New Revision: 272695 URL: https://svnweb.freebsd.org/changeset/base/272695 Log: Our packet filters use mbuf's rcvif pointer to determine incoming interface. Change mbuf's rcvif to enc0 and restore it after pfil processing. Will this work / was this tested with options VIMAGE, where m_pkthdr.rcvif-if_vnet will no longer match curvnet, except in vnet0? I tested only without VIMAGE. ipfw and pf use if_xname field to compare interfaces. So will this work? I have no idea whether this would work now, but this change implies that no pfil consumer should reference m_pkthdr.rcvif-if_vnet from now on, ever. Which doesn't seem right to me. If changing m_pkthdr.rcvif to enc0 in ipsec_filter() is really unavoidable, perhaps we could introduce enc0 for each vnet, maybe in a similar manner how hrs@ virtualized gif (271917) and gre (271918) cloners, which (gif) apparently seem to be at the root of the PR 110959 referenced here. Marko ___ 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: r272705 - stable/9/sys/net
Author: asomers Date: Tue Oct 7 15:21:20 2014 New Revision: 272705 URL: https://svnweb.freebsd.org/changeset/base/272705 Log: MFC r265232 Fix a panic caused by doing ifconfig -am while a lagg is being destroyed. The thread that is destroying the lagg has already set sc-sc_psc=NULL when the ifconfig -am thread gets to lacp_req(). It tries to dereference sc-sc_psc and panics. The solution is for lacp_req() to check the value of sc-sc_psc. If NULL, harmlessly return an lacp_opreq structure full of zeros. Full details in GNATS. PR: 189003 Modified: stable/9/sys/net/ieee8023ad_lacp.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/ieee8023ad_lacp.c == --- stable/9/sys/net/ieee8023ad_lacp.c Tue Oct 7 15:12:06 2014 (r272704) +++ stable/9/sys/net/ieee8023ad_lacp.c Tue Oct 7 15:21:20 2014 (r272705) @@ -584,10 +584,20 @@ lacp_req(struct lagg_softc *sc, caddr_t { struct lacp_opreq *req = (struct lacp_opreq *)data; struct lacp_softc *lsc = LACP_SOFTC(sc); - struct lacp_aggregator *la = lsc-lsc_active_aggregator; + struct lacp_aggregator *la; - LACP_LOCK(lsc); bzero(req, sizeof(struct lacp_opreq)); + + /* +* If the LACP softc is NULL, return with the opreq structure full of +* zeros. It is normal for the softc to be NULL while the lagg is +* being destroyed. +*/ + if (NULL == lsc) + return; + + la = lsc-lsc_active_aggregator; + LACP_LOCK(lsc); if (la != NULL) { req-actor_prio = ntohs(la-la_actor.lip_systemid.lsi_prio); memcpy(req-actor_mac, la-la_actor.lip_systemid.lsi_mac, ___ 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: r272706 - head/sys/netinet6
Author: tuexen Date: Tue Oct 7 16:01:17 2014 New Revision: 272706 URL: https://svnweb.freebsd.org/changeset/base/272706 Log: Fix a bug introduced in https://svnweb.freebsd.org/base?view=revisionrevision=272347 MFC after: 3 days Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Tue Oct 7 15:21:20 2014 (r272705) +++ head/sys/netinet6/udp6_usrreq.c Tue Oct 7 16:01:17 2014 (r272706) @@ -265,7 +265,7 @@ udp6_input(struct mbuf **mp, int *offp, if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); - /*goto badunlocked;*/ + goto badunlocked; } /* ___ 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: r272707 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Oct 7 16:06:10 2014 New Revision: 272707 URL: https://svnweb.freebsd.org/changeset/base/272707 Log: revert r272702: wrong (earlier) change was committed Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Oct 7 16:01:17 2014(r272706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Oct 7 16:06:10 2014(r272707) @@ -711,9 +711,7 @@ uint64_t zfs_crc64_table[256]; * Level 2 ARC */ -/* initial write max */ -#defineL2ARC_WRITE_SIZE\ -(8 * 1024 * 1024 * 2 / (ARC_BUFC_NUMMETADATALISTS + ARC_BUFC_NUMDATALISTS)) +#defineL2ARC_WRITE_SIZE(8 * 1024 * 1024) /* initial write max */ #defineL2ARC_HEADROOM 2 /* num of writes */ /* * If we discover during ARC scan any buffers to be compressed, we boost ___ 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: r272708 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Oct 7 16:08:21 2014 New Revision: 272708 URL: https://svnweb.freebsd.org/changeset/base/272708 Log: l2arc_write_buffers: reduce headroom value FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS data lists (currently both are 16) while illumos has just a single list of each kind. headroom determines how much data is scanned on a single list during each run of the l2arc feed thread. Because FreeBSD has more lists we proportionally decrease the limit. Reviewed by: Brendan Gregg (earlier version) MFC after:2 weeks Sponsored by: HybridCluster Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Oct 7 16:06:10 2014(r272707) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Oct 7 16:08:21 2014(r272708) @@ -5047,7 +5047,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de if (ab == NULL) ARCSTAT_BUMP(arcstat_l2_write_buffer_list_null_iter); - headroom = target_sz * l2arc_headroom; + headroom = target_sz * l2arc_headroom * 2 / ARC_BUFC_NUMLISTS; if (do_headroom_boost) headroom = (headroom * l2arc_headroom_boost) / 100; ___ 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: r272596 - head/sys/fs/devfs
On Monday, October 06, 2014 8:52:37 pm Mateusz Guzik wrote: On Mon, Oct 06, 2014 at 11:37:32AM -0400, John Baldwin wrote: On Monday, October 06, 2014 06:20:36 AM Mateusz Guzik wrote: Author: mjg Date: Mon Oct 6 06:20:35 2014 New Revision: 272596 URL: https://svnweb.freebsd.org/changeset/base/272596 Log: devfs: don't take proctree_lock unconditionally in devfs_close MFC after: 1 week Just for my sanity: What keeps td-td_proc-p_session static in this case so that it is safe to dereference it? Specifically, if you are preempted after reading p_session but before you then read s_ttyvp, what prevents a race with another thread changing the session of td-td_proc? Right, it's buggy. Turns out devfs was quite liberal in relation to that even prior to my change. How about: diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index d7009a4..a480e4f 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -499,6 +499,7 @@ devfs_access(struct vop_access_args *ap) { struct vnode *vp = ap-a_vp; struct devfs_dirent *de; + struct proc *p; int error; de = vp-v_data; @@ -511,11 +512,14 @@ devfs_access(struct vop_access_args *ap) return (0); if (error != EACCES) return (error); + p = ap-a_td-td_proc; /* We do, however, allow access to the controlling terminal */ - if (!(ap-a_td-td_proc-p_flag P_CONTROLT)) + if (!(p-p_flag P_CONTROLT)) return (error); - if (ap-a_td-td_proc-p_session-s_ttydp == de-de_cdp) - return (0); + PROC_LOCK(p); + if (p-p_session-s_ttydp == de-de_cdp) + error = 0; + PROC_UNLOCK(p); return (error); } @@ -525,6 +529,7 @@ devfs_close(struct vop_close_args *ap) { struct vnode *vp = ap-a_vp, *oldvp; struct thread *td = ap-a_td; + struct proc *p; struct cdev *dev = vp-v_rdev; struct cdevsw *dsw; int vp_locked, error, ref; @@ -545,24 +550,30 @@ devfs_close(struct vop_close_args *ap) * if the reference count is 2 (this last descriptor * plus the session), release the reference from the session. */ - if (td vp == td-td_proc-p_session-s_ttyvp) { - oldvp = NULL; - sx_xlock(proctree_lock); - if (vp == td-td_proc-p_session-s_ttyvp) { - SESS_LOCK(td-td_proc-p_session); - VI_LOCK(vp); - if (count_dev(dev) == 2 - (vp-v_iflag VI_DOOMED) == 0) { - td-td_proc-p_session-s_ttyvp = NULL; - td-td_proc-p_session-s_ttydp = NULL; - oldvp = vp; + if (td != NULL) { + p = td-td_proc; + PROC_LOCK(p); + if (vp == p-p_session-s_ttyvp) { + PROC_UNLOCK(p); + oldvp = NULL; + sx_xlock(proctree_lock); + if (vp == p-p_session-s_ttyvp) { + SESS_LOCK(p-p_session); + VI_LOCK(vp); + if (count_dev(dev) == 2 + (vp-v_iflag VI_DOOMED) == 0) { + p-p_session-s_ttyvp = NULL; + p-p_session-s_ttydp = NULL; + oldvp = vp; + } + VI_UNLOCK(vp); + SESS_UNLOCK(p-p_session); } - VI_UNLOCK(vp); - SESS_UNLOCK(td-td_proc-p_session); - } - sx_xunlock(proctree_lock); - if (oldvp != NULL) - vrele(oldvp); + sx_xunlock(proctree_lock); + if (oldvp != NULL) + vrele(oldvp); + } else + PROC_UNLOCK(p); } /* * We do not want to really close the device if it @@ -814,6 +825,7 @@ devfs_prison_check(struct devfs_dirent *de, struct thread *td) { struct cdev_priv *cdp; struct ucred *dcr; + struct proc *p; int error; cdp = de-de_cdp; @@ -827,10 +839,13 @@ devfs_prison_check(struct devfs_dirent *de, struct thread *td) if (error == 0) return (0); /* We do, however, allow access to the controlling terminal */ - if (!(td-td_proc-p_flag P_CONTROLT)) + p = td-td_proc; + if (!(p-p_flag P_CONTROLT)) return (error); - if (td-td_proc-p_session-s_ttydp == cdp) - return (0); + PROC_LOCK(p); + if (p-p_session-s_ttydp == cdp) + error = 0; + PROC_UNLOCK(p); return (error); } I think
Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access
Dimitry Andric d...@freebsd.org writes: And why is 'user' not a char * to begin with? :) man 3 pam_get_item + C rules about casting pointers. DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r272281 - head/lib/libpam/modules/pam_login_access
Bruce Evans b...@optusnet.com.au writes: Other bugs in PAM_VERBOSE_ERROR()'s function [...] PAM_VERBOSE_ERROR should die. The only reason I didn't kill it way back when was to avoid extensive modifications to existing modules. DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r272710 - head/usr.sbin/bhyve
Author: neel Date: Tue Oct 7 17:08:53 2014 New Revision: 272710 URL: https://svnweb.freebsd.org/changeset/base/272710 Log: Implement the FLUSH operation in the virtio-block emulation. This gets rid of the following error message during FreeBSD guest bootup: vtbd0: hard error cmd=flush fsbn 0 Reported by: rodrigc Reviewed by: grehan 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 Oct 7 16:46:11 2014 (r272709) +++ head/usr.sbin/bhyve/pci_virtio_block.c Tue Oct 7 17:08:53 2014 (r272710) @@ -94,6 +94,8 @@ struct vtblk_config { struct virtio_blk_hdr { #defineVBH_OP_READ 0 #defineVBH_OP_WRITE1 +#defineVBH_OP_FLUSH4 +#defineVBH_OP_FLUSH_OUT5 #defineVBH_OP_IDENT8 #defineVBH_FLAG_BARRIER0x8000 /* OR'ed into vbh_type */ uint32_tvbh_type; @@ -217,6 +219,10 @@ pci_vtblk_proc(struct pci_vtblk_softc *s MIN(iov[1].iov_len, sizeof(sc-vbsc_ident))); err = 0; break; + case VBH_OP_FLUSH: + case VBH_OP_FLUSH_OUT: + err = fsync(sc-vbsc_fd); + break; default: err = -ENOSYS; break; ___ 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: r272712 - in head/sys: arm/altera/socfpga arm/conf arm/samsung/exynos boot/fdt/dts/arm dev/mmc dev/mmc/host
Author: br Date: Tue Oct 7 17:39:30 2014 New Revision: 272712 URL: https://svnweb.freebsd.org/changeset/base/272712 Log: Add driver for Synopsys DesignWare Mobile Storage Host Controller. Sponsored by: DARPA, AFRL Added: head/sys/dev/mmc/host/ head/sys/dev/mmc/host/dwmmc.c (contents, props changed) head/sys/dev/mmc/host/dwmmc.h (contents, props changed) Modified: head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/altera/socfpga/socfpga_machdep.c head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/SOCKIT head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/samsung/exynos/files.exynos5 head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts head/sys/boot/fdt/dts/arm/exynos5420-peach-pit.dts head/sys/boot/fdt/dts/arm/exynos5420.dtsi head/sys/boot/fdt/dts/arm/socfpga-sockit.dts head/sys/boot/fdt/dts/arm/socfpga.dtsi head/sys/dev/mmc/mmc.c Modified: head/sys/arm/altera/socfpga/files.socfpga == --- head/sys/arm/altera/socfpga/files.socfpga Tue Oct 7 17:23:11 2014 (r272711) +++ head/sys/arm/altera/socfpga/files.socfpga Tue Oct 7 17:39:30 2014 (r272712) @@ -19,3 +19,4 @@ arm/altera/socfpga/socfpga_manager.c st arm/altera/socfpga/socfpga_rstmgr.cstandard dev/dwc/if_dwc.c optional dwc +dev/mmc/host/dwmmc.c optional dwmmc Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c == --- head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Oct 7 17:23:11 2014(r272711) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Oct 7 17:39:30 2014(r272712) @@ -89,6 +89,9 @@ platform_devmap_init(void) */ arm_devmap_add_entry(0xffb0, 0x10); + /* dwmmc */ + arm_devmap_add_entry(0xff70, 0x10); + return (0); } Modified: head/sys/arm/conf/EXYNOS5.common == --- head/sys/arm/conf/EXYNOS5.commonTue Oct 7 17:23:11 2014 (r272711) +++ head/sys/arm/conf/EXYNOS5.commonTue Oct 7 17:39:30 2014 (r272712) @@ -80,7 +80,7 @@ options NFS_ROOT# NFS usable as /, re device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards -device sdhci # generic sdhci +device dwmmc optionsROOTDEVNAME=\ufs:/dev/da0\ Modified: head/sys/arm/conf/SOCKIT == --- head/sys/arm/conf/SOCKITTue Oct 7 17:23:11 2014(r272711) +++ head/sys/arm/conf/SOCKITTue Oct 7 17:39:30 2014(r272712) @@ -82,7 +82,7 @@ options NFS_ROOT# NFS usable as /, re device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards -device sdhci # generic sdhci +device dwmmc optionsROOTDEVNAME=\ufs:/dev/da0\ Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c == --- head/sys/arm/samsung/exynos/exynos5_machdep.c Tue Oct 7 17:23:11 2014(r272711) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Tue Oct 7 17:39:30 2014(r272712) @@ -78,6 +78,9 @@ platform_devmap_init(void) /* UART */ arm_devmap_add_entry(0x12C0, 0x10); + /* DWMMC */ + arm_devmap_add_entry(0x1220, 0x10); + return (0); } Modified: head/sys/arm/samsung/exynos/files.exynos5 == --- head/sys/arm/samsung/exynos/files.exynos5 Tue Oct 7 17:23:11 2014 (r272711) +++ head/sys/arm/samsung/exynos/files.exynos5 Tue Oct 7 17:39:30 2014 (r272712) @@ -33,4 +33,4 @@ arm/samsung/exynos/chrome_ec.coptiona arm/samsung/exynos/chrome_ec_spi.c optionalchrome_ec_spi arm/samsung/exynos/chrome_kb.c optionalchrome_kb -#dev/sdhci/sdhci_fdt.c optionalsdhci +dev/mmc/host/dwmmc.c optionaldwmmc Modified: head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts == --- head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts Tue Oct 7 17:23:11 2014(r272711) +++ head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts Tue Oct 7 17:39:30 2014(r272712) @@ -47,8 +47,19 @@ status = okay; }; - sdhci@1222 { - status = disabled; + mmc2: dwmmc@1222 { +
svn commit: r272713 - head/sys/dev/hwpmc
Author: bz Date: Tue Oct 7 18:00:34 2014 New Revision: 272713 URL: https://svnweb.freebsd.org/changeset/base/272713 Log: Since introducing the extra mapping in r250103 for architectural performance events we have actually counted 'Branch Instruction Retired' when people asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask mnemonic. Reviewed by: jimharris Discussed with: gnn, rwatson MFC after:3 days Sponsored by: DARPA/AFRL Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c == --- head/sys/dev/hwpmc/hwpmc_core.c Tue Oct 7 17:39:30 2014 (r272712) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Oct 7 18:00:34 2014 (r272713) @@ -1796,7 +1796,7 @@ iap_is_event_architectural(enum pmc_even switch (pe) { case PMC_EV_IAP_ARCH_UNH_COR_CYC: ae = CORE_AE_UNHALTED_CORE_CYCLES; - *map = PMC_EV_IAP_EVENT_C4H_00H; + *map = PMC_EV_IAP_EVENT_3CH_00H; break; case PMC_EV_IAP_ARCH_INS_RET: ae = CORE_AE_INSTRUCTION_RETIRED; ___ 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: r272715 - head/sys/dev/vt
Author: ray Date: Tue Oct 7 18:47:53 2014 New Revision: 272715 URL: https://svnweb.freebsd.org/changeset/base/272715 Log: Allow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`, similar as syscons(4) do. Submitted by: Tiwei Bie b...@mail.ustc.edu.cn MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c == --- head/sys/dev/vt/vt_core.c Tue Oct 7 18:22:05 2014(r272714) +++ head/sys/dev/vt/vt_core.c Tue Oct 7 18:47:53 2014(r272715) @@ -120,6 +120,7 @@ const struct terminal_class vt_termclass static SYSCTL_NODE(_kern, OID_AUTO, vt, CTLFLAG_RD, 0, vt(9) parameters); VT_SYSCTL_INT(enable_altgr, 1, Enable AltGr key (Do not assume R.Alt as Alt)); +VT_SYSCTL_INT(enable_bell, 1, Enable bell); VT_SYSCTL_INT(debug, 0, vt(9) debug level); VT_SYSCTL_INT(deadtimer, 15, Time to wait busy process in VT_PROCESS mode); VT_SYSCTL_INT(suspendswitch, 1, Switch to VT0 before suspend); @@ -904,6 +905,9 @@ vtterm_bell(struct terminal *tm) struct vt_window *vw = tm-tm_softc; struct vt_device *vd = vw-vw_device; + if (!vt_enable_bell) + return; + if (vd-vd_flags VDF_QUIET_BELL) return; @@ -915,6 +919,9 @@ vtterm_beep(struct terminal *tm, u_int p { u_int freq, period; + if (!vt_enable_bell) + return; + if ((param == 0) || ((param 0x) == 0)) { vtterm_bell(tm); return; ___ 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: r272716 - in head/sys/dev/usb: . net
Author: gavin Date: Tue Oct 7 19:07:50 2014 New Revision: 272716 URL: https://svnweb.freebsd.org/changeset/base/272716 Log: Support the Vodafone R215 LET USB dongle, which is apparently a rebadged E5372 with different product IDs. Interestingly, the standard E5372 IDs (12d1:1506) are currently listed in u3g.c and are the same as the E3131. However, the R215/E5372 is an NCM device and works well with cdce(4) whereas the E3131 isn't. More work may be needed to better identify the other device IDs. MFC after:1 week Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_cdce.c == --- head/sys/dev/usb/net/if_cdce.c Tue Oct 7 18:47:53 2014 (r272715) +++ head/sys/dev/usb/net/if_cdce.c Tue Oct 7 19:07:50 2014 (r272716) @@ -273,6 +273,7 @@ static const struct usb_ether_methods cd static const STRUCT_USB_HOST_ID cdce_switch_devs[] = { {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3272_INIT, MSC_EJECT_HUAWEI2)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_R215_INIT, MSC_EJECT_HUAWEI2)}, }; static const STRUCT_USB_HOST_ID cdce_host_devs[] = { Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Oct 7 18:47:53 2014(r272715) +++ head/sys/dev/usb/usbdevsTue Oct 7 19:07:50 2014(r272716) @@ -2353,6 +2353,8 @@ product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial product HUAWEI K4505_INIT 0x1521 K4505 Initial product HUAWEI E3272_INIT 0x155b LTE modem initial +product HUAWEI R215_INIT 0x1582 LTE modem initial +product HUAWEI R2150x1588 LTE modem product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E1730x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial ___ 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: r272717 - head/usr.sbin/autofs
Author: trasz Date: Tue Oct 7 19:08:02 2014 New Revision: 272717 URL: https://svnweb.freebsd.org/changeset/base/272717 Log: Remove call to access(2) which didn't serve any purpose, and make it more tolerant to errors. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/common.c Modified: head/usr.sbin/autofs/common.c == --- head/usr.sbin/autofs/common.c Tue Oct 7 19:07:50 2014 (r272716) +++ head/usr.sbin/autofs/common.c Tue Oct 7 19:08:02 2014 (r272717) @@ -169,17 +169,12 @@ create_directory(const char *path) if (component == NULL) break; concat(partial, component); - //log_debugx(checking \%s\ for existence, partial); - error = access(partial, F_OK); - if (error == 0) - continue; - if (errno != ENOENT) - log_err(1, cannot access %s, partial); - log_debugx(directory %s does not exist, creating, - partial); + //log_debugx(creating \%s\, partial); error = mkdir(partial, 0755); - if (error != 0) - log_err(1, cannot create %s, partial); + if (error != 0 errno != EEXIST) { + log_warn(cannot create %s, partial); + return; + } } free(tofree); ___ 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: r272718 - head/sys/kern
Author: jkim Date: Tue Oct 7 20:13:47 2014 New Revision: 272718 URL: https://svnweb.freebsd.org/changeset/base/272718 Log: Make kern.nswbuf tunable from loader. MFC after:1 week Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Tue Oct 7 19:08:02 2014(r272717) +++ head/sys/kern/vfs_bio.c Tue Oct 7 20:13:47 2014(r272718) @@ -667,6 +667,10 @@ bd_speedup(void) mtx_unlock(bdlock); } +#ifndef NSWBUF_MIN +#defineNSWBUF_MIN 16 +#endif + #ifdef __i386__ #defineTRANSIENT_DENOM 5 #else @@ -778,11 +782,10 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon * swbufs are used as temporary holders for I/O, such as paging I/O. * We have no less then 16 and no more then 256. */ - nswbuf = max(min(nbuf/4, 256), 16); -#ifdef NSWBUF_MIN + nswbuf = min(nbuf / 4, 256); + TUNABLE_INT_FETCH(kern.nswbuf, nswbuf); if (nswbuf NSWBUF_MIN) nswbuf = NSWBUF_MIN; -#endif /* * Reserve space for the buffer cache buffers ___ 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: r272649 - head/contrib/byacc
On Mon, Oct 6, 2014 at 7:49 AM, Baptiste Daroussin b...@freebsd.org wrote: Why a direct commit instead of a proper import of 20141005 version? it would have imho been better, simpler and easier to maintain. Because according to Thomas Dickey, he did not fix all the memory related problems in snapshot 20141005. Specifically there are still some issues not fixed when realloc() is called. I was going to wait for the next snapshot. However, I wanted to get that one fix into FreeBSD to fix the kyua tests, which have been failing under Jenkins. See: https://jenkins.freebsd.org/jenkins/job/FreeBSD_HEAD-tests2/ (see runs #10 and #11). -- Craig ___ 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: r272719 - in head/sys/dev/cxgbe: common tom
Author: np Date: Tue Oct 7 21:26:22 2014 New Revision: 272719 URL: https://svnweb.freebsd.org/changeset/base/272719 Log: cxgbe/tom: don't leak resources tied to an active open request that cannot be sent to the chip because a prerequisite L2 resolution failed. Submitted by: Hariprasad at chelsio dot com (original version) MFC after:2 weeks. Modified: head/sys/dev/cxgbe/common/t4_msg.h head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h head/sys/dev/cxgbe/tom/t4_tom_l2t.c Modified: head/sys/dev/cxgbe/common/t4_msg.h == --- head/sys/dev/cxgbe/common/t4_msg.h Tue Oct 7 20:13:47 2014 (r272718) +++ head/sys/dev/cxgbe/common/t4_msg.h Tue Oct 7 21:26:22 2014 (r272719) @@ -273,6 +273,7 @@ union opcode_tid { /* extract the TID from a CPL command */ #define GET_TID(cmd) (G_TID(ntohl(OPCODE_TID(cmd +#define GET_OPCODE(cmd) ((cmd)-ot.opcode) /* partitioning of TID fields that also carry a queue id */ #define S_TID_TID0 Modified: head/sys/dev/cxgbe/tom/t4_connect.c == --- head/sys/dev/cxgbe/tom/t4_connect.c Tue Oct 7 20:13:47 2014 (r272718) +++ head/sys/dev/cxgbe/tom/t4_connect.c Tue Oct 7 21:26:22 2014 (r272719) @@ -115,8 +115,8 @@ do_act_establish(struct sge_iq *iq, cons { struct adapter *sc = iq-adapter; const struct cpl_act_establish *cpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(cpl); - unsigned int atid = G_TID_TID(ntohl(cpl-tos_atid)); + u_int tid = GET_TID(cpl); + u_int atid = G_TID_TID(ntohl(cpl-tos_atid)); struct toepcb *toep = lookup_atid(sc, atid); struct inpcb *inp = toep-inp; @@ -178,17 +178,34 @@ act_open_rpl_status_to_errno(int status) } } +void +act_open_failure_cleanup(struct adapter *sc, u_int atid, u_int status) +{ + struct toepcb *toep = lookup_atid(sc, atid); + struct inpcb *inp = toep-inp; + struct toedev *tod = toep-td-tod; + + free_atid(sc, atid); + toep-tid = -1; + + if (status != EAGAIN) + INP_INFO_WLOCK(V_tcbinfo); + INP_WLOCK(inp); + toe_connect_failed(tod, inp, status); + final_cpl_received(toep); /* unlocks inp */ + if (status != EAGAIN) + INP_INFO_WUNLOCK(V_tcbinfo); +} + static int do_act_open_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct adapter *sc = iq-adapter; const struct cpl_act_open_rpl *cpl = (const void *)(rss + 1); - unsigned int atid = G_TID_TID(G_AOPEN_ATID(be32toh(cpl-atid_status))); - unsigned int status = G_AOPEN_STATUS(be32toh(cpl-atid_status)); + u_int atid = G_TID_TID(G_AOPEN_ATID(be32toh(cpl-atid_status))); + u_int status = G_AOPEN_STATUS(be32toh(cpl-atid_status)); struct toepcb *toep = lookup_atid(sc, atid); - struct inpcb *inp = toep-inp; - struct toedev *tod = toep-td-tod; int rc; KASSERT(m == NULL, (%s: wasn't expecting payload, __func__)); @@ -200,20 +217,11 @@ do_act_open_rpl(struct sge_iq *iq, const if (negative_advice(status)) return (0); - free_atid(sc, atid); - toep-tid = -1; - if (status act_open_has_tid(status)) release_tid(sc, GET_TID(cpl), toep-ctrlq); rc = act_open_rpl_status_to_errno(status); - if (rc != EAGAIN) - INP_INFO_WLOCK(V_tcbinfo); - INP_WLOCK(inp); - toe_connect_failed(tod, inp, rc); - final_cpl_received(toep); /* unlocks inp */ - if (rc != EAGAIN) - INP_INFO_WUNLOCK(V_tcbinfo); + act_open_failure_cleanup(sc, atid, rc); return (0); } Modified: head/sys/dev/cxgbe/tom/t4_tom.c == --- head/sys/dev/cxgbe/tom/t4_tom.c Tue Oct 7 20:13:47 2014 (r272718) +++ head/sys/dev/cxgbe/tom/t4_tom.c Tue Oct 7 21:26:22 2014 (r272719) @@ -98,6 +98,7 @@ static void t4_clip_task(void *, int); static void update_clip_table(struct adapter *, struct tom_data *); static void destroy_clip_table(struct adapter *, struct tom_data *); static void free_tom_data(struct adapter *, struct tom_data *); +static void reclaim_wr_resources(void *, int); static int in6_ifaddr_gen; static eventhandler_tag ifaddr_evhandler; @@ -903,6 +904,8 @@ free_tom_data(struct adapter *sc, struct if (td-listen_mask != 0) hashdestroy(td-listen_hash, M_CXGBE, td-listen_mask); + if (mtx_initialized(td-unsent_wr_lock)) + mtx_destroy(td-unsent_wr_lock); if (mtx_initialized(td-lctx_hash_lock)) mtx_destroy(td-lctx_hash_lock); if (mtx_initialized(td-toep_list_lock)) @@ -912,6 +915,44 @@
svn commit: r272720 - head/sys/netinet
Author: sbruno Date: Tue Oct 7 21:50:28 2014 New Revision: 272720 URL: https://svnweb.freebsd.org/changeset/base/272720 Log: Implement PLPMTUD blackhole detection (RFC 4821), inspired by code from xnu sources. If we encounter a network where ICMP is blocked the Needs Frag indicator may not propagate back to us. Attempt to downshift the mss once to a preconfigured value. Default this feature to off for now while we do not have a full PLPMTUD implementation in our stack. Adds the following new sysctl's for control: net.inet.tcp.pmtud_blackhole_detection -- turns on/off this feature net.inet.tcp.pmtud_blackhole_mss -- mss to try for ipv4 net.inet.tcp.v6pmtud_blackhole_mss -- mss to try for ipv6 Adds the following new sysctl's for monitoring: -- Number of times the code was activated to attempt a mss downshift net.inet.tcp.pmtud_blackhole_activated -- Number of times the blackhole mss was used in an attempt to downshift net.inet.tcp.pmtud_blackhole_min_activated -- Number of times that we failed to connect after we downshifted the mss net.inet.tcp.pmtud_blackhole_failed Phabricator: https://reviews.freebsd.org/D506 Reviewed by: rpaulo bz MFC after:2 weeks Relnotes: yes Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_output.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Tue Oct 7 21:26:22 2014 (r272719) +++ head/sys/netinet/tcp_output.c Tue Oct 7 21:50:28 2014 (r272720) @@ -675,6 +675,12 @@ just_return: send: SOCKBUF_LOCK_ASSERT(so-so_snd); + if (len 0) { + if (len = tp-t_maxseg) + tp-t_flags2 |= TF2_PLPMTU_MAXSEGSNT; + else + tp-t_flags2 = ~TF2_PLPMTU_MAXSEGSNT; + } /* * Before ESTABLISHED, force sending of initial options * unless TCP set not to do any options. @@ -1303,8 +1309,12 @@ send: * * NB: Don't set DF on small MTU/MSS to have a safe fallback. */ - if (V_path_mtu_discovery tp-t_maxopd V_tcp_minmss) + if (V_path_mtu_discovery tp-t_maxopd V_tcp_minmss) { ip-ip_off |= htons(IP_DF); + tp-t_flags2 |= TF2_PLPMTU_PMTUD; + } else { + tp-t_flags2 = ~TF2_PLPMTU_PMTUD; + } if (tp-t_state == TCPS_SYN_SENT) TCP_PROBE5(connect__request, NULL, tp, ip, tp, th); Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cTue Oct 7 21:26:22 2014 (r272719) +++ head/sys/netinet/tcp_timer.cTue Oct 7 21:50:28 2014 (r272720) @@ -66,6 +66,9 @@ __FBSDID($FreeBSD$); #include netinet/tcp_fsm.h #include netinet/tcp_timer.h #include netinet/tcp_var.h +#ifdef INET6 +#include netinet6/tcp6_var.h +#endif #include netinet/tcpip.h #ifdef TCPDEBUG #include netinet/tcp_debug.h @@ -127,6 +130,54 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, rexm tcp_rexmit_drop_options, 0, Drop TCP options from 3rd and later retransmitted SYN); +static VNET_DEFINE(int, tcp_pmtud_blackhole_detect); +#defineV_tcp_pmtud_blackhole_detectVNET(tcp_pmtud_blackhole_detect) +SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_detection, +CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_VNET, +VNET_NAME(tcp_pmtud_blackhole_detect), 0, +Path MTU Discovery Black Hole Detection Enabled); + +static VNET_DEFINE(int, tcp_pmtud_blackhole_activated); +#defineV_tcp_pmtud_blackhole_activated \ +VNET(tcp_pmtud_blackhole_activated) +SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_activated, +CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_VNET, +VNET_NAME(tcp_pmtud_blackhole_activated), 0, +Path MTU Discovery Black Hole Detection, Activation Count); + +static VNET_DEFINE(int, tcp_pmtud_blackhole_activated_min_mss); +#defineV_tcp_pmtud_blackhole_activated_min_mss \ +VNET(tcp_pmtud_blackhole_activated_min_mss) +SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_activated_min_mss, +CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_VNET, +VNET_NAME(tcp_pmtud_blackhole_activated_min_mss), 0, +Path MTU Discovery Black Hole Detection, Activation Count at min MSS); + +static VNET_DEFINE(int, tcp_pmtud_blackhole_failed); +#defineV_tcp_pmtud_blackhole_failedVNET(tcp_pmtud_blackhole_failed) +SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_failed, +CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_VNET, +VNET_NAME(tcp_pmtud_blackhole_failed), 0, +Path MTU Discovery Black Hole Detection, Failure Count); + +#ifdef INET +static VNET_DEFINE(int, tcp_pmtud_blackhole_mss) = 1200; +#defineV_tcp_pmtud_blackhole_mss VNET(tcp_pmtud_blackhole_mss) +SYSCTL_INT(_net_inet_tcp, OID_AUTO,
Re: svn commit: r272649 - head/contrib/byacc
On Tue, Oct 07, 2014 at 02:02:34PM -0700, Craig Rodrigues wrote: On Mon, Oct 6, 2014 at 7:49 AM, Baptiste Daroussin b...@freebsd.org wrote: Why a direct commit instead of a proper import of 20141005 version? it would have imho been better, simpler and easier to maintain. Because according to Thomas Dickey, he did not fix all the memory related problems in snapshot 20141005. Specifically there are still some issues not fixed when realloc() is called. I was going to wait for the next snapshot. However, I wanted to get that one fix into FreeBSD to fix the kyua tests, which have been failing under Jenkins. See: https://jenkins.freebsd.org/jenkins/job/FreeBSD_HEAD-tests2/ (see runs #10 and #11). In that case I will import the new one which has the fix (do you confirm?) Best regards, Bapt pgpdulM1jocbi.pgp Description: PGP signature
Re: svn commit: r272384 - head/usr.bin/mkimg
On Fri, 3 Oct 2014, Ed Maste wrote: On 2 October 2014 10:43, Ed Maste ema...@freebsd.org wrote: I've been using brooks' NO_ROOT support along with makefs / mkimg to build and test changes by creating an image to boot in QEMU. This change provides a noticeable improvement in the cycle time. I've had a couple of inquiries about the workflow I've been using, so I've added a brief set of steps to my Wiki page at https://wiki.freebsd.org/EdMaste/BuildVM . With -DNO_ROOT for the install targets an mtree file named METALOG file is created at the top of DESTDIR. Files are installed owned by the user, without special flags. Makefs reads the METALOG file and applies the desired ownership, permissions and flags in the generated file system. Then mkimg creates an image with a GPT partition table, the UFS filesystem created by makefs, and the various boot loader bits for legacy and UEFI boot. Wouldn't it be useful for automating backing up config directories? I'd think about copying, say, /etc and /usr/local/etc to sometemporary place, changing owner to non-privileged user, and then commit changes (removals should be treated specially, of course) to some kind of SCM? Or, does such project exist already? I failed to find it, but maybe my goole-fu is lacking necessary components ;) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ 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: r272721 - in head/sys/dev: alc ale
Author: yongari Date: Wed Oct 8 01:03:32 2014 New Revision: 272721 URL: https://svnweb.freebsd.org/changeset/base/272721 Log: Fix a long standing bug in MAC statistics register access. One additional register was erroneously added in the MAC register set such that 7 TX statistics counters were wrong. Modified: head/sys/dev/alc/if_alc.c head/sys/dev/alc/if_alcreg.h head/sys/dev/ale/if_ale.c head/sys/dev/ale/if_alereg.h Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Tue Oct 7 21:50:28 2014(r272720) +++ head/sys/dev/alc/if_alc.c Wed Oct 8 01:03:32 2014(r272721) @@ -1287,8 +1287,6 @@ alc_sysctl_node(struct alc_softc *sc) stats-tx_late_colls, Late collisions); ALC_SYSCTL_STAT_ADD32(ctx, child, excess_colls, stats-tx_excess_colls, Excessive collisions); - ALC_SYSCTL_STAT_ADD32(ctx, child, abort, - stats-tx_abort, Aborted frames due to Excessive collisions); ALC_SYSCTL_STAT_ADD32(ctx, child, underruns, stats-tx_underrun, FIFO underruns); ALC_SYSCTL_STAT_ADD32(ctx, child, desc_underruns, @@ -2599,7 +2597,6 @@ alc_stats_update(struct alc_softc *sc) stat-tx_multi_colls += smb-tx_multi_colls; stat-tx_late_colls += smb-tx_late_colls; stat-tx_excess_colls += smb-tx_excess_colls; - stat-tx_abort += smb-tx_abort; stat-tx_underrun += smb-tx_underrun; stat-tx_desc_underrun += smb-tx_desc_underrun; stat-tx_lenerrs += smb-tx_lenerrs; @@ -2612,17 +2609,10 @@ alc_stats_update(struct alc_softc *sc) if_inc_counter(ifp, IFCOUNTER_COLLISIONS, smb-tx_single_colls + smb-tx_multi_colls * 2 + smb-tx_late_colls + - smb-tx_abort * HDPX_CFG_RETRY_DEFAULT); + smb-tx_excess_colls * HDPX_CFG_RETRY_DEFAULT); - /* -* XXX -* tx_pkts_truncated counter looks suspicious. It constantly -* increments with no sign of Tx errors. This may indicate -* the counter name is not correct one so I've removed the -* counter in output errors. -*/ - if_inc_counter(ifp, IFCOUNTER_OERRORS, - smb-tx_abort + smb-tx_late_colls + smb-tx_underrun); + if_inc_counter(ifp, IFCOUNTER_OERRORS, smb-tx_late_colls + + smb-tx_excess_colls + smb-tx_underrun + smb-tx_pkts_truncated); if_inc_counter(ifp, IFCOUNTER_IPACKETS, smb-rx_frames); Modified: head/sys/dev/alc/if_alcreg.h == --- head/sys/dev/alc/if_alcreg.hTue Oct 7 21:50:28 2014 (r272720) +++ head/sys/dev/alc/if_alcreg.hWed Oct 8 01:03:32 2014 (r272721) @@ -860,7 +860,6 @@ struct smb { uint32_t tx_multi_colls; uint32_t tx_late_colls; uint32_t tx_excess_colls; - uint32_t tx_abort; uint32_t tx_underrun; uint32_t tx_desc_underrun; uint32_t tx_lenerrs; Modified: head/sys/dev/ale/if_ale.c == --- head/sys/dev/ale/if_ale.c Tue Oct 7 21:50:28 2014(r272720) +++ head/sys/dev/ale/if_ale.c Wed Oct 8 01:03:32 2014(r272721) @@ -946,8 +946,6 @@ ale_sysctl_node(struct ale_softc *sc) stats-tx_late_colls, Late collisions); ALE_SYSCTL_STAT_ADD32(ctx, child, excess_colls, stats-tx_excess_colls, Excessive collisions); - ALE_SYSCTL_STAT_ADD32(ctx, child, abort, - stats-tx_abort, Aborted frames due to Excessive collisions); ALE_SYSCTL_STAT_ADD32(ctx, child, underruns, stats-tx_underrun, FIFO underruns); ALE_SYSCTL_STAT_ADD32(ctx, child, desc_underruns, @@ -2197,7 +2195,6 @@ ale_stats_update(struct ale_softc *sc) stat-tx_multi_colls += smb-tx_multi_colls; stat-tx_late_colls += smb-tx_late_colls; stat-tx_excess_colls += smb-tx_excess_colls; - stat-tx_abort += smb-tx_abort; stat-tx_underrun += smb-tx_underrun; stat-tx_desc_underrun += smb-tx_desc_underrun; stat-tx_lenerrs += smb-tx_lenerrs; @@ -2210,17 +2207,10 @@ ale_stats_update(struct ale_softc *sc) if_inc_counter(ifp, IFCOUNTER_COLLISIONS, smb-tx_single_colls + smb-tx_multi_colls * 2 + smb-tx_late_colls + - smb-tx_abort * HDPX_CFG_RETRY_DEFAULT); + smb-tx_excess_colls * HDPX_CFG_RETRY_DEFAULT); - /* -* XXX -* tx_pkts_truncated counter looks suspicious. It constantly -* increments with no sign of Tx errors. This may indicate -* the counter name is not correct one so I've removed the -* counter in output errors. -*/ - if_inc_counter(ifp, IFCOUNTER_OERRORS, - smb-tx_abort + smb-tx_late_colls + smb-tx_underrun); + if_inc_counter(ifp, IFCOUNTER_OERRORS, smb-tx_late_colls + +
svn commit: r272722 - stable/10/sys/vm
Author: bryanv Date: Wed Oct 8 04:07:07 2014 New Revision: 272722 URL: https://svnweb.freebsd.org/changeset/base/272722 Log: MFC 272550: Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case. Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/uma_core.c == --- stable/10/sys/vm/uma_core.c Wed Oct 8 01:03:32 2014(r272721) +++ stable/10/sys/vm/uma_core.c Wed Oct 8 04:07:07 2014(r272722) @@ -898,9 +898,7 @@ zone_drain_wait(uma_zone_t zone, int wai while (zone-uz_flags UMA_ZFLAG_DRAINING) { if (waitok == M_NOWAIT) goto out; - mtx_unlock(uma_mtx); msleep(zone, zone-uz_lockptr, PVM, zonedrain, 1); - mtx_lock(uma_mtx); } zone-uz_flags |= UMA_ZFLAG_DRAINING; bucket_cache_drain(zone); ___ 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: r272723 - stable/9/sys/vm
Author: bryanv Date: Wed Oct 8 04:11:05 2014 New Revision: 272723 URL: https://svnweb.freebsd.org/changeset/base/272723 Log: MFC 272550: Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case. Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c == --- stable/9/sys/vm/uma_core.c Wed Oct 8 04:07:07 2014(r272722) +++ stable/9/sys/vm/uma_core.c Wed Oct 8 04:11:05 2014(r272723) @@ -761,9 +761,7 @@ zone_drain_wait(uma_zone_t zone, int wai while (zone-uz_flags UMA_ZFLAG_DRAINING) { if (waitok == M_NOWAIT) goto out; - mtx_unlock(uma_mtx); msleep(zone, zone-uz_lock, PVM, zonedrain, 1); - mtx_lock(uma_mtx); } zone-uz_flags |= UMA_ZFLAG_DRAINING; bucket_cache_drain(zone); ___ 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: r272724 - in stable/10: release release/amd64 release/i386 share/man/man7
Author: gjb Date: Wed Oct 8 04:25:17 2014 New Revision: 272724 URL: https://svnweb.freebsd.org/changeset/base/272724 Log: MFC r272414: Merge the following revisions from ^/projects/release-vmimage: r272234, r272236, r272262, r272264, r272269, r272271, r272272, r272277, r272279, r272376, r272380, r272381, r272392, r272234, r272412: r272234: Initial commit to include virtual machine images as part of the FreeBSD release builds. This adds a make(1) environment variable requirement, WITH_VMIMAGES, which triggers the virtual machine image targets when not defined to an empty value. Relevant user-driven variables include: o VMFORMATS: The virtual machine image formats to create. Valid formats are provided by running 'mkimg --formats' o VMSIZE: The size of the resulting virtual machine image. Typical compression is roughly 140Mb, regardless of the target size (10GB, 15GB, 20GB, 40GB sizes have been tested with the same result). o VMBASE: The prefix of the virtual machine disk images. The VMBASE make(1) environment variable is suffixed with each format in VMFORMATS for each individual disk image, as well as '.img' for the source UFS filesystem passed to mkimg(1). This also includes a new script, mk-vmimage.sh, based on how the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE were created (mk-vmimage.sh in ^/user/gjb/thermite/). With the order in which the stages need to occur, as well as sanity-checking error cases, it makes much more sense to execute a shell script called from make(1), using env(1) to set specific parameters for the target image than it does to do this in make(1) directly. r272236: Use VMBASE in place of a hard-coded filename in the CLEANFILES list. r272262: Remove a 'set -x' that snuck in during testing. r272264: release/Makefile: Connect the virtual machine image build to the release target if WITH_VMIMAGES is set to a non-empty value. release/release.sh: Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS. release/release.conf.sample: Add commented entries for tuning the release build if the WITH_VMIMAGES make(1) environment variable is set to a non-empty value. r272269: release/Makefile: Include .OBJDIR in DESTDIR in the vm-base target. release/release.sh: Provide the full path to mddev. r272271: Fix UFS label for the root filesystem. r272272: Remove comments left in accidentally while testing, so the VM /etc/fstab is actually created. r272277: Remove the UFS label from the root filesystem since it is added by mkimg(1) as a gpt label, consistent with the fstab(5) entry. r272279: Comment cleanup in panic() message when mkimg(1) does not support the requested disk image format. r272376: Separate release/scripts/mk-vmimage.sh to machine-specific scripts, making it possible to mimic the functionality for non-x86 targets. Move echo output if MAKEFLAGS is empty outside of usage(). Remove TARGET/TARGET_ARCH evaluation. r272380: Avoid using env(1) to set values passed to mk-vmimage.sh, and instead pass the values as arguments to the script, making it easier to run this by hand, without 'make release'. Add usage_vm_base() and usage_vm_image() usage helpers. r272381: After evaluating WITH_VMIMAGES is non-empty, ensure the mk-vmimage.sh script exists before running it. r272392: Add WITH_COMPRESSED_VMIMAGES variable, which when set enables xz(1) compression of the virtual machine images. This is intentionally separate to allow more fine-grained tuning over which images are compressed, especially in cases where compressing 20GB sparse images can take hours. r272412: Document the new 'vm-image' target, and associated release.conf variables. r272413: Remove two stray comments added during the initial iterations of testing, no longer needed. Sponsored by: The FreeBSD Foundation Added: stable/10/release/amd64/mk-vmimage.sh - copied unchanged from r272414, head/release/amd64/mk-vmimage.sh stable/10/release/i386/mk-vmimage.sh - copied unchanged from r272414, head/release/i386/mk-vmimage.sh Modified: stable/10/release/Makefile stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile == --- stable/10/release/Makefile Wed Oct 8 04:11:05 2014(r272723) +++ stable/10/release/Makefile Wed Oct 8 04:25:17 2014(r272724) @@ -23,6 +23,9 @@ # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set,
svn commit: r272726 - stable/10/sys/kern
Author: neel Date: Wed Oct 8 04:35:09 2014 New Revision: 272726 URL: https://svnweb.freebsd.org/changeset/base/272726 Log: MFC r272270: tty_rel_free() can be called more than once for the same tty so make sure that the tty is dequeued from 'tty_list' only the first time. Modified: stable/10/sys/kern/tty.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/tty.c == --- stable/10/sys/kern/tty.cWed Oct 8 04:34:46 2014(r272725) +++ stable/10/sys/kern/tty.cWed Oct 8 04:35:09 2014(r272726) @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) tp-t_dev = NULL; tty_unlock(tp); - sx_xlock(tty_list_sx); - TAILQ_REMOVE(tty_list, tp, t_list); - tty_list_count--; - sx_xunlock(tty_list_sx); - - if (dev != NULL) + if (dev != NULL) { + sx_xlock(tty_list_sx); + TAILQ_REMOVE(tty_list, tp, t_list); + tty_list_count--; + sx_xunlock(tty_list_sx); destroy_dev_sched_cb(dev, tty_dealloc, tp); + } } void ___ 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: r272725 - stable/8/sys/vm
Author: bryanv Date: Wed Oct 8 04:34:46 2014 New Revision: 272725 URL: https://svnweb.freebsd.org/changeset/base/272725 Log: MFC 272550: Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case. Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/vm/uma_core.c == --- stable/8/sys/vm/uma_core.c Wed Oct 8 04:25:17 2014(r272724) +++ stable/8/sys/vm/uma_core.c Wed Oct 8 04:34:46 2014(r272725) @@ -761,9 +761,7 @@ zone_drain_wait(uma_zone_t zone, int wai while (zone-uz_flags UMA_ZFLAG_DRAINING) { if (waitok == M_NOWAIT) goto out; - mtx_unlock(uma_mtx); msleep(zone, zone-uz_lock, PVM, zonedrain, 1); - mtx_lock(uma_mtx); } zone-uz_flags |= UMA_ZFLAG_DRAINING; bucket_cache_drain(zone); ___ 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: r272727 - in stable/10: release release/amd64 release/i386 share/man/man7
Author: gjb Date: Wed Oct 8 04:42:56 2014 New Revision: 272727 URL: https://svnweb.freebsd.org/changeset/base/272727 Log: Revert r272724: Features not yet available in stable/10 are needed in mkimg(1), and it is more dangerous to tweak these changes in stable/10 directly without explicitly testing certain failure cases. Re-addition of this change is imminent. Sponsored by: The FreeBSD Foundation Deleted: stable/10/release/amd64/mk-vmimage.sh stable/10/release/i386/mk-vmimage.sh Modified: stable/10/release/Makefile stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile == --- stable/10/release/Makefile Wed Oct 8 04:35:09 2014(r272726) +++ stable/10/release/Makefile Wed Oct 8 04:42:56 2014(r272727) @@ -23,9 +23,6 @@ # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) -# WITH_VMIMAGES: if set, build virtual machine images with the release -# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images -# with xz(1) (extremely time consuming) # TARGET/TARGET_ARCH: architecture of built release # @@ -113,11 +110,6 @@ IMAGES+= uefi-dvd1.iso . endif .endif -VMTARGETS= vm-base vm-image -VMFORMATS?=vhd vmdk qcow2 raw -VMSIZE?= 20G -VMBASE?= vm - CLEANFILES=packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} @@ -127,16 +119,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -.if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) -CLEANFILES+= ${VMBASE}.img -. for FORMAT in ${VMFORMATS} -CLEANFILES+= ${VMBASE}.${FORMAT} -. endfor -.endif CLEANDIRS= dist ftp release bootonly dvd -.if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) -CLEANDIRS+=${VMTARGETS} -.endif beforeclean: chflags -R noschg . .include bsd.obj.mk @@ -314,9 +297,6 @@ ftp: packagesystem release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -.if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) - ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} -.endif install: .if defined(DESTDIR) !empty(DESTDIR) @@ -331,44 +311,3 @@ install: .endfor cd ${DESTDIR} sha256 ${OSRELEASE}* ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} md5 ${OSRELEASE}* ${DESTDIR}/CHECKSUM.MD5 -.if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) - mkdir -p ${DESTDIR}/vmimages -. for FORMAT in ${VMFORMATS} - cp -p ${VMBASE}.${FORMAT} \ - ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} -. endfor -. if defined(WITH_COMPRESSED_VMIMAGES) !empty(WITH_COMPRESSED_VMIMAGES) -# This is very time consuming, so defer it after the images are moved to -# the DESTDIR. -. for FORMAT in ${VMFORMATS} - # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. - ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} -. endfor -. endif - cd ${DESTDIR}/vmimages sha256 ${OSRELEASE}* \ - ${DESTDIR}/vmimages/CHECKSUM.SHA256 - cd ${DESTDIR}/vmimages md5 ${OSRELEASE}* \ - ${DESTDIR}/vmimages/CHECKSUM.MD5 -.endif - -vm-base: -.if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} -. endif -.endif - touch ${.TARGET} - -vm-image: vm-base -.if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) -. for FORMAT in ${VMFORMATS} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} -. endfor -. endif -.endif - touch ${.TARGET} Modified: stable/10/release/release.conf.sample == --- stable/10/release/release.conf.sample Wed Oct 8 04:35:09 2014 (r272726) +++ stable/10/release/release.conf.sample Wed Oct 8 04:42:56 2014 (r272727) @@ -72,24 +72,3 @@ PORTBRANCH=ports/head@rHEAD ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= -## Set to a non-empty value to build virtual machine images as part of the -## release build. -#WITH_VMIMAGES= - -## Set to a non-empty value to compress virtual machine images with xz(1) -## as part of the release build. -#WITH_COMPRESSED_VMIMAGES= - -## If WITH_VMIMAGES is set to a non-empty value, this is
Re: svn commit: r272727 - in stable/10: release release/amd64 release/i386 share/man/man7
On Wed, Oct 08, 2014 at 04:42:57AM +, Glen Barber wrote: Author: gjb Date: Wed Oct 8 04:42:56 2014 New Revision: 272727 URL: https://svnweb.freebsd.org/changeset/base/272727 Log: Revert r272724: Features not yet available in stable/10 are needed in mkimg(1), and it is more dangerous to tweak these changes in stable/10 directly without explicitly testing certain failure cases. Re-addition of this change is imminent. This is a big pointy-hat to me for not double-checking that the mkimg(1) longopts (--version, --formats, etc.) have been merged yet. Bigger pointy-hat points for committing while tired. Glen pgpkHoiY6112l.pgp Description: PGP signature
svn commit: r272728 - head/usr.bin/w
Author: eadler Date: Wed Oct 8 05:04:31 2014 New Revision: 272728 URL: https://svnweb.freebsd.org/changeset/base/272728 Log: don't reinvent the wheel: rely on basename(3) Reviewed by: nwhitehorn Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c == --- head/usr.bin/w/w.c Wed Oct 8 04:42:56 2014(r272727) +++ head/usr.bin/w/w.c Wed Oct 8 05:04:31 2014(r272728) @@ -68,6 +68,7 @@ static const char sccsid[] = @(#)w.c 8. #include fcntl.h #include kvm.h #include langinfo.h +#include libgen.h #include libutil.h #include limits.h #include locale.h @@ -121,7 +122,6 @@ static struct entry { static void pr_header(time_t *, int); static struct stat *ttystat(char *); static void usage(int); -static int this_is_uptime(const char *s); char *fmt_argv(char **, char *, char *, size_t); /* ../../bin/ps/fmt.c */ @@ -144,7 +144,7 @@ main(int argc, char *argv[]) use_comma = (*nl_langinfo(RADIXCHAR) != ','); /* Are we w(1) or uptime(1)? */ - if (this_is_uptime(argv[0]) == 0) { + if (strcmp(basename(argv[0]), uptime) == 0) { wcmd = 0; p = ; } else { @@ -512,17 +512,3 @@ usage(int wcmd) (void)fprintf(stderr, usage: uptime\n); exit(1); } - -static int -this_is_uptime(const char *s) -{ - const char *u; - - if ((u = strrchr(s, '/')) != NULL) - ++u; - else - u = s; - if (strcmp(u, uptime) == 0) - return (0); - return (-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: r272729 - head/sys/dev/pci
Author: yongari Date: Wed Oct 8 05:34:39 2014 New Revision: 272729 URL: https://svnweb.freebsd.org/changeset/base/272729 Log: Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4). QAC AR816x/E2200 controller has a silicon bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of command register is set. Reviewed by: jhb Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed Oct 8 05:04:31 2014(r272728) +++ head/sys/dev/pci/pci.c Wed Oct 8 05:34:39 2014(r272729) @@ -207,6 +207,7 @@ struct pci_quirk { #definePCI_QUIRK_ENABLE_MSI_VM 3 /* Older chipset in VM where MSI works */ #definePCI_QUIRK_UNMAP_REG 4 /* Ignore PCI map register */ #definePCI_QUIRK_DISABLE_MSIX 5 /* MSI-X doesn't work */ +#definePCI_QUIRK_MSI_INTX_BUG 5 /* PCIM_CMD_INTxDIS disables MSI */ int arg1; int arg2; }; @@ -266,6 +267,15 @@ static const struct pci_quirk pci_quirks */ { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, + /* +* Atheros AR8161/AR8162/E2200 ethernet controller has a bug that +* MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the +* command register is set. +*/ + { 0x10911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + { 0 } }; @@ -3856,8 +3866,14 @@ pci_setup_intr(device_t dev, device_t ch mte-mte_handlers++; } - /* Make sure that INTx is disabled if we are using MSI/MSIX */ - pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); + if (!pci_has_quirk(pci_get_devid(dev), + PCI_QUIRK_MSI_INTX_BUG)) { + /* +* Make sure that INTx is disabled if we are +* using MSI/MSIX +*/ + pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); + } bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, ___ 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: r272730 - head/sys/dev/alc
Author: yongari Date: Wed Oct 8 05:47:01 2014 New Revision: 272730 URL: https://svnweb.freebsd.org/changeset/base/272730 Log: Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers. These controllers seem to have the same feature of AR813x/AR815x and improved RSS support(4 TX queues and 8 RX queues). alc(4) supports all hardware features except RSS. I didn't implement RX checksum offloading for AR816x/AR817x just because I couldn't get confirmation from the Vendor whether AR816x/AR817x corrected its predecessor's RX checksum offloading bug on fragmented packets. This change adds supports for the following controllers. o AR8161 PCIe Gigabit Ethernet controller o AR8162 PCIe Fast Ethernet controller o AR8171 PCIe Gigabit Ethernet controller o AR8172 PCIe Fast Ethernet controller o Killer E2200 Gigabit Ethernet controller Tested by:Many Relnotes: yes MFC after:2 weeks HW donated by:Qualcomm Atheros Communications, Inc. Modified: head/sys/dev/alc/if_alc.c head/sys/dev/alc/if_alcreg.h head/sys/dev/alc/if_alcvar.h Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Wed Oct 8 05:34:39 2014(r272729) +++ head/sys/dev/alc/if_alc.c Wed Oct 8 05:47:01 2014(r272730) @@ -111,17 +111,31 @@ static struct alc_ident alc_ident_table[ Atheros AR8152 v1.1 PCIe Fast Ethernet }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8152_B2, 6 * 1024, Atheros AR8152 v2.0 PCIe Fast Ethernet }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8161, 9 * 1024, + Atheros AR8161 PCIe Gigabit Ethernet }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8162, 9 * 1024, + Atheros AR8161 PCIe Fast Ethernet }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8171, 9 * 1024, + Atheros AR8161 PCIe Gigabit Ethernet }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8172, 9 * 1024, + Atheros AR8161 PCIe Fast Ethernet }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2200, 9 * 1024, + Killer E2200 Gigabit Ethernet }, { 0, 0, 0, NULL} }; -static voidalc_aspm(struct alc_softc *, int); +static voidalc_aspm(struct alc_softc *, int, int); +static voidalc_aspm_813x(struct alc_softc *, int); +static voidalc_aspm_816x(struct alc_softc *, int); static int alc_attach(device_t); static int alc_check_boundary(struct alc_softc *); +static voidalc_config_msi(struct alc_softc *); static int alc_detach(device_t); static voidalc_disable_l0s_l1(struct alc_softc *); static int alc_dma_alloc(struct alc_softc *); static voidalc_dma_free(struct alc_softc *); static voidalc_dmamap_cb(void *, bus_dma_segment_t *, int, int); +static voidalc_dsp_fixup(struct alc_softc *, int); static int alc_encap(struct alc_softc *, struct mbuf **); static struct alc_ident * alc_find_ident(device_t); @@ -130,6 +144,9 @@ static struct mbuf * alc_fixup_rx(struct ifnet *, struct mbuf *); #endif static voidalc_get_macaddr(struct alc_softc *); +static voidalc_get_macaddr_813x(struct alc_softc *); +static voidalc_get_macaddr_816x(struct alc_softc *); +static voidalc_get_macaddr_par(struct alc_softc *); static voidalc_init(void *); static voidalc_init_cmb(struct alc_softc *); static voidalc_init_locked(struct alc_softc *); @@ -141,14 +158,26 @@ static void alc_int_task(void *, int); static int alc_intr(void *); static int alc_ioctl(struct ifnet *, u_long, caddr_t); static voidalc_mac_config(struct alc_softc *); +static uint32_talc_mii_readreg_813x(struct alc_softc *, int, int); +static uint32_talc_mii_readreg_816x(struct alc_softc *, int, int); +static uint32_talc_mii_writereg_813x(struct alc_softc *, int, int, int); +static uint32_talc_mii_writereg_816x(struct alc_softc *, int, int, int); static int alc_miibus_readreg(device_t, int, int); static voidalc_miibus_statchg(device_t); static int alc_miibus_writereg(device_t, int, int, int); +static uint32_talc_miidbg_readreg(struct alc_softc *, int); +static uint32_talc_miidbg_writereg(struct alc_softc *, int, int); +static uint32_talc_miiext_readreg(struct alc_softc *, int, int); +static uint32_talc_miiext_writereg(struct alc_softc *, int, int, int); static int alc_mediachange(struct ifnet *); +static int alc_mediachange_locked(struct alc_softc *); static voidalc_mediastatus(struct ifnet *, struct ifmediareq *); static int alc_newbuf(struct alc_softc *, struct alc_rxdesc *); +static voidalc_osc_reset(struct alc_softc *); static voidalc_phy_down(struct alc_softc *); static voidalc_phy_reset(struct alc_softc *); +static voidalc_phy_reset_813x(struct alc_softc *); +static void
svn commit: r272731 - head/share/man/man4
Author: yongari Date: Wed Oct 8 05:49:10 2014 New Revision: 272731 URL: https://svnweb.freebsd.org/changeset/base/272731 Log: Document newly added controller AR816x/AR817x. Modified: head/share/man/man4/alc.4 Modified: head/share/man/man4/alc.4 == --- head/share/man/man4/alc.4 Wed Oct 8 05:47:01 2014(r272730) +++ head/share/man/man4/alc.4 Wed Oct 8 05:49:10 2014(r272731) @@ -24,12 +24,12 @@ .\ .\ $FreeBSD$ .\ -.Dd August 9, 2010 +.Dd October 8, 2014 .Dt ALC 4 .Os .Sh NAME .Nm alc -.Nd Atheros AR813x/AR815x Gigabit/Fast Ethernet driver +.Nd Atheros AR813x/AR815x/AR816x/AR817x Gigabit/Fast Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -48,8 +48,8 @@ if_alc_load=YES .Sh DESCRIPTION The .Nm -device driver provides support for Atheros AR813x and AR815x PCI -Express Gigabit/Fast Ethernet controllers. +device driver provides support for Atheros AR813x, AR815x, AR816x +and AR817x PCI Express Gigabit/Fast Ethernet controllers. .Pp All LOMs supported by the .Nm @@ -58,9 +58,9 @@ segmentation offload (TSO), hardware VLA features, Wake On Lan (WOL) and an interrupt moderation mechanism as well as a 64-bit multicast hash filter. .Pp -The AR813x and AR815x supports Jumbo Frames (up to 9216 and 6144 -bytes, respectively), which can be configured via the interface -MTU setting. +The AR813x, AR815x, AR816x and AR817x supports Jumbo Frames (up to +9216, 6144, 9216 and 9216 bytes, respectively), which can be +configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. @@ -112,6 +112,16 @@ Atheros AR8151 v2.0 PCI Express Gigabit Atheros AR8152 v1.1 PCI Express Fast Ethernet controller .It Atheros AR8152 v2.0 PCI Express Fast Ethernet controller +.It +Atheros AR8161 PCI Express Gigabit Ethernet controller +.It +Atheros AR8162 PCI Express Fast Ethernet controller +.It +Atheros AR8171 PCI Express Gigabit Ethernet controller +.It +Atheros AR8172 PCI Express Fast Ethernet controller +.It +Killer E2200 Gigabit Ethernet controller .El .Sh LOADER TUNABLES Tunables can be set at 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: r272732 - head/sys/dev/pci
Author: yongari Date: Wed Oct 8 05:53:04 2014 New Revision: 272732 URL: https://svnweb.freebsd.org/changeset/base/272732 Log: Oops, fix typo made in r272729. Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed Oct 8 05:49:10 2014(r272731) +++ head/sys/dev/pci/pci.c Wed Oct 8 05:53:04 2014(r272732) @@ -207,7 +207,7 @@ struct pci_quirk { #definePCI_QUIRK_ENABLE_MSI_VM 3 /* Older chipset in VM where MSI works */ #definePCI_QUIRK_UNMAP_REG 4 /* Ignore PCI map register */ #definePCI_QUIRK_DISABLE_MSIX 5 /* MSI-X doesn't work */ -#definePCI_QUIRK_MSI_INTX_BUG 5 /* PCIM_CMD_INTxDIS disables MSI */ +#definePCI_QUIRK_MSI_INTX_BUG 6 /* PCIM_CMD_INTxDIS disables MSI */ int arg1; int arg2; }; ___ 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