svn commit: r207141 - in head: lib/libufs sbin/dumpfs sbin/fsck_ffs sbin/fsdb sbin/tunefs sys/kern sys/sys sys/ufs/ffs sys/ufs/ufs usr.sbin/makefs/ffs

2010-04-24 Thread Jeff Roberson
Author: jeff
Date: Sat Apr 24 07:05:35 2010
New Revision: 207141
URL: http://svn.freebsd.org/changeset/base/207141

Log:
   - Merge soft-updates journaling from projects/suj/head into head.  This
 brings in support for an optional intent log which eliminates the need
 for background fsck on unclean shutdown.
  
  Sponsored by:   iXsystems, Yahoo!, and Juniper.
  With help from: McKusick and Peter Holm

Added:
  head/sbin/fsck_ffs/suj.c   (contents, props changed)
Modified:
  head/lib/libufs/Makefile
  head/lib/libufs/cgroup.c
  head/lib/libufs/inode.c
  head/lib/libufs/libufs.h
  head/lib/libufs/sblock.c
  head/lib/libufs/type.c
  head/sbin/dumpfs/dumpfs.c
  head/sbin/fsck_ffs/Makefile
  head/sbin/fsck_ffs/fsck.h
  head/sbin/fsck_ffs/gjournal.c
  head/sbin/fsck_ffs/main.c
  head/sbin/fsck_ffs/pass5.c
  head/sbin/fsdb/fsdb.c
  head/sbin/fsdb/fsdbutil.c
  head/sbin/tunefs/tunefs.8
  head/sbin/tunefs/tunefs.c
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_subr.c
  head/sys/sys/buf.h
  head/sys/sys/mount.h
  head/sys/ufs/ffs/ffs_alloc.c
  head/sys/ufs/ffs/ffs_balloc.c
  head/sys/ufs/ffs/ffs_extern.h
  head/sys/ufs/ffs/ffs_inode.c
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_softdep.c
  head/sys/ufs/ffs/ffs_subr.c
  head/sys/ufs/ffs/ffs_vfsops.c
  head/sys/ufs/ffs/ffs_vnops.c
  head/sys/ufs/ffs/fs.h
  head/sys/ufs/ffs/softdep.h
  head/sys/ufs/ufs/dinode.h
  head/sys/ufs/ufs/inode.h
  head/sys/ufs/ufs/ufs_dirhash.c
  head/sys/ufs/ufs/ufs_extern.h
  head/sys/ufs/ufs/ufs_lookup.c
  head/sys/ufs/ufs/ufs_vnops.c
  head/sys/ufs/ufs/ufsmount.h
  head/usr.sbin/makefs/ffs/ffs_bswap.c

Modified: head/lib/libufs/Makefile
==
--- head/lib/libufs/MakefileSat Apr 24 05:03:42 2010(r207140)
+++ head/lib/libufs/MakefileSat Apr 24 07:05:35 2010(r207141)
@@ -3,7 +3,7 @@
 LIB=   ufs
 SHLIBDIR?= /lib
 
-SRCS=  block.c cgroup.c inode.c sblock.c type.c
+SRCS=  block.c cgroup.c inode.c sblock.c type.c ffs_subr.c ffs_tables.c
 INCS=  libufs.h
 
 MAN=   bread.3 cgread.3 libufs.3 sbread.3 ufs_disk_close.3
@@ -16,8 +16,11 @@ MLINKS+= ufs_disk_close.3 ufs_disk_fillo
 MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3
 MLINKS+= ufs_disk_close.3 ufs_disk_write.3
 
-WARNS?=3
+.PATH:  ${.CURDIR}/../../sys/ufs/ffs
 
+WARNS?=2
+
+DEBUG_FLAGS = -g
 CFLAGS+= -D_LIBUFS
 .if defined(LIBUFS_DEBUG)
 CFLAGS+= -D_LIBUFS_DEBUGGING

Modified: head/lib/libufs/cgroup.c
==
--- head/lib/libufs/cgroup.cSat Apr 24 05:03:42 2010(r207140)
+++ head/lib/libufs/cgroup.cSat Apr 24 07:05:35 2010(r207141)
@@ -40,11 +40,143 @@ __FBSDID($FreeBSD$);
 #include errno.h
 #include fcntl.h
 #include stdio.h
+#include stdlib.h
 #include string.h
 #include unistd.h
 
 #include libufs.h
 
+ufs2_daddr_t
+cgballoc(struct uufsd *disk)
+{
+   u_int8_t *blksfree;
+   struct cg *cgp;
+   struct fs *fs;
+   long bno;
+
+   fs = disk-d_fs;
+   cgp = disk-d_cg;
+   blksfree = cg_blksfree(cgp);
+   for (bno = 0; bno  fs-fs_fpg / fs-fs_frag; bno++)
+   if (ffs_isblock(fs, blksfree, bno))
+   goto gotit;
+   return (0);
+gotit:
+   fs-fs_cs(fs, cgp-cg_cgx).cs_nbfree--;
+   ffs_clrblock(fs, blksfree, (long)bno);
+   ffs_clusteracct(fs, cgp, bno, -1);
+   cgp-cg_cs.cs_nbfree--;
+   fs-fs_cstotal.cs_nbfree--;
+   fs-fs_fmod = 1;
+   return (cgbase(fs, cgp-cg_cgx) + blkstofrags(fs, bno));
+}
+
+int
+cgbfree(struct uufsd *disk, ufs2_daddr_t bno, long size)
+{
+   u_int8_t *blksfree;
+   struct fs *fs;
+   struct cg *cgp;
+   ufs1_daddr_t fragno, cgbno;
+   int i, cg, blk, frags, bbase;
+
+   fs = disk-d_fs;
+   cg = dtog(fs, bno);
+   if (cgread1(disk, cg) != 1)
+   return (-1);
+   cgp = disk-d_cg;
+   cgbno = dtogd(fs, bno);
+   blksfree = cg_blksfree(cgp);
+   if (size == fs-fs_bsize) {
+   fragno = fragstoblks(fs, cgbno);
+   ffs_setblock(fs, blksfree, fragno);
+   ffs_clusteracct(fs, cgp, fragno, 1);
+   cgp-cg_cs.cs_nbfree++;
+   fs-fs_cstotal.cs_nbfree++;
+   fs-fs_cs(fs, cg).cs_nbfree++;
+   } else {
+   bbase = cgbno - fragnum(fs, cgbno);
+   /*
+* decrement the counts associated with the old frags
+*/
+   blk = blkmap(fs, blksfree, bbase);
+   ffs_fragacct(fs, blk, cgp-cg_frsum, -1);
+   /*
+* deallocate the fragment
+*/
+   frags = numfrags(fs, size);
+   for (i = 0; i  frags; i++)
+   setbit(blksfree, cgbno + i);
+   cgp-cg_cs.cs_nffree += i;
+   fs-fs_cstotal.cs_nffree += i;
+   fs-fs_cs(fs, cg).cs_nffree += i;
+  

svn commit: r207142 - head/sys/ufs/ffs

2010-04-24 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sat Apr 24 07:36:33 2010
New Revision: 207142
URL: http://svn.freebsd.org/changeset/base/207142

Log:
  Fix build for UFS without SOFTUPDATES.

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==
--- head/sys/ufs/ffs/ffs_softdep.c  Sat Apr 24 07:05:35 2010
(r207141)
+++ head/sys/ufs/ffs/ffs_softdep.c  Sat Apr 24 07:36:33 2010
(r207142)
@@ -232,7 +232,8 @@ softdep_setup_directory_add(bp, dp, diro
 }
 
 void 
-softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize)
+softdep_change_directoryentry_offset(bp, dp, base, oldloc, newloc, entrysize)
+   struct buf *bp;
struct inode *dp;
caddr_t base;
caddr_t oldloc;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207143 - head/sbin/fsck_ffs

2010-04-24 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sat Apr 24 07:54:49 2010
New Revision: 207143
URL: http://svn.freebsd.org/changeset/base/207143

Log:
  Protect fsck.h from being included twice.

Modified:
  head/sbin/fsck_ffs/fsck.h

Modified: head/sbin/fsck_ffs/fsck.h
==
--- head/sbin/fsck_ffs/fsck.h   Sat Apr 24 07:36:33 2010(r207142)
+++ head/sbin/fsck_ffs/fsck.h   Sat Apr 24 07:54:49 2010(r207143)
@@ -60,6 +60,9 @@
  * $FreeBSD$
  */
 
+#ifndef _FSCK_H_
+#define_FSCK_H_
+
 #include unistd.h
 #include stdlib.h
 #include stdio.h
@@ -389,3 +392,5 @@ voidsetinodebuf(ino_t);
 intsetup(char *dev);
 void   gjournal_check(const char *filesys);
 intsuj_check(const char *filesys);
+
+#endif /* !_FSCK_H_ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207144 - head/sbin/fsck_ffs

2010-04-24 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sat Apr 24 07:58:59 2010
New Revision: 207144
URL: http://svn.freebsd.org/changeset/base/207144

Log:
  suj.c seems to contain two versions of the code.
  Remove the one that doesn't compile.

Modified:
  head/sbin/fsck_ffs/suj.c

Modified: head/sbin/fsck_ffs/suj.c
==
--- head/sbin/fsck_ffs/suj.cSat Apr 24 07:54:49 2010(r207143)
+++ head/sbin/fsck_ffs/suj.cSat Apr 24 07:58:59 2010(r207144)
@@ -2632,2068 +2632,3 @@ suj_check(const char *filesys)
 
return (0);
 }
