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

2009-05-16 Thread Christian Brueffer
Author: brueffer
Date: Sat May 16 10:42:00 2009
New Revision: 192193
URL: http://svn.freebsd.org/changeset/base/192193

Log:
  Add a manpage for the bwi(4) driver.

Added:
  head/share/man/man4/bwi.4   (contents, props changed)
Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileSat May 16 08:27:23 2009
(r192192)
+++ head/share/man/man4/MakefileSat May 16 10:42:00 2009
(r192193)
@@ -51,6 +51,7 @@ MAN=  aac.4 \
blackhole.4 \
bpf.4 \
bt.4 \
+   bwi.4 \
cardbus.4 \
carp.4 \
ccd.4 \
@@ -465,6 +466,7 @@ MLINKS+=bce.4 if_bce.4
 MLINKS+=bfe.4 if_bfe.4
 MLINKS+=bge.4 if_bge.4
 MLINKS+=bktr.4 brooktree.4
+MLINKS+=bwi.4 if_bwi.4
 MLINKS+=crypto.4 cryptodev.4
 MLINKS+=cue.4 if_cue.4
 MLINKS+=dc.4 if_dc.4

Added: head/share/man/man4/bwi.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/bwi.4   Sat May 16 10:42:00 2009(r192193)
@@ -0,0 +1,134 @@
+.\" Copyright (c) 2009 Christian Brueffer
+.\" 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 May 16, 2009
+.Dt BWI 4
+.Os
+.Sh NAME
+.Nm bwi
+.Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device bwi"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Cd "device firmware"
+.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
+if_bwi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Broadcom BCM43xx based
+PCI/CardBus network adapters.
+.Pp
+It supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires firmware to be loaded before it will work.
+The
+.Pa ports/net/bwi-firmware-kmod
+port needs to be installed before
+.Xr ifconfig 8
+will work.
+.Sh HARDWARE
+The
+.Nm
+driver supports Broadcom BCM43xx based wireless devices, including:
+.Pp
+.Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" 
-offset 6n
+.It Em "Card   ChipBus Standard"
+.It "Apple Airport Extreme BCM4306 PCI b/g"
+.It "Apple Airport Extreme BCM4318 PCI b/g"
+.It "ASUS WL-138g  BCM4318 PCI b/g"
+.It "Buffalo WLI-CB-G54S   BCM4318 CardBus b/g"
+.It "Buffalo WLI-PCI-G54S  BCM4306 PCI b/g"
+.It "Compaq R4035 onboard  BCM4306 PCI b/g"
+.It "Dell Wireless 1470BCM4318 Mini PCIb/g"
+.It "Dell Truemobile 1400  BCM4309 Mini PCIb/g"
+.It "HP nx6125 BCM4319 PCI b/g"
+.It "Linksys WPC54G Ver 3  BCM4318 CardBus b/g"
+.It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g"
+.It "TRENDnet TEW-401PCplusBCM4306 CardBus b/g"
+.It "US Robotics 5411  BCM4318 CardBus b/g"
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Pp
+.Bd -literal -offset indent
+ifconfig wlan create wlandev bwi0 inet 192.168.0.20 \e
+netmask 0xff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev bwi0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev bwi0 ssid my_net \e
+   

svn commit: r192194 - in head/sys: boot/i386/zfsboot boot/zfs cddl/boot/zfs

2009-05-16 Thread Doug Rabson
Author: dfr
Date: Sat May 16 10:48:20 2009
New Revision: 192194
URL: http://svn.freebsd.org/changeset/base/192194

Log:
  Add support for booting from raidz1 and raidz2 pools.

Modified:
  head/sys/boot/i386/zfsboot/zfsboot.c
  head/sys/boot/zfs/zfsimpl.c
  head/sys/cddl/boot/zfs/README
  head/sys/cddl/boot/zfs/zfsimpl.h
  head/sys/cddl/boot/zfs/zfssubr.c

Modified: head/sys/boot/i386/zfsboot/zfsboot.c
==
--- head/sys/boot/i386/zfsboot/zfsboot.cSat May 16 10:42:00 2009
(r192193)
+++ head/sys/boot/i386/zfsboot/zfsboot.cSat May 16 10:48:20 2009
(r192194)
@@ -413,6 +413,20 @@ int13probe(int drive)
 return(0);
 }
 
+/*
+ * We call this when we find a ZFS vdev - ZFS consumes the dsk
+ * structure so we must make a new one.
+ */
+static struct dsk *
+copy_dsk(struct dsk *dsk)
+{
+struct dsk *newdsk;
+
+newdsk = malloc(sizeof(struct dsk));
+*newdsk = *dsk;
+return (newdsk);
+}
+
 static void
 probe_drive(struct dsk *dsk, spa_t **spap)
 {
@@ -426,9 +440,6 @@ probe_drive(struct dsk *dsk, spa_t **spa
 char *sec;
 unsigned i;
 
-if (!int13probe(dsk->drive))
-   return;
-
 /*
  * If we find a vdev on the whole disk, stop here. Otherwise dig
  * out the MBR and probe each slice in turn for a vdev.
@@ -473,7 +484,7 @@ probe_drive(struct dsk *dsk, spa_t **spa
if (vdev_probe(vdev_read, dsk, spap) == 0) {
/*
 * We record the first pool we find (we will try
-* to boot from that one.
+* to boot from that one).
 */
spap = 0;
 
@@ -481,10 +492,7 @@ probe_drive(struct dsk *dsk, spa_t **spa
 * This slice had a vdev. We need a new dsk
 * structure now since the vdev now owns this one.
 */
-   struct dsk *newdsk;
-   newdsk = malloc(sizeof(struct dsk));
-   *newdsk = *dsk;
-   dsk = newdsk;
+   dsk = copy_dsk(dsk);
}
break;
}
@@ -514,10 +522,7 @@ trymbr:
 * This slice had a vdev. We need a new dsk structure now
 * since the vdev now owns this one.
 */
-   struct dsk *newdsk;
-   newdsk = malloc(sizeof(struct dsk));
-   *newdsk = *dsk;
-   dsk = newdsk;
+   dsk = copy_dsk(dsk);
}
 }
 }
@@ -569,10 +574,13 @@ main(void)
  * will find any other available pools and it may fill in missing
  * vdevs for the boot pool.
  */
