svn commit: r222783 - in projects/largeSMP: bin/sh contrib/top etc
lib/libiconv release/ia64 sbin/geom/class/part
sbin/geom/class/sched sbin/ifconfig sbin/ipfw sbin/mount
sbin/rcorder share/man/man...
Attilio Rao
attilio at FreeBSD.org
Mon Jun 6 21:38:40 UTC 2011
Author: attilio
Date: Mon Jun 6 21:38:39 2011
New Revision: 222783
URL: http://svn.freebsd.org/changeset/base/222783
Log:
MFC
Added:
projects/largeSMP/sys/netinet/in_pcbgroup.c
- copied unchanged from r222782, head/sys/netinet/in_pcbgroup.c
projects/largeSMP/sys/netinet6/in6_pcbgroup.c
- copied unchanged from r222782, head/sys/netinet6/in6_pcbgroup.c
projects/largeSMP/tools/regression/bin/sh/expansion/heredoc1.0
- copied unchanged from r222782, head/tools/regression/bin/sh/expansion/heredoc1.0
projects/largeSMP/tools/regression/bin/sh/expansion/heredoc2.0
- copied unchanged from r222782, head/tools/regression/bin/sh/expansion/heredoc2.0
Modified:
projects/largeSMP/bin/sh/eval.c
projects/largeSMP/bin/sh/options.c
projects/largeSMP/etc/network.subr
projects/largeSMP/lib/libiconv/Makefile
projects/largeSMP/release/ia64/mkisoimages.sh
projects/largeSMP/sbin/geom/class/part/gpart.8
projects/largeSMP/sbin/geom/class/sched/Makefile
projects/largeSMP/sbin/ifconfig/af_inet6.c
projects/largeSMP/sbin/ifconfig/af_nd6.c
projects/largeSMP/sbin/ipfw/main.c
projects/largeSMP/sbin/mount/mount.8
projects/largeSMP/sbin/rcorder/rcorder.8
projects/largeSMP/share/man/man4/amdsbwd.4
projects/largeSMP/sys/amd64/amd64/mp_machdep.c
projects/largeSMP/sys/cddl/compat/opensolaris/sys/atomic.h
projects/largeSMP/sys/conf/files
projects/largeSMP/sys/conf/options
projects/largeSMP/sys/dev/ath/if_ath.c
projects/largeSMP/sys/dev/cardbus/cardbus_cis.c
projects/largeSMP/sys/dev/cxgbe/adapter.h
projects/largeSMP/sys/dev/cxgbe/t4_main.c
projects/largeSMP/sys/dev/cxgbe/t4_sge.c
projects/largeSMP/sys/dev/pccard/pccard.c
projects/largeSMP/sys/dev/pci/pci.c
projects/largeSMP/sys/dev/puc/pucdata.c
projects/largeSMP/sys/fs/nfs/nfs_var.h
projects/largeSMP/sys/fs/nfsclient/nfs_clport.c
projects/largeSMP/sys/fs/nfsclient/nfs_clrpcops.c
projects/largeSMP/sys/fs/nfsclient/nfs_clstate.c
projects/largeSMP/sys/fs/nfsclient/nfs_clvnops.c
projects/largeSMP/sys/i386/i386/mp_machdep.c
projects/largeSMP/sys/ia64/acpica/acpi_machdep.c
projects/largeSMP/sys/ia64/ia64/machdep.c
projects/largeSMP/sys/ia64/ia64/pal.S
projects/largeSMP/sys/kern/subr_rman.c
projects/largeSMP/sys/netinet/icmp6.h
projects/largeSMP/sys/netinet/in_pcb.c
projects/largeSMP/sys/netinet/in_pcb.h
projects/largeSMP/sys/netinet/ip_divert.c
projects/largeSMP/sys/netinet/ipfw/ip_fw2.c
projects/largeSMP/sys/netinet/ipfw/ip_fw_sockopt.c
projects/largeSMP/sys/netinet/raw_ip.c
projects/largeSMP/sys/netinet/tcp_subr.c
projects/largeSMP/sys/netinet/tcp_syncache.c
projects/largeSMP/sys/netinet/udp_usrreq.c
projects/largeSMP/sys/netinet6/in6.c
projects/largeSMP/sys/netinet6/in6.h
projects/largeSMP/sys/netinet6/in6_pcb.c
projects/largeSMP/sys/netinet6/in6_pcb.h
projects/largeSMP/sys/netinet6/in6_proto.c
projects/largeSMP/sys/netinet6/ip6_var.h
projects/largeSMP/sys/netinet6/nd6.c
projects/largeSMP/sys/netinet6/nd6.h
projects/largeSMP/sys/netinet6/nd6_nbr.c
projects/largeSMP/sys/netinet6/nd6_rtr.c
projects/largeSMP/sys/netinet6/send.h
projects/largeSMP/sys/sys/mbuf.h
projects/largeSMP/sys/sys/soundcard.h
projects/largeSMP/sys/ufs/ffs/ffs_alloc.c
projects/largeSMP/usr.bin/calendar/io.c
projects/largeSMP/usr.bin/grep/Makefile
projects/largeSMP/usr.bin/iconv/Makefile
projects/largeSMP/usr.bin/kdump/mksubr
projects/largeSMP/usr.bin/rctl/Makefile
projects/largeSMP/usr.bin/su/su.1
projects/largeSMP/usr.sbin/bluetooth/ath3kfw/Makefile
projects/largeSMP/usr.sbin/bsdinstall/scripts/netconfig_ipv6
projects/largeSMP/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile
projects/largeSMP/usr.sbin/lastlogin/lastlogin.8
projects/largeSMP/usr.sbin/lastlogin/lastlogin.c
projects/largeSMP/usr.sbin/rtadvd/advcap.c
projects/largeSMP/usr.sbin/rtadvd/config.c
projects/largeSMP/usr.sbin/rtadvd/config.h
projects/largeSMP/usr.sbin/rtadvd/dump.c
projects/largeSMP/usr.sbin/rtadvd/dump.h
projects/largeSMP/usr.sbin/rtadvd/if.c
projects/largeSMP/usr.sbin/rtadvd/if.h
projects/largeSMP/usr.sbin/rtadvd/pathnames.h
projects/largeSMP/usr.sbin/rtadvd/rrenum.c
projects/largeSMP/usr.sbin/rtadvd/rrenum.h
projects/largeSMP/usr.sbin/rtadvd/rtadvd.8
projects/largeSMP/usr.sbin/rtadvd/rtadvd.c
projects/largeSMP/usr.sbin/rtadvd/rtadvd.conf
projects/largeSMP/usr.sbin/rtadvd/rtadvd.conf.5
projects/largeSMP/usr.sbin/rtadvd/rtadvd.h
projects/largeSMP/usr.sbin/rtadvd/timer.c
projects/largeSMP/usr.sbin/rtadvd/timer.h
projects/largeSMP/usr.sbin/rtsold/Makefile
projects/largeSMP/usr.sbin/rtsold/dump.c
projects/largeSMP/usr.sbin/rtsold/if.c
projects/largeSMP/usr.sbin/rtsold/probe.c
projects/largeSMP/usr.sbin/rtsold/rtsock.c
projects/largeSMP/usr.sbin/rtsold/rtsol.c
projects/largeSMP/usr.sbin/rtsold/rtsold.8
projects/largeSMP/usr.sbin/rtsold/rtsold.c
projects/largeSMP/usr.sbin/rtsold/rtsold.h
projects/largeSMP/usr.sbin/tcpdrop/tcpdrop.c
Directory Properties:
projects/largeSMP/ (props changed)
projects/largeSMP/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/contrib/bind9/ (props changed)
projects/largeSMP/contrib/binutils/ (props changed)
projects/largeSMP/contrib/bzip2/ (props changed)
projects/largeSMP/contrib/compiler-rt/ (props changed)
projects/largeSMP/contrib/dialog/ (props changed)
projects/largeSMP/contrib/ee/ (props changed)
projects/largeSMP/contrib/expat/ (props changed)
projects/largeSMP/contrib/file/ (props changed)
projects/largeSMP/contrib/gcc/ (props changed)
projects/largeSMP/contrib/gdb/ (props changed)
projects/largeSMP/contrib/gdtoa/ (props changed)
projects/largeSMP/contrib/gnu-sort/ (props changed)
projects/largeSMP/contrib/groff/ (props changed)
projects/largeSMP/contrib/less/ (props changed)
projects/largeSMP/contrib/libpcap/ (props changed)
projects/largeSMP/contrib/libstdc++/ (props changed)
projects/largeSMP/contrib/llvm/ (props changed)
projects/largeSMP/contrib/llvm/tools/clang/ (props changed)
projects/largeSMP/contrib/ncurses/ (props changed)
projects/largeSMP/contrib/netcat/ (props changed)
projects/largeSMP/contrib/ntp/ (props changed)
projects/largeSMP/contrib/one-true-awk/ (props changed)
projects/largeSMP/contrib/openbsm/ (props changed)
projects/largeSMP/contrib/openpam/ (props changed)
projects/largeSMP/contrib/pf/ (props changed)
projects/largeSMP/contrib/sendmail/ (props changed)
projects/largeSMP/contrib/tcpdump/ (props changed)
projects/largeSMP/contrib/tcsh/ (props changed)
projects/largeSMP/contrib/top/ (props changed)
projects/largeSMP/contrib/top/install-sh (props changed)
projects/largeSMP/contrib/tzcode/stdtime/ (props changed)
projects/largeSMP/contrib/tzcode/zic/ (props changed)
projects/largeSMP/contrib/tzdata/ (props changed)
projects/largeSMP/contrib/wpa/ (props changed)
projects/largeSMP/contrib/xz/ (props changed)
projects/largeSMP/crypto/openssh/ (props changed)
projects/largeSMP/crypto/openssl/ (props changed)
projects/largeSMP/gnu/lib/ (props changed)
projects/largeSMP/gnu/usr.bin/binutils/ (props changed)
projects/largeSMP/gnu/usr.bin/cc/cc_tools/ (props changed)
projects/largeSMP/gnu/usr.bin/gdb/ (props changed)
projects/largeSMP/lib/libc/ (props changed)
projects/largeSMP/lib/libc/stdtime/ (props changed)
projects/largeSMP/lib/libutil/ (props changed)
projects/largeSMP/lib/libz/ (props changed)
projects/largeSMP/sbin/ (props changed)
projects/largeSMP/sbin/ipfw/ (props changed)
projects/largeSMP/share/mk/bsd.arch.inc.mk (props changed)
projects/largeSMP/share/zoneinfo/ (props changed)
projects/largeSMP/sys/ (props changed)
projects/largeSMP/sys/amd64/include/xen/ (props changed)
projects/largeSMP/sys/boot/ (props changed)
projects/largeSMP/sys/boot/i386/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/ski/ (props changed)
projects/largeSMP/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/largeSMP/sys/boot/powerpc/ofw/ (props changed)
projects/largeSMP/sys/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/sys/conf/ (props changed)
projects/largeSMP/sys/contrib/dev/acpica/ (props changed)
projects/largeSMP/sys/contrib/octeon-sdk/ (props changed)
projects/largeSMP/sys/contrib/pf/ (props changed)
projects/largeSMP/sys/contrib/x86emu/ (props changed)
projects/largeSMP/usr.bin/calendar/ (props changed)
projects/largeSMP/usr.bin/csup/ (props changed)
projects/largeSMP/usr.bin/procstat/ (props changed)
projects/largeSMP/usr.sbin/ndiscvt/ (props changed)
projects/largeSMP/usr.sbin/zic/ (props changed)
Modified: projects/largeSMP/bin/sh/eval.c
==============================================================================
--- projects/largeSMP/bin/sh/eval.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/bin/sh/eval.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -409,6 +409,7 @@ evalsubshell(union node *n, int flags)
struct job *jp;
int backgnd = (n->type == NBACKGND);
+ oexitstatus = exitstatus;
expredir(n->nredir.redirect);
if ((!backgnd && flags & EV_EXIT && !have_traps()) ||
forkshell(jp = makejob(n, 1), n, backgnd) == 0) {
@@ -436,6 +437,7 @@ evalredir(union node *n, int flags)
struct jmploc *savehandler;
volatile int in_redirect = 1;
+ oexitstatus = exitstatus;
expredir(n->nredir.redirect);
savehandler = handler;
if (setjmp(jmploc.loc)) {
@@ -478,7 +480,6 @@ expredir(union node *n)
for (redir = n ; redir ; redir = redir->nfile.next) {
struct arglist fn;
fn.lastp = &fn.list;
- oexitstatus = exitstatus;
switch (redir->type) {
case NFROM:
case NTO:
Modified: projects/largeSMP/bin/sh/options.c
==============================================================================
--- projects/largeSMP/bin/sh/options.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/bin/sh/options.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -83,6 +83,7 @@ void
procargs(int argc, char **argv)
{
int i;
+ char *scriptname;
argptr = argv;
if (argc > 0)
@@ -105,8 +106,9 @@ procargs(int argc, char **argv)
optlist[i].val = 0;
arg0 = argv[0];
if (sflag == 0 && minusc == NULL) {
- commandname = arg0 = *argptr++;
- setinputfile(commandname, 0);
+ scriptname = *argptr++;
+ setinputfile(scriptname, 0);
+ commandname = arg0 = scriptname;
}
/* POSIX 1003.2: first arg after -c cmd is $0, remainder $1... */
if (argptr && minusc && *argptr)
Modified: projects/largeSMP/etc/network.subr
==============================================================================
--- projects/largeSMP/etc/network.subr Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/etc/network.subr Mon Jun 6 21:38:39 2011 (r222783)
@@ -100,25 +100,19 @@ ifconfig_up()
# inet6 specific
if afexists inet6; then
- if ipv6if $1; then
- if checkyesno ipv6_gateway_enable; then
- _ipv6_opts="-accept_rtadv"
- fi
- else
- if checkyesno ipv6_activate_all_interfaces; then
- _ipv6_opts="-ifdisabled"
- else
- _ipv6_opts="ifdisabled"
- fi
-
- # backward compatibility: $ipv6_enable
- case $ipv6_enable in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- _ipv6_opts="${_ipv6_opts} accept_rtadv"
- ;;
- esac
+ if checkyesno ipv6_activate_all_interfaces; then
+ _ipv6_opts="-ifdisabled"
+ elif [ "$1" != "lo0" ]; then
+ _ipv6_opts="ifdisabled"
fi
+ # backward compatibility: $ipv6_enable
+ case $ipv6_enable in
+ [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ _ipv6_opts="${_ipv6_opts} accept_rtadv"
+ ;;
+ esac
+
if [ -n "${_ipv6_opts}" ]; then
ifconfig $1 inet6 ${_ipv6_opts}
fi
Modified: projects/largeSMP/lib/libiconv/Makefile
==============================================================================
--- projects/largeSMP/lib/libiconv/Makefile Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/lib/libiconv/Makefile Mon Jun 6 21:38:39 2011 (r222783)
@@ -19,7 +19,6 @@ SRCS= citrus_bcs.c citrus_bcs_strtol.c c
citrus_module.c citrus_none.c citrus_pivot_factory.c \
citrus_prop.c citrus_stdenc.c iconv.c
-WARNS?= 6
CFLAGS+= --param max-inline-insns-single=128 -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include
.include <bsd.lib.mk>
Modified: projects/largeSMP/release/ia64/mkisoimages.sh
==============================================================================
--- projects/largeSMP/release/ia64/mkisoimages.sh Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/release/ia64/mkisoimages.sh Mon Jun 6 21:38:39 2011 (r222783)
@@ -48,28 +48,32 @@ EFIPART=efipart.sys
if [ $bootable = yes ]; then
EFISZ=65536
MNT=/mnt
- dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ
- md=`mdconfig -a -t vnode -f $BASE/$EFIPART`
+ dd if=/dev/zero of=$EFIPART count=$EFISZ
+ md=`mdconfig -a -t vnode -f $EFIPART`
newfs_msdos -F 12 -S 512 -h 4 -o 0 -s $EFISZ -u 16 $md
mount -t msdosfs /dev/$md $MNT
mkdir -p $MNT/efi/boot $MNT/boot $MNT/boot/kernel
cp -R $BASE/boot/defaults $MNT/boot
cp $BASE/boot/kernel/kernel $MNT/boot/kernel
- cp $BASE/boot/kernel/ispfw.ko $MNT/boot/kernel
+ if [ -s $BASE/boot/kernel/ispfw.ko ]; then
+ cp $BASE/boot/kernel/ispfw.ko $MNT/boot/kernel
+ fi
cp $BASE/boot/device.hints $MNT/boot
cp $BASE/boot/loader.* $MNT/boot
- cp $BASE/boot/mfsroot.gz $MNT/boot
+ if [ -s $BASE/boot/mfsroot.gz ]; then
+ cp $BASE/boot/mfsroot.gz $MNT/boot
+ fi
cp $BASE/boot/support.4th $MNT/boot
mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi
umount $MNT
mdconfig -d -u $md
- BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot"
+ BOOTOPTS="-o bootimage=i386;$EFIPART -o no-emul-boot"
else
BOOTOPTS=""
fi
-echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab
+echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $BASE/etc/fstab
makefs -t cd9660 $BOOTOPTS -o rockridge -o label=$LABEL $NAME $BASE $*
-rm -f $BASE/$EFIPART
-rm $1/etc/fstab
+rm $BASE/etc/fstab
+rm -f $EFIPART
exit 0
Modified: projects/largeSMP/sbin/geom/class/part/gpart.8
==============================================================================
--- projects/largeSMP/sbin/geom/class/part/gpart.8 Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/geom/class/part/gpart.8 Mon Jun 6 21:38:39 2011 (r222783)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 30, 2011
+.Dd June 6, 2011
.Dt GPART 8
.Os
.Sh NAME
@@ -530,16 +530,17 @@ about its use.
.El
.\"
.Sh PARTITION TYPES
+Partition types are identified on disk by particular strings or magic
+values.
The
.Nm
-utility uses symbolic names for common partition types to avoid that the
-user needs to know what the partitioning scheme in question is and what
-the actual number or identification needs to be used for a particular
-type.
+utility uses symbolic names for common partition types to avoid the
+user needing to know these values or other details of the partitioning
+scheme in question.
The
.Nm
utility also allows the user to specify scheme-specific partition types
-for partition types that do not have symbol names.
+for partition types that do not have symbolic names.
The symbolic names currently understood are:
.Bl -tag -width ".Cm freebsd-vinum"
.It Cm bios-boot
@@ -740,30 +741,30 @@ action or reverted with the
.Cm undo
action.
.Sh RECOVERING
-The GEOM class PART supports recovering of partition tables only for GPT.
+The GEOM PART class supports recovering of partition tables only for GPT.
The GUID partition table has a primary and secondary (backup) copy of
-metadata for redundance.
-They are stored in the begining and in the end of device respectively.
-Therefore it is acceptable to have some corruptions in the metadata that
-are not fatal to work with GPT.
-When kernel detects corrupt metadata it marks this table as corrupt and
-reports about corruption.
-Any changes in corrupt table are prohibited except
+metadata for redundance, these are stored at the begining and the end
+of the device respectively.
+As a result of having two copies, it is acceptable to have some corruption
+within the metadata that is not fatal to the working of GPT.
+When the kernel detects corrupt metadata it marks this table as corrupt and
+reports the corruption.
+Any operations on corrupt tables are prohibited except for
.Cm destroy
and
.Cm recover .
.Pp
-In case when only first sector is corrupt kernel can not detect GPT even
-if partition table is not corrupt.
-You can write protective MBR with
+If the first sector of a provider is corrupt, the kernel can not detect GPT
+even if partition table itself is not corrupt.
+You can rewrite the protective MBR using the
.Xr dd 1
-command to restore ability of GPT detection.
-The copy of protective MBR is usually located in the
+command, to restore the ability to detect the GPT.
+The copy of the protective MBR is usually located in the
.Pa /boot/pmbr
file.
.Pp
-In case when some of metadata is corrupt you will get to know about this
-from kernel's messages like these:
+If one GPT header appears to be corrupt but the other copy remains intact,
+the kernel will log the following:
.Bd -literal -offset indent
GEOM: provider: the primary GPT table is corrupt or invalid.
GEOM: provider: using the secondary instead -- recovery strongly advised.
@@ -777,32 +778,31 @@ GEOM: provider: using the primary only -
.Pp
Also
.Nm
-commands like
+commands such as
.Cm show , status
and
.Cm list
-will report about corrupt table.
+will report about corrupt tables.
.Pp
-In case when the size of device has changed (e.g.\& volume expansion) the
-secondary GPT header will become located not in the last sector.
+If the size of the device has changed (e.g.\& volume expansion) the
+secondary GPT header will no longer be located in the last sector.
This is not a metadata corruption, but it is dangerous because any
-corruption of the primary GPT will lead to lost of partition table.
-Kernel reports about this problem with message:
+corruption of the primary GPT will lead to loss of partition table.
+This problem is reported by the kernel with the message:
.Bd -literal -offset indent
GEOM: provider: the secondary GPT header is not in the last LBA.
.Ed
.Pp
-A corrupt table can be recovered with
+This situation can be recovered with the
.Cm recover
command.
-This command does reconstruction of corrupt metadata using
-known valid metadata.
-Also it can relocate secondary GPT to the end of device.
+This command reconstructs the corrupt metadata using known valid
+metadata and relocates the secondary GPT to the end of the device.
.Pp
.Em NOTE :
-The GEOM class PART can detect the same partition table on different GEOM
-providers and some of them will be marked as corrupt.
-Be careful when choosing a provider for recovering.
+The GEOM PART class can detect the same partition table visible through
+different GEOM providers, and some of them will be marked as corrupt.
+Be careful when choosing a provider for recovery.
If you choose incorrectly you can destroy the metadata of another GEOM class,
e.g.\& GEOM MIRROR or GEOM LABEL.
.Sh SYSCTL VARIABLES
@@ -815,11 +815,11 @@ The default value is shown next to each
.Bl -tag -width indent
.It Va kern.geom.part.check_integrity : No 1
This variable controls the behaviour of metadata integrity checks.
-When integrity checks are enabled
+When integrity checks are enabled, the
.Nm PART
-GEOM class verifies all generic partition parameters that it gets from the
+GEOM class verifies all generic partition parameters obtained from the
disk metadata.
-If some inconsistency is detected, partition table will be
+If some inconsistency is detected, the partition table will be
rejected with a diagnostic message:
.Sy "GEOM_PART: Integrity check failed (provider, scheme)" .
.El
Modified: projects/largeSMP/sbin/geom/class/sched/Makefile
==============================================================================
--- projects/largeSMP/sbin/geom/class/sched/Makefile Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/geom/class/sched/Makefile Mon Jun 6 21:38:39 2011 (r222783)
@@ -5,6 +5,4 @@
GEOM_CLASS= sched
-WARNS?= 6
-
.include <bsd.lib.mk>
Modified: projects/largeSMP/sbin/ifconfig/af_inet6.c
==============================================================================
--- projects/largeSMP/sbin/ifconfig/af_inet6.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/ifconfig/af_inet6.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -69,6 +69,7 @@ static int explicit_prefix = 0;
extern void setnd6flags(const char *, int, int, const struct afswtch *);
extern void setnd6defif(const char *, int, int, const struct afswtch *);
+extern void nd6_status(int);
static char addr_buf[MAXHOSTNAMELEN *2 + 1]; /*for getnameinfo()*/
@@ -498,6 +499,8 @@ static struct cmd inet6_cmds[] = {
DEF_CMD("-autoconf", -IN6_IFF_AUTOCONF, setip6flags),
DEF_CMD("accept_rtadv", ND6_IFF_ACCEPT_RTADV, setnd6flags),
DEF_CMD("-accept_rtadv",-ND6_IFF_ACCEPT_RTADV, setnd6flags),
+ DEF_CMD("no_radr", ND6_IFF_NO_RADR, setnd6flags),
+ DEF_CMD("-no_radr", -ND6_IFF_NO_RADR, setnd6flags),
DEF_CMD("defaultif", 1, setnd6defif),
DEF_CMD("-defaultif", -1, setnd6defif),
DEF_CMD("ifdisabled", ND6_IFF_IFDISABLED, setnd6flags),
@@ -519,6 +522,7 @@ static struct afswtch af_inet6 = {
.af_status = in6_status,
.af_getaddr = in6_getaddr,
.af_getprefix = in6_getprefix,
+ .af_other_status = nd6_status,
.af_postproc = in6_postproc,
.af_status_tunnel = in6_status_tunnel,
.af_settunnel = in6_set_tunnel,
Modified: projects/largeSMP/sbin/ifconfig/af_nd6.c
==============================================================================
--- projects/largeSMP/sbin/ifconfig/af_nd6.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/ifconfig/af_nd6.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -58,11 +58,12 @@ static const char rcsid[] =
#define MAX_SYSCTL_TRY 5
#define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \
"\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \
- "\020DEFAULTIF"
+ "\007NO_RADR\020DEFAULTIF"
static int isnd6defif(int);
void setnd6flags(const char *, int, int, const struct afswtch *);
void setnd6defif(const char *, int, int, const struct afswtch *);
+void nd6_status(int);
void
setnd6flags(const char *dummyaddr __unused,
@@ -136,64 +137,13 @@ isnd6defif(int s)
return (ndifreq.ifindex == ifindex);
}
-static void
+void
nd6_status(int s)
{
struct in6_ndireq nd;
- struct rt_msghdr *rtm;
- size_t needed;
- char *buf, *next;
- int mib[6], ntry;
int s6;
int error;
- int isinet6, isdefif;
-
- /* Check if the interface has at least one IPv6 address. */
- mib[0] = CTL_NET;
- mib[1] = PF_ROUTE;
- mib[2] = 0;
- mib[3] = AF_INET6;
- mib[4] = NET_RT_IFLIST;
- mib[5] = if_nametoindex(ifr.ifr_name);
-
- /* Try to prevent a race between two sysctls. */
- ntry = 0;
- do {
- error = sysctl(mib, 6, NULL, &needed, NULL, 0);
- if (error) {
- warn("sysctl(NET_RT_IFLIST)/estimate");
- return;
- }
- buf = malloc(needed);
- if (buf == NULL) {
- warn("malloc for sysctl(NET_RT_IFLIST) failed");
- return;
- }
- if ((error = sysctl(mib, 6, buf, &needed, NULL, 0)) < 0) {
- if (errno != ENOMEM || ++ntry >= MAX_SYSCTL_TRY) {
- warn("sysctl(NET_RT_IFLIST)/get");
- free(buf);
- return;
- }
- free(buf);
- buf = NULL;
- }
- } while (buf == NULL);
-
- isinet6 = 0;
- for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
- rtm = (struct rt_msghdr *)next;
-
- if (rtm->rtm_version != RTM_VERSION)
- continue;
- if (rtm->rtm_type == RTM_NEWADDR) {
- isinet6 = 1;
- break;
- }
- }
- free(buf);
- if (!isinet6)
- return;
+ int isdefif;
memset(&nd, 0, sizeof(nd));
strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname));
@@ -215,19 +165,3 @@ nd6_status(int s)
(unsigned int)(nd.ndi.flags | (isdefif << 15)), ND6BITS);
putchar('\n');
}
-
-static struct afswtch af_nd6 = {
- .af_name = "nd6",
- .af_af = AF_LOCAL,
- .af_other_status= nd6_status,
-};
-
-static __constructor void
-nd6_ctor(void)
-{
-
- if (!feature_present("inet6"))
- return;
-
- af_register(&af_nd6);
-}
Modified: projects/largeSMP/sbin/ipfw/main.c
==============================================================================
--- projects/largeSMP/sbin/ipfw/main.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/ipfw/main.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -356,6 +356,7 @@ ipfw_main(int oldac, char **oldav)
*/
co.do_nat = 0;
co.do_pipe = 0;
+ co.use_set = 0;
if (!strncmp(*av, "nat", strlen(*av)))
co.do_nat = 1;
else if (!strncmp(*av, "pipe", strlen(*av)))
@@ -444,7 +445,7 @@ static void
ipfw_readfile(int ac, char *av[])
{
#define MAX_ARGS 32
- char buf[BUFSIZ];
+ char buf[4096];
char *progname = av[0]; /* original program name */
const char *cmd = NULL; /* preprocessor name, if any */
const char *filename = av[ac-1]; /* file to read */
@@ -552,7 +553,7 @@ ipfw_readfile(int ac, char *av[])
}
}
- while (fgets(buf, BUFSIZ, f)) { /* read commands */
+ while (fgets(buf, sizeof(buf), f)) { /* read commands */
char linename[20];
char *args[2];
Modified: projects/largeSMP/sbin/mount/mount.8
==============================================================================
--- projects/largeSMP/sbin/mount/mount.8 Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/mount/mount.8 Mon Jun 6 21:38:39 2011 (r222783)
@@ -28,7 +28,7 @@
.\" @(#)mount.8 8.8 (Berkeley) 6/16/94
.\" $FreeBSD$
.\"
-.Dd April 28, 2011
+.Dd June 6, 2011
.Dt MOUNT 8
.Os
.Sh NAME
@@ -348,7 +348,6 @@ option) may be passed as a comma separat
distinguished by a leading
.Dq \&-
(dash).
-Options that take a value are specified using the syntax -option=value.
For example, the
.Nm
command:
@@ -363,6 +362,16 @@ to execute the equivalent of:
/sbin/mount_cd9660 -e /dev/cd0 /cdrom
.Ed
.Pp
+Options that take a value are specified using the -option=value syntax:
+.Bd -literal -offset indent
+mount -t msdosfs -o -u=fred,-g=wheel /dev/da0s1 /mnt
+.Ed
+.Pp
+is equivalent to
+.Bd -literal -offset indent
+/sbin/mount_msdosfs -u fred -g wheel /dev/da0s1 /mnt
+.Ed
+.Pp
Additional options specific to file system types
which are not internally known
(see the description of the
Modified: projects/largeSMP/sbin/rcorder/rcorder.8
==============================================================================
--- projects/largeSMP/sbin/rcorder/rcorder.8 Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sbin/rcorder/rcorder.8 Mon Jun 6 21:38:39 2011 (r222783)
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 9, 2008
+.Dd June 6, 2011
.Dt RCORDER 8
.Os
.Sh NAME
@@ -89,6 +89,12 @@ and
lines may appear, but all such lines must appear in a sequence without
any intervening lines, as once a line that does not follow the format
is reached, parsing stops.
+Note that for historical reasons,
+.Dq Li REQUIRES ,
+.Dq Li PROVIDES ,
+and
+.Dq Li KEYWORDS
+are also accepted in addition to the above.
.Pp
The options are as follows:
.Bl -tag -width indent
Modified: projects/largeSMP/share/man/man4/amdsbwd.4
==============================================================================
--- projects/largeSMP/share/man/man4/amdsbwd.4 Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/share/man/man4/amdsbwd.4 Mon Jun 6 21:38:39 2011 (r222783)
@@ -61,12 +61,14 @@ AMD SB600 and SB7xx south bridge chips.
The
.Nm
driver first appeared in
-.Fx 9.0 .
+.Fx 7.3
+and
+.Fx 8.1 .
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
-.An Andiry Gapon Aq avg at FreeBSD.org .
+.An Andriy Gapon Aq avg at FreeBSD.org .
This manual page was written by
-.An Andiry Gapon Aq avg at FreeBSD.org .
+.An Andriy Gapon Aq avg at FreeBSD.org .
Modified: projects/largeSMP/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- projects/largeSMP/sys/amd64/amd64/mp_machdep.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/amd64/amd64/mp_machdep.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -242,8 +242,11 @@ topo_probe_0x4(void)
* logical processors that belong to the same core
* as BSP thus deducing number of threads per core.
*/
- cpuid_count(0x04, 0, p);
- max_cores = ((p[0] >> 26) & 0x3f) + 1;
+ if (cpu_high >= 0x4) {
+ cpuid_count(0x04, 0, p);
+ max_cores = ((p[0] >> 26) & 0x3f) + 1;
+ } else
+ max_cores = 1;
core_id_bits = mask_width(max_logical/max_cores);
if (core_id_bits < 0)
return;
Modified: projects/largeSMP/sys/cddl/compat/opensolaris/sys/atomic.h
==============================================================================
--- projects/largeSMP/sys/cddl/compat/opensolaris/sys/atomic.h Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/cddl/compat/opensolaris/sys/atomic.h Mon Jun 6 21:38:39 2011 (r222783)
@@ -40,8 +40,6 @@
extern void atomic_add_64(volatile uint64_t *target, int64_t delta);
extern void atomic_dec_64(volatile uint64_t *target);
#endif
-#ifndef __LP64__
-#endif
#ifndef __sparc64__
extern uint32_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
uint32_t newval);
Modified: projects/largeSMP/sys/conf/files
==============================================================================
--- projects/largeSMP/sys/conf/files Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/conf/files Mon Jun 6 21:38:39 2011 (r222783)
@@ -2748,6 +2748,7 @@ netinet/ip_gre.c optional gre inet
netinet/ip_id.c optional inet
netinet/in_mcast.c optional inet
netinet/in_pcb.c optional inet | inet6
+netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup
netinet/in_proto.c optional inet | inet6 \
compile-with "${NORMAL_C} -I$S/contrib/pf"
netinet/in_rmx.c optional inet
@@ -2825,6 +2826,7 @@ netinet6/in6_gif.c optional gif inet6 |
netinet6/in6_ifattach.c optional inet6
netinet6/in6_mcast.c optional inet6
netinet6/in6_pcb.c optional inet6
+netinet6/in6_pcbgroup.c optional inet6 pcbgroup
netinet6/in6_proto.c optional inet6
netinet6/in6_rmx.c optional inet6
netinet6/in6_src.c optional inet6
Modified: projects/largeSMP/sys/conf/options
==============================================================================
--- projects/largeSMP/sys/conf/options Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/conf/options Mon Jun 6 21:38:39 2011 (r222783)
@@ -419,6 +419,7 @@ MROUTING opt_mrouting.h
NCP
NETATALK opt_atalk.h
NFSLOCKD
+PCBGROUP opt_pcbgroup.h
RADIX_MPATH opt_mpath.h
ROUTETABLES opt_route.h
SLIP_IFF_OPTS opt_slip.h
Modified: projects/largeSMP/sys/dev/ath/if_ath.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/if_ath.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/ath/if_ath.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -3473,7 +3473,15 @@ ath_rx_proc(void *arg, int npending)
if (rs->rs_status & HAL_RXERR_PHY) {
sc->sc_stats.ast_rx_phyerr++;
/* Process DFS radar events */
- ath_dfs_process_phy_err(sc, mtod(m, char *), tsf, rs);
+ if ((rs->rs_phyerr == HAL_PHYERR_RADAR) ||
+ (rs->rs_phyerr == HAL_PHYERR_FALSE_RADAR_EXT)) {
+ /* Since we're touching the frame data, sync it */
+ bus_dmamap_sync(sc->sc_dmat,
+ bf->bf_dmamap,
+ BUS_DMASYNC_POSTREAD);
+ /* Now pass it to the radar processing code */
+ ath_dfs_process_phy_err(sc, mtod(m, char *), tsf, rs);
+ }
/* Be suitably paranoid about receiving phy errors out of the stats array bounds */
if (rs->rs_phyerr < 64)
Modified: projects/largeSMP/sys/dev/cardbus/cardbus_cis.c
==============================================================================
--- projects/largeSMP/sys/dev/cardbus/cardbus_cis.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/cardbus/cardbus_cis.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -324,7 +324,7 @@ decode_tuple_bar(device_t cbdev, device_
* hint when the cardbus bridge is a child of pci0 (the main
* bus). The PC Card spec seems to indicate that this should
* only be done on x86 based machines, which suggests that on
- * non-x86 machines the adddresses can be anywhere. Since the
+ * non-x86 machines the addresses can be anywhere. Since the
* hardware can do it on non-x86 machines, it should be able
* to do it on x86 machines too. Therefore, we can and should
* ignore this hint. Furthermore, the PC Card spec recommends
@@ -430,7 +430,6 @@ cardbus_read_tuple_finish(device_t cbdev
{
if (res != CIS_CONFIG_SPACE) {
bus_release_resource(child, SYS_RES_MEMORY, rid, res);
- bus_delete_resource(child, SYS_RES_MEMORY, rid);
}
}
@@ -467,7 +466,7 @@ cardbus_read_tuple_init(device_t cbdev,
}
/* allocate the memory space to read CIS */
- res = bus_alloc_resource(child, SYS_RES_MEMORY, rid, 0, ~0, 1,
+ res = bus_alloc_resource_any(child, SYS_RES_MEMORY, rid,
rman_make_alignment_flags(4096) | RF_ACTIVE);
if (res == NULL) {
device_printf(cbdev, "Unable to allocate resource "
Modified: projects/largeSMP/sys/dev/cxgbe/adapter.h
==============================================================================
--- projects/largeSMP/sys/dev/cxgbe/adapter.h Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/cxgbe/adapter.h Mon Jun 6 21:38:39 2011 (r222783)
@@ -396,6 +396,7 @@ struct sge_ctrlq {
struct sge {
uint16_t timer_val[SGE_NTIMERS];
uint8_t counter_val[SGE_NCOUNTERS];
+ int fl_starve_threshold;
int nrxq; /* total rx queues (all ports and the rest) */
int ntxq; /* total tx queues (all ports and the rest) */
Modified: projects/largeSMP/sys/dev/cxgbe/t4_main.c
==============================================================================
--- projects/largeSMP/sys/dev/cxgbe/t4_main.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/cxgbe/t4_main.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -492,6 +492,8 @@ t4_attach(device_t dev)
V_RXTSHIFTMAXR2(15) | V_PERSHIFTBACKOFFMAX(8) | V_PERSHIFTMAX(8) |
V_KEEPALIVEMAXR1(4) | V_KEEPALIVEMAXR2(9));
t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12));
+ t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 |
+ F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, 0);
setup_memwin(sc);
Modified: projects/largeSMP/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- projects/largeSMP/sys/dev/cxgbe/t4_sge.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/cxgbe/t4_sge.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -203,6 +203,9 @@ t4_sge_init(struct adapter *sc)
FL_BUF_SIZE(i));
}
+ i = t4_read_reg(sc, A_SGE_CONM_CTRL);
+ s->fl_starve_threshold = G_EGRTHRESHOLD(i) * 2 + 1;
+
t4_write_reg(sc, A_SGE_INGRESS_RX_THRESHOLD,
V_THRESHOLD_0(s->counter_val[0]) |
V_THRESHOLD_1(s->counter_val[1]) |
@@ -1233,7 +1236,8 @@ alloc_iq_fl(struct port_info *pi, struct
sc->sge.eqmap[cntxt_id] = (void *)fl;
FL_LOCK(fl);
- refill_fl(sc, fl, -1, 8);
+ /* Just enough to make sure it doesn't starve right away. */
+ refill_fl(sc, fl, roundup(sc->sge.fl_starve_threshold, 8), 8);
FL_UNLOCK(fl);
}
@@ -1389,6 +1393,10 @@ alloc_rxq(struct port_info *pi, struct s
if (rc != 0)
return (rc);
+ FL_LOCK(&rxq->fl);
+ refill_fl(pi->adapter, &rxq->fl, rxq->fl.needed / 8, 8);
+ FL_UNLOCK(&rxq->fl);
+
#ifdef INET
rc = tcp_lro_init(&rxq->lro);
if (rc != 0)
Modified: projects/largeSMP/sys/dev/pccard/pccard.c
==============================================================================
--- projects/largeSMP/sys/dev/pccard/pccard.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/pccard/pccard.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -1405,8 +1405,8 @@ pccard_ccr_read_impl(device_t brdev, dev
struct pccard_ivar *devi = PCCARD_IVAR(child);
*val = pccard_ccr_read(devi->pf, offset);
- device_printf(child, "ccr_read of %#x (%#x) is %#x\n", offset,
- devi->pf->pf_ccr_offset, *val);
+ DEVPRINTF((child, "ccr_read of %#x (%#x) is %#x\n", offset,
+ devi->pf->pf_ccr_offset, *val));
return 0;
}
@@ -1421,8 +1421,8 @@ pccard_ccr_write_impl(device_t brdev, de
* Can't use pccard_ccr_write since client drivers may access
* registers not contained in the 'mask' if they are non-standard.
*/
- device_printf(child, "ccr_write of %#x to %#x (%#x)\n", val, offset,
- devi->pf->pf_ccr_offset);
+ DEVPRINTF((child, "ccr_write of %#x to %#x (%#x)\n", val, offset,
+ devi->pf->pf_ccr_offset));
bus_space_write_1(pf->pf_ccrt, pf->pf_ccrh, pf->pf_ccr_offset + offset,
val);
return 0;
Modified: projects/largeSMP/sys/dev/pci/pci.c
==============================================================================
--- projects/largeSMP/sys/dev/pci/pci.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/pci/pci.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -2576,6 +2576,17 @@ pci_add_map(device_t bus, device_t dev,
uint16_t cmd;
struct resource *res;
+ /*
+ * The BAR may already exist if the device is a CardBus card
+ * whose CIS is stored in this BAR.
+ */
+ pm = pci_find_bar(dev, reg);
+ if (pm != NULL) {
+ maprange = pci_maprange(pm->pm_value);
+ barlen = maprange == 64 ? 2 : 1;
+ return (barlen);
+ }
+
pci_read_bar(dev, reg, &map, &testval);
if (PCI_BAR_MEM(map)) {
type = SYS_RES_MEMORY;
Modified: projects/largeSMP/sys/dev/puc/pucdata.c
==============================================================================
--- projects/largeSMP/sys/dev/puc/pucdata.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/dev/puc/pucdata.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -51,12 +51,12 @@ static puc_config_f puc_config_amc;
static puc_config_f puc_config_diva;
static puc_config_f puc_config_exar;
static puc_config_f puc_config_icbook;
+static puc_config_f puc_config_oxford_pcie;
static puc_config_f puc_config_quatech;
static puc_config_f puc_config_syba;
static puc_config_f puc_config_siig;
static puc_config_f puc_config_timedia;
static puc_config_f puc_config_titan;
-static puc_config_f puc_config_oxford_pcie;
const struct puc_cfg puc_pci_devices[] = {
@@ -1366,14 +1366,12 @@ puc_config_oxford_pcie(struct puc_softc
bar = puc_get_bar(sc, cfg->rid);
if (bar == NULL)
return (ENXIO);
-
for (idx = 0; idx < sc->sc_nports; idx++) {
- value = bus_read_1(bar->b_res, 0x1000 + (idx << 9)
- + 0x92);
+ value = bus_read_1(bar->b_res, 0x1000 + (idx << 9) +
+ 0x92);
bus_write_1(bar->b_res, 0x1000 + (idx << 9) + 0x92,
- value | 0x10);
+ value | 0x10);
}
-
return (0);
case PUC_CFG_GET_LEN:
*res = 0x200;
Modified: projects/largeSMP/sys/fs/nfs/nfs_var.h
==============================================================================
--- projects/largeSMP/sys/fs/nfs/nfs_var.h Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/fs/nfs/nfs_var.h Mon Jun 6 21:38:39 2011 (r222783)
@@ -401,10 +401,10 @@ int nfsrpc_readdirplus(vnode_t, struct u
int nfsrpc_commit(vnode_t, u_quad_t, int, struct ucred *,
NFSPROC_T *, u_char *, struct nfsvattr *, int *, void *);
int nfsrpc_advlock(vnode_t, off_t, int, struct flock *, int,
- struct ucred *, NFSPROC_T *);
+ struct ucred *, NFSPROC_T *, void *, int);
int nfsrpc_lockt(struct nfsrv_descript *, vnode_t,
struct nfsclclient *, u_int64_t, u_int64_t, struct flock *,
- struct ucred *, NFSPROC_T *);
+ struct ucred *, NFSPROC_T *, void *, int);
int nfsrpc_lock(struct nfsrv_descript *, struct nfsmount *, vnode_t,
u_int8_t *, int, struct nfscllockowner *, int, int, u_int64_t,
u_int64_t, short, struct ucred *, NFSPROC_T *, int);
@@ -439,16 +439,16 @@ struct nfsclclient *nfscl_findcl(struct
void nfscl_clientrelease(struct nfsclclient *);
void nfscl_freelock(struct nfscllock *, int);
int nfscl_getbytelock(vnode_t, u_int64_t, u_int64_t, short,
- struct ucred *, NFSPROC_T *, struct nfsclclient *, int, u_int8_t *,
- u_int8_t *, struct nfscllockowner **, int *, int *);
+ struct ucred *, NFSPROC_T *, struct nfsclclient *, int, void *, int,
+ u_int8_t *, u_int8_t *, struct nfscllockowner **, int *, int *);
int nfscl_relbytelock(vnode_t, u_int64_t, u_int64_t,
struct ucred *, NFSPROC_T *, int, struct nfsclclient *,
- struct nfscllockowner **, int *);
+ void *, int, struct nfscllockowner **, int *);
int nfscl_checkwritelocked(vnode_t, struct flock *,
- struct ucred *, NFSPROC_T *);
+ struct ucred *, NFSPROC_T *, void *, int);
void nfscl_lockrelease(struct nfscllockowner *, int, int);
void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t);
-void nfscl_filllockowner(NFSPROC_T *, u_int8_t *);
+void nfscl_filllockowner(void *, u_int8_t *, int);
void nfscl_freeopen(struct nfsclopen *, int);
void nfscl_umount(struct nfsmount *, NFSPROC_T *);
void nfscl_renewthread(struct nfsclclient *, NFSPROC_T *);
@@ -466,9 +466,10 @@ void nfscl_lockexcl(struct nfsv4lock *,
void nfscl_lockunlock(struct nfsv4lock *);
void nfscl_lockderef(struct nfsv4lock *);
void nfscl_docb(struct nfsrv_descript *, NFSPROC_T *);
-void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *);
+void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *, void *,
+ int);
int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t,
- u_int64_t, struct flock *, NFSPROC_T *);
+ u_int64_t, struct flock *, NFSPROC_T *, void *, int);
int nfscl_mustflush(vnode_t);
int nfscl_nodeleg(vnode_t, int);
int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *);
Modified: projects/largeSMP/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsclient/nfs_clport.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/fs/nfsclient/nfs_clport.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -500,7 +500,7 @@ nfscl_fillclid(u_int64_t clval, char *uu
* Fill in a lock owner name. For now, pid + the process's creation time.
*/
void
-nfscl_filllockowner(struct thread *td, u_int8_t *cp)
+nfscl_filllockowner(void *id, u_int8_t *cp, int flags)
{
union {
u_int32_t lval;
@@ -508,37 +508,35 @@ nfscl_filllockowner(struct thread *td, u
} tl;
struct proc *p;
-if (td == NULL) {
- printf("NULL td\n");
- bzero(cp, 12);
- return;
-}
- p = td->td_proc;
-if (p == NULL) {
- printf("NULL pid\n");
- bzero(cp, 12);
- return;
-}
- tl.lval = p->p_pid;
- *cp++ = tl.cval[0];
- *cp++ = tl.cval[1];
- *cp++ = tl.cval[2];
- *cp++ = tl.cval[3];
-if (p->p_stats == NULL) {
- printf("pstats null\n");
- bzero(cp, 8);
- return;
-}
- tl.lval = p->p_stats->p_start.tv_sec;
- *cp++ = tl.cval[0];
- *cp++ = tl.cval[1];
- *cp++ = tl.cval[2];
- *cp++ = tl.cval[3];
- tl.lval = p->p_stats->p_start.tv_usec;
- *cp++ = tl.cval[0];
- *cp++ = tl.cval[1];
- *cp++ = tl.cval[2];
- *cp = tl.cval[3];
+ if (id == NULL) {
+ printf("NULL id\n");
+ bzero(cp, NFSV4CL_LOCKNAMELEN);
+ return;
+ }
+ if ((flags & F_POSIX) != 0) {
+ p = (struct proc *)id;
+ tl.lval = p->p_pid;
+ *cp++ = tl.cval[0];
+ *cp++ = tl.cval[1];
+ *cp++ = tl.cval[2];
+ *cp++ = tl.cval[3];
+ tl.lval = p->p_stats->p_start.tv_sec;
+ *cp++ = tl.cval[0];
+ *cp++ = tl.cval[1];
+ *cp++ = tl.cval[2];
+ *cp++ = tl.cval[3];
+ tl.lval = p->p_stats->p_start.tv_usec;
+ *cp++ = tl.cval[0];
+ *cp++ = tl.cval[1];
+ *cp++ = tl.cval[2];
+ *cp = tl.cval[3];
+ } else if ((flags & F_FLOCK) != 0) {
+ bcopy(&id, cp, sizeof(id));
+ bzero(&cp[sizeof(id)], NFSV4CL_LOCKNAMELEN - sizeof(id));
+ } else {
+ printf("nfscl_filllockowner: not F_POSIX or F_FLOCK\n");
+ bzero(cp, NFSV4CL_LOCKNAMELEN);
+ }
}
/*
@@ -943,6 +941,7 @@ nfscl_getmyip(struct nfsmount *nmp, int
sad.sin_family = AF_INET;
sad.sin_len = sizeof (struct sockaddr_in);
sad.sin_addr.s_addr = sin->sin_addr.s_addr;
+ CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred));
rt = rtalloc1((struct sockaddr *)&sad, 0, 0UL);
if (rt != NULL) {
if (rt->rt_ifp != NULL &&
@@ -956,6 +955,7 @@ nfscl_getmyip(struct nfsmount *nmp, int
}
RTFREE_LOCKED(rt);
}
+ CURVNET_RESTORE();
#ifdef INET6
} else if (nmp->nm_nam->sa_family == AF_INET6) {
struct sockaddr_in6 sad6, *sin6;
@@ -966,6 +966,7 @@ nfscl_getmyip(struct nfsmount *nmp, int
sad6.sin6_family = AF_INET6;
sad6.sin6_len = sizeof (struct sockaddr_in6);
sad6.sin6_addr = sin6->sin6_addr;
+ CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred));
rt = rtalloc1((struct sockaddr *)&sad6, 0, 0UL);
if (rt != NULL) {
if (rt->rt_ifp != NULL &&
@@ -980,6 +981,7 @@ nfscl_getmyip(struct nfsmount *nmp, int
}
RTFREE_LOCKED(rt);
}
+ CURVNET_RESTORE();
#endif
}
return (retp);
Modified: projects/largeSMP/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsclient/nfs_clrpcops.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/fs/nfsclient/nfs_clrpcops.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -3459,7 +3459,7 @@ nfsmout:
*/
APPLESTATIC int
nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl,
- int reclaim, struct ucred *cred, NFSPROC_T *p)
+ int reclaim, struct ucred *cred, NFSPROC_T *p, void *id, int flags)
{
struct nfscllockowner *lp;
struct nfsclclient *clp;
@@ -3511,11 +3511,11 @@ nfsrpc_advlock(vnode_t vp, off_t size, i
error = nfscl_getcl(vp, cred, p, &clp);
if (error)
return (error);
- error = nfscl_lockt(vp, clp, off, len, fl, p);
+ error = nfscl_lockt(vp, clp, off, len, fl, p, id, flags);
if (!error) {
clidrev = clp->nfsc_clientidrev;
error = nfsrpc_lockt(nd, vp, clp, off, len, fl, cred,
- p);
+ p, id, flags);
} else if (error == -1) {
error = 0;
}
@@ -3530,7 +3530,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, i
return (error);
do {
error = nfscl_relbytelock(vp, off, len, cred, p, callcnt,
- clp, &lp, &dorpc);
+ clp, id, flags, &lp, &dorpc);
/*
* If it returns a NULL lp, we're done.
*/
@@ -3538,7 +3538,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, i
if (callcnt == 0)
nfscl_clientrelease(clp);
else
- nfscl_releasealllocks(clp, vp, p);
+ nfscl_releasealllocks(clp, vp, p, id, flags);
return (error);
}
if (nmp->nm_clp != NULL)
@@ -3572,10 +3572,10 @@ nfsrpc_advlock(vnode_t vp, off_t size, i
}
callcnt++;
} while (error == 0 && nd->nd_repstat == 0);
- nfscl_releasealllocks(clp, vp, p);
+ nfscl_releasealllocks(clp, vp, p, id, flags);
} else if (op == F_SETLK) {
error = nfscl_getbytelock(vp, off, len, fl->l_type, cred, p,
- NULL, 0, NULL, NULL, &lp, &newone, &donelocally);
+ NULL, 0, id, flags, NULL, NULL, &lp, &newone, &donelocally);
if (error || donelocally) {
return (error);
}
@@ -3625,7 +3625,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, i
APPLESTATIC int
nfsrpc_lockt(struct nfsrv_descript *nd, vnode_t vp,
struct nfsclclient *clp, u_int64_t off, u_int64_t len, struct flock *fl,
- struct ucred *cred, NFSPROC_T *p)
+ struct ucred *cred, NFSPROC_T *p, void *id, int flags)
{
u_int32_t *tl;
int error, type, size;
@@ -3643,7 +3643,7 @@ nfsrpc_lockt(struct nfsrv_descript *nd,
tl += 2;
*tl++ = clp->nfsc_clientid.lval[0];
*tl = clp->nfsc_clientid.lval[1];
- nfscl_filllockowner(p, own);
+ nfscl_filllockowner(id, own, flags);
(void) nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN);
error = nfscl_request(nd, vp, p, cred, NULL);
if (error)
Modified: projects/largeSMP/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- projects/largeSMP/sys/fs/nfsclient/nfs_clstate.c Mon Jun 6 21:24:07 2011 (r222782)
+++ projects/largeSMP/sys/fs/nfsclient/nfs_clstate.c Mon Jun 6 21:38:39 2011 (r222783)
@@ -226,7 +226,7 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i
* If none found, add the new one or return error, depending upon
* "create".
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list