-/*-
- * Copyright (c) 2009 Jeffrey W. Roberson j...@freebsd.org
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
- */
-
-#include sys/cdefs.h
-__FBSDID($FreeBSD$);
-
-#include sys/param.h
-#include sys/disklabel.h
-#include sys/mount.h
-#include sys/stat.h
-
-#include ufs/ufs/ufsmount.h
-#include ufs/ufs/dinode.h
-#include ufs/ufs/dir.h
-#include ufs/ffs/fs.h
-
-#include stdio.h
-#include stdlib.h
-#include stdint.h
-#include libufs.h
-#include strings.h
-#include err.h
-#include assert.h
-
-#include fsck.h
-
-static voidino_decr(ino_t);
-
-#defineSUJ_HASHSIZE128
-#defineSUJ_HASHMASK(SUJ_HASHSIZE - 1)
-#defineSUJ_HASH(x) ((x * 2654435761)  SUJ_HASHMASK)
-
-struct suj_seg {
-   TAILQ_ENTRY(suj_seg) ss_next;
-   struct jsegrec  ss_rec;
-   uint8_t *ss_blk;
-};
-
-struct suj_rec {
-   TAILQ_ENTRY(suj_rec) sr_next;
-   union jrec  *sr_rec;
-};
-TAILQ_HEAD(srechd, suj_rec);
-
-struct suj_ino {
-   LIST_ENTRY(suj_ino) si_next;
-   struct srechd   si_recs;
-   struct srechd   si_movs;
-   ino_t   si_ino;
-   int si_nlinkadj;
-   int si_skipparent;
-   int si_linkadj;
-   int si_hasrecs;
-   int si_blkadj;
-};
-LIST_HEAD(inohd, suj_ino);
-
-struct suj_blk {
-   LIST_ENTRY(suj_blk) sb_next;
-   struct srechd   sb_recs;
-   ufs2_daddr_tsb_blk;
-};
-LIST_HEAD(blkhd, suj_blk);
-
-struct data_blk {
-   LIST_ENTRY(data_blk)db_next;
-   uint8_t *db_buf;
-   ufs2_daddr_tdb_blk;
-   int db_size;
-};
-
-struct ino_blk {
-   LIST_ENTRY(ino_blk) ib_next;
-   uint8_t *ib_buf;
-   int ib_dirty;
-   ufs2_daddr_tib_blk;
-};
-LIST_HEAD(iblkhd, ino_blk);
-
-struct suj_cg {
-   LIST_ENTRY(suj_cg)  sc_next;
-   struct blkhdsc_blkhash[SUJ_HASHSIZE];
-   struct inohdsc_inohash[SUJ_HASHSIZE];
-   struct iblkhd   sc_iblkhash[SUJ_HASHSIZE];
-   struct ino_blk  *sc_lastiblk;
-   uint8_t *sc_cgbuf;
-   struct cg   *sc_cgp;
-   int sc_dirty;
-   int sc_cgx;
-};
-
-LIST_HEAD(cghd, suj_cg) cghash[SUJ_HASHSIZE];
-LIST_HEAD(dblkhd, data_blk) dbhash[SUJ_HASHSIZE];
-
-TAILQ_HEAD(seghd, suj_seg) allsegs;
-uint64_t oldseq;
-static struct uufsd *disk = NULL;
-static struct fs *fs = NULL;
-
-/*
- * Summary statistics.
- */
-uint64_t freefrags;
-uint64_t freeblocks;
-uint64_t freeinos;
-uint64_t freedir;
-uint64_t jbytes;
-uint64_t jrecs;
-
-typedef void (*ino_visitor)(ino_t, ufs_lbn_t, ufs2_daddr_t, int);
-
-static void *
-errmalloc(size_t n)
-{
-   void *a;
-
-   a = malloc(n);
-   if (a == NULL)
-   errx(1, malloc(%zu), n);
-   return (a);
-}
-
-/*
- * Open the given provider, load superblock.
- */
-static void

svn commit: r207145 - head/sbin/tunefs

2010-04-24 Thread Jeff Roberson
Author: jeff
Date: Sat Apr 24 07:59:45 2010
New Revision: 207145
URL: http://svn.freebsd.org/changeset/base/207145

Log:
   - Temporarily lower WARNS until I fix alignment warnings on sparc64.
  
  Reported by:  Florian Smeets

Modified:
  head/sbin/tunefs/Makefile

Modified: head/sbin/tunefs/Makefile
==
--- head/sbin/tunefs/Makefile   Sat Apr 24 07:58:59 2010(r207144)
+++ head/sbin/tunefs/Makefile   Sat Apr 24 07:59:45 2010(r207145)
@@ -6,4 +6,6 @@ DPADD=  ${LIBUFS}
 LDADD= -lufs
 MAN=   tunefs.8
 
+WARNS= 3
+
 .include bsd.prog.mk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r207144 - head/sbin/fsck_ffs

2010-04-24 Thread Jeff Roberson

On Sat, 24 Apr 2010, Pawel Jakub Dawidek wrote:


Author: pjd
Date: Sat Apr 24 07:58:59 2010
New Revision: 207144
URL: http://svn.freebsd.org/changeset/base/207144

Log:
 suj.c seems to contain two versions of the code.
 Remove the one that doesn't compile.


Thanks pjd.  I must've patched twice and not noticed.  When I tried to 
just merge the changes from my projects branch it failed.


Jeff



Modified:
 head/sbin/fsck_ffs/suj.c

Modified: head/sbin/fsck_ffs/suj.c
==
--- head/sbin/fsck_ffs/suj.cSat Apr 24 07:54:49 2010(r207143)
+++ head/sbin/fsck_ffs/suj.cSat Apr 24 07:58:59 2010(r207144)
@@ -2632,2068 +2632,3 @@ suj_check(const char *filesys)

