svn commit: r197533 - in projects/quota64: .
cddl/contrib/opensolaris contrib/bind9 contrib/cpio
contrib/csup contrib/ee contrib/file contrib/gdb
contrib/gdtoa contrib/less contrib/libpcap contrib/...
Dag-Erling Smorgrav
des at FreeBSD.org
Sat Sep 26 23:25:23 UTC 2009
Author: des
Date: Sat Sep 26 23:25:22 2009
New Revision: 197533
URL: http://svn.freebsd.org/changeset/base/197533
Log:
Sync from head.
Added:
projects/quota64/share/man/man4/lindev.4
- copied unchanged from r197532, head/share/man/man4/lindev.4
projects/quota64/sys/dev/lindev/
- copied from r197532, head/sys/dev/lindev/
projects/quota64/sys/modules/lindev/
- copied from r197532, head/sys/modules/lindev/
Modified:
projects/quota64/ (props changed)
projects/quota64/UPDATING
projects/quota64/cddl/contrib/opensolaris/ (props changed)
projects/quota64/contrib/bind9/ (props changed)
projects/quota64/contrib/cpio/ (props changed)
projects/quota64/contrib/csup/ (props changed)
projects/quota64/contrib/ee/ (props changed)
projects/quota64/contrib/file/ (props changed)
projects/quota64/contrib/gdb/ (props changed)
projects/quota64/contrib/gdtoa/ (props changed)
projects/quota64/contrib/less/ (props changed)
projects/quota64/contrib/libpcap/ (props changed)
projects/quota64/contrib/ncurses/ (props changed)
projects/quota64/contrib/netcat/ (props changed)
projects/quota64/contrib/ntp/ (props changed)
projects/quota64/contrib/openbsm/ (props changed)
projects/quota64/contrib/openpam/ (props changed)
projects/quota64/contrib/pf/ (props changed)
projects/quota64/contrib/sendmail/ (props changed)
projects/quota64/contrib/tcpdump/ (props changed)
projects/quota64/contrib/tcsh/ (props changed)
projects/quota64/contrib/top/ (props changed)
projects/quota64/contrib/wpa/ (props changed)
projects/quota64/crypto/openssh/ (props changed)
projects/quota64/crypto/openssl/ (props changed)
projects/quota64/etc/network.subr
projects/quota64/etc/rc.d/defaultroute
projects/quota64/etc/rc.d/ip6addrctl
projects/quota64/etc/rc.d/netif
projects/quota64/etc/rc.d/routing
projects/quota64/etc/rc.d/rtadvd
projects/quota64/lib/libc/ (props changed)
projects/quota64/lib/libc/stdlib/malloc.3
projects/quota64/lib/libc/stdlib/malloc.c
projects/quota64/lib/libc/stdtime/ (props changed)
projects/quota64/lib/libc/string/ffsll.c (props changed)
projects/quota64/lib/libc/string/flsll.c (props changed)
projects/quota64/lib/libutil/ (props changed)
projects/quota64/libexec/rpc.rquotad/rquotad.c
projects/quota64/sbin/ (props changed)
projects/quota64/sbin/ifconfig/ifconfig.8
projects/quota64/sbin/ipfw/ (props changed)
projects/quota64/share/man/man4/Makefile
projects/quota64/share/man/man5/rc.conf.5
projects/quota64/share/zoneinfo/ (props changed)
projects/quota64/sys/ (props changed)
projects/quota64/sys/amd64/conf/NOTES
projects/quota64/sys/amd64/include/xen/ (props changed)
projects/quota64/sys/arm/arm/identcpu.c
projects/quota64/sys/arm/include/md_var.h
projects/quota64/sys/boot/forth/loader.conf
projects/quota64/sys/cddl/contrib/opensolaris/ (props changed)
projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
projects/quota64/sys/conf/files.amd64
projects/quota64/sys/conf/files.i386
projects/quota64/sys/conf/files.pc98
projects/quota64/sys/contrib/dev/acpica/ (props changed)
projects/quota64/sys/contrib/pf/ (props changed)
projects/quota64/sys/dev/syscons/scterm-teken.c
projects/quota64/sys/dev/xen/xenpci/ (props changed)
projects/quota64/sys/i386/conf/NOTES
projects/quota64/sys/modules/Makefile
projects/quota64/sys/nfsserver/nfs_serv.c
projects/quota64/sys/pc98/conf/NOTES
projects/quota64/sys/teken/teken.c
projects/quota64/sys/teken/teken.h
projects/quota64/sys/teken/teken_demo.c
projects/quota64/sys/teken/teken_scs.h
projects/quota64/sys/teken/teken_stress.c
projects/quota64/sys/teken/teken_subr.h
projects/quota64/sys/teken/teken_subr_compat.h
projects/quota64/usr.bin/csup/ (props changed)
projects/quota64/usr.bin/procstat/ (props changed)
projects/quota64/usr.sbin/dumpcis/cardinfo.h (props changed)
projects/quota64/usr.sbin/dumpcis/cis.h (props changed)
projects/quota64/usr.sbin/mfiutil/mfiutil.8 (props changed)
projects/quota64/usr.sbin/zic/ (props changed)
Modified: projects/quota64/UPDATING
==============================================================================
--- projects/quota64/UPDATING Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/UPDATING Sat Sep 26 23:25:22 2009 (r197533)
@@ -22,10 +22,61 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
machines to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20090926:
+ The rc.d/network_ipv6, IPv6 configuration script has been integrated
+ into rc.d/netif. The changes are the following:
+
+ 1. To use IPv6, simply define $ifconfig_IF_ipv6 like $ifconfig_IF
+ for IPv4. For aliases, $ifconfig_IF_aliasN should be used.
+ Note that both variables need the "inet6" keyword at the head.
+
+ Do not set $ipv6_network_interfaces manually if you do not
+ understand what you are doing. It is not needed in most cases.
+
+ $ipv6_ifconfig_IF and $ipv6_ifconfig_IF_aliasN still work, but
+ they are obsolete.
+
+ 2. $ipv6_enable is obsolete. Use $ipv6_prefer and
+ "inet6 accept_rtadv" keyword in ifconfig(8) instead.
+
+ If you define $ipv6_enable=YES, it means $ipv6_prefer=YES and
+ all configured interfaces have "inet6 accept_rtadv" in the
+ $ifconfig_IF_ipv6. These are for backward compatibility.
+
+ 3. A new variable $ipv6_prefer has been added. If NO, IPv6
+ functionality of interfaces with no corresponding
+ $ifconfig_IF_ipv6 is disabled by using "inet6 ifdisabled" flag,
+ and the default address selection policy of ip6addrctl(8)
+ is the IPv4-preferred one (see rc.d/ip6addrctl for more details).
+ Note that if you want to configure IPv6 functionality on the
+ disabled interfaces after boot, first you need to clear the flag by
+ using ifconfig(8) like:
+
+ ifconfig em0 inet6 -ifdisabled
+
+ If YES, the default address selection policy is set as
+ IPv6-preferred.
+
+ The default value of $ipv6_prefer is NO.
+
+ 4. If your system need to receive Router Advertisement messages,
+ define "inet6 accept_rtadv" in $ifconfig_IF_ipv6. The rc(8)
+ scripts automatically invoke rtsol(8) when the interface becomes
+ UP. The Router Advertisement messages are used for SLAAC
+ (State-Less Address AutoConfiguration).
+
20090922:
802.11s D3.03 support was committed. This is incompatible with the
previous code, which was based on D3.0.
+20090912:
+ A sysctl variable net.inet6.ip6.accept_rtadv now sets the default value
+ of a per-interface flag ND6_IFF_ACCEPT_RTADV, not a global knob to
+ control whether accepting Router Advertisement messages or not.
+ Also, a per-interface flag ND6_IFF_AUTO_LINKLOCAL has been added and
+ a sysctl variable net.inet6.ip6.auto_linklocal is its default value.
+ The ifconfig(8) utility now supports these flags.
+
20090910:
ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for
mount(8) and -a option for df(1) to see them.
Modified: projects/quota64/etc/network.subr
==============================================================================
--- projects/quota64/etc/network.subr Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/etc/network.subr Sat Sep 26 23:25:22 2009 (r197533)
@@ -97,15 +97,26 @@ ifconfig_up()
if afexists inet6; then
if ipv6if $1; then
if checkyesno ipv6_gateway_enable; then
- _ipv6_opts="-accept_rtadv auto_linklocal"
- else
- _ipv6_opts="auto_linklocal"
+ _ipv6_opts="-accept_rtadv"
fi
else
- _ipv6_opts="-auto_linklocal ifdisabled"
+ if checkyesno ipv6_prefer; then
+ _ipv6_opts="-ifdisabled"
+ else
+ _ipv6_opts="ifdisabled"
+ fi
+
+ # backward compatibility: $ipv6_enable
+ case $ipv6_enable in
+ [Yy][Ee][Ss])
+ _ipv6_opts="${_ipv6_opts} accept_rtadv"
+ ;;
+ esac
fi
- ifconfig $1 inet6 ${_ipv6_opts}
+ if [ -n "${_ipv6_opts}" ]; then
+ ifconfig $1 inet6 ${_ipv6_opts}
+ fi
# ifconfig_IF_ipv6
ifconfig_args=`ifconfig_getargs $1 ipv6`
@@ -382,7 +393,7 @@ noafif()
# 1 otherwise.
ipv6if()
{
- local _if i
+ local _if _tmpargs i
_if=$1
if ! afexists inet6; then
@@ -396,6 +407,18 @@ ipv6if()
;;
esac
+ # True if $ifconfig_IF_ipv6 is defined.
+ _tmpargs=`_ifconfig_getargs $_if ipv6`
+ if [ -n "${_tmpargs}" ]; then
+ return 0
+ fi
+
+ # backward compatibility: True if $ipv6_ifconfig_IF is defined.
+ _tmpargs=`get_if_var $_if ipv6_ifconfig_IF`
+ if [ -n "${_tmpargs}" ]; then
+ return 0
+ fi
+
case "${ipv6_network_interfaces}" in
[Aa][Uu][Tt][Oo])
return 0
@@ -431,17 +454,30 @@ ipv6_autoconfif()
if checkyesno ipv6_gateway_enable; then
return 1
fi
+ _tmpargs=`get_if_var $_if ipv6_prefix_IF`
+ if [ -n "${_tmpargs}" ]; then
+ return 1
+ fi
case $_if in
lo0|\
stf[0-9]*|\
faith[0-9]*|\
lp[0-9]*|\
- sl[0-9]*)
+ sl[0-9]*|\
+ pflog[0-9]*|\
+ pfsync[0-9]*)
return 1
;;
esac
+ # backward compatibility: $ipv6_enable
+ case $ipv6_enable in
+ [Yy][Ee][Ss])
+ return 0
+ ;;
+ esac
+
_tmpargs=`_ifconfig_getargs $_if ipv6`
for _arg in $_tmpargs; do
case $_arg in
@@ -451,6 +487,16 @@ ipv6_autoconfif()
esac
done
+ # backward compatibility: $ipv6_ifconfig_IF
+ _tmpargs=`get_if_var $_if ipv6_ifconfig_IF`
+ for _arg in $_tmpargs; do
+ case $_arg in
+ accept_rtadv)
+ return 0
+ ;;
+ esac
+ done
+
return 1
}
@@ -691,7 +737,7 @@ ifalias_ipv6_up()
;;
*)
ifconfig $1 inet6 ${ifconfig_args} alias && _ret=0
- warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete."
+ warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete." \
" Use ifconfig_$1_aliasN instead."
;;
esac
@@ -773,6 +819,7 @@ ifalias_ipv6_down()
done
# backward compatibility: ipv6_ifconfig_IF_aliasN.
+ alias=0
while : ; do
ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF_alias${alias}`
case "${ifconfig_args}" in
@@ -780,13 +827,12 @@ ifalias_ipv6_down()
break
;;
*)
- ifconfig $1 inet6 ${ifconfig_args} -alias
- alias=$((${alias} + 1))
- warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete."
+ ifconfig $1 inet6 ${ifconfig_args} -alias && _ret=0
+ warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete." \
" Use ifconfig_$1_aliasN instead."
- _ret=0
;;
esac
+ alias=$((${alias} + 1))
done
return $_ret
Modified: projects/quota64/etc/rc.d/defaultroute
==============================================================================
--- projects/quota64/etc/rc.d/defaultroute Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/etc/rc.d/defaultroute Sat Sep 26 23:25:22 2009 (r197533)
@@ -6,7 +6,7 @@
#
# PROVIDE: defaultroute
-# REQUIRE: devd netif
+# REQUIRE: devd faith netif stf
# KEYWORD: nojail
. /etc/rc.subr
Modified: projects/quota64/etc/rc.d/ip6addrctl
==============================================================================
--- projects/quota64/etc/rc.d/ip6addrctl Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/etc/rc.d/ip6addrctl Sat Sep 26 23:25:22 2009 (r197533)
@@ -19,6 +19,8 @@ status_cmd="ip6addrctl"
prefer_ipv6_cmd="ip6addrctl_prefer_ipv6"
prefer_ipv4_cmd="ip6addrctl_prefer_ipv4"
+set_rcvar_obsolete ipv6_enable ipv6_prefer
+
ip6addrctl_prefer_ipv6()
{
ip6addrctl flush >/dev/null 2>&1
Modified: projects/quota64/etc/rc.d/netif
==============================================================================
--- projects/quota64/etc/rc.d/netif Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/etc/rc.d/netif Sat Sep 26 23:25:22 2009 (r197533)
@@ -41,7 +41,7 @@ clonedown_cmd="clone_down"
extra_commands="cloneup clonedown"
cmdifn=
-set_rcvar_obsolete ipv6_enable
+set_rcvar_obsolete ipv6_enable ipv6_prefer
network_start()
{
Modified: projects/quota64/etc/rc.d/routing
==============================================================================
--- projects/quota64/etc/rc.d/routing Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/etc/rc.d/routing Sat Sep 26 23:25:22 2009 (r197533)
@@ -6,7 +6,7 @@
#
# PROVIDE: routing
-# REQUIRE: netif ppp
+# REQUIRE: faith netif ppp stf
# KEYWORD: nojail
. /etc/rc.subr
Modified: projects/quota64/etc/rc.d/rtadvd
==============================================================================
--- projects/quota64/etc/rc.d/rtadvd Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/etc/rc.d/rtadvd Sat Sep 26 23:25:22 2009 (r197533)
@@ -43,7 +43,10 @@ rtadvd_precmd()
case ${rtadvd_interfaces} in
[Aa][Uu][Tt][Oo]|'')
for i in `ifconfig -l` ; do
- if is_wired_interface $1; then
+ case $i in
+ lo0) continue ;;
+ esac
+ if ipv6if $i; then
rtadvd_interfaces="${rtadvd_interfaces} ${i}"
fi
done
Modified: projects/quota64/lib/libc/stdlib/malloc.3
==============================================================================
--- projects/quota64/lib/libc/stdlib/malloc.3 Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/lib/libc/stdlib/malloc.3 Sat Sep 26 23:25:22 2009 (r197533)
@@ -32,7 +32,7 @@
.\" @(#)malloc.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd August 26, 2008
+.Dd September 26, 2009
.Dt MALLOC 3
.Os
.Sh NAME
@@ -245,7 +245,8 @@ will be initialized to 0x5a.
This is intended for debugging and will impact performance negatively.
.It K
Double/halve the virtual memory chunk size.
-The default chunk size is 1 MB.
+The default chunk size is the maximum of 1 MB and the largest
+page size that is less than or equal to 4 MB.
.It M
Use
.Xr mmap 2
@@ -561,6 +562,7 @@ _malloc_options = "X";
.Xr alloca 3 ,
.Xr atexit 3 ,
.Xr getpagesize 3 ,
+.Xr getpagesizes 3 ,
.Xr memory 3 ,
.Xr posix_memalign 3
.Sh STANDARDS
Modified: projects/quota64/lib/libc/stdlib/malloc.c
==============================================================================
--- projects/quota64/lib/libc/stdlib/malloc.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/lib/libc/stdlib/malloc.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -4795,6 +4795,21 @@ malloc_init_hard(void)
}
}
+ /*
+ * Increase the chunk size to the largest page size that is greater
+ * than the default chunk size and less than or equal to 4MB.
+ */
+ {
+ size_t pagesizes[MAXPAGESIZES];
+ int k, nsizes;
+
+ nsizes = getpagesizes(pagesizes, MAXPAGESIZES);
+ for (k = 0; k < nsizes; k++)
+ if (pagesizes[k] <= (1LU << 22))
+ while ((1LU << opt_chunk_2pow) < pagesizes[k])
+ opt_chunk_2pow++;
+ }
+
for (i = 0; i < 3; i++) {
unsigned j;
Modified: projects/quota64/libexec/rpc.rquotad/rquotad.c
==============================================================================
--- projects/quota64/libexec/rpc.rquotad/rquotad.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/libexec/rpc.rquotad/rquotad.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -32,12 +32,11 @@ __FBSDID("$FreeBSD$");
#include <syslog.h>
#include <unistd.h>
-void rquota_service(struct svc_req *request, SVCXPRT *transp);
-void sendquota(struct svc_req *request, SVCXPRT *transp);
-void printerr_reply(SVCXPRT *transp);
-void initfs(void);
-int getfsquota(long id, char *path, struct dqblk *dqblk);
-int hasquota(struct fstab *fs, char **qfnamep);
+static void rquota_service(struct svc_req *request, SVCXPRT *transp);
+static void sendquota(struct svc_req *request, SVCXPRT *transp);
+static void initfs(void);
+static int getfsquota(long id, char *path, struct dqblk *dqblk);
+static int hasquota(struct fstab *fs, char **qfnamep);
/*
* structure containing informations about ufs filesystems
@@ -49,9 +48,9 @@ struct fs_stat {
char *qfpathname; /* pathname of the quota file */
dev_t st_dev; /* device of the filesystem */
} fs_stat;
-struct fs_stat *fs_begin = NULL;
+static struct fs_stat *fs_begin = NULL;
-int from_inetd = 1;
+static int from_inetd = 1;
static void
cleanup(int sig)
@@ -112,7 +111,7 @@ main(void)
exit(1);
}
-void
+static void
rquota_service(struct svc_req *request, SVCXPRT *transp)
{
@@ -135,7 +134,7 @@ rquota_service(struct svc_req *request,
}
/* read quota for the specified id, and send it */
-void
+static void
sendquota(struct svc_req *request, SVCXPRT *transp)
{
struct getquota_args getq_args;
@@ -184,26 +183,8 @@ sendquota(struct svc_req *request, SVCXP
}
}
-void
-printerr_reply(SVCXPRT *transp) /* when a reply to a request failed */
-{
- char name[INET6_ADDRSTRLEN];
- struct sockaddr *caller;
- int save_errno;
-
- save_errno = errno;
- caller = (struct sockaddr *)svc_getrpccaller(transp)->buf;
- getnameinfo(caller, caller->sa_len, name, sizeof (name),
- NULL, 0, NI_NUMERICHOST);
- errno = save_errno;
- if (errno == 0)
- syslog(LOG_ERR, "couldn't send reply to %s", name);
- else
- syslog(LOG_ERR, "couldn't send reply to %s: %m", name);
-}
-
/* initialise the fs_tab list from entries in /etc/fstab */
-void
+static void
initfs(void)
{
struct fs_stat *fs_current = NULL;
@@ -241,7 +222,7 @@ initfs(void)
* gets the quotas for id, filesystem path.
* Return 0 if fail, 1 otherwise
*/
-int
+static int
getfsquota(long id, char *path, struct dqblk *dqblk)
{
struct quotafile *qf;
@@ -281,7 +262,7 @@ getfsquota(long id, char *path, struct d
* Check to see if a particular quota is to be enabled.
* Comes from quota.c, NetBSD 0.9
*/
-int
+static int
hasquota(struct fstab *fs, char **qfnamep)
{
static char initname, usrname[100];
Modified: projects/quota64/sbin/ifconfig/ifconfig.8
==============================================================================
--- projects/quota64/sbin/ifconfig/ifconfig.8 Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sbin/ifconfig/ifconfig.8 Sat Sep 26 23:25:22 2009 (r197533)
@@ -28,7 +28,7 @@
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
.\" $FreeBSD$
.\"
-.Dd September 2, 2009
+.Dd September 23, 2009
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -598,7 +598,10 @@ If the interface was reset when previous
the hardware will be re-initialized.
.El
.Pp
-The following parameters are for ICMPv6 Neightbor Discovery Protocol:
+The following parameters are for ICMPv6 Neightbor Discovery Protocol.
+Note that the address family keyword
+.Dq Li inet6
+is needed for them:
.Bl -tag -width indent
.It Cm accept_rtadv
Set a flag to enable accepting ICMPv6 Router Advertisement messages.
@@ -619,7 +622,10 @@ Clear a flag
.Cm defaultif .
.It Cm ifdisabled
Set a flag to disable all of IPv6 network communications on the
-specified interface.
+specified interface. Note that if there are already configured IPv6
+addresses on that interface, all of them are marked as
+.Dq tentative
+and DAD will be performed when this flag is cleared.
.It Cm -ifdisabled
Clear a flag
.Cm ifdisabled .
Modified: projects/quota64/share/man/man4/Makefile
==============================================================================
--- projects/quota64/share/man/man4/Makefile Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/share/man/man4/Makefile Sat Sep 26 23:25:22 2009 (r197533)
@@ -173,6 +173,7 @@ MAN= aac.4 \
le.4 \
led.4 \
lge.4 \
+ ${_lindev.4} \
${_linux.4} \
lmc.4 \
lo.4 \
@@ -625,6 +626,7 @@ _if_urtw.4= if_urtw.4
_if_wpi.4= if_wpi.4
_ipmi.4= ipmi.4
_io.4= io.4
+_lindev.4= lindev.4
_linux.4= linux.4
_ndis.4= ndis.4
_nfe.4= nfe.4
@@ -636,6 +638,8 @@ _speaker.4= speaker.4
_spkr.4= spkr.4
_urtw.4= urtw.4
_wpi.4= wpi.4
+
+MLINKS+=lindev.4 full.4
.endif
.if exists(${.CURDIR}/man4.${MACHINE_ARCH})
Copied: projects/quota64/share/man/man4/lindev.4 (from r197532, head/share/man/man4/lindev.4)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/quota64/share/man/man4/lindev.4 Sat Sep 26 23:25:22 2009 (r197533, copy of r197532, head/share/man/man4/lindev.4)
@@ -0,0 +1,73 @@
+.\"-
+.\" Copyright (c) 2009 "Bjoern A. Zeeb" <bz at 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 26, 2009
+.Dt LINDEV 4
+.Os
+.Sh NAME
+.Nm lindev
+.Nd the lindev module
+.Sh SYNOPSIS
+To compile this collection of linux-specific pseudo devices into the kernel,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device lindev"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+lindev_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+module provides a collection of linux-specific pseudo devices.
+.Sh DEVICES
+.Bl -tag -width /dev/full
+.It Pa /dev/full
+The
+.Xr full
+device always returns
+.Er ENOSPC
+on write attempts.
+For reads it emulates
+.Xr zero 4 .
+.El
+.Sh FILES
+.Bl -tag -width /dev/full
+.It Pa /dev/full
+.El
+.Sh SEE ALSO
+.Xr null 4 ,
+.Xr zero 4
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 9.0 .
Modified: projects/quota64/share/man/man5/rc.conf.5
==============================================================================
--- projects/quota64/share/man/man5/rc.conf.5 Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/share/man/man5/rc.conf.5 Sat Sep 26 23:25:22 2009 (r197533)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 17, 2009
+.Dd September 23, 2009
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -1246,28 +1246,85 @@ It is also possible to rename interface
ifconfig_ed0_name="net0"
ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00"
.Ed
+.It Va ipv6_enable
+.Pq Vt bool
+If the variable is
+.Dq Li YES ,
+.Dq Li inet6 accept_rtadv
+is added to all of
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
+and the
+.Va ipv6_prefer
+is defined as
+.Dq Li YES .
+.Pp
+This variable is deprecated. Use
+.Va ipv6_prefer
+and
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 .
+.It Va ipv6_prefer
+.Pq Vt bool
+This variable does the following:
+.Pp
+If the variable is
+.Dq Li YES ,
+the default policy of the source address selection set by
+.Xr ip6addrctl 8
+will be IPv6-preferred.
+.Pp
+If the variable is
+.Dq Li NO ,
+the default policy of the source address selection set by
+.Xr ip6addrctl 8
+will be IPv4-preferred, and all of interfaces which does not have the
+corrsponding
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
+variable will be marked as
+.Dq Li IFDISABLED .
+This means only IPv6 functionality on that interface is completely
+disabled. For more details of
+.Dq Li IFDISABLED
+flag and keywords
+.Dq Li inet6 ifdisabled ,
+see
+.Xr ifconfig 8 .
+.Pp
.It Va ipv6_network_interfaces
.Pq Vt str
This is the IPv6 equivalent of
.Va network_interfaces .
-Instead of setting the ifconfig variables as
-.Va ifconfig_ Ns Aq Ar interface
-they should be set as
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6.
-Aliases should be set as
-.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n .
-.Va ipv6_prefix_ Ns Aq Ar interface
-does something.
-Interfaces that have a
-.Fl accept_rtadv
-flag in
+Normally manual configuration of this variable is not needed.
+.Pp
+IPv6 functionality on an interface should be configured by
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 ,
+instead of setting ifconfig parameters in
+.Va ifconfig_ Ns Aq Ar interface .
+Aliases should be set by
+.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
+with
+.Dq Li inet6
+keyword. For example:
+.Bd -literal
+ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64"
+ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64"
+.Ed
+.Pp
+Interfaces that have an
+.Dq Li inet6 accept_rtadv
+keyword in
.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
setting will be automatically configured by
-.Xr rtsol 8
-if the
+.Xr rtsol 8 .
+Note that this automatic configuration is disabled if the
.Va ipv6_gateway_enable
is set to
-.Dq Li NO .
+.Dq Li YES .
+.It Va ipv6_prefix_ Ns Aq Ar interface
+.Pq Vt str
+If one or more prefixes are defined in
+.Va ipv6_prefix_ Ns Aq Ar interface
+addresses based on each prefix and the EUI-64 interface index will be
+configured on that interface.
.It Va ipv6_default_interface
.Pq Vt str
If not set to
Modified: projects/quota64/sys/amd64/conf/NOTES
==============================================================================
--- projects/quota64/sys/amd64/conf/NOTES Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/amd64/conf/NOTES Sat Sep 26 23:25:22 2009 (r197533)
@@ -517,3 +517,6 @@ options VM_KMEM_SIZE_SCALE
# Enable NDIS binary driver support
options NDISAPI
device ndis
+
+# Linux-specific pseudo devices support
+device lindev
Modified: projects/quota64/sys/arm/arm/identcpu.c
==============================================================================
--- projects/quota64/sys/arm/arm/identcpu.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/arm/arm/identcpu.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -54,30 +54,12 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpuconf.h>
+#include <machine/md_var.h>
char machine[] = "arm";
SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD,
machine, 0, "Machine class");
-enum cpu_class {
- CPU_CLASS_NONE,
- CPU_CLASS_ARM2,
- CPU_CLASS_ARM2AS,
- CPU_CLASS_ARM3,
- CPU_CLASS_ARM6,
- CPU_CLASS_ARM7,
- CPU_CLASS_ARM7TDMI,
- CPU_CLASS_ARM8,
- CPU_CLASS_ARM9TDMI,
- CPU_CLASS_ARM9ES,
- CPU_CLASS_ARM9EJS,
- CPU_CLASS_ARM10E,
- CPU_CLASS_ARM10EJ,
- CPU_CLASS_SA1,
- CPU_CLASS_XSCALE,
- CPU_CLASS_ARM11J,
- CPU_CLASS_MARVELL
-};
static const char * const generic_steppings[16] = {
"rev 0", "rev 1", "rev 2", "rev 3",
@@ -372,11 +354,11 @@ static const char * const wtnames[] = {
extern int ctrl;
+enum cpu_class cpu_class = CPU_CLASS_NONE;
void
identify_arm_cpu(void)
{
u_int cpuid;
- enum cpu_class cpu_class = CPU_CLASS_NONE;
int i;
cpuid = cpu_id();
Modified: projects/quota64/sys/arm/include/md_var.h
==============================================================================
--- projects/quota64/sys/arm/include/md_var.h Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/arm/include/md_var.h Sat Sep 26 23:25:22 2009 (r197533)
@@ -48,6 +48,27 @@ extern int _min_bzero_size;
#define SRC_IS_USER 0x2
#define IS_PHYSICAL 0x4
+enum cpu_class {
+ CPU_CLASS_NONE,
+ CPU_CLASS_ARM2,
+ CPU_CLASS_ARM2AS,
+ CPU_CLASS_ARM3,
+ CPU_CLASS_ARM6,
+ CPU_CLASS_ARM7,
+ CPU_CLASS_ARM7TDMI,
+ CPU_CLASS_ARM8,
+ CPU_CLASS_ARM9TDMI,
+ CPU_CLASS_ARM9ES,
+ CPU_CLASS_ARM9EJS,
+ CPU_CLASS_ARM10E,
+ CPU_CLASS_ARM10EJ,
+ CPU_CLASS_SA1,
+ CPU_CLASS_XSCALE,
+ CPU_CLASS_ARM11J,
+ CPU_CLASS_MARVELL
+};
+extern enum cpu_class cpu_class;
+
struct dumperinfo;
extern int busdma_swi_pending;
void busdma_swi(void);
Modified: projects/quota64/sys/boot/forth/loader.conf
==============================================================================
--- projects/quota64/sys/boot/forth/loader.conf Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/boot/forth/loader.conf Sat Sep 26 23:25:22 2009 (r197533)
@@ -179,6 +179,7 @@ screensave_name="green_saver" # Set to t
ibcs2_load="NO" # IBCS2 (SCO) emulation
ibcs2_coff_load="NO"
linux_load="NO" # Linux emulation
+lindev_load="NO" # Linux-specific pseudo devices (see lindev(4))
svr4_load="NO" # SystemV R4 emulation
streams_load="NO" # System V streams module
Modified: projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
==============================================================================
--- projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -595,7 +595,6 @@ found:
if (vp->v_flag & V_XATTRDIR)
VI_LOCK(fp->gfs_parent);
VI_LOCK(vp);
- ASSERT(vp->v_count < 2);
/*
* Really remove this vnode
*/
@@ -607,12 +606,7 @@ found:
*/
ge->gfse_vnode = NULL;
}
- if (vp->v_count == 1) {
- vp->v_usecount--;
- vdropl(vp);
- } else {
- VI_UNLOCK(vp);
- }
+ VI_UNLOCK(vp);
/*
* Free vnode and release parent
@@ -1084,18 +1078,16 @@ gfs_vop_inactive(ap)
{
vnode_t *vp = ap->a_vp;
gfs_file_t *fp = vp->v_data;
- void *data;
if (fp->gfs_type == GFS_DIR)
- data = gfs_dir_inactive(vp);
+ gfs_dir_inactive(vp);
else
- data = gfs_file_inactive(vp);
-
- if (data != NULL)
- kmem_free(data, fp->gfs_size);
+ gfs_file_inactive(vp);
VI_LOCK(vp);
vp->v_data = NULL;
VI_UNLOCK(vp);
+ kmem_free(fp, fp->gfs_size);
+
return (0);
}
Modified: projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -818,7 +818,11 @@ zfsctl_snapdir_lookup(ap)
if ((sep = avl_find(&sdp->sd_snaps, &search, &where)) != NULL) {
*vpp = sep->se_root;
VN_HOLD(*vpp);
- if ((*vpp)->v_mountedhere == NULL) {
+ err = traverse(vpp, LK_EXCLUSIVE | LK_RETRY);
+ if (err) {
+ VN_RELE(*vpp);
+ *vpp = NULL;
+ } else if (*vpp == sep->se_root) {
/*
* The snapshot was unmounted behind our backs,
* try to remount it.
@@ -832,10 +836,9 @@ zfsctl_snapdir_lookup(ap)
*/
(*vpp)->v_flag &= ~VROOT;
}
- vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
mutex_exit(&sdp->sd_lock);
ZFS_EXIT(zfsvfs);
- return (0);
+ return (err);
}
/*
@@ -895,6 +898,8 @@ domount:
}
mutex_exit(&sdp->sd_lock);
ZFS_EXIT(zfsvfs);
+ if (err != 0)
+ *vpp = NULL;
return (err);
}
@@ -1002,15 +1007,24 @@ zfsctl_snapdir_inactive(ap)
{
vnode_t *vp = ap->a_vp;
zfsctl_snapdir_t *sdp = vp->v_data;
- void *private;
+ zfs_snapentry_t *sep;
- private = gfs_dir_inactive(vp);
- if (private != NULL) {
- ASSERT(avl_numnodes(&sdp->sd_snaps) == 0);
- mutex_destroy(&sdp->sd_lock);
- avl_destroy(&sdp->sd_snaps);
- kmem_free(private, sizeof (zfsctl_snapdir_t));
+ /*
+ * On forced unmount we have to free snapshots from here.
+ */
+ mutex_enter(&sdp->sd_lock);
+ while ((sep = avl_first(&sdp->sd_snaps)) != NULL) {
+ avl_remove(&sdp->sd_snaps, sep);
+ kmem_free(sep->se_name, strlen(sep->se_name) + 1);
+ kmem_free(sep, sizeof (zfs_snapentry_t));
}
+ mutex_exit(&sdp->sd_lock);
+ gfs_dir_inactive(vp);
+ ASSERT(avl_numnodes(&sdp->sd_snaps) == 0);
+ mutex_destroy(&sdp->sd_lock);
+ avl_destroy(&sdp->sd_snaps);
+ kmem_free(sdp, sizeof (zfsctl_snapdir_t));
+
return (0);
}
@@ -1068,6 +1082,9 @@ zfsctl_snapshot_inactive(ap)
int locked;
vnode_t *dvp;
+ if (vp->v_count > 0)
+ goto end;
+
VERIFY(gfs_dir_lookup(vp, "..", &dvp, cr, 0, NULL, NULL) == 0);
sdp = dvp->v_data;
VOP_UNLOCK(dvp, 0);
@@ -1075,11 +1092,6 @@ zfsctl_snapshot_inactive(ap)
if (!(locked = MUTEX_HELD(&sdp->sd_lock)))
mutex_enter(&sdp->sd_lock);
- if (vp->v_count > 1) {
- if (!locked)
- mutex_exit(&sdp->sd_lock);
- return (0);
- }
ASSERT(!vn_ismntpt(vp));
sep = avl_first(&sdp->sd_snaps);
@@ -1099,6 +1111,7 @@ zfsctl_snapshot_inactive(ap)
if (!locked)
mutex_exit(&sdp->sd_lock);
VN_RELE(dvp);
+end:
VFS_RELE(vp->v_vfsp);
/*
Modified: projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -1107,8 +1107,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
if (zfsvfs->z_issnap) {
vnode_t *svp = vfsp->mnt_vnodecovered;
- ASSERT(svp->v_count == 2 || svp->v_count == 1);
- if (svp->v_count == 2)
+ if (svp->v_count >= 2)
VN_RELE(svp);
}
zfs_freevfs(vfsp);
Modified: projects/quota64/sys/conf/files.amd64
==============================================================================
--- projects/quota64/sys/conf/files.amd64 Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/conf/files.amd64 Sat Sep 26 23:25:22 2009 (r197533)
@@ -208,6 +208,8 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc
dev/hwpmc/hwpmc_tsc.c optional hwpmc
dev/hwpmc/hwpmc_x86.c optional hwpmc
dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd
+dev/lindev/full.c optional lindev
+dev/lindev/lindev.c optional lindev
dev/mem/memutil.c optional mem
dev/nfe/if_nfe.c optional nfe pci
dev/nve/if_nve.c optional nve pci
Modified: projects/quota64/sys/conf/files.i386
==============================================================================
--- projects/quota64/sys/conf/files.i386 Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/conf/files.i386 Sat Sep 26 23:25:22 2009 (r197533)
@@ -201,6 +201,8 @@ dev/ipmi/ipmi_pci.c optional ipmi pci
dev/ipmi/ipmi_linux.c optional ipmi compat_linux
dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd
dev/le/if_le_isa.c optional le isa
+dev/lindev/full.c optional lindev
+dev/lindev/lindev.c optional lindev
dev/mem/memutil.c optional mem
dev/mse/mse.c optional mse
dev/mse/mse_isa.c optional mse isa
Modified: projects/quota64/sys/conf/files.pc98
==============================================================================
--- projects/quota64/sys/conf/files.pc98 Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/conf/files.pc98 Sat Sep 26 23:25:22 2009 (r197533)
@@ -107,6 +107,8 @@ dev/hwpmc/hwpmc_x86.c optional hwpmc
dev/io/iodev.c optional io
dev/kbd/kbd.c optional pckbd | sc | ukbd | usb2_input_kbd
dev/le/if_le_cbus.c optional le isa
+dev/lindev/full.c optional lindev
+dev/lindev/lindev.c optional lindev
dev/mem/memutil.c optional mem
dev/mse/mse.c optional mse
dev/mse/mse_cbus.c optional mse isa
Modified: projects/quota64/sys/dev/syscons/scterm-teken.c
==============================================================================
--- projects/quota64/sys/dev/syscons/scterm-teken.c Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/dev/syscons/scterm-teken.c Sat Sep 26 23:25:22 2009 (r197533)
@@ -313,11 +313,11 @@ scteken_attr(const teken_attr_t *a)
teken_color_t fg, bg;
if (a->ta_format & TF_REVERSE) {
- fg = a->ta_bgcolor;
- bg = a->ta_fgcolor;
+ fg = teken_256to8(a->ta_bgcolor);
+ bg = teken_256to8(a->ta_fgcolor);
} else {
- fg = a->ta_fgcolor;
- bg = a->ta_bgcolor;
+ fg = teken_256to8(a->ta_fgcolor);
+ bg = teken_256to8(a->ta_bgcolor);
}
if (a->ta_format & TF_BOLD)
attr |= fgcolors_bold[fg];
Modified: projects/quota64/sys/i386/conf/NOTES
==============================================================================
--- projects/quota64/sys/i386/conf/NOTES Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/i386/conf/NOTES Sat Sep 26 23:25:22 2009 (r197533)
@@ -880,6 +880,9 @@ device streams # STREAMS network drive
options NDISAPI
device ndis
+# Linux-specific pseudo devices support
+device lindev
+
#####################################################################
# VM OPTIONS
Modified: projects/quota64/sys/modules/Makefile
==============================================================================
--- projects/quota64/sys/modules/Makefile Sat Sep 26 23:16:06 2009 (r197532)
+++ projects/quota64/sys/modules/Makefile Sat Sep 26 23:25:22 2009 (r197533)
@@ -151,6 +151,7 @@ SUBDIR= ${_3dfx} \
libiconv \
libmbpool \
libmchain \
+ ${_lindev} \
${_linprocfs} \
${_linsysfs} \
${_linux} \
@@ -373,6 +374,7 @@ _ie= ie
_if_ndis= if_ndis
_igb= igb
_io= io
+_lindev= lindev
_linprocfs= linprocfs
_linsysfs= linsysfs
_linux= linux
@@ -510,6 +512,7 @@ _ipwfw= ipwfw
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list