-for (i = 0; i < 4; i++) {
+for (i = 0; i < 128; i++) {
if ((i | DRV_HARD) == *(uint8_t *)PTOV(ARGS))
continue;
 
+   if (!int13probe(i | DRV_HARD))
+   break;
+
dsk = malloc(sizeof(struct dsk));
dsk->drive = i | DRV_HARD;
dsk->type = dsk->drive & TYPE_AD;
@@ -944,7 +952,7 @@ static int
 drvread(struct dsk *dsk, void *buf, unsigned lba, unsigned nblk)
 {
 #ifdef GPT
-   static unsigned c = 0x2d5c7c2f;
+static unsigned c = 0x2d5c7c2f;
 
 if (!OPT_CHECK(RBX_QUIET))
printf("%c\b", c = c << 8 | c >> 24);

Modified: head/sys/boot/zfs/zfsimpl.c
==
--- head/sys/boot/zfs/zfsimpl.c Sat May 16 10:42:00 2009(r192193)
+++ head/sys/boot/zfs/zfsimpl.c Sat May 16 10:48:20 2009(r192194)
@@ -45,16 +45,13 @@ static vdev_list_t zfs_vdevs;
 static spa_list_t zfs_pools;
 
 static uint64_t zfs_crc64_table[256];
-static char *zfs_decomp_buf;
 static const dnode_phys_t *dnode_cache_obj = 0;
 static uint64_t dnode_cache_bn;
 static char *dnode_cache_buf;
 static char *zap_scratch;
+static char *zfs_temp_buf, *zfs_temp_end, *zfs_temp_ptr;
 
-/*
- * Forward declarations.
- */
-static int zio_read_phys(vdev_t *vdev, const blkptr_t *bp, void *buf, off_t 
offset);
+#define TEMP_SIZE  (1*SPA_MAXBLOCKSIZE)
 
 static void
 zfs_init(void)
@@ -62,13 +59,37 @@ zfs_init(void)
STAILQ_INIT(&zfs_vdevs);
STAILQ_INIT(&zfs_pools);
 
-   zfs_decomp_buf = malloc(128*1024);
-   dnode_cache_buf = malloc(128*1024);
-   zap_scratch = malloc(128*1024);
+   zfs_temp_buf = malloc(TEMP_SIZE);
+   zfs_temp_end = zfs_temp_buf + TEMP_SIZE;
+   zfs_temp_ptr = zfs_temp_buf;
+   dnode_cache_buf = malloc(SPA_MAXBLOCKSIZE);
+   zap_scratch = malloc(SPA_MAXBLOCKSIZE);
 
zfs_init_crc();
 }
 
+static char *
+zfs_alloc_temp(size_t sz)
+{
+   char *p;
+
+   if (zfs_temp_ptr + sz > zfs_temp_end) {
+   printf("ZFS: out of temporary buffer space\n");
+   for (;;) ;
+   }
+   p = zfs_temp_ptr;
+   zfs_temp_ptr += sz;
+
+   return (p);
+}
+
+static void
+zfs_reset_temp(void)
+{
+
+   zfs_temp_ptr = zfs_temp_buf;
+}
+
 static int
 xdr_int(const u

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

2009-05-16 Thread Christian Brueffer
Author: brueffer
Date: Sat May 16 12:11:06 2009
New Revision: 192195
URL: http://svn.freebsd.org/changeset/base/192195

Log:
  Make the HARDWARE section ready for the automatic hardware notes generation,
  fix the date format.

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

Modified: head/share/man/man4/urtw.4
==
--- head/share/man/man4/urtw.4  Sat May 16 10:48:20 2009(r192194)
+++ head/share/man/man4/urtw.4  Sat May 16 12:11:06 2009(r192195)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 15 2008 $
+.Dd November 15, 2008
 .Dt URTW 4
 .Os
 .Sh NAME
@@ -64,13 +64,15 @@ Only one virtual interface may be config
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE
-The following adapters should work:
+The
+.Nm
+driver supports Realtek RTL8187L based wireless network devices, including:
 .Pp
-.Bl -column "Card" "Radio" "Bus" -compact -offset 
6n
+.Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n
 .It Em "Card   Radio   Bus"
-.It Li "Netgear WG111v2" Ta RTL8225 Ta USB
-.It Li "Safehome WLG-1500SMA5" Ta RTL8225 Ta USB
-.It Li "Shuttle XPC Accessory PN20" Ta RTL8225 Ta USB
+.It "Netgear WG111v2   RTL8225 USB"
+.It "Safehome WLG-1500SMA5 RTL8225 USB"
+.It "Shuttle XPC Accessory PN20RTL8225 USB"
 .El
 .Sh EXAMPLES
 Join an existing BSS network (i.e., connect to an access point):
___
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: r192196 - head/release/doc/en_US.ISO8859-1/hardware

2009-05-16 Thread Christian Brueffer
Author: brueffer
Date: Sat May 16 12:12:31 2009
New Revision: 192196
URL: http://svn.freebsd.org/changeset/base/192196

Log:
  Add bwi(4) and urtw(4).

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Sat May 16 
12:11:06 2009(r192195)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Sat May 16 
12:12:31 2009(r192196)
@@ -898,6 +898,8 @@
 
   &hwlist.ath;
 
+  &hwlist.bwi;
+
   [&arch.i386;, &arch.amd64;] Intel PRO/Wireless 2100
MiniPCI network adapter (&man.ipw.4; driver)
 
@@ -922,6 +924,8 @@
 
   &hwlist.ural;
 
+  &hwlist.urtw;
+
   [&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent
Technologies WaveLAN/IEEE 802.11b wireless network adapters
and workalikes using the Lucent Hermes, Intersil PRISM-II,
___
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: r192198 - head/etc

2009-05-16 Thread Maxim Konovalov
Author: maxim
Date: Sat May 16 15:12:56 2009
New Revision: 192198
URL: http://svn.freebsd.org/changeset/base/192198

Log:
  o Add missed semicolon in action script.
  
  PR:   conf/134579
  Submitted by: Lucius Windschuh
  MFC after:1 week

Modified:
  head/etc/devd.conf

Modified: head/etc/devd.conf
==
--- head/etc/devd.conf  Sat May 16 14:30:08 2009(r192197)
+++ head/etc/devd.conf  Sat May 16 15:12:56 2009(r192198)
@@ -132,7 +132,7 @@ attach 100 {
match "vendor"  "0x1645";
match "product" "0x8001";
match "release" "0x0101";
-   action "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi 
/usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 
/dev/$device-name";
+   action "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi; 
/usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 
/dev/$device-name";
 };
 
 # This entry starts the ColdSync tool in daemon mode. Make sure you have an up
___
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: r192199 - head/sys/mips/mips

2009-05-16 Thread Ulf Lilleengen
Author: lulf
Date: Sat May 16 15:21:08 2009
New Revision: 192199
URL: http://svn.freebsd.org/changeset/base/192199

Log:
  - Fix spelling.

Modified:
  head/sys/mips/mips/pm_machdep.c

Modified: head/sys/mips/mips/pm_machdep.c
==
--- head/sys/mips/mips/pm_machdep.c Sat May 16 15:12:56 2009
(r192198)
+++ head/sys/mips/mips/pm_machdep.c Sat May 16 15:21:08 2009
(r192199)
@@ -130,7 +130,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
sfp = (struct sigframe *)((vm_offset_t)(regs->sp - 
sizeof(struct sigframe)) & ~(sizeof(__int64_t) - 1));
 
-   /* Translate the signal is appropriate */
+   /* Translate the signal if appropriate */
if (p->p_sysent->sv_sigtbl) {
if (sig <= p->p_sysent->sv_sigsize)
sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
___
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: r192200 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb ufs/ufs

2009-05-16 Thread Konstantin Belousov
Author: kib
Date: Sat May 16 17:15:26 2009
New Revision: 192200
URL: http://svn.freebsd.org/changeset/base/192200

Log:
  MFC r191137:
  Verify that '..' still exists with the same inode number after
  VFS_VGET() has returned in ufs_lookup().
  
  MFC r191260:
  When verifying '..' after VFS_VGET() in ufs_lookup(), do not return
  error if '..' is still there but changed between lookup and check.
  Start relookup instead.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/ufs/ufs/ufs_lookup.c

Modified: stable/7/sys/ufs/ufs/ufs_lookup.c
==
--- stable/7/sys/ufs/ufs/ufs_lookup.c   Sat May 16 15:21:08 2009
(r192199)
+++ stable/7/sys/ufs/ufs/ufs_lookup.c   Sat May 16 17:15:26 2009
(r192200)
@@ -77,6 +77,9 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, C
 /* true if old FS format...*/
 #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0)
 
+static int ufs_lookup_(struct vnode *, struct vnode **, struct componentname *,
+ino_t *);
+
 /*
  * Convert a component of a pathname into a pointer to a locked inode.
  * This is a very central and rather complicated routine.
@@ -130,7 +133,14 @@ ufs_lookup(ap)
struct componentname *a_cnp;
} */ *ap;
 {
-   struct vnode *vdp;  /* vnode for directory being searched */
+
+   return (ufs_lookup_(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL));
+}
+
+static int
+ufs_lookup_(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp,
+ino_t *dd_ino)
+{
struct inode *dp;   /* inode for directory being searched */
struct buf *bp; /* a buffer of directory entries */
struct direct *ep;  /* the current directory entry */
@@ -150,24 +160,16 @@ ufs_lookup(ap)
doff_t enduseful;   /* pointer past last used dir slot */
u_long bmask;   /* block offset mask */
int namlen, error;
-   struct vnode **vpp = ap->a_vpp;
-   struct componentname *cnp = ap->a_cnp;
struct ucred *cred = cnp->cn_cred;
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
struct thread *td = cnp->cn_thread;
-   ino_t ino;
+   ino_t ino, ino1;
int ltype;
 
-   bp = NULL;
-   slotoffset = -1;
-/*
- *  XXX there was a soft-update diff about this I couldn't merge.
- * I think this was the equiv.
- */
-   *vpp = NULL;
+   if (vpp != NULL)
+   *vpp = NULL;
 
-   vdp = ap->a_dvp;
dp = VTOI(vdp);
 
/*
@@ -178,6 +180,12 @@ ufs_lookup(ap)
 */
vnode_create_vobject(vdp, DIP(dp, i_size), cnp->cn_thread);
 
+   bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
+
+restart:
+   bp = NULL;
+   slotoffset = -1;
+
/*
 * We now have a segment name to search for, and a directory to search.
 *
@@ -195,7 +203,6 @@ ufs_lookup(ap)
slotstatus = NONE;
slotneeded = DIRECTSIZ(cnp->cn_namelen);
}
-   bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
 
 #ifdef UFS_DIRHASH
/*
@@ -364,7 +371,7 @@ foundentry:
slotoffset = i_offset;
slotsize = ep->d_reclen;
enduseful = dp->i_size;
-   ap->a_cnp->cn_flags |= ISWHITEOUT;
+   cnp->cn_flags |= ISWHITEOUT;
numdirpasses--;
goto notfound;
}
@@ -398,8 +405,8 @@ notfound:
 */
if ((nameiop == CREATE || nameiop == RENAME ||
 (nameiop == DELETE &&
- (ap->a_cnp->cn_flags & DOWHITEOUT) &&
- (ap->a_cnp->cn_flags & ISWHITEOUT))) &&
+ (cnp->cn_flags & DOWHITEOUT) &&
+ (cnp->cn_flags & ISWHITEOUT))) &&
(flags & ISLASTCN) && dp->i_effnlink != 0) {
/*
 * Access for write is interpreted as allowing
@@ -454,7 +461,7 @@ notfound:
 * Insert name into cache (as non-existent) if appropriate.
 */
if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE)
-   cache_enter(vdp, *vpp, cnp);
+   cache_enter(vdp, NULL, cnp);
return (ENOENT);
 
 found:
@@ -480,6 +487,11 @@ found:
if ((flags & ISLASTCN) && nameiop == LOOKUP)
dp->i_diroff = i_offset &~ (DIRBLKSIZ - 1);
 
+   if (dd_ino != NULL) {
+   *dd_ino = ino;
+   return (0);
+   }
+
/*
 * If deleting, and at end of pathname, return
 * parameters which can be used to remove file.
@@ -581,6 +593,22 

svn commit: r192201 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb ufs/ufs

2009-05-16 Thread Konstantin Belousov
Author: kib
Date: Sat May 16 17:22:03 2009
New Revision: 192201
URL: http://svn.freebsd.org/changeset/base/192201

Log:
  MFC r191315:
  In ufs_checkpath(), recheck that '..' still points to the inode with
  the same inode number after VFS_VGET() and relock of the vp. If '..'
  changed, redo the lookup.
  
  Supply the source inode number as an argument to ufs_checkpath() instead
  of the source inode itself.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/ufs/ufs/ufs_extern.h
  stable/7/sys/ufs/ufs/ufs_lookup.c
  stable/7/sys/ufs/ufs/ufs_vnops.c

Modified: stable/7/sys/ufs/ufs/ufs_extern.h
==
--- stable/7/sys/ufs/ufs/ufs_extern.h   Sat May 16 17:15:26 2009
(r192200)
+++ stable/7/sys/ufs/ufs/ufs_extern.h   Sat May 16 17:22:03 2009
(r192201)
@@ -58,7 +58,7 @@ intufs_bmap(struct vop_bmap_args *);
 int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *,
struct buf *, int *, int *);
 int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **);
-int ufs_checkpath(struct inode *, struct inode *, struct ucred *);
+int ufs_checkpath(ino_t, struct inode *, struct ucred *);
 voidufs_dirbad(struct inode *, doff_t, char *);
 int ufs_dirbadentry(struct vnode *, struct direct *, int);
 int ufs_dirempty(struct inode *, ino_t, struct ucred *);

Modified: stable/7/sys/ufs/ufs/ufs_lookup.c
==
--- stable/7/sys/ufs/ufs/ufs_lookup.c   Sat May 16 17:15:26 2009
(r192200)
+++ stable/7/sys/ufs/ufs/ufs_lookup.c   Sat May 16 17:22:03 2009
(r192201)
@@ -1238,69 +1238,81 @@ ufs_dirempty(ip, parentino, cred)
return (1);
 }
 
+static int
+ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino)
+{
+   struct dirtemplate dirbuf;
+   int error, namlen;
+
+   if (vp->v_type != VDIR)
+   return (ENOTDIR);
+   error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
+   sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
+   IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0, NULL);
+   if (error != 0)
+   return (error);
+#if (BYTE_ORDER == LITTLE_ENDIAN)
+   if (OFSFMT(vp))
+   namlen = dirbuf.dotdot_type;
+   else
+   namlen = dirbuf.dotdot_namlen;
+#else
+   namlen = dirbuf.dotdot_namlen;
+#endif
+   if (namlen != 2 || dirbuf.dotdot_name[0] != '.' ||
+   dirbuf.dotdot_name[1] != '.')
+   return (ENOTDIR);
+   *dd_ino = dirbuf.dotdot_ino;
+   return (0);
+}
+
 /*
  * Check if source directory is in the path of the target directory.
  * Target is supplied locked, source is unlocked.
  * The target is always vput before returning.
  */
 int
-ufs_checkpath(source, target, cred)
-   struct inode *source, *target;
-   struct ucred *cred;
+ufs_checkpath(ino_t source_ino, struct inode *target, struct ucred *cred)
 {
-   struct vnode *vp;
-   int error, namlen;
-   ino_t rootino;
-   struct dirtemplate dirbuf;
+   struct vnode *vp, *vp1;
+   int error;
+   ino_t dd_ino;
 
vp = ITOV(target);
-   if (target->i_number == source->i_number) {
+   if (target->i_number == source_ino) {
error = EEXIST;
goto out;
}
-   rootino = ROOTINO;
error = 0;
-   if (target->i_number == rootino)
+   if (target->i_number == ROOTINO)
goto out;
 
for (;;) {
-   if (vp->v_type != VDIR) {
-   error = ENOTDIR;
-   break;
-   }
-   error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
-   sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
-   IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0,
-   (struct thread *)0);
+   error = ufs_dir_dd_ino(vp, cred, &dd_ino);
if (error != 0)
break;
-#  if (BYTE_ORDER == LITTLE_ENDIAN)
-   if (OFSFMT(vp))
-   namlen = dirbuf.dotdot_type;
-   else
-   namlen = dirbuf.dotdot_namlen;
-#  else
-   namlen = dirbuf.dotdot_namlen;
-#  endif
-   if (namlen != 2 ||
-   dirbuf.dotdot_name[0] != '.' ||
-   dirbuf.dotdot_name[1] != '.') {
-   error = ENOTDIR;
-   break;
-   }
-   if (dirbuf.dotdot_ino == source->i_number) {
+   if (dd_ino == source_ino) {
error = EINVAL;
break;
}

Re: svn commit: r192194 - in head/sys: boot/i386/zfsboot boot/zfs cddl/boot/zfs

2009-05-16 Thread Pegasus Mc Cleaft
On Saturday 16 May 2009 10:48:20 Doug Rabson wrote:
> Author: dfr
> Date: Sat May 16 10:48:20 2009
> New Revision: 192194
> URL: http://svn.freebsd.org/changeset/base/192194
>
> Log:
>   Add support for booting from raidz1 and raidz2 pools.
>
> Modified:
>   head/sys/boot/i386/zfsboot/zfsboot.c
>   head/sys/boot/zfs/zfsimpl.c
>   head/sys/cddl/boot/zfs/README
>   head/sys/cddl/boot/zfs/zfsimpl.h
>   head/sys/cddl/boot/zfs/zfssubr.c
>
I think there may be a bug when you boot the machine from a drive that 
is a 
member of a zfs-mirror and you have raidz pools elsewhere. 

On reboot, I would get message saying there was no bootable kernel and 
dropped me down to the "OK" prompt. At that point, lsdev would show all the 
pools (both zfs-mirror and zraid's) and "ls" would return an error saying 
there were to many open files. 

I was able to work around the problem by pulling all the drives in the 
zraid 
pool into single user, attach all the drives and use atacontrol attach to 
bring them online before going to multi-user and hitting /etc/rc.d/zfs start. 

The only thing I haven't tried, and may be the key to the problem is 
reloading the boot-strap on the bootable drives. Would that make any 
difference? 

Peg

___
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: r192050 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include

2009-05-16 Thread Alan Cox

John Baldwin wrote:

Author: jhb
Date: Wed May 13 17:53:04 2009
New Revision: 192050
URL: http://svn.freebsd.org/changeset/base/192050

Log:
  Implement simple machine check support for amd64 and i386.
  - For CPUs that only support MCE (the machine check exception) but not MCA
(i.e. Pentium), all this does is print out the value of the machine check
registers and then panic when a machine check exception occurs.
  - For CPUs that support MCA (the machine check architecture), the support is
a bit more involved.
- First, there is limited support for decoding the CPU-independent MCA
  error codes in the kernel, and the kernel uses this to output a short
  description of any machine check events that occur.
- When a machine check exception occurs, all of the MCx banks on the
  current CPU are scanned and any events are reported to the console
  before panic'ing.
- To catch events for correctable errors, a periodic timer kicks off a
  task which scans the MCx banks on all CPUs.  The frequency of these
  checks is controlled via the "hw.mca.interval" sysctl.
- Userland can request an immediate scan of the MCx banks by writing
  a non-zero value to "hw.mca.force_scan".
- If any correctable events are encountered, the appropriate details
  are stored in a 'struct mca_record' (defined in ).
  The "hw.mca.count" is a count of such records and each record may
  be queried via the "hw.mca.records" tree by specifying the record
  index (0 .. count - 1) as the next name in the MIB similar to using
  PIDs with the kern.proc.* sysctls.  The idea is to export machine
  check events to userland for more detailed processing.
- The periodic timer and hw.mca sysctls are only present if the CPU
  supports MCA.
  
  Discussed with:	emaste (briefly)

  MFC after:1 month

Added:
  head/sys/amd64/amd64/mca.c   (contents, props changed)
  head/sys/amd64/include/mca.h   (contents, props changed)
  head/sys/i386/i386/mca.c   (contents, props changed)
  head/sys/i386/include/mca.h   (contents, props changed)
Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/amd64/amd64/trap.c
  head/sys/amd64/include/specialreg.h
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/i386/i386/machdep.c
  head/sys/i386/i386/mp_machdep.c
  head/sys/i386/i386/trap.c
  head/sys/i386/include/specialreg.h
  


After this change my Phenom II locks up hard within minutes of booting.  
There are no messages, and I am unable to break into the debugger from a 
serial console.


The same exact kernel is running fine on a Core 2 Quad.

Regards,
Alan

___
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: r192203 - head/sys/compat/linux

2009-05-16 Thread Dmitry Chagin
Author: dchagin
Date: Sat May 16 18:42:18 2009
New Revision: 192203
URL: http://svn.freebsd.org/changeset/base/192203

Log:
  Emulate SO_PEERCRED socket option.
  Temporarily use 0 for pid member as the FreeBSD does not cache remote
  UNIX domain socket peer pid.
  
  PR:   kern/102956
  Reviewed by:  rwatson
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_socket.c
  head/sys/compat/linux/linux_socket.h

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cSat May 16 18:08:28 2009
(r192202)
+++ head/sys/compat/linux/linux_socket.cSat May 16 18:42:18 2009
(r192203)
@@ -1354,7 +1354,9 @@ linux_getsockopt(struct thread *td, stru
} */ bsd_args;
l_timeval linux_tv;
struct timeval tv;
-   socklen_t tv_len;
+   socklen_t tv_len, xulen;
+   struct xucred xu;
+   struct l_ucred lxu;
int error, name;
 
bsd_args.s = args->s;
@@ -1377,6 +1379,23 @@ linux_getsockopt(struct thread *td, stru
sizeof(linux_tv)));
/* NOTREACHED */
break;
+   case LOCAL_PEERCRED:
+   if (args->optlen != sizeof(lxu))
+   return (EINVAL);
+   xulen = sizeof(xu);
+   error = kern_getsockopt(td, args->s, bsd_args.level,
+   name, &xu, UIO_SYSSPACE, &xulen);
+   if (error)
+   return (error);
+   /*
+* XXX Use 0 for pid as the FreeBSD does not cache peer 
pid.
+*/
+   lxu.pid = 0;
+   lxu.uid = xu.cr_uid;
+   lxu.gid = xu.cr_gid;
+   return (copyout(&lxu, PTRIN(args->optval), 
sizeof(lxu)));
+   /* NOTREACHED */
+   break;
default:
break;
}

Modified: head/sys/compat/linux/linux_socket.h
==
--- head/sys/compat/linux/linux_socket.hSat May 16 18:08:28 2009
(r192202)
+++ head/sys/compat/linux/linux_socket.hSat May 16 18:42:18 2009
(r192203)
@@ -90,4 +90,10 @@
 #defineLINUX_AF_APPLETALK  5
 #defineLINUX_AF_INET6  10
 
+struct l_ucred {
+   uint32_tpid;
+   uint32_tuid;
+   uint32_tgid;
+};
+
 #endif /* _LINUX_SOCKET_H_ */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192204 - head/sys/compat/linux

2009-05-16 Thread Dmitry Chagin
Author: dchagin
Date: Sat May 16 18:44:56 2009
New Revision: 192204
URL: http://svn.freebsd.org/changeset/base/192204

Log:
  Use the protocol family constants for the domain argument validation.
  Return immediately when the socket() failed.
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cSat May 16 18:42:18 2009
(r192203)
+++ head/sys/compat/linux/linux_socket.cSat May 16 18:44:56 2009
(r192204)
@@ -602,10 +602,12 @@ linux_socket(struct thread *td, struct l
return (EAFNOSUPPORT);
 
retval_socket = socket(td, &bsd_args);
+   if (retval_socket)
+   return (retval_socket);
+
if (bsd_args.type == SOCK_RAW
&& (bsd_args.protocol == IPPROTO_RAW || bsd_args.protocol == 0)
-   && bsd_args.domain == AF_INET
-   && retval_socket >= 0) {
+   && bsd_args.domain == PF_INET) {
/* It's a raw IP socket: set the IP_HDRINCL option. */
int hdrincl;
 
@@ -620,7 +622,7 @@ linux_socket(struct thread *td, struct l
 * default and some apps depend on this. So, set V6ONLY to 0
 * for Linux apps if the sysctl value is set to 1.
 */
-   if (bsd_args.domain == PF_INET6 && retval_socket >= 0
+   if (bsd_args.domain == PF_INET6
 #ifndef KLD_MODULE
/*
 * XXX: Avoid undefined symbol error with an IPv4 only
___
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: r192205 - head/sys/compat/linux

2009-05-16 Thread Dmitry Chagin
Author: dchagin
Date: Sat May 16 18:46:51 2009
New Revision: 192205
URL: http://svn.freebsd.org/changeset/base/192205

Log:
  Return EINVAL in case when the incorrect or unsupported
  type argument is specified.
  
  Do not map type argument value as its Linux values are
  identical to FreeBSD values.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/compat/linux/linux_socket.c
  head/sys/compat/linux/linux_socket.h

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cSat May 16 18:44:56 2009
(r192204)
+++ head/sys/compat/linux/linux_socket.cSat May 16 18:46:51 2009
(r192205)
@@ -597,6 +597,8 @@ linux_socket(struct thread *td, struct l
 
bsd_args.protocol = args->protocol;
bsd_args.type = args->type;
+   if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX)
+   return (EINVAL);
bsd_args.domain = linux_to_bsd_domain(args->domain);
if (bsd_args.domain == -1)
return (EAFNOSUPPORT);

Modified: head/sys/compat/linux/linux_socket.h
==
--- head/sys/compat/linux/linux_socket.hSat May 16 18:44:56 2009
(r192204)
+++ head/sys/compat/linux/linux_socket.hSat May 16 18:46:51 2009
(r192205)
@@ -90,6 +90,16 @@
 #defineLINUX_AF_APPLETALK  5
 #defineLINUX_AF_INET6  10
 
+/* Supported socket types */
+
+#defineLINUX_SOCK_STREAM   1
+#defineLINUX_SOCK_DGRAM2
+#defineLINUX_SOCK_RAW  3
+#defineLINUX_SOCK_RDM  4
+#defineLINUX_SOCK_SEQPACKET5
+
+#defineLINUX_SOCK_MAX  LINUX_SOCK_SEQPACKET
+
 struct l_ucred {
uint32_tpid;
uint32_tuid;
___
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: r192194 - in head/sys: boot/i386/zfsboot boot/zfs cddl/boot/zfs

2009-05-16 Thread Doug Rabson


On 16 May 2009, at 19:35, Pegasus Mc Cleaft wrote:


On Saturday 16 May 2009 10:48:20 Doug Rabson wrote:

Author: dfr
Date: Sat May 16 10:48:20 2009
New Revision: 192194
URL: http://svn.freebsd.org/changeset/base/192194

Log:
 Add support for booting from raidz1 and raidz2 pools.

Modified:
 head/sys/boot/i386/zfsboot/zfsboot.c
 head/sys/boot/zfs/zfsimpl.c
 head/sys/cddl/boot/zfs/README
 head/sys/cddl/boot/zfs/zfsimpl.h
 head/sys/cddl/boot/zfs/zfssubr.c

	I think there may be a bug when you boot the machine from a drive  
that is a

member of a zfs-mirror and you have raidz pools elsewhere.

	On reboot, I would get message saying there was no bootable kernel  
and
dropped me down to the "OK" prompt. At that point, lsdev would show  
all the
pools (both zfs-mirror and zraid's) and "ls" would return an error  
saying

there were to many open files.

	I was able to work around the problem by pulling all the drives in  
the zraid
pool into single user, attach all the drives and use atacontrol  
attach to
bring them online before going to multi-user and hitting /etc/rc.d/ 
zfs start.


The only thing I haven't tried, and may be the key to the problem is
reloading the boot-strap on the bootable drives. Would that make any
difference?


I'm not sure but it can't hurt. The part of the bootstrap that runs  
before /boot/loader (e.g. gptzfsboot) also has access to all the pools  
in the system (at least the ones where the drives are visible to the  
BIOS). It should figure out which pool contains the drive that was  
actually booted and load /boot/loader from that. It should also pass  
the identity of that pool down to /boot/loader so that the process  
continues with the correct pool.



___
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: r192206 - in head/sys: amd64/linux32 compat/linux i386/linux

2009-05-16 Thread Dmitry Chagin
Author: dchagin
Date: Sat May 16 18:48:41 2009
New Revision: 192206
URL: http://svn.freebsd.org/changeset/base/192206

Log:
  Somewhere between 2.6.23 and 2.6.27, Linux added SOCK_CLOEXEC and
  SOCK_NONBLOCK flags, that allow to save fcntl() calls.
  
  Implement a variation of the socket() syscall which takes a flags
  in addition to the type argument.
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/amd64/linux32/linux.h
  head/sys/compat/linux/linux_socket.c
  head/sys/compat/linux/linux_socket.h
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux32/linux.h
==
--- head/sys/amd64/linux32/linux.h  Sat May 16 18:46:51 2009
(r192205)
+++ head/sys/amd64/linux32/linux.h  Sat May 16 18:48:41 2009
(r192206)
@@ -571,6 +571,7 @@ int linux_ioctl_unregister_handler(struc
 #defineLINUX_O_DIRECTORY   0020/* Must be a directory 
*/
 #defineLINUX_O_NOFOLLOW0040/* Do not follow links 
*/
 #defineLINUX_O_NOATIME 0100
+#defineLINUX_O_CLOEXEC 0200
 
 #defineLINUX_F_DUPFD   0
 #defineLINUX_F_GETFD   1

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cSat May 16 18:46:51 2009
(r192205)
+++ head/sys/compat/linux/linux_socket.cSat May 16 18:48:41 2009
(r192206)
@@ -593,10 +593,13 @@ linux_socket(struct thread *td, struct l
int type;
int protocol;
} */ bsd_args;
-   int retval_socket;
+   int retval_socket, socket_flags;
 
bsd_args.protocol = args->protocol;
-   bsd_args.type = args->type;
+   socket_flags = args->type & ~LINUX_SOCK_TYPE_MASK;
+   if (socket_flags & ~(LINUX_SOCK_CLOEXEC | LINUX_SOCK_NONBLOCK))
+   return (EINVAL);
+   bsd_args.type = args->type & LINUX_SOCK_TYPE_MASK;
if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX)
return (EINVAL);
bsd_args.domain = linux_to_bsd_domain(args->domain);
@@ -607,6 +610,23 @@ linux_socket(struct thread *td, struct l
if (retval_socket)
return (retval_socket);
 
+   if (socket_flags & LINUX_SOCK_NONBLOCK) {
+   retval_socket = kern_fcntl(td, td->td_retval[0],
+   F_SETFL, O_NONBLOCK);
+   if (retval_socket) {
+   (void)kern_close(td, td->td_retval[0]);
+   goto out;
+   }
+   }
+   if (socket_flags & LINUX_SOCK_CLOEXEC) {
+   retval_socket = kern_fcntl(td, td->td_retval[0],
+   F_SETFD, FD_CLOEXEC);
+   if (retval_socket) {
+   (void)kern_close(td, td->td_retval[0]);
+   goto out;
+   }
+   }
+
if (bsd_args.type == SOCK_RAW
&& (bsd_args.protocol == IPPROTO_RAW || bsd_args.protocol == 0)
&& bsd_args.domain == PF_INET) {
@@ -642,6 +662,7 @@ linux_socket(struct thread *td, struct l
}
 #endif
 
+out:
return (retval_socket);
 }
 

Modified: head/sys/compat/linux/linux_socket.h
==
--- head/sys/compat/linux/linux_socket.hSat May 16 18:46:51 2009
(r192205)
+++ head/sys/compat/linux/linux_socket.hSat May 16 18:48:41 2009
(r192206)
@@ -100,6 +100,13 @@
 
 #defineLINUX_SOCK_MAX  LINUX_SOCK_SEQPACKET
 
+#defineLINUX_SOCK_TYPE_MASK0xf
+
+/* Flags for socket, socketpair, accept4 */
+
+#defineLINUX_SOCK_CLOEXEC  LINUX_O_CLOEXEC
+#defineLINUX_SOCK_NONBLOCK LINUX_O_NONBLOCK
+
 struct l_ucred {
uint32_tpid;
uint32_tuid;

Modified: head/sys/i386/linux/linux.h
==
--- head/sys/i386/linux/linux.h Sat May 16 18:46:51 2009(r192205)
+++ head/sys/i386/linux/linux.h Sat May 16 18:48:41 2009(r192206)
@@ -547,6 +547,7 @@ int linux_ioctl_unregister_handler(struc
 #defineLINUX_O_DIRECTORY   0020/* Must be a directory 
*/
 #defineLINUX_O_NOFOLLOW0040/* Do not follow links 
*/
 #defineLINUX_O_NOATIME 0100
+#defineLINUX_O_CLOEXEC 0200
 
 #defineLINUX_F_DUPFD   0
 #defineLINUX_F_GETFD   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: r192207 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs vm

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 19:17:15 2009
New Revision: 192207
URL: http://svn.freebsd.org/changeset/base/192207

Log:
  apply band-aid to x86_64 systems with more physical memory than kmem by 
allocating from the direct map

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
  head/sys/vm/vm_contig.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Sat May 16 
18:48:41 2009(r192206)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Sat May 16 
19:17:15 2009(r192207)
@@ -172,6 +172,7 @@ uint64_t zfs_arc_max;
 uint64_t zfs_arc_min;
 uint64_t zfs_arc_meta_limit = 0;
 int zfs_mdcomp_disable = 0;
+int arc_large_memory_enabled = 0;
 
 TUNABLE_QUAD("vfs.zfs.arc_max", &zfs_arc_max);
 TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc_min);
@@ -3429,17 +3430,13 @@ arc_init(void)
arc_min_prefetch_lifespan = 1 * hz;
 
/* Start out with 1/8 of all memory */
+#if defined(_KERNEL) && (__amd64__)
+   arc_c = physmem*PAGE_SIZE / 8;
+   if (physmem*PAGE_SIZE > kmem_size())
+   arc_large_memory_enabled = 1;
+#else
arc_c = kmem_size() / 8;
-#if 0
-#ifdef _KERNEL
-   /*
-* On architectures where the physical memory can be larger
-* than the addressable space (intel in 32-bit mode), we may
-* need to limit the cache to 1/8 of VM size.
-*/
-   arc_c = MIN(arc_c, vmem_size(heap_arena, VMEM_ALLOC | VMEM_FREE) / 8);
-#endif
-#endif
+#endif 
/* set min cache to 1/32 of all memory, or 16MB, whichever is more */
arc_c_min = MAX(arc_c / 4, 64<<18);
/* set max to 1/2 of all memory, or all but 1GB, whichever is more */
@@ -3453,8 +3450,13 @@ arc_init(void)
 * Allow the tunables to override our calculations if they are
 * reasonable (ie. over 16MB)
 */
+#if defined(_KERNEL) && defined(__amd64__)
+   if (zfs_arc_max >= 64<<18)
+   arc_c_max = zfs_arc_max;
+#else
if (zfs_arc_max >= 64<<18 && zfs_arc_max < kmem_size())
arc_c_max = zfs_arc_max;
+#endif 
if (zfs_arc_min >= 64<<18 && zfs_arc_min <= arc_c_max)
arc_c_min = zfs_arc_min;
 #endif

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c   Sat May 16 
18:48:41 2009(r192206)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c   Sat May 16 
19:17:15 2009(r192207)
@@ -33,6 +33,9 @@
 #include 
 #include 
 
+#if defined(_KERNEL) && defined(__amd64__)
+#include 
+#endif
 /*
  * ==
  * I/O priority table
@@ -85,6 +88,8 @@ extern vmem_t *zio_alloc_arena;
 #defineIO_IS_ALLOCATING(zio) \
((zio)->io_orig_pipeline & (1U << ZIO_STAGE_DVA_ALLOCATE))
 
+extern int arc_large_memory_enabled;
+
 void
 zio_init(void)
 {
@@ -205,6 +210,80 @@ zio_buf_alloc(size_t size)
 #endif
 }
 
+#if defined(_KERNEL) && defined(__amd64__)
+extern int vm_contig_launder(int queue);
+
+static void *
+zio_large_malloc(size_t size)
+{
+   void *ret;
+   vm_page_t pages;
+   unsigned long npgs;
+   int actl, actmax, inactl, inactmax, tries;
+   int flags = M_WAITOK;
+   vm_paddr_t low = (1UL<<29); /* leave lower 512MB untouched */
+   vm_paddr_t high = ~(vm_paddr_t)0;
+   unsigned long alignment = 1;
+   unsigned long boundary = 0;
+
+   npgs = round_page(size) >> PAGE_SHIFT;
+   tries = 0;
+retry:
+   pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary);
+   if (pages == NULL) {
+   if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) {
+   vm_page_lock_queues();
+   inactl = 0;
+   inactmax = tries < 1 ? 0 : cnt.v_inactive_count;
+   actl = 0;
+   actmax = tries < 2 ? 0 : cnt.v_active_count;
+again:
+   if (inactl < inactmax &&
+   vm_contig_launder(PQ_INACTIVE)) {
+   inactl++;
+   goto again;
+   }
+   if (actl < actmax &&
+   vm_contig_launder(PQ_ACTIVE)) {
+   actl++;
+   goto again;
+   }
+   vm_page_unlock_queues();
+   tries++;
+   goto retry;
+   }
+
+   ret = NULL;
+   } else {
+   int i;
+   
+   vm_page_lock_queues();
+   for (i = 0; i < npgs; i++)
+ 

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

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 20:09:07 2009
New Revision: 192209
URL: http://svn.freebsd.org/changeset/base/192209

Log:
  only use direct map if system has more than 2GB

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   Sat May 16 
19:18:13 2009(r192208)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Sat May 16 
20:09:07 2009(r192209)
@@ -3432,7 +3432,7 @@ arc_init(void)
/* Start out with 1/8 of all memory */
 #if defined(_KERNEL) && (__amd64__)
arc_c = physmem*PAGE_SIZE / 8;
-   if (physmem*PAGE_SIZE > kmem_size())
+   if (physmem*PAGE_SIZE > kmem_size() && (physmem > (1UL<<31)))
arc_large_memory_enabled = 1;
 #else
arc_c = kmem_size() / 8;
___
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: r192210 - head/etc/rc.d

2009-05-16 Thread Doug Barton
Author: dougb
Date: Sat May 16 20:26:01 2009
New Revision: 192210
URL: http://svn.freebsd.org/changeset/base/192210

Log:
  Trim trailing whitespace from the end of a line

Modified:
  head/etc/rc.d/named

Modified: head/etc/rc.d/named
==
--- head/etc/rc.d/named Sat May 16 20:09:07 2009(r192209)
+++ head/etc/rc.d/named Sat May 16 20:26:01 2009(r192210)
@@ -79,7 +79,7 @@ chroot_autoupdate()
fi
fi
 
-   # Copy and/or update key files to the chroot /etc 
+   # Copy and/or update key files to the chroot /etc
#
for file in localtime protocols services; do
if [ -r /etc/$file ]; then
___
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: r192122 - in head/sys: amd64/conf i386/conf

2009-05-16 Thread M. Warner Losh
In message: <9bbcef730905151538w1d1dbd45oc44004115d6b5...@mail.gmail.com>
Ivan Voras  writes:
: 2009/5/14 John Baldwin :
: > Author: jhb
: > Date: Thu May 14 21:53:35 2009
: > New Revision: 192122
: > URL: http://svn.freebsd.org/changeset/base/192122
: >
: > Log:
: >  Trim the default set of device hints on i386 and amd64:
: >  - Remove vga0 and the disabled uart2/uart3 hints from both platforms.
: >  - Remove hints for ISA adv0, bt0, aha0, aic0, ed0, cs0, sn0, ie0, fe0, and
: >    le0 from i386.  All these hints were marked 'disabled' and thus already
: >    did not work "out of the box".
: 
: > -hint.le.0.at="isa"
: > -hint.le.0.disabled="1"
: > -hint.le.0.port="0x280"
: > -hint.le.0.irq="10"
: > -hint.le.0.drq="0"
: 
: Heh, this will again change the behaviour under virtualization hosts
: that emulate this hardware. Sometime before 7.0 the addition of this
: hint caused all leX devices to be renamed le(X+1) because le0 was
: taken and disabled. Restoring this will cause the same thing in
: reverse. Unless someone actually has this hardware (as opposed to its
: emulation) and needs the hint for something, I'd suggest these
: particular lines be removed before 8.0 to restore the original
: behaviour quickly. Obviously, they cannot be MFC-ed to 7-STABLE

Generically, this has been the case since:

r61640 | peter | 2000-06-13 16:28:50 -0600 (Tue, 13 Jun 2000) | 47 lines

Warner
___
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: r192211 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 20:33:13 2009
New Revision: 192211
URL: http://svn.freebsd.org/changeset/base/192211

Log:
  - allow forced unmounts
  - don't assume snapshot was auto-mounted

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cSat May 
16 20:26:01 2009(r192210)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cSat May 
16 20:33:13 2009(r192211)
@@ -967,8 +967,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
 
if (fflag & MS_FORCE) {
/* TODO: Force unmount is not well implemented yet, so deny it. 
*/
-   ZFS_LOG(0, "Force unmount is not supported, removing FORCE 
flag.");
-   fflag &= ~MS_FORCE;
+   ZFS_LOG(0, "Force unmount is experimental - report any 
problems.");
}
 
ret = secpolicy_fs_unmount(cr, vfsp);
@@ -1070,8 +1069,9 @@ zfs_umount(vfs_t *vfsp, int fflag)
if (zfsvfs->z_issnap) {
vnode_t *svp = vfsp->mnt_vnodecovered;
 
-   ASSERT(svp->v_count == 2);
-   VN_RELE(svp);
+   ASSERT(svp->v_count == 2 || svp->v_count == 1);
+   if (svp->v_count == 2)
+   VN_RELE(svp);
}
zfs_freevfs(vfsp);
 
___
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: r192215 - in head: etc/defaults etc/namedb etc/rc.d share/man/man5

2009-05-16 Thread Doug Barton
Author: dougb
Date: Sat May 16 20:55:28 2009
New Revision: 192215
URL: http://svn.freebsd.org/changeset/base/192215

Log:
  1. New feature; option to have the script loop until a specified hostname
  (localhost by default) can be successfully looked up. Off by default.
  2. New feature: option to create a forwarder configuration file based on
  the contents of /etc/resolv.conf. This allows you to utilize a local
  resolver for better performance, less network traffic, custom zones, etc.
  while still relying on the benefits of your local network resolver.
  Off by default.
  3. Add named-checkconf into the startup routine. This will prevent named
  from trying to start in a situation where it would not be possible to do
  so.

Modified:
  head/etc/defaults/rc.conf
  head/etc/namedb/named.conf
  head/etc/rc.d/named
  head/share/man/man5/rc.conf.5

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Sat May 16 20:51:28 2009(r192214)
+++ head/etc/defaults/rc.conf   Sat May 16 20:55:28 2009(r192215)
@@ -247,6 +247,7 @@ inetd_flags="-wW -C 60" # Optional flag
 #
 named_enable="NO"  # Run named, the DNS server (or NO).
 named_program="/usr/sbin/named" # Path to named, if you want a different one.
+named_conf="/etc/namedb/named.conf"# Path to the configuration file
 #named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin
 named_pidfile="/var/run/named/pid" # Must set this in named.conf as well
 named_uid="bind"   # User to run named as
@@ -254,6 +255,10 @@ named_chrootdir="/var/named"   # Chroot di
 named_chroot_autoupdate="YES"  # Automatically install/update chrooted
# components of named. See /etc/rc.d/named.
 named_symlink_enable="YES" # Symlink the chrooted pid file
+named_wait="NO"# Wait for working name service before exiting
+named_wait_host="localhost"# Hostname to check if named_wait is enabled
+named_auto_forward="NO"# Set up forwarders from /etc/resolv.conf
+named_auto_forward_only="NO"   # Do "forward only" instead of "forward first"
 
 #
 # kerberos. Do not run the admin daemons on slave servers

Modified: head/etc/namedb/named.conf
==
--- head/etc/namedb/named.conf  Sat May 16 20:51:28 2009(r192214)
+++ head/etc/namedb/named.conf  Sat May 16 20:55:28 2009(r192215)
@@ -31,12 +31,6 @@ options {
disable-empty-zone 
"0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
disable-empty-zone 
"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
 
-// In addition to the "forwarders" clause, you can force your name
-// server to never initiate queries of its own, but always ask its
-// forwarders only, by enabling the following line:
-//
-// forward only;
-
 // If you've got a DNS server around at your upstream provider, enter
 // its IP address here, and enable the line below.  This will make you
 // benefit from its cache, thus reduce overall DNS traffic in the Internet.
@@ -45,6 +39,20 @@ options {
127.0.0.1;
};
 */
+
+// If the 'forwarders' clause is not empty the default is to 'forward first'
+// which will fall back to sending a query from your local server if the name
+// servers in 'forwarders' do not have the answer.  Alternatively you can
+// force your name server to never initiate queries of its own by enabling the
+// following line:
+// forward only;
+
+// If you wish to have forwarding configured automatically based on
+// the entries in /etc/resolv.conf, uncomment the following line and
+// set named_auto_forward=yes in /etc/rc.conf.  You can also enable
+// named_auto_forward_only (the effect of which is described above).
+// include "/etc/namedb/auto_forward.conf";
+
/*
   Modern versions of BIND use a random UDP port for each outgoing
   query by default in order to dramatically reduce the possibility

Modified: head/etc/rc.d/named
==
--- head/etc/rc.d/named Sat May 16 20:51:28 2009(r192214)
+++ head/etc/rc.d/named Sat May 16 20:55:28 2009(r192215)
@@ -16,7 +16,7 @@ command="/usr/sbin/named"
 extra_commands="reload"
 
 start_precmd="named_precmd"
-start_postcmd="make_symlinks"
+start_postcmd="named_poststart"
 reload_cmd="named_reload"
 stop_cmd="named_stop"
 stop_postcmd="named_poststop"
@@ -97,6 +97,17 @@ make_symlinks()
ln -fs "${named_chrootdir}${pidfile}" ${pidfile}
 }
 
+named_poststart () {
+   make_symlinks
+
+   if checkyesno named_wait; then
+   until ${command%/sbin/named}/bin/host $named_wait_host 
>/dev/null 2>&1; do
+   echo "  Waiting for nameserver to resolve 
$named_wait_host"
+  

svn commit: r192216 - head/sys/amd64/include

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 20:57:08 2009
New Revision: 192216
URL: http://svn.freebsd.org/changeset/base/192216

Log:
  Increase default kernel map to 512GB
  
  I briefly discussed this with alc. It could lead to problems for greater than 
64GB.
  However, that seems unlikely in practice.

Modified:
  head/sys/amd64/include/vmparam.h

Modified: head/sys/amd64/include/vmparam.h
==
--- head/sys/amd64/include/vmparam.hSat May 16 20:55:28 2009
(r192215)
+++ head/sys/amd64/include/vmparam.hSat May 16 20:57:08 2009
(r192216)
@@ -155,7 +155,7 @@
  * 0x804020101000 - 0xfeff   unused
  * 0xff00 - 0xff7f   512GB direct map mappings
  * 0xff80 - 0xfffe3fff   unused (505GB)
- * 0xfffe4000 - 0x   7GB kernel map
+ * 0xfffe4000 - 0x   512GB kernel map
  *
  * Within the kernel map:
  *
@@ -163,7 +163,7 @@
  */
 
 #defineVM_MAX_KERNEL_ADDRESS   KVADDR(KPML4I, NPDPEPG-1, NPDEPG-1, 
NPTEPG-1)
-#defineVM_MIN_KERNEL_ADDRESS   KVADDR(KPML4I, NPDPEPG-7, 0, 0)
+#defineVM_MIN_KERNEL_ADDRESS   KVADDR(KPML4I, NPDPEPG-512, 0, 0)
 
 #defineDMAP_MIN_ADDRESSKVADDR(DMPML4I, 0, 0, 0)
 #defineDMAP_MAX_ADDRESSKVADDR(DMPML4I+1, 0, 0, 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192219 - head/usr.sbin/mergemaster

2009-05-16 Thread Doug Barton
Author: dougb
Date: Sat May 16 21:32:09 2009
New Revision: 192219
URL: http://svn.freebsd.org/changeset/base/192219

Log:
  Add -L to the mtree invocation to chase symbolic links that are present
  in "Service jails."
  
  Submitted by: Jeremie Le Hen 

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shSat May 16 21:08:32 2009
(r192218)
+++ head/usr.sbin/mergemaster/mergemaster.shSat May 16 21:32:09 2009
(r192219)
@@ -461,7 +461,7 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED
 #
 CHANGED=
 if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then
-   for file in `mtree -eq -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \
+   for file in `mtree -eqL -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \
2>/dev/null | awk '($2 == "changed") {print $1}'`; do
if [ -f "${DESTDIR}/$file" ]; then
CHANGED="${CHANGED} ${DESTDIR}/$file"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2009-05-16 Thread Christian Brueffer
Author: brueffer
Date: Sat May 16 21:38:55 2009
New Revision: 192220
URL: http://svn.freebsd.org/changeset/base/192220

Log:
  Sync up to rev. 1.25 from OpenBSD:
  
  1.19: nop
  1.20: nop
  1.21: nop
  1.22: typo fixed
  1.23: license clauses 3 and 4 nuked
  1.24: nop
  1.25: Sun Crypto Accelerator 1000 has a 5821 chip on it
  
  Obtained from:OpenBSD
  MFC after:3 days

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

Modified: head/share/man/man4/ubsec.4
==
--- head/share/man/man4/ubsec.4 Sat May 16 21:32:09 2009(r192219)
+++ head/share/man/man4/ubsec.4 Sat May 16 21:38:55 2009(r192220)
@@ -1,4 +1,4 @@
-.\"$OpenBSD: ubsec.4,v 1.18 2002/09/26 07:55:41 miod Exp $
+.\"$OpenBSD: ubsec.4,v 1.25 2003/08/12 19:42:46 jason Exp $
 .\"
 .\" Copyright (c) 2000 Jason L. Wright (ja...@thought.net)
 .\" All rights reserved.
@@ -11,11 +11,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"notice, this list of conditions and the following disclaimer in the
 .\"documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"must display the following acknowledgement:
-.\"This product includes software developed by Jason L. Wright
-.\" 4. The name of the author may not be used to endorse or promote products
-.\"derived from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -31,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 1, 2006
+.Dd May 16, 2009
 .Dt UBSEC 4
 .Os
 .Sh NAME
@@ -84,7 +79,7 @@ driver supports cards containing any of 
 .It Bluesteel 5501
 The original chipset, no longer made.
 This extremely rare unit
-was not very fast, lacked a RNG, and had a number of other bugs.
+was not very fast, lacked an RNG, and had a number of other bugs.
 .It Bluesteel 5601
 A faster and fixed version of the original, with a random number
 unit and large number engine added.
@@ -98,6 +93,7 @@ Faster version of Bluesteel 5601.
 64 bit version of the chip, and significantly more advanced.
 .It Broadcom BCM5821
 Faster version of the BCM5820.
+This is the chip found on the Sun Crypto Accelerator 1000.
 .It Broadcom BCM5822
 Faster version of the BCM5820.
 .It Broadcom BCM5823
___
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: r192224 - head/sys/amd64/include

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 22:00:13 2009
New Revision: 192224
URL: http://svn.freebsd.org/changeset/base/192224

Log:
  update vm map comment
  
  pointed out by Larry Rosenman

Modified:
  head/sys/amd64/include/vmparam.h

Modified: head/sys/amd64/include/vmparam.h
==
--- head/sys/amd64/include/vmparam.hSat May 16 21:59:31 2009
(r192223)
+++ head/sys/amd64/include/vmparam.hSat May 16 22:00:13 2009
(r192224)
@@ -154,7 +154,6 @@
  * 0x8000 - 0x804020100fff   recursive page table (512GB slot)
  * 0x804020101000 - 0xfeff   unused
  * 0xff00 - 0xff7f   512GB direct map mappings
- * 0xff80 - 0xfffe3fff   unused (505GB)
  * 0xfffe4000 - 0x   512GB kernel map
  *
  * Within the kernel map:
___
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: r192227 - head/sys/amd64/include

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 22:08:00 2009
New Revision: 192227
URL: http://svn.freebsd.org/changeset/base/192227

Log:
  correct range in comment
  pointed out by alc

Modified:
  head/sys/amd64/include/vmparam.h

Modified: head/sys/amd64/include/vmparam.h
==
--- head/sys/amd64/include/vmparam.hSat May 16 22:07:41 2009
(r192226)
+++ head/sys/amd64/include/vmparam.hSat May 16 22:08:00 2009
(r192227)
@@ -154,7 +154,7 @@
  * 0x8000 - 0x804020100fff   recursive page table (512GB slot)
  * 0x804020101000 - 0xfeff   unused
  * 0xff00 - 0xff7f   512GB direct map mappings
- * 0xfffe4000 - 0x   512GB kernel map
+ * 0xff80 - 0x   512GB kernel map
  *
  * Within the kernel map:
  *
___
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: r192228 - head/share/man/man4

2009-05-16 Thread Christian Brueffer
Author: brueffer
Date: Sat May 16 22:18:58 2009
New Revision: 192228
URL: http://svn.freebsd.org/changeset/base/192228

Log:
  Drop clause 3 of the license as per rev. 1.35 from OpenBSD.
  
  Obtained from:OpenBSD
  MFC after:3 days

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

Modified: head/share/man/man4/hifn.4
==
--- head/share/man/man4/hifn.4  Sat May 16 22:08:00 2009(r192227)
+++ head/share/man/man4/hifn.4  Sat May 16 22:18:58 2009(r192228)
@@ -11,8 +11,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"notice, this list of conditions and the following disclaimer in the
 .\"documentation and/or other materials provided with the distribution.
-.\" 3. The name of the author may not be used to endorse or promote products
-.\"derived from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
___
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: r192230 - head/usr.sbin/mergemaster

2009-05-16 Thread Doug Barton
Author: dougb
Date: Sat May 16 22:22:31 2009
New Revision: 192230
URL: http://svn.freebsd.org/changeset/base/192230

Log:
  Enhance the safety of the -U option:
  1. In several places make sure that the mtree database is not empty using
  the -s argument to test instead of -f. (I thought I'd already changed this,
  but obviously not.)
  2. When deriving the list of changed files use a colon-delimited list.
  3. If the list of changed files is empty, unset the variable, and test
  for a non-empty CHANGED in diff_loop() before entering that routine.
  
  Enhance the speed of the -U option by using an internal case statement
  instead of echoing the variable to an external grep for every file.
  
  Fix indentation on one line.

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shSat May 16 22:20:42 2009
(r192229)
+++ head/usr.sbin/mergemaster/mergemaster.shSat May 16 22:22:31 2009
(r192230)
@@ -115,8 +115,10 @@ diff_loop () {
   while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o \
 "${HANDLE_COMPFILE}" = "NOT V" ]; do
 if [ -f "${DESTDIR}${COMPFILE#.}" -a -f "${COMPFILE}" ]; then
-  if [ -n "${AUTO_UPGRADE}" ]; then
-if echo "${CHANGED}" | grep -qsv ${DESTDIR}${COMPFILE#.}; then
+  if [ -n "${AUTO_UPGRADE}" -a -n "${CHANGED}" ]; then
+case "${CHANGED}" in
+*:${DESTDIR}${COMPFILE#.}:*) ;;# File has been modified
+*)
   echo ''
   echo "  *** ${COMPFILE} has not been user modified."
   echo ''
@@ -128,10 +130,11 @@ diff_loop () {
 AUTO_UPGRADED_FILES="${AUTO_UPGRADED_FILES}  
${DESTDIR}${COMPFILE#.}
 "
   else
-  echo "   *** Problem upgrading ${COMPFILE}, it will remain to merge 
by hand"
+echo "   *** Problem upgrading ${COMPFILE}, it will remain to 
merge by hand"
   fi
   return
-fi
+  ;;
+esac
   fi
   if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then
echo ''
@@ -348,7 +351,7 @@ fi
 case "${AUTO_UPGRADE}" in
 '') ;; # If the option is not set no need to run the test or warn the user
 *)
-  if [ ! -f "${DESTDIR}${MTREEFILE}" ]; then
+  if [ ! -s "${DESTDIR}${MTREEFILE}" ]; then
 echo ''
 echo "*** Unable to find mtree database. Skipping auto-upgrade."
 echo ''
@@ -459,14 +462,15 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED
 # Check DESTDIR against the mergemaster mtree database to see what
 # files the user changed from the reference files.
 #
-CHANGED=
-if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then
+if [ -n "${AUTO_UPGRADE}" -a -s "${DESTDIR}${MTREEFILE}" ]; then
+   CHANGED=:
for file in `mtree -eqL -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \
2>/dev/null | awk '($2 == "changed") {print $1}'`; do
if [ -f "${DESTDIR}/$file" ]; then
-   CHANGED="${CHANGED} ${DESTDIR}/$file"
+   CHANGED="${CHANGED}${DESTDIR}/${file}:"
fi
done
+   [ "$CHANGED" = ':' ] && unset CHANGED
 fi
 
 # Check the width of the user's terminal
@@ -1055,7 +1059,7 @@ done # This is for the for way up there 
 echo ''
 echo "*** Comparison complete"
 
-if [ -f "${MTREENEW}" ]; then
+if [ -s "${MTREENEW}" ]; then
   echo "*** Saving mtree database for future upgrades"
   test -e "${DESTDIR}${MTREEFILE}" && unlink ${DESTDIR}${MTREEFILE}
   mv ${MTREENEW} ${DESTDIR}${MTREEFILE}
___
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: r192231 - head/sys/fs/nfsclient

2009-05-16 Thread Rick Macklem
Author: rmacklem
Date: Sat May 16 22:31:38 2009
New Revision: 192231
URL: http://svn.freebsd.org/changeset/base/192231

Log:
  Changed sys/fs/nfs_clbio.c in the same way Alan Cox changed
  sys/nfsclient/nfs_bio.c for r192134, so that the sources stay
  in sync.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/fs/nfsclient/nfs_clbio.c

Modified: head/sys/fs/nfsclient/nfs_clbio.c
==
--- head/sys/fs/nfsclient/nfs_clbio.c   Sat May 16 22:22:31 2009
(r192230)
+++ head/sys/fs/nfsclient/nfs_clbio.c   Sat May 16 22:31:38 2009
(r192231)
@@ -313,9 +313,9 @@ ncl_getpages(struct vop_getpages_args *a
 * Read operation filled a partial page.
 */
m->valid = 0;
-   vm_page_set_validclean(m, 0, size - toff);
-   /* handled by vm_fault now*/
-   /* vm_page_zero_invalid(m, TRUE); */
+   vm_page_set_valid(m, 0, size - toff);
+   KASSERT((m->dirty & vm_page_bits(0, size - toff)) == 0,
+   ("nfs_getpages: page %p is dirty", m));
} else {
/*
 * Read operation was short.  If no error occured
___
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: r192234 - head/sys/cddl/compat/opensolaris/sys

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sat May 16 23:56:45 2009
New Revision: 192234
URL: http://svn.freebsd.org/changeset/base/192234

Log:
  enable adaptive spinning on zfs locks

Modified:
  head/sys/cddl/compat/opensolaris/sys/mutex.h
  head/sys/cddl/compat/opensolaris/sys/rwlock.h

Modified: head/sys/cddl/compat/opensolaris/sys/mutex.h
==
--- head/sys/cddl/compat/opensolaris/sys/mutex.hSat May 16 23:33:07 
2009(r192233)
+++ head/sys/cddl/compat/opensolaris/sys/mutex.hSat May 16 23:56:45 
2009(r192234)
@@ -47,9 +47,9 @@ typedef enum {
 typedef struct sx  kmutex_t;
 
 #ifndef DEBUG
-#defineMUTEX_FLAGS (SX_DUPOK | SX_NOWITNESS)
+#defineMUTEX_FLAGS (SX_DUPOK | SX_NOWITNESS | SX_ADAPTIVESPIN)
 #else
-#defineMUTEX_FLAGS (SX_DUPOK)
+#defineMUTEX_FLAGS (SX_DUPOK | SX_ADAPTIVESPIN)
 #endif
 
 #definemutex_init(lock, desc, type, arg)   do {
\

Modified: head/sys/cddl/compat/opensolaris/sys/rwlock.h
==
--- head/sys/cddl/compat/opensolaris/sys/rwlock.h   Sat May 16 23:33:07 
2009(r192233)
+++ head/sys/cddl/compat/opensolaris/sys/rwlock.h   Sat May 16 23:56:45 
2009(r192234)
@@ -49,9 +49,9 @@ typedef enum {
 typedefstruct sx   krwlock_t;
 
 #ifndef DEBUG
-#defineRW_FLAGS(SX_DUPOK | SX_NOWITNESS)
+#defineRW_FLAGS(SX_DUPOK | SX_NOWITNESS | SX_ADAPTIVESPIN)
 #else
-#defineRW_FLAGS(SX_DUPOK)
+#defineRW_FLAGS(SX_DUPOK | SX_ADAPTIVESPIN)
 #endif
 
 #defineRW_READ_HELD(x) (rw_read_held((x)))
___
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: r192237 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sun May 17 01:31:28 2009
New Revision: 192237
URL: http://svn.freebsd.org/changeset/base/192237

Log:
  SAVESTART implies SAVENAME

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun May 
17 00:01:57 2009(r192236)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun May 
17 01:31:28 2009(r192237)
@@ -4253,8 +4253,8 @@ zfs_freebsd_rename(ap)
vnode_t *tvp = ap->a_tvp;
int error;
 
-   ASSERT(ap->a_fcnp->cn_flags & SAVENAME);
-   ASSERT(ap->a_tcnp->cn_flags & SAVENAME);
+   ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART));
+   ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART));
 
error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp,
ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192239 - head/bin/ps

2009-05-16 Thread Brian Somers
Author: brian
Date: Sun May 17 04:00:43 2009
New Revision: 192239
URL: http://svn.freebsd.org/changeset/base/192239

Log:
  Add a -d option to ps to display descendant info with the output.
  This is similar to linux's -H (or -f) switch.
  
  MFC after:3 weeks

Modified:
  head/bin/ps/print.c
  head/bin/ps/ps.1
  head/bin/ps/ps.c
  head/bin/ps/ps.h

Modified: head/bin/ps/print.c
==
--- head/bin/ps/print.c Sun May 17 01:32:47 2009(r192238)
+++ head/bin/ps/print.c Sun May 17 04:00:43 2009(r192239)
@@ -130,9 +130,11 @@ command(KINFO *k, VARENT *ve)
if (cflag) {
/* If it is the last field, then don't pad */
if (STAILQ_NEXT(ve, next_ve) == NULL) {
+   if (k->ki_d.prefix)
+   (void)printf("%s", k->ki_d.prefix);
(void)printf("%s", k->ki_p->ki_comm);
if (showthreads && k->ki_p->ki_numthreads > 1)
-   printf("/%s", k->ki_p->ki_ocomm);
+   (void)printf("/%s", k->ki_p->ki_ocomm);
} else
(void)printf("%-*s", v->width, k->ki_p->ki_comm);
return;
@@ -140,16 +142,22 @@ command(KINFO *k, VARENT *ve)
if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL)
errx(1, "malloc failed");
strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH);
-   if (k->ki_env) {
-   if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1)) == NULL)
-   errx(1, "malloc failed");
-   strvis(vis_env, k->ki_env, VIS_TAB | VIS_NL | VIS_NOSLASH);
-   } else
-   vis_env = NULL;
 
if (STAILQ_NEXT(ve, next_ve) == NULL) {
/* last field */
+
+   if (k->ki_env) {
+   if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1))
+   == NULL)
+   errx(1, "malloc failed");
+   strvis(vis_env, k->ki_env,
+   VIS_TAB | VIS_NL | VIS_NOSLASH);
+   } else
+   vis_env = NULL;
+
if (termwidth == UNLIMITED) {
+   if (k->ki_d.prefix)
+   (void)printf("%s", k->ki_d.prefix);
if (vis_env)
(void)printf("%s ", vis_env);
(void)printf("%s", vis_args);
@@ -157,6 +165,9 @@ command(KINFO *k, VARENT *ve)
left = termwidth - (totwidth - v->width);
if (left < 1) /* already wrapped, just use std width */
left = v->width;
+   if ((cp = k->ki_d.prefix) != NULL)
+   while (--left >= 0 && *cp)
+   (void)putchar(*cp++);
if ((cp = vis_env) != NULL) {
while (--left >= 0 && *cp)
(void)putchar(*cp++);
@@ -166,12 +177,12 @@ command(KINFO *k, VARENT *ve)
for (cp = vis_args; --left >= 0 && *cp != '\0';)
(void)putchar(*cp++);
}
+   if (vis_env != NULL)
+   free(vis_env);
} else
-   /* XXX env? */
+   /* ki_d.prefix & ki_env aren't shown for interim fields */
(void)printf("%-*.*s", v->width, v->width, vis_args);
free(vis_args);
-   if (vis_env != NULL)
-   free(vis_env);
 }
 
 void
@@ -182,6 +193,8 @@ ucomm(KINFO *k, VARENT *ve)
 
v = ve->var;
if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */
+   if (k->ki_d.prefix)
+   (void)printf("%s", k->ki_d.prefix);
(void)printf("%s", k->ki_p->ki_comm);
if (showthreads && k->ki_p->ki_numthreads > 1)
printf("/%s", k->ki_p->ki_ocomm);

Modified: head/bin/ps/ps.1
==
--- head/bin/ps/ps.1Sun May 17 01:32:47 2009(r192238)
+++ head/bin/ps/ps.1Sun May 17 04:00:43 2009(r192239)
@@ -29,7 +29,7 @@
 .\" @(#)ps.1   8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd August 21, 2006
+.Dd May 16, 2009
 .Dt PS 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd process status
 .Sh SYNOPSIS
 .Nm
-.Op Fl aCcefHhjlmrSTuvwXxZ
+.Op Fl aCcdefHhjlmrSTuvwXxZ
 .Op Fl O Ar fmt | Fl o Ar fmt
 .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ...
 .Op Fl M Ar core
@@ -122,6 +122,15 @@ CPU calculation that ignores
 .Dq resident
 time (this normally has
 no effect).
+.It Fl d
+Arrange processes into descendancy order and prefix each command with
+indentation text showing sibling and parent/child relationships.
+If e

svn commit: r192240 - head/sys/cddl/contrib/opensolaris/common/zfs

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sun May 17 04:04:25 2009
New Revision: 192240
URL: http://svn.freebsd.org/changeset/base/192240

Log:
  set createtxg prop name
  
  PR: bin/130105

Modified:
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c

Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
==
--- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sun May 17 
04:00:43 2009(r192239)
+++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Sun May 17 
04:04:25 2009(r192240)
@@ -297,7 +297,7 @@ zfs_prop_init(void)
 
/* hidden properties */
register_hidden(ZFS_PROP_CREATETXG, "createtxg", PROP_TYPE_NUMBER,
-   PROP_READONLY, ZFS_TYPE_DATASET, NULL);
+   PROP_READONLY, ZFS_TYPE_DATASET, "CREATETXG");
register_hidden(ZFS_PROP_NUMCLONES, "numclones", PROP_TYPE_NUMBER,
PROP_READONLY, ZFS_TYPE_SNAPSHOT, NULL);
register_hidden(ZFS_PROP_NAME, "name", PROP_TYPE_STRING,
___
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: r192242 - head/bin/pkill

2009-05-16 Thread Brian Somers
Author: brian
Date: Sun May 17 04:34:14 2009
New Revision: 192242
URL: http://svn.freebsd.org/changeset/base/192242

Log:
  When finding processes, ignore ourself and our ancestors.  It is almost
  always surprising when you kill a 'sh -c ...' ancestor or when you kill
  yourself when using -f.
  
  Add a -a switch for backwards compatibility.
  
  MFC after:3 weeks

Modified:
  head/bin/pkill/pkill.1
  head/bin/pkill/pkill.c

Modified: head/bin/pkill/pkill.1
==
--- head/bin/pkill/pkill.1  Sun May 17 04:05:27 2009(r192241)
+++ head/bin/pkill/pkill.1  Sun May 17 04:34:14 2009(r192242)
@@ -36,7 +36,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 23, 2006
+.Dd May 16, 2009
 .Dt PKILL 1
 .Os
 .Sh NAME
@@ -44,7 +44,7 @@
 .Nd find or signal processes by name
 .Sh SYNOPSIS
 .Nm pgrep
-.Op Fl LSfilnovx
+.Op Fl LSafilnovx
 .Op Fl F Ar pidfile
 .Op Fl G Ar gid
 .Op Fl M Ar core
@@ -60,7 +60,7 @@
 .Ar pattern ...
 .Nm pkill
 .Op Fl Ar signal
-.Op Fl ILfinovx
+.Op Fl ILafinovx
 .Op Fl F Ar pidfile
 .Op Fl G Ar gid
 .Op Fl M Ar core
@@ -128,6 +128,15 @@ The default is a newline.
 This option can only be used with the
 .Nm pgrep
 command.
+.It Fl a
+Include process ancestors in the match list.
+By default, the current
+.Nm pgrep
+or
+.Nm pkill
+process and all of its ancestors are excluded (unless
+.Fl v
+is used).
 .It Fl f
 Match against full argument lists.
 The default is to match against process names.

Modified: head/bin/pkill/pkill.c
==
--- head/bin/pkill/pkill.c  Sun May 17 04:05:27 2009(r192241)
+++ head/bin/pkill/pkill.c  Sun May 17 04:34:14 2009(r192242)
@@ -133,7 +133,7 @@ main(int argc, char **argv)
 {
char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q, *pidfile;
const char *execf, *coref;
-   int debug_opt;
+   int ancestors, debug_opt;
int i, ch, bestidx, rv, criteria, pidfromfile, pidfilelock;
size_t jsz;
int (*action)(const struct kinfo_proc *);
@@ -142,6 +142,7 @@ main(int argc, char **argv)
struct timeval best_tval;
regex_t reg;
regmatch_t regmatch;
+   pid_t pid;
 
setlocale(LC_ALL, "");
 
@@ -174,13 +175,14 @@ main(int argc, char **argv)
}
}
 
+   ancestors = 0;
criteria = 0;
debug_opt = 0;
pidfile = NULL;
pidfilelock = 0;
execf = coref = _PATH_DEVNULL;
 
-   while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:d:fg:ij:lnos:t:u:vx")) 
!= -1)
+   while ((ch = getopt(argc, argv, 
"DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1)
switch (ch) {
case 'D':
debug_opt++;
@@ -220,6 +222,9 @@ main(int argc, char **argv)
makelist(&ruidlist, LT_USER, optarg);
criteria = 1;
break;
+   case 'a':
+   ancestors++;
+   break;
case 'd':
if (!pgrep)
usage();
@@ -468,6 +473,27 @@ main(int argc, char **argv)
selected[i] = 1;
}
 
+   if (!ancestors) {
+   pid = mypid;
+   while (pid) {
+   for (i = 0, kp = plist; i < nproc; i++, kp++) {
+   if (PSKIP(kp))
+   continue;
+   if (kp->ki_pid == pid) {
+   selected[i] = 0;
+   pid = kp->ki_ppid;
+   break;
+   }
+   }
+   if (i == nproc) {
+   if (pid == mypid)
+   pid = getppid();
+   else
+   break;  /* Maybe we're in a jail ? */
+   }
+   }
+   }
+
if (newest || oldest) {
best_tval.tv_sec = 0;
best_tval.tv_usec = 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192243 - head/usr.sbin/bsnmpd/modules/snmp_hostres

2009-05-16 Thread Kip Macy
Author: kmacy
Date: Sun May 17 05:54:25 2009
New Revision: 192243
URL: http://svn.freebsd.org/changeset/base/192243

Log:
  add zfs oid to bsnmpd
  
  PR: bin/129360
  Submitted by: Ulrich Spoerlein

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c

Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c
==
--- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c  Sun May 17 
04:34:14 2009(r192242)
+++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c  Sun May 17 
05:54:25 2009(r192243)
@@ -131,6 +131,7 @@ static const struct {
const struct asn_oid*oid;   /* the OID to return */
 } fs_type_map[] = {
{ "ufs",&OIDX_hrFSBerkeleyFFS_c },
+   { "zfs",&OIDX_hrFSOther_c },
{ "cd9660", &OIDX_hrFSiso9660_c },
{ "nfs",&OIDX_hrFSNFS_c },
{ "ext2fs", &OIDX_hrFSLinuxExt2_c },
___
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: r192245 - head/sys/fs/nfsclient

2009-05-16 Thread Alan Cox
Author: alc
Date: Sun May 17 06:45:30 2009
New Revision: 192245
URL: http://svn.freebsd.org/changeset/base/192245

Log:
  Merge r191964: Eliminate a case of unnecessary page queues locking.

Modified:
  head/sys/fs/nfsclient/nfs_clbio.c

Modified: head/sys/fs/nfsclient/nfs_clbio.c
==
--- head/sys/fs/nfsclient/nfs_clbio.c   Sun May 17 05:55:13 2009
(r192244)
+++ head/sys/fs/nfsclient/nfs_clbio.c   Sun May 17 06:45:30 2009
(r192245)
@@ -232,10 +232,8 @@ ncl_getpages(struct vop_getpages_args *a
vm_page_t m = pages[ap->a_reqpage];
 
VM_OBJECT_LOCK(object);
-   vm_page_lock_queues();
if (m->valid != 0) {
-   /* handled by vm_fault now*/
-   /* vm_page_zero_invalid(m, TRUE); */
+   vm_page_lock_queues();
for (i = 0; i < npages; ++i) {
if (i != ap->a_reqpage)
vm_page_free(pages[i]);
@@ -244,7 +242,6 @@ ncl_getpages(struct vop_getpages_args *a
VM_OBJECT_UNLOCK(object);
return(0);
}
-   vm_page_unlock_queues();
VM_OBJECT_UNLOCK(object);
}
 
___
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"