return (0);
}
-/*-
- * Copyright (c) 2009 Jeffrey W. Roberson j...@freebsd.org
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
- */
-
-#include sys/cdefs.h
-__FBSDID($FreeBSD$);
-
-#include sys/param.h
-#include sys/disklabel.h
-#include sys/mount.h
-#include sys/stat.h
-
-#include ufs/ufs/ufsmount.h
-#include ufs/ufs/dinode.h
-#include ufs/ufs/dir.h
-#include ufs/ffs/fs.h
-
-#include stdio.h
-#include stdlib.h
-#include stdint.h
-#include libufs.h
-#include strings.h
-#include err.h
-#include assert.h
-
-#include fsck.h
-
-static voidino_decr(ino_t);
-
-#defineSUJ_HASHSIZE128
-#defineSUJ_HASHMASK(SUJ_HASHSIZE - 1)
-#defineSUJ_HASH(x) ((x * 2654435761)  SUJ_HASHMASK)
-
-struct suj_seg {
-   TAILQ_ENTRY(suj_seg) ss_next;
-   struct jsegrec  ss_rec;
-   uint8_t *ss_blk;
-};
-
-struct suj_rec {
-   TAILQ_ENTRY(suj_rec) sr_next;
-   union jrec  *sr_rec;
-};
-TAILQ_HEAD(srechd, suj_rec);
-
-struct suj_ino {
-   LIST_ENTRY(suj_ino) si_next;
-   struct srechd   si_recs;
-   struct srechd   si_movs;
-   ino_t   si_ino;
-   int si_nlinkadj;
-   int si_skipparent;
-   int si_linkadj;
-   int si_hasrecs;
-   int si_blkadj;
-};
-LIST_HEAD(inohd, suj_ino);
-
-struct suj_blk {
-   LIST_ENTRY(suj_blk) sb_next;
-   struct srechd   sb_recs;
-   ufs2_daddr_tsb_blk;
-};
-LIST_HEAD(blkhd, suj_blk);
-
-struct data_blk {
-   LIST_ENTRY(data_blk)db_next;
-   uint8_t *db_buf;
-   ufs2_daddr_tdb_blk;
-   int db_size;
-};
-
-struct ino_blk {
-   LIST_ENTRY(ino_blk) ib_next;
-   uint8_t *ib_buf;
-   int ib_dirty;
-   ufs2_daddr_tib_blk;
-};
-LIST_HEAD(iblkhd, ino_blk);
-
-struct suj_cg {
-   LIST_ENTRY(suj_cg)  sc_next;
-   struct blkhdsc_blkhash[SUJ_HASHSIZE];
-   struct inohdsc_inohash[SUJ_HASHSIZE];
-   struct iblkhd   sc_iblkhash[SUJ_HASHSIZE];
-   struct ino_blk  *sc_lastiblk;
-   uint8_t *sc_cgbuf;
-   struct cg   *sc_cgp;
-   int sc_dirty;
-   int sc_cgx;
-};
-
-LIST_HEAD(cghd, suj_cg) cghash[SUJ_HASHSIZE];
-LIST_HEAD(dblkhd, data_blk) dbhash[SUJ_HASHSIZE];
-
-TAILQ_HEAD(seghd, suj_seg) allsegs;
-uint64_t oldseq;
-static struct uufsd *disk = NULL;
-static struct fs *fs = NULL;
-
-/*
- * Summary statistics.
- */
-uint64_t freefrags;
-uint64_t freeblocks;
-uint64_t freeinos;
-uint64_t freedir;
-uint64_t jbytes;
-uint64_t jrecs;
-
-typedef void (*ino_visitor)(ino_t, ufs_lbn_t, ufs2_daddr_t, int);
-
-static void *
-errmalloc(size_t n)
-{
-   void *a;
-
-   

svn commit: r207151 - in head/tools/test: . testfloat testfloat/sparc64

2010-04-24 Thread Marius Strobl
Author: marius
Date: Sat Apr 24 12:11:41 2010
New Revision: 207151
URL: http://svn.freebsd.org/changeset/base/207151

Log:
  Add a TestFloat based test suite for floating-point implementations
  currently supporting sparc64. After a `make depend all` there are
  three programs; testsoftfloat for testing against the SoftFloat in
  src/lib/libc/softfloat for reference purposes, testemufloat for
  testing the emulator source in src/lib/libc/sparc64/fpu and testfloat
  for testing with the installed libc. Support for other architectures
  can be added as needed.
  
  PR:   144900
  Submitted by: Peter Jeremy

Added:
  head/tools/test/testfloat/
  head/tools/test/testfloat/README.txt
 - copied unchanged from r207134, vendor/testfloat/dist/testfloat/README.txt
  head/tools/test/testfloat/fail.c
 - copied unchanged from r207134, vendor/testfloat/dist/testfloat/fail.c
  head/tools/test/testfloat/fail.h
 - copied unchanged from r207134, vendor/testfloat/dist/testfloat/fail.h
  head/tools/test/testfloat/random.c   (contents, props changed)
 - copied, changed from r207134, vendor/testfloat/dist/testfloat/random.c
  head/tools/test/testfloat/random.h
 - copied unchanged from r207134, vendor/testfloat/dist/testfloat/random.h
  head/tools/test/testfloat/slowfloat-32.c
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/slowfloat-32.c
  head/tools/test/testfloat/slowfloat-64.c
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/slowfloat-64.c
  head/tools/test/testfloat/slowfloat.c
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/slowfloat.c
  head/tools/test/testfloat/slowfloat.h
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/slowfloat.h
  head/tools/test/testfloat/sparc64/
  head/tools/test/testfloat/sparc64/Makefile   (contents, props changed)
  head/tools/test/testfloat/sparc64/fpu_emul.S   (contents, props changed)
  head/tools/test/testfloat/sparc64/fpu_reg.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/fpu_util.c   (contents, props changed)
  head/tools/test/testfloat/sparc64/libc_private.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/milieu.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/namespace.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/softfloat.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/sparc64.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/systflags.c   (contents, props changed)
  head/tools/test/testfloat/sparc64/systfloat.S   (contents, props changed)
  head/tools/test/testfloat/sparc64/systfloat.h   (contents, props changed)
  head/tools/test/testfloat/sparc64/systmodes.c   (contents, props changed)
  head/tools/test/testfloat/sparc64/un-namespace.h   (contents, props changed)
  head/tools/test/testfloat/systemBugs.txt
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/systemBugs.txt
  head/tools/test/testfloat/systflags.h
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/systflags.h
  head/tools/test/testfloat/systfloat.c
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/systfloat.c
  head/tools/test/testfloat/systmodes.h
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/systmodes.h
  head/tools/test/testfloat/testCases.c   (contents, props changed)
 - copied, changed from r207134, vendor/testfloat/dist/testfloat/testCases.c
  head/tools/test/testfloat/testCases.h
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testCases.h
  head/tools/test/testfloat/testFunction.c
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testFunction.c
  head/tools/test/testfloat/testFunction.h
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testFunction.h
  head/tools/test/testfloat/testLoops.c
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testLoops.c
  head/tools/test/testfloat/testLoops.h
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testLoops.h
  head/tools/test/testfloat/testfloat-history.txt
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testfloat-history.txt
  head/tools/test/testfloat/testfloat-source.txt
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testfloat-source.txt
  head/tools/test/testfloat/testfloat.c   (contents, props changed)
 - copied, changed from r207134, vendor/testfloat/dist/testfloat/testfloat.c
  head/tools/test/testfloat/testfloat.txt
 - copied unchanged from r207134, 
vendor/testfloat/dist/testfloat/testfloat.txt
  head/tools/test/testfloat/testsoftfloat.c   (contents, props changed)
 - copied, changed from r207134, 
vendor/testfloat/dist/testfloat/testsoftfloat.c
  head/tools/test/testfloat/writeHex.c
 - copied unchanged from r207134, vendor/testfloat/dist/testfloat/writeHex.c
  

svn commit: r207152 - in head/sys: amd64/include arm/include i386/include ia64/include kern mips/include powerpc/include sparc64/include sun4v/include sys

2010-04-24 Thread Konstantin Belousov
Author: kib
Date: Sat Apr 24 12:49:52 2010
New Revision: 207152
URL: http://svn.freebsd.org/changeset/base/207152

Log:
  Move the constants specifying the size of struct kinfo_proc into
  machine-specific header files. Add KINFO_PROC32_SIZE for struct
  kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add
  CTASSERT for the size of struct kinfo_proc32.
  
  Submitted by: pluknet
  Reviewed by:  imp, jhb, nwhitehorn
  MFC after:2 weeks

Modified:
  head/sys/amd64/include/proc.h
  head/sys/arm/include/proc.h
  head/sys/i386/include/proc.h
  head/sys/ia64/include/proc.h
  head/sys/kern/kern_proc.c
  head/sys/mips/include/proc.h
  head/sys/powerpc/include/proc.h
  head/sys/sparc64/include/proc.h
  head/sys/sun4v/include/proc.h
  head/sys/sys/user.h

Modified: head/sys/amd64/include/proc.h
==
--- head/sys/amd64/include/proc.h   Sat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/amd64/include/proc.h   Sat Apr 24 12:49:52 2010
(r207152)
@@ -53,6 +53,9 @@ struct mdproc {
struct system_segment_descriptor md_ldt_sd;
 };
 
+#define KINFO_PROC_SIZE 1088
+#define KINFO_PROC32_SIZE 768
+
 #ifdef _KERNEL
 
 /* Get the current kernel thread stack usage. */

Modified: head/sys/arm/include/proc.h
==
--- head/sys/arm/include/proc.h Sat Apr 24 12:11:41 2010(r207151)
+++ head/sys/arm/include/proc.h Sat Apr 24 12:49:52 2010(r207152)
@@ -60,4 +60,6 @@ struct mdproc {
void*md_sigtramp;
 };
 
+#define KINFO_PROC_SIZE 792
+
 #endif /* !_MACHINE_PROC_H_ */

Modified: head/sys/i386/include/proc.h
==
--- head/sys/i386/include/proc.hSat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/i386/include/proc.hSat Apr 24 12:49:52 2010
(r207152)
@@ -57,6 +57,8 @@ struct mdproc {
struct proc_ldt *md_ldt;/* (t) per-process ldt */
 };
 
+#define KINFO_PROC_SIZE 768
+
 #ifdef _KERNEL
 
 /* Get the current kernel thread stack usage. */

Modified: head/sys/ia64/include/proc.h
==
--- head/sys/ia64/include/proc.hSat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/ia64/include/proc.hSat Apr 24 12:49:52 2010
(r207152)
@@ -38,4 +38,7 @@ struct mdproc {
int __dummy;/* Avoid having an empty struct. */
 };
 
+#define KINFO_PROC_SIZE 1088
+#define KINFO_PROC32_SIZE 768
+
 #endif /* !_MACHINE_PROC_H_ */

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Sat Apr 24 12:11:41 2010(r207151)
+++ head/sys/kern/kern_proc.c   Sat Apr 24 12:49:52 2010(r207152)
@@ -151,6 +151,9 @@ int kstack_pages = KSTACK_PAGES;
 SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, kstack_pages, 0, );
 
 CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
+#ifdef COMPAT_FREEBSD32
+CTASSERT(sizeof(struct kinfo_proc32) == KINFO_PROC32_SIZE);
+#endif
 
 /*
  * Initialize global process hashing structures.

Modified: head/sys/mips/include/proc.h
==
--- head/sys/mips/include/proc.hSat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/mips/include/proc.hSat Apr 24 12:49:52 2010
(r207152)
@@ -68,4 +68,10 @@ struct thread;
 void   mips_cpu_switch(struct thread *, struct thread *, struct mtx *);
 void   mips_cpu_throw(struct thread *, struct thread *);
 
+#ifdef __mips_n64
+#define KINFO_PROC_SIZE 1088
+#else
+#define KINFO_PROC_SIZE 816
+#endif
+
 #endif /* !_MACHINE_PROC_H_ */

Modified: head/sys/powerpc/include/proc.h
==
--- head/sys/powerpc/include/proc.h Sat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/powerpc/include/proc.h Sat Apr 24 12:49:52 2010
(r207152)
@@ -46,4 +46,6 @@ struct mdthread {
 struct mdproc {
 };
 
+#define KINFO_PROC_SIZE 768
+
 #endif /* !_MACHINE_PROC_H_ */

Modified: head/sys/sparc64/include/proc.h
==
--- head/sys/sparc64/include/proc.h Sat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/sparc64/include/proc.h Sat Apr 24 12:49:52 2010
(r207152)
@@ -51,4 +51,6 @@ struct mdproc {
void*md_sigtramp;
 };
 
+#define KINFO_PROC_SIZE 1088
+
 #endif /* !_MACHINE_PROC_H_ */

Modified: head/sys/sun4v/include/proc.h
==
--- head/sys/sun4v/include/proc.h   Sat Apr 24 12:11:41 2010
(r207151)
+++ head/sys/sun4v/include/proc.h   Sat Apr 24 12:49:52 2010
(r207152)
@@ -51,4 +51,6 @@ struct mdproc {
   

svn commit: r207153 - head/usr.bin/stat

2010-04-24 Thread Jilles Tjoelker
Author: jilles
Date: Sat Apr 24 13:53:12 2010
New Revision: 207153
URL: http://svn.freebsd.org/changeset/base/207153

Log:
  stat: Allow -f %Sf to display the file flags symbolically.
  
  I have changed the patch slightly to show '-' if there are no flags just
  like ls -ldo does.
  
  PR:   124349
  Submitted by: Ighighi
  MFC after:1 week

Modified:
  head/usr.bin/stat/stat.1
  head/usr.bin/stat/stat.c

Modified: head/usr.bin/stat/stat.1
==
--- head/usr.bin/stat/stat.1Sat Apr 24 12:49:52 2010(r207152)
+++ head/usr.bin/stat/stat.1Sat Apr 24 13:53:12 2010(r207153)
@@ -29,7 +29,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd April 27, 2007
+.Dd April 24, 2010
 .Dt STAT 1
 .Os
 .Sh NAME
@@ -232,6 +232,11 @@ Display date in
 format.
 .It Cm dr
 Display actual device name.
+.It Cm f
+Display the flags of
+.Ar file
+as in
+.Nm ls Fl lTdo .
 .It Cm gu
 Display group or user name.
 .It Cm p

Modified: head/usr.bin/stat/stat.c
==
--- head/usr.bin/stat/stat.cSat Apr 24 12:49:52 2010(r207152)
+++ head/usr.bin/stat/stat.cSat Apr 24 13:53:12 2010(r207153)
@@ -182,6 +182,9 @@ int format1(const struct stat *,/* stat
char *, size_t, /* a place to put the output */
int, int, int, int, /* the parsed format */
int, int);
+#if HAVE_STRUCT_STAT_ST_FLAGS
+char   *xfflagstostr(unsigned long);
+#endif
 
 char *timefmt;
 int linkfail;
@@ -333,6 +336,25 @@ main(int argc, char *argv[])
return (am_readlink ? linkfail : errs);
 }
 
+#if HAVE_STRUCT_STAT_ST_FLAGS
+/*
+ * fflagstostr() wrapper that leaks only once
+ */
+char *
+xfflagstostr(unsigned long fflags)
+{
+   static char *str = NULL;
+
+   if (str != NULL)
+   free(str);
+
+   str = fflagstostr(fflags);
+   if (str == NULL)
+   err(1, fflagstostr);
+   return (str);
+}
+#endif /* HAVE_STRUCT_STAT_ST_FLAGS */
+
 void
 usage(const char *synopsis)
 {
@@ -725,8 +747,11 @@ format1(const struct stat *st,
case SHOW_st_flags:
small = (sizeof(st-st_flags) == 4);
data = st-st_flags;
-   sdata = NULL;
-   formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX;
+   sdata = xfflagstostr(st-st_flags);
+   if (*sdata == '\0')
+   sdata = -;
+   formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX |
+   FMTF_STRING;
if (ofmt == 0)
ofmt = FMTF_UNSIGNED;
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207154 - head/sys/conf

2010-04-24 Thread Marius Strobl
Author: marius
Date: Sat Apr 24 16:27:43 2010
New Revision: 207154
URL: http://svn.freebsd.org/changeset/base/207154

Log:
  Fix some sorting and whitespace nits.

Modified:
  head/sys/conf/files.sparc64
  head/sys/conf/files.sun4v

Modified: head/sys/conf/files.sparc64
==
--- head/sys/conf/files.sparc64 Sat Apr 24 13:53:12 2010(r207153)
+++ head/sys/conf/files.sparc64 Sat Apr 24 16:27:43 2010(r207154)
@@ -22,7 +22,7 @@ ukbdmap.h optional
ukbd_dflt_keymap\
no-obj no-implicit-rule before-depend   \
clean   ukbdmap.h
 #
-crypto/blowfish/bf_enc.c   optionalcrypto | ipsec 
+crypto/blowfish/bf_enc.c   optionalcrypto | ipsec
 crypto/des/des_enc.c   optionalcrypto | ipsec | netsmb
 dev/atkbdc/atkbd.c optionalatkbd atkbdc
 dev/atkbdc/atkbd_atkbdc.c  optionalatkbd atkbdc
@@ -42,11 +42,11 @@ dev/kbd/kbd.c   optionalatkbd | 
sc | uk
 dev/le/if_le_lebuffer.coptionalle sbus
 dev/le/if_le_ledma.c   optionalle sbus
 dev/le/lebuffer_sbus.c optionalle sbus
-dev/ofw/ofw_if.m   standard
 dev/ofw/ofw_bus_if.m   standard
 dev/ofw/ofw_bus_subr.c standard
-dev/ofw/ofw_standard.c standard
 dev/ofw/ofw_console.c  optionalofw_console
+dev/ofw/ofw_if.m   standard
+dev/ofw/ofw_standard.c standard
 dev/ofw/openfirm.c standard
 dev/ofw/openfirmio.c   standard
 dev/ofw/openpromio.c   standard
@@ -79,7 +79,7 @@ sparc64/pci/ofw_pcib.coptionalpci
 sparc64/pci/ofw_pcib_subr.coptionalpci
 sparc64/pci/ofw_pcibus.c   optionalpci
 sparc64/pci/psycho.c   optionalpci
-sparc64/pci/sbbc.c optionaluart sbbc
+sparc64/pci/sbbc.c optionalsbbc uart
 sparc64/pci/schizo.c   optionalpci
 sparc64/sbus/dma_sbus.coptionalsbus
 sparc64/sbus/sbus.coptionalsbus

Modified: head/sys/conf/files.sun4v
==
--- head/sys/conf/files.sun4v   Sat Apr 24 13:53:12 2010(r207153)
+++ head/sys/conf/files.sun4v   Sat Apr 24 16:27:43 2010(r207154)
@@ -18,12 +18,12 @@ ukbdmap.h   optional
ukbd_dflt_keymap\
clean   ukbdmap.h
 #
 #
-crypto/blowfish/bf_enc.c   optionalcrypto | ipsec 
+crypto/blowfish/bf_enc.c   optionalcrypto | ipsec
 crypto/des/des_enc.c   optionalcrypto | ipsec | netsmb
 dev/ofw/ofw_bus_if.m   standard
-dev/ofw/ofw_if.m   standard
 dev/ofw/ofw_bus_subr.c standard
 dev/ofw/ofw_console.c  optionalofw_console
+dev/ofw/ofw_if.m   standard
 dev/ofw/ofw_standard.c standard
 dev/ofw/openfirm.c standard
 dev/ofw/openfirmio.c   standard
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207155 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke powerpc/powerpc sparc64/sparc64 sun4v/sun4v vm

2010-04-24 Thread Alan Cox
Author: alc
Date: Sat Apr 24 17:32:52 2010
New Revision: 207155
URL: http://svn.freebsd.org/changeset/base/207155

Log:
  Resurrect pmap_is_referenced() and use it in mincore().  Essentially,
  pmap_ts_referenced() is not always appropriate for checking whether or
  not pages have been referenced because it clears any reference bits
  that it encounters.  For example, in mincore(), clearing the reference
  bits has two negative consequences.  First, it throws off the activity
  count calculations performed by the page daemon.  Specifically, a page
  on which mincore() has called pmap_ts_referenced() looks less active
  to the page daemon than it should.  Consequently, the page could be
  deactivated prematurely by the page daemon.  Arguably, this problem
  could be fixed by having mincore() duplicate the activity count
  calculation on the page.  However, there is a second problem for which
  that is not a solution.  In order to clear a reference on a 4KB page,
  it may be necessary to demote a 2/4MB page mapping.  Thus, a mincore()
  by one process can have the side effect of demoting a superpage
  mapping within another process!

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/arm/arm/pmap.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/xen/pmap.c
  head/sys/ia64/ia64/pmap.c
  head/sys/mips/mips/pmap.c
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/aim/mmu_oea64.c
  head/sys/powerpc/booke/pmap.c
  head/sys/powerpc/powerpc/mmu_if.m
  head/sys/powerpc/powerpc/pmap_dispatch.c
  head/sys/sparc64/sparc64/pmap.c
  head/sys/sun4v/sun4v/pmap.c
  head/sys/vm/pmap.h
  head/sys/vm/vm_mmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sat Apr 24 16:27:43 2010(r207154)
+++ head/sys/amd64/amd64/pmap.c Sat Apr 24 17:32:52 2010(r207155)
@@ -236,6 +236,7 @@ static void pmap_fill_ptp(pt_entry_t *fi
 static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte);
 static void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva);
 static boolean_t pmap_is_modified_pvh(struct md_page *pvh);
+static boolean_t pmap_is_referenced_pvh(struct md_page *pvh);
 static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode);
 static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va);
 static void pmap_pde_attr(pd_entry_t *pde, int cache_bits);
@@ -4178,6 +4179,49 @@ pmap_is_prefaultable(pmap_t pmap, vm_off
 }
 
 /*
+ * pmap_is_referenced:
+ *
+ * Return whether or not the specified physical page was referenced
+ * in any physical maps.
+ */
+boolean_t
+pmap_is_referenced(vm_page_t m)
+{
+
+   if (m-flags  PG_FICTITIOUS)
+   return (FALSE);
+   if (pmap_is_referenced_pvh(m-md))
+   return (TRUE);
+   return (pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m;
+}
+
+/*
+ * Returns TRUE if any of the given mappings were referenced and FALSE
+ * otherwise.  Both page and 2mpage mappings are supported.
+ */
+static boolean_t
+pmap_is_referenced_pvh(struct md_page *pvh)
+{
+   pv_entry_t pv;
+   pt_entry_t *pte;
+   pmap_t pmap;
+   boolean_t rv;
+
+   mtx_assert(vm_page_queue_mtx, MA_OWNED);
+   rv = FALSE;
+   TAILQ_FOREACH(pv, pvh-pv_list, pv_list) {
+   pmap = PV_PMAP(pv);
+   PMAP_LOCK(pmap);
+   pte = pmap_pte(pmap, pv-pv_va);
+   rv = (*pte  (PG_A | PG_V)) == (PG_A | PG_V);
+   PMAP_UNLOCK(pmap);
+   if (rv)
+   break;
+   }
+   return (rv);
+}
+
+/*
  * Clear the write and modified bits in each of the given page's mappings.
  */
 void
@@ -4893,10 +4937,8 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad
 */
vm_page_lock_queues();
if ((m-flags  PG_REFERENCED) ||
-   pmap_ts_referenced(m)) {
+   pmap_is_referenced(m))
val |= MINCORE_REFERENCED_OTHER;
-   vm_page_flag_set(m, PG_REFERENCED);
-   }
vm_page_unlock_queues();
}
} 

Modified: head/sys/arm/arm/pmap.c
==
--- head/sys/arm/arm/pmap.c Sat Apr 24 16:27:43 2010(r207154)
+++ head/sys/arm/arm/pmap.c Sat Apr 24 17:32:52 2010(r207155)
@@ -4493,6 +4493,20 @@ pmap_clear_modify(vm_page_t m)
 
 
 /*
+ * pmap_is_referenced:
+ *
+ * Return whether or not the specified physical page was referenced
+ * in any physical maps.
+ */
+boolean_t
+pmap_is_referenced(vm_page_t m)
+{
+
+   return ((m-flags  (PG_FICTITIOUS | PG_UNMANAGED)) == 0 
+   (m-md.pvh_attrs  PVF_REF) != 0);
+}
+
+/*
  * pmap_clear_reference:
  *
  * Clear the reference bit on the specified physical page.

Modified: 

svn commit: r207156 - head/sys/dev/drm

2010-04-24 Thread Robert Noland
Author: rnoland
Date: Sat Apr 24 18:13:12 2010
New Revision: 207156
URL: http://svn.freebsd.org/changeset/base/207156

Log:
  remove vm obect tracker that slipped in from prior work.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/drm/drmP.h

Modified: head/sys/dev/drm/drmP.h
==
--- head/sys/dev/drm/drmP.h Sat Apr 24 17:32:52 2010(r207155)
+++ head/sys/dev/drm/drmP.h Sat Apr 24 18:13:12 2010(r207156)
@@ -481,7 +481,6 @@ typedef struct drm_sg_mem {
vm_offset_t vaddr;
vm_paddr_t *busaddr;
vm_pindex_t pages;
-   vm_object_t obj;
 } drm_sg_mem_t;
 
 #define DRM_MAP_HANDLE_BITS(sizeof(void *) == 4 ? 4 : 24)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs

2010-04-24 Thread Alexander Best
tiny patch to fix a typo in the gsched(8) manual. ;)

-- 
Alexander Best
Index: sbin/geom/class/sched/gsched.8
===
--- sbin/geom/class/sched/gsched.8  (revision 207154)
+++ sbin/geom/class/sched/gsched.8  (working copy)
@@ -93,8 +93,8 @@
 on an already existing provider.
 .Pp
 A subsequent 'destroy' will remove the newly created geom and
-hook the provider back to the original geom.
-.Ar algorithm
+hook the provider back to the original geom
+.Ar algorithm .
 .It Cm configure
 Configure existing scheduling provider.  It supports the same options
 as the 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org

svn commit: r207161 - head/sys/amd64/amd64

2010-04-24 Thread Kip Macy
Author: kmacy
Date: Sat Apr 24 21:17:07 2010
New Revision: 207161
URL: http://svn.freebsd.org/changeset/base/207161

Log:
  apply style(9) changes applied to head_page_lock_2
  
  requested by: kib@

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sat Apr 24 21:05:08 2010(r207160)
+++ head/sys/amd64/amd64/pmap.c Sat Apr 24 21:17:07 2010(r207161)
@@ -284,7 +284,7 @@ pmap_kmem_choose(vm_offset_t addr)
vm_offset_t newaddr = addr;
 
newaddr = (addr + (NBPDR - 1))  ~(NBPDR - 1);
-   return newaddr;
+   return (newaddr);
 }
 
 //
@@ -295,7 +295,7 @@ pmap_kmem_choose(vm_offset_t addr)
 static __inline vm_pindex_t
 pmap_pde_pindex(vm_offset_t va)
 {
-   return va  PDRSHIFT;
+   return (va  PDRSHIFT);
 }
 
 
@@ -354,7 +354,7 @@ pmap_pdpe(pmap_t pmap, vm_offset_t va)
 
pml4e = pmap_pml4e(pmap, va);
if ((*pml4e  PG_V) == 0)
-   return NULL;
+   return (NULL);
return (pmap_pml4e_to_pdpe(pml4e, va));
 }
 
@@ -376,7 +376,7 @@ pmap_pde(pmap_t pmap, vm_offset_t va)
 
pdpe = pmap_pdpe(pmap, va);
if (pdpe == NULL || (*pdpe  PG_V) == 0)
-return NULL;
+   return (NULL);
return (pmap_pdpe_to_pde(pdpe, va));
 }
 
@@ -398,7 +398,7 @@ pmap_pte(pmap_t pmap, vm_offset_t va)
 
pde = pmap_pde(pmap, va);
if (pde == NULL || (*pde  PG_V) == 0)
-   return NULL;
+   return (NULL);
if ((*pde  PG_PS) != 0)/* compat with i386 pmap_pte() */
return ((pt_entry_t *)pde);
return (pmap_pde_to_pte(pde, va));
@@ -1237,7 +1237,7 @@ pmap_kextract(vm_offset_t va)
pa = (pa  PG_FRAME) | (va  PAGE_MASK);
}
}
-   return pa;
+   return (pa);
 }
 
 /***
@@ -1467,9 +1467,9 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_off
 
--m-wire_count;
if (m-wire_count == 0)
-   return _pmap_unwire_pte_hold(pmap, va, m, free);
+   return (_pmap_unwire_pte_hold(pmap, va, m, free));
else
-   return 0;
+   return (0);
 }
 
 static int 
@@ -1525,7 +1525,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of
 */
pmap_add_delayed_free_list(m, free, TRUE);

-   return 1;
+   return (1);
 }
 
 /*
@@ -1538,10 +1538,10 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v
vm_page_t mpte;
 
if (va = VM_MAXUSER_ADDRESS)
-   return 0;
+   return (0);
KASSERT(ptepde != 0, (pmap_unuse_pt: ptepde != 0));
mpte = PHYS_TO_VM_PAGE(ptepde  PG_FRAME);
-   return pmap_unwire_pte_hold(pmap, va, mpte, free);
+   return (pmap_unwire_pte_hold(pmap, va, mpte, free));
 }
 
 void
@@ -1732,7 +1732,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t 
 
pmap-pm_stats.resident_count++;
 
-   return m;
+   return (m);
 }
 
 static vm_page_t
@@ -3510,7 +3510,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_
pte_store(pte, pa | PG_V | PG_U);
else
pte_store(pte, pa | PG_V | PG_U | PG_MANAGED);
-   return mpte;
+   return (mpte);
 }
 
 /*
@@ -3887,12 +3887,12 @@ pmap_page_exists_quick(pmap_t pmap, vm_p
int loops = 0;
 
if (m-flags  PG_FICTITIOUS)
-   return FALSE;
+   return (FALSE);
 
mtx_assert(vm_page_queue_mtx, MA_OWNED);
TAILQ_FOREACH(pv, m-md.pv_list, pv_list) {
if (PV_PMAP(pv) == pmap) {
-   return TRUE;
+   return (TRUE);
}
loops++;
if (loops = 16)
@@ -4908,7 +4908,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad
if (pte != 0) {
val |= MINCORE_INCORE;
if ((pte  PG_MANAGED) == 0)
-   return val;
+   return (val);
 
m = PHYS_TO_VM_PAGE(pa);
 
@@ -4942,7 +4942,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad
vm_page_unlock_queues();
}
} 
-   return val;
+   return (val);
 }
 
 void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207163 - head/sys/i386/i386

2010-04-24 Thread Kip Macy
Author: kmacy
Date: Sat Apr 24 21:36:52 2010
New Revision: 207163
URL: http://svn.freebsd.org/changeset/base/207163

Log:
  - fix style issues on i386 as well
  
  requested by: alc@

Modified:
  head/sys/i386/i386/pmap.c

Modified: head/sys/i386/i386/pmap.c
==
--- head/sys/i386/i386/pmap.c   Sat Apr 24 21:20:43 2010(r207162)
+++ head/sys/i386/i386/pmap.c   Sat Apr 24 21:36:52 2010(r207163)
@@ -1607,9 +1607,9 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_pag
 
--m-wire_count;
if (m-wire_count == 0)
-   return _pmap_unwire_pte_hold(pmap, m, free);
+   return (_pmap_unwire_pte_hold(pmap, m, free));
else
-   return 0;
+   return (0);
 }
 
 static int 
@@ -1643,7 +1643,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa
 */
pmap_add_delayed_free_list(m, free, TRUE);
 
-   return 1;
+   return (1);
 }
 
 /*
@@ -1657,10 +1657,10 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v
vm_page_t mpte;
 
if (va = VM_MAXUSER_ADDRESS)
-   return 0;
+   return (0);
ptepde = *pmap_pde(pmap, va);
mpte = PHYS_TO_VM_PAGE(ptepde  PG_FRAME);
-   return pmap_unwire_pte_hold(pmap, mpte, free);
+   return (pmap_unwire_pte_hold(pmap, mpte, free));
 }
 
 void
@@ -1811,7 +1811,7 @@ _pmap_allocpte(pmap_t pmap, unsigned pte
pmap-pm_pdir[ptepindex] =
(pd_entry_t) (ptepa | PG_U | PG_RW | PG_V | PG_A | PG_M);
 
-   return m;
+   return (m);
 }
 
 static vm_page_t
@@ -2009,7 +2009,7 @@ kvm_size(SYSCTL_HANDLER_ARGS)
 {
unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE;
 
-   return sysctl_handle_long(oidp, ksize, 0, req);
+   return (sysctl_handle_long(oidp, ksize, 0, req));
 }
 SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, 
 0, 0, kvm_size, IU, Size of KVM);
@@ -2019,7 +2019,7 @@ kvm_free(SYSCTL_HANDLER_ARGS)
 {
unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end;
 
-   return sysctl_handle_long(oidp, kfree, 0, req);
+   return (sysctl_handle_long(oidp, kfree, 0, req));
 }
 SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, 
 0, 0, kvm_free, IU, Amount of KVM free);
@@ -2083,7 +2083,7 @@ static __inline struct pv_chunk *
 pv_to_chunk(pv_entry_t pv)
 {
 
-   return (struct pv_chunk *)((uintptr_t)pv  ~(uintptr_t)PAGE_MASK);
+   return ((struct pv_chunk *)((uintptr_t)pv  ~(uintptr_t)PAGE_MASK));
 }
 
 #define PV_PMAP(pv) (pv_to_chunk(pv)-pc_pmap)
@@ -3662,7 +3662,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_
pte_store(pte, pa | PG_V | PG_U);
else
pte_store(pte, pa | PG_V | PG_U | PG_MANAGED);
-   return mpte;
+   return (mpte);
 }
 
 /*
@@ -4059,12 +4059,12 @@ pmap_page_exists_quick(pmap_t pmap, vm_p
int loops = 0;
 
if (m-flags  PG_FICTITIOUS)
-   return FALSE;
+   return (FALSE);
 
mtx_assert(vm_page_queue_mtx, MA_OWNED);
TAILQ_FOREACH(pv, m-md.pv_list, pv_list) {
if (PV_PMAP(pv) == pmap) {
-   return TRUE;
+   return (TRUE);
}
loops++;
if (loops = 16)
@@ -4978,7 +4978,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad
if (pte != 0) {
val |= MINCORE_INCORE;
if ((pte  PG_MANAGED) == 0)
-   return val;
+   return (val);
 
m = PHYS_TO_VM_PAGE(pa);
 
@@ -5012,7 +5012,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad
vm_page_unlock_queues();
}
} 
-   return val;
+   return (val);
 }
 
 void
@@ -5107,7 +5107,7 @@ pmap_pid_dump(int pid)
printf(\n);
}

sx_sunlock(allproc_lock);
-   return npte;
+   return (npte);
}
pte = pmap_pte(pmap, va);
if (pte  pmap_pte_v(pte)) {
@@ -5132,7 +5132,7 @@ pmap_pid_dump(int pid)
}
}
sx_sunlock(allproc_lock);
-   return npte;
+   return (npte);
 }
 #endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207166 - head/share/man/man1

2010-04-24 Thread Jilles Tjoelker
Author: jilles
Date: Sat Apr 24 22:16:01 2010
New Revision: 207166
URL: http://svn.freebsd.org/changeset/base/207166

Log:
  builtin(1): Mention [ sh builtin.
  
  MFC after:1 week

Modified:
  head/share/man/man1/builtin.1

Modified: head/share/man/man1/builtin.1
==
--- head/share/man/man1/builtin.1   Sat Apr 24 22:09:13 2010
(r207165)
+++ head/share/man/man1/builtin.1   Sat Apr 24 22:16:01 2010
(r207166)
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd October 14, 2006
+.Dd April 25, 2010
 .Dt BUILTIN 1
 .Os
 .Sh NAME
@@ -36,6 +36,7 @@
 .Nm \. ,
 .Nm \: ,
 .Nm @ ,
+.Nm \[ ,
 .Nm { ,
 .Nm } ,
 .Nm alias ,
@@ -200,6 +201,7 @@ but are implemented as scripts using a b
 .It Ic . Ta \No Ta \No Ta Yes
 .It Ic : Ta \No Ta Yes Ta Yes
 .It Ic @ Ta \No Ta Yes Ta Yes
+.It Ic \[ Ta Yes Ta \No Ta Yes
 .It Ic { Ta \No Ta \No Ta Yes
 .It Ic } Ta \No Ta \No Ta Yes
 .It Ic alias Ta No** Ta Yes Ta Yes
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207168 - head/share/man/man1

2010-04-24 Thread Jilles Tjoelker
Author: jilles
Date: Sat Apr 24 22:24:26 2010
New Revision: 207168
URL: http://svn.freebsd.org/changeset/base/207168

Log:
  builtin(1): Add missing escaping for !, . and : in the table.
  
  This caused these commands to look differently (not bold) from the other
  commands in the table (bold).
  
  MFC after:1 week

Modified:
  head/share/man/man1/builtin.1

Modified: head/share/man/man1/builtin.1
==
--- head/share/man/man1/builtin.1   Sat Apr 24 22:23:49 2010
(r207167)
+++ head/share/man/man1/builtin.1   Sat Apr 24 22:24:26 2010
(r207168)
@@ -196,10 +196,10 @@ but are implemented as scripts using a b
 .It Xo
 .Em Command   External Ta Xr csh 1 Ta Xr sh 1
 .Xc
-.It Ic ! Ta \No Ta \No Ta Yes
+.It Ic \! Ta \No Ta \No Ta Yes
 .It Ic % Ta \No Ta Yes Ta \No
-.It Ic . Ta \No Ta \No Ta Yes
-.It Ic : Ta \No Ta Yes Ta Yes
+.It Ic \. Ta \No Ta \No Ta Yes
+.It Ic \: Ta \No Ta Yes Ta Yes
 .It Ic @ Ta \No Ta Yes Ta Yes
 .It Ic \[ Ta Yes Ta \No Ta Yes
 .It Ic { Ta \No Ta \No Ta Yes
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207170 - in head/sys/fs: nfs nfsclient nfsserver

2010-04-24 Thread Rick Macklem
Author: rmacklem
Date: Sat Apr 24 22:52:14 2010
New Revision: 207170
URL: http://svn.freebsd.org/changeset/base/207170

Log:
  An NFSv4 server will reply NFSERR_GRACE for non-recovery RPCs
  during the grace period after startup. This grace period must
  be at least the lease duration, which is typically 1-2 minutes.
  It seems prudent for the experimental NFS client to wait a few
  seconds before retrying such an RPC, so that the server isn't
  flooded with non-recovery RPCs during recovery. This patch adds
  an argument to nfs_catnap() to implement a 5 second delay
  for this case.
  
  MFC after:1 week

Modified:
  head/sys/fs/nfs/nfs_commonkrpc.c
  head/sys/fs/nfs/nfs_commonport.c
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfs/nfsport.h
  head/sys/fs/nfsclient/nfs_clrpcops.c
  head/sys/fs/nfsclient/nfs_clstate.c
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/fs/nfsclient/nfs_clvnops.c
  head/sys/fs/nfsserver/nfs_nfsdstate.c

Modified: head/sys/fs/nfs/nfs_commonkrpc.c
==
--- head/sys/fs/nfs/nfs_commonkrpc.cSat Apr 24 22:31:51 2010
(r207169)
+++ head/sys/fs/nfs/nfs_commonkrpc.cSat Apr 24 22:52:14 2010
(r207170)
@@ -650,7 +650,7 @@ tryagain:
trylater_delay = NFS_TRYLATERDEL;
waituntil = NFSD_MONOSEC + trylater_delay;
while (NFSD_MONOSEC  waituntil)
-   (void) nfs_catnap(PZERO, nfstry);
+   (void) nfs_catnap(PZERO, 0, nfstry);
trylater_delay *= 2;
goto tryagain;
}

Modified: head/sys/fs/nfs/nfs_commonport.c
==
--- head/sys/fs/nfs/nfs_commonport.cSat Apr 24 22:31:51 2010
(r207169)
+++ head/sys/fs/nfs/nfs_commonport.cSat Apr 24 22:52:14 2010
(r207170)
@@ -345,17 +345,21 @@ newnfs_timer(void *arg)
 
 
 /*
- * sleep for a short period of time.
+ * Sleep for a short period of time unless errval == NFSERR_GRACE, where
+ * the sleep should be for 5 seconds.
  * Since lbolt doesn't exist in FreeBSD-CURRENT, just use a timeout on
  * an event that never gets a wakeup. Only return EINTR or 0.
  */
 int
-nfs_catnap(int prio, const char *wmesg)
+nfs_catnap(int prio, int errval, const char *wmesg)
 {
static int non_event;
int ret;
 
-   ret = tsleep(non_event, prio, wmesg, 1);
+   if (errval == NFSERR_GRACE)
+   ret = tsleep(non_event, prio, wmesg, 5 * hz);
+   else
+   ret = tsleep(non_event, prio, wmesg, 1);
if (ret != EINTR)
ret = 0;
return (ret);

Modified: head/sys/fs/nfs/nfs_var.h
==
--- head/sys/fs/nfs/nfs_var.h   Sat Apr 24 22:31:51 2010(r207169)
+++ head/sys/fs/nfs/nfs_var.h   Sat Apr 24 22:52:14 2010(r207170)
@@ -322,7 +322,7 @@ int nfsvno_v4rootexport(struct nfsrv_des
 void newnfs_portinit(void);
 struct ucred *newnfs_getcred(void);
 void newnfs_setroot(struct ucred *);
-int nfs_catnap(int, const char *);
+int nfs_catnap(int, int, const char *);
 struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t);
 int nfsrv_atroot(vnode_t, long *);
 void newnfs_timer(void *);

Modified: head/sys/fs/nfs/nfsport.h
==
--- head/sys/fs/nfs/nfsport.h   Sat Apr 24 22:31:51 2010(r207169)
+++ head/sys/fs/nfs/nfsport.h   Sat Apr 24 22:52:14 2010(r207170)
@@ -143,21 +143,21 @@
 #defineNFSMGET(m)  do {\
MGET((m), M_TRYWAIT, MT_DATA);  \
while ((m) == NULL ) {  \
-   (void) nfs_catnap(PZERO, nfsmget);\
+   (void) nfs_catnap(PZERO, 0, nfsmget); \
MGET((m), M_TRYWAIT, MT_DATA);  \
}   \
} while (0)
 #defineNFSMGETHDR(m)   do {\
MGETHDR((m), M_TRYWAIT, MT_DATA);   \
while ((m) == NULL ) {  \
-   (void) nfs_catnap(PZERO, nfsmget);\
+   (void) nfs_catnap(PZERO, 0, nfsmget); \
MGETHDR((m), M_TRYWAIT, MT_DATA);   \
}   \
} while (0)
 #defineNFSMCLGET(m, w) do {\
MGET((m), M_TRYWAIT, MT_DATA);  \
while ((m) == NULL ) {  \
-   (void) nfs_catnap(PZERO, nfsmget);  

svn commit: r207176 - head/sys/dev/bwn

2010-04-24 Thread Weongyo Jeong
Author: weongyo
Date: Sat Apr 24 23:32:24 2010
New Revision: 207176
URL: http://svn.freebsd.org/changeset/base/207176

Log:
  ifp-if_ipackets++ when RX packet interrupts are occurred.
  
  MFC after:3 days

Modified:
  head/sys/dev/bwn/if_bwn.c

Modified: head/sys/dev/bwn/if_bwn.c
==
--- head/sys/dev/bwn/if_bwn.c   Sat Apr 24 23:20:51 2010(r207175)
+++ head/sys/dev/bwn/if_bwn.c   Sat Apr 24 23:32:24 2010(r207176)
@@ -9368,6 +9368,8 @@ bwn_rxeof(struct bwn_mac *mac, struct mb
rssi = rxhdr-phy.abg.rssi; /* XXX incorrect RSSI calculation? */
noise = mac-mac_stats.link_noise;
 
+   ifp-if_ipackets++;
+
BWN_UNLOCK(sc);
 
ni = ieee80211_find_rxnode(ic, wh);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs

2010-04-24 Thread Bruce Cran
On Monday 12 April 2010 17:37:45 Luigi Rizzo wrote:
 Author: luigi
 Date: Mon Apr 12 16:37:45 2010
 New Revision: 206497
 URL: http://svn.freebsd.org/changeset/base/206497
 
 Log:
   Bring in geom_sched, support for scheduling disk I/O requests
   in a device independent manner. Also include an example anticipatory
   scheduler, gsched_rr, which gives very nice performance improvements
   in presence of competing random access patterns.

The example in gsched(8) says to use -s rr, but it looks like it should be 
-a rr?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r207181 - head/sys/geom/part

2010-04-24 Thread Marcel Moolenaar
Author: marcel
Date: Sun Apr 25 01:56:39 2010
New Revision: 207181
URL: http://svn.freebsd.org/changeset/base/207181

Log:
  Re-calculate a geometry when reprobing as well.
  
  PR:   kern/145452
  Reported by:  Andrey V. Elsukov bu7c...@yandex.ru

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==
--- head/sys/geom/part/g_part.c Sun Apr 25 01:56:31 2010(r207180)
+++ head/sys/geom/part/g_part.c Sun Apr 25 01:56:39 2010(r207181)
@@ -1166,6 +1166,15 @@ g_part_ctl_undo(struct gctl_req *req, st
return (0);
}
table = gp-softc;
+
+   /*
+* Synthesize a disk geometry. Some partitioning schemes
+* depend on it and since some file systems need it even
+* when the partitition scheme doesn't, we do it here in
+* scheme-independent code.
+*/
+   pp = cp-provider;
+   g_part_geometry(table, cp, pp-mediasize / pp-sectorsize);
}
 
error = G_PART_READ(table, cp);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org