CVS commit: src/sys/kern

2012-05-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue May  8 08:44:49 UTC 2012

Modified Files:
src/sys/kern: vfs_mount.c vfs_syscalls.c

Log Message:
Move VFS_EXTATTRCTL to mount_domount().  This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again.  Patch from
manu, discussed on tech-kern and committed at his request.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.455 -r1.456 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.13 src/sys/kern/vfs_mount.c:1.14
--- src/sys/kern/vfs_mount.c:1.13	Tue Mar 13 18:40:55 2012
+++ src/sys/kern/vfs_mount.c	Tue May  8 08:44:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.13 2012/03/13 18:40:55 elad Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.14 2012/05/08 08:44:49 gson Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_mount.c,v 1.13 2012/03/13 18:40:55 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_mount.c,v 1.14 2012/05/08 08:44:49 gson Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -83,6 +83,7 @@ __KERNEL_RCSID(0, $NetBSD: vfs_mount.c,
 #include sys/module.h
 #include sys/mount.h
 #include sys/namei.h
+#include sys/extattr.h
 #include sys/syscallargs.h
 #include sys/sysctl.h
 #include sys/systm.h
@@ -739,8 +740,15 @@ mount_domount(struct lwp *l, vnode_t **v
 	vfs_unbusy(mp, true, NULL);
 	(void) VFS_STATVFS(mp, mp-mnt_stat);
 	error = VFS_START(mp, 0);
-	if (error)
+   if (error) {
 		vrele(vp);
+   } else if (flags  MNT_EXTATTR) {
+	   error = VFS_EXTATTRCTL(vp-v_mountedhere, 
+		   EXTATTR_CMD_START, NULL, 0, NULL);
+	   if (error) 
+		   printf(%s: failed to start extattr: error = %d\n,
+			   vp-v_mountedhere-mnt_stat.f_mntonname, error);
+   }
 	/* Drop reference held for VFS_START(). */
 	vfs_destroy(mp);
 	*vpp = NULL;

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.455 src/sys/kern/vfs_syscalls.c:1.456
--- src/sys/kern/vfs_syscalls.c:1.455	Wed May  2 20:48:29 2012
+++ src/sys/kern/vfs_syscalls.c	Tue May  8 08:44:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.455 2012/05/02 20:48:29 rmind Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.456 2012/05/08 08:44:49 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.455 2012/05/02 20:48:29 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.456 2012/05/08 08:44:49 gson Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -458,30 +458,11 @@ do_sys_mount(struct lwp *l, struct vfsop
 	} else if (flags  MNT_UPDATE) {
 		error = mount_update(l, vp, path, flags, data_buf, data_len);
 	} else {
-		struct vnode *svp;
-
-		/* Save vp as mount_domount sets it to NULL */
-		vref(vp);
-		svp = vp;	
-
 		/* Locking is handled internally in mount_domount(). */
 		KASSERT(vfsopsrele == true);
 		error = mount_domount(l, vp, vfsops, path, flags, data_buf,
 		data_len);
 		vfsopsrele = false;
-
-		if ((error == 0)  (flags  MNT_EXTATTR)) {
-			KASSERT(svp-v_mountedhere != NULL);
-
-			if (VFS_EXTATTRCTL(svp-v_mountedhere,
-	   EXTATTR_CMD_START, 
-	   NULL, 0, NULL) != 0)
-printf(%s: failed to start extattr,
- svp-v_mountedhere-mnt_stat.f_mntonname);
-/* XXX remove flag */
-		}
-
-		vrele(svp);
 	}
 
 done:



CVS commit: [netbsd-5] src/sys/arch/xen/xen

2012-05-08 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue May  8 12:11:46 UTC 2012

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: hypervisor.c

Log Message:
Pull up the following revisions(s) (requested by riz in ticket #1748):
sys/arch/xen/xen/hypervisor.c:  revision 1.62 via patch

Retrieve and print the hypervisor extra (teeny) version.


To generate a diff of this commit:
cvs rdiff -u -r1.42.4.5 -r1.42.4.6 src/sys/arch/xen/xen/hypervisor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/hypervisor.c
diff -u src/sys/arch/xen/xen/hypervisor.c:1.42.4.5 src/sys/arch/xen/xen/hypervisor.c:1.42.4.6
--- src/sys/arch/xen/xen/hypervisor.c:1.42.4.5	Mon Sep 26 09:56:54 2011
+++ src/sys/arch/xen/xen/hypervisor.c	Tue May  8 12:11:45 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.42.4.5 2011/09/26 09:56:54 sborrill Exp $ */
+/* $NetBSD: hypervisor.c,v 1.42.4.6 2012/05/08 12:11:45 sborrill Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -63,7 +63,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hypervisor.c,v 1.42.4.5 2011/09/26 09:56:54 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: hypervisor.c,v 1.42.4.6 2012/05/08 12:11:45 sborrill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -239,13 +239,17 @@ hypervisor_attach(device_t parent, devic
 
 #endif /* NPCI */
 	union hypervisor_attach_cookie hac;
+	char xen_extra_version[XEN_EXTRAVERSION_LEN];
 
 	xenkernfs_init();
 
 #ifdef XEN3
 	xen_version = HYPERVISOR_xen_version(XENVER_version, NULL);
-	aprint_normal(: Xen version %d.%d\n, (xen_version  0x)  16,
-	   xen_version  0x);
+	memset(xen_extra_version, 0, sizeof(xen_extra_version));
+	HYPERVISOR_xen_version(XENVER_extraversion, xen_extra_version);
+	aprint_normal(: Xen version %d.%d%s\n,
+		(xen_version  0x)  16, xen_version  0x,
+		 xen_extra_version);
 
 	xengnt_init();
 



CVS commit: [netbsd-5] src/doc

2012-05-08 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue May  8 12:12:20 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket #1748


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.159 -r1.1.2.160 src/doc/CHANGES-5.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.159 src/doc/CHANGES-5.2:1.1.2.160
--- src/doc/CHANGES-5.2:1.1.2.159	Sun Apr 22 03:16:43 2012
+++ src/doc/CHANGES-5.2	Tue May  8 12:12:19 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.159 2012/04/22 03:16:43 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.160 2012/05/08 12:12:19 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6337,3 +6337,7 @@ sys/dev/usb/uaudio.c1.131
 	ticket #1746.
 	[jakllsch, ticket #1751]
 
+sys/arch/xen/xen/hypervisor.c			1.62 via patch
+	Retrieve and print the hypervisor extra (teeny) version.
+	[riz, ticket #1748]
+



CVS commit: src/distrib/sets/lists/modules

2012-05-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  8 13:22:37 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: md.evbppc

Log Message:
Add a few modules in booke/4xx compat lists - should fix the evbppc build.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/modules/md.evbppc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.21 src/distrib/sets/lists/modules/md.evbppc:1.22
--- src/distrib/sets/lists/modules/md.evbppc:1.21	Thu Apr 26 22:09:53 2012
+++ src/distrib/sets/lists/modules/md.evbppc	Tue May  8 13:22:36 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.21 2012/04/26 22:09:53 he Exp $
+# $NetBSD: md.evbppc,v 1.22 2012/05/08 13:22:36 martin Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -70,6 +70,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/gpiosim/gpiosim.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hfsbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/hfs/hfs.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/if_axe	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/if_axe/if_axe.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/iicbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/iic/iic.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/iscsibase-kernel-modules	kmod,compatmodules
@@ -170,6 +172,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/union/union.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/usbverbose			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/usbverbose/usbverbose.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/vcoda	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/vcoda/vcoda.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/v7fs base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/v7fs/v7fs.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/vnd base-kernel-modules	kmod,compatmodules
@@ -247,6 +251,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/gpiosim/gpiosim.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/hfsbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/hfs/hfs.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/if_axebase-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/if_axe/if_axe.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/iicbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/iic/iic.kmod			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/iscsibase-kernel-modules	kmod,compatmodules



CVS commit: src/distrib/utils/sysinst

2012-05-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May  8 13:51:34 UTC 2012

Modified Files:
src/distrib/utils/sysinst: util.c

Log Message:
Fix harmless error preventing auto-finding non-ISO9660 formatted CD
partitions (when offering sets from CD).


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/distrib/utils/sysinst/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/sysinst/util.c
diff -u src/distrib/utils/sysinst/util.c:1.177 src/distrib/utils/sysinst/util.c:1.178
--- src/distrib/utils/sysinst/util.c:1.177	Mon Apr  9 23:18:31 2012
+++ src/distrib/utils/sysinst/util.c	Tue May  8 13:51:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.177 2012/04/09 23:18:31 jdf Exp $	*/
+/*	$NetBSD: util.c,v 1.178 2012/05/08 13:51:34 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -431,7 +431,8 @@ get_available_cds(void)
 		if (error == 0) {
 			for (part = 0; part  label.d_npartitions; part++) {
 if (label.d_partitions[part].p_fstype
-!= FS_ISO9660)
+	== FS_UNUSED
+|| label.d_partitions[part].p_size == 0)
 	continue;
 if (label.d_partitions[part].p_fstype
 == FS_ISO9660) {



CVS commit: src/sys/fs/sysvbfs

2012-05-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May  8 14:28:55 UTC 2012

Modified Files:
src/sys/fs/sysvbfs: bfs.c bfs.h sysvbfs_vnops.c

Log Message:
Move bfs_file_setsize() from bfs.c to sysvbfs_vnops.c
(and rename it to sysvbfs_file_setsize()) because it's actually
part of vnode ops and bfs.c is also pulled by standalone bootloaders
which don't want vnode header mess.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/sysvbfs/bfs.c
cvs rdiff -u -r1.6 -r1.7 src/sys/fs/sysvbfs/bfs.h
cvs rdiff -u -r1.44 -r1.45 src/sys/fs/sysvbfs/sysvbfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/sysvbfs/bfs.c
diff -u src/sys/fs/sysvbfs/bfs.c:1.14 src/sys/fs/sysvbfs/bfs.c:1.15
--- src/sys/fs/sysvbfs/bfs.c:1.14	Sun Mar 18 02:40:55 2012
+++ src/sys/fs/sysvbfs/bfs.c	Tue May  8 14:28:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bfs.c,v 1.14 2012/03/18 02:40:55 christos Exp $	*/
+/*	$NetBSD: bfs.c,v 1.15 2012/05/08 14:28:55 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: bfs.c,v 1.14 2012/03/18 02:40:55 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: bfs.c,v 1.15 2012/05/08 14:28:55 tsutsui Exp $);
 #define	BFS_DEBUG
 
 #include sys/param.h
@@ -57,7 +57,6 @@ MALLOC_JUSTDEFINE(M_BFS, sysvbfs core,
 #define	__FREE(a, s, t)		free(a)
 #endif
 #include fs/sysvbfs/bfs.h
-#include fs/sysvbfs/sysvbfs.h
 
 #ifdef BFS_DEBUG
 #define	DPRINTF(on, fmt, args...)	if (on) printf(fmt, ##args)
@@ -507,21 +506,6 @@ bfs_file_lookup(const struct bfs *bfs, c
 	return true;
 }
 
-void
-bfs_file_setsize(struct vnode *v, size_t size)
-{
-	struct sysvbfs_node *bnode = v-v_data;
-	struct bfs_inode *inode = bnode-inode;
-
-	bnode-size = size;
-	uvm_vnp_setsize(v, bnode-size);
-	inode-end_sector = bnode-data_block +
-	(ROUND_SECTOR(bnode-size)  DEV_BSHIFT) - 1;
-	inode-eof_offset_byte = bnode-data_block * DEV_BSIZE +
-	bnode-size - 1;
-	bnode-update_mtime = true;
-}
-
 bool
 bfs_dirent_lookup_by_inode(const struct bfs *bfs, int inode,
 struct bfs_dirent **dirent)

Index: src/sys/fs/sysvbfs/bfs.h
diff -u src/sys/fs/sysvbfs/bfs.h:1.6 src/sys/fs/sysvbfs/bfs.h:1.7
--- src/sys/fs/sysvbfs/bfs.h:1.6	Sun Mar 18 02:40:55 2012
+++ src/sys/fs/sysvbfs/bfs.h	Tue May  8 14:28:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bfs.h,v 1.6 2012/03/18 02:40:55 christos Exp $	*/
+/*	$NetBSD: bfs.h,v 1.7 2012/05/08 14:28:55 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -155,7 +155,6 @@ int bfs_file_rename(struct bfs *, const 
 bool bfs_file_lookup(const struct bfs *, const char *, int *, int *,
 size_t *);
 size_t bfs_file_size(const struct bfs_inode *);
-void bfs_file_setsize(struct vnode *, size_t);
 
 bool bfs_dump(const struct bfs *);
 

Index: src/sys/fs/sysvbfs/sysvbfs_vnops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.44 src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.45
--- src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.44	Sun Apr 29 22:53:59 2012
+++ src/sys/fs/sysvbfs/sysvbfs_vnops.c	Tue May  8 14:28:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysvbfs_vnops.c,v 1.44 2012/04/29 22:53:59 chs Exp $	*/
+/*	$NetBSD: sysvbfs_vnops.c,v 1.45 2012/05/08 14:28:55 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysvbfs_vnops.c,v 1.44 2012/04/29 22:53:59 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysvbfs_vnops.c,v 1.45 2012/05/08 14:28:55 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -60,6 +60,8 @@ __KERNEL_RCSID(0, $NetBSD: sysvbfs_vnop
 MALLOC_JUSTDEFINE(M_SYSVBFS_VNODE, sysvbfs vnode, sysvbfs vnode structures);
 MALLOC_DECLARE(M_BFS);
 
+static void sysvbfs_file_setsize(struct vnode *, size_t);
+
 int
 sysvbfs_lookup(void *arg)
 {
@@ -373,7 +375,7 @@ sysvbfs_setattr(void *arg)
 		case VREG:
 			if (vp-v_mount-mnt_flag  MNT_RDONLY)
 return EROFS;
-			bfs_file_setsize(vp, vap-va_size);
+			sysvbfs_file_setsize(vp, vap-va_size);
 			break;
 		default:
 			return EOPNOTSUPP;
@@ -479,7 +481,7 @@ sysvbfs_write(void *arg)
 		return 0;
 
 	if (bnode-size  uio-uio_offset + uio-uio_resid) {
-		bfs_file_setsize(v, uio-uio_offset + uio-uio_resid);
+		sysvbfs_file_setsize(v, uio-uio_offset + uio-uio_resid);
 		extended = true;
 	}
 
@@ -492,7 +494,7 @@ sysvbfs_write(void *arg)
 		DPRINTF(%s: write %ldbyte\n, __func__, sz);
 	}
 	if (err)
-		bfs_file_setsize(v, bnode-size - uio-uio_resid);
+		sysvbfs_file_setsize(v, bnode-size - uio-uio_resid);
 
 	VN_KNOTE(v, NOTE_WRITE | (extended ? NOTE_EXTEND : 0));
 
@@ -893,3 +895,18 @@ sysvbfs_update(struct vnode *vp, const s
 
 	return 0;
 }
+
+static void
+sysvbfs_file_setsize(struct vnode *v, size_t size)
+{
+	struct sysvbfs_node *bnode = v-v_data;
+	struct bfs_inode *inode = bnode-inode;
+
+	bnode-size = size;
+	uvm_vnp_setsize(v, bnode-size);
+	inode-end_sector = 

CVS commit: [netbsd-5] src/sys/arch/xen/xen

2012-05-08 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue May  8 15:51:14 UTC 2012

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: hypervisor.c

Log Message:
Fix XEN2 build after last pullup


To generate a diff of this commit:
cvs rdiff -u -r1.42.4.6 -r1.42.4.7 src/sys/arch/xen/xen/hypervisor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/hypervisor.c
diff -u src/sys/arch/xen/xen/hypervisor.c:1.42.4.6 src/sys/arch/xen/xen/hypervisor.c:1.42.4.7
--- src/sys/arch/xen/xen/hypervisor.c:1.42.4.6	Tue May  8 12:11:45 2012
+++ src/sys/arch/xen/xen/hypervisor.c	Tue May  8 15:51:13 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.42.4.6 2012/05/08 12:11:45 sborrill Exp $ */
+/* $NetBSD: hypervisor.c,v 1.42.4.7 2012/05/08 15:51:13 sborrill Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -63,7 +63,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hypervisor.c,v 1.42.4.6 2012/05/08 12:11:45 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: hypervisor.c,v 1.42.4.7 2012/05/08 15:51:13 sborrill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -230,6 +230,7 @@ hypervisor_attach(device_t parent, devic
 {
 #ifdef XEN3
 	int xen_version;
+	char xen_extra_version[XEN_EXTRAVERSION_LEN];
 #endif
 #if NPCI 0
 #ifndef XEN3
@@ -239,7 +240,6 @@ hypervisor_attach(device_t parent, devic
 
 #endif /* NPCI */
 	union hypervisor_attach_cookie hac;
-	char xen_extra_version[XEN_EXTRAVERSION_LEN];
 
 	xenkernfs_init();
 



CVS commit: src/sys

2012-05-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue May  8 23:53:27 UTC 2012

Modified Files:
src/sys/conf: files
src/sys/miscfs/genfs: genfs.h
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs
Added Files:
src/sys/miscfs/genfs: genfs_rename.c

Log Message:
Implement a genfs_rename abstraction.

First major step in incrementally adapting all the file systems to a
saner rename VOP protocol.


To generate a diff of this commit:
cvs rdiff -u -r1.1049 -r1.1050 src/sys/conf/files
cvs rdiff -u -r1.29 -r1.30 src/sys/miscfs/genfs/genfs.h
cvs rdiff -u -r0 -r1.1 src/sys/miscfs/genfs/genfs_rename.c
cvs rdiff -u -r1.32 -r1.33 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1049 src/sys/conf/files:1.1050
--- src/sys/conf/files:1.1049	Sat May  5 19:15:10 2012
+++ src/sys/conf/files	Tue May  8 23:53:26 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1049 2012/05/05 19:15:10 rmind Exp $
+#	$NetBSD: files,v 1.1050 2012/05/08 23:53:26 riastradh Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1625,6 +1625,7 @@ file	kern/vnode_if.c
 file	miscfs/deadfs/dead_vnops.c
 file	miscfs/fifofs/fifo_vnops.c
 file	miscfs/genfs/genfs_io.c
+file	miscfs/genfs/genfs_rename.c
 file	miscfs/genfs/genfs_vfsops.c
 file	miscfs/genfs/genfs_vnops.c
 file	miscfs/genfs/layer_subr.c	nullfs | overlay | umapfs

Index: src/sys/miscfs/genfs/genfs.h
diff -u src/sys/miscfs/genfs/genfs.h:1.29 src/sys/miscfs/genfs/genfs.h:1.30
--- src/sys/miscfs/genfs/genfs.h:1.29	Tue Mar 13 18:40:57 2012
+++ src/sys/miscfs/genfs/genfs.h	Tue May  8 23:53:26 2012
@@ -1,9 +1,13 @@
-/*	$NetBSD: genfs.h,v 1.29 2012/03/13 18:40:57 elad Exp $	*/
+/*	$NetBSD: genfs.h,v 1.30 2012/05/08 23:53:26 riastradh Exp $	*/
 
 #ifndef	_MISCFS_GENFS_GENFS_H_
 #define	_MISCFS_GENFS_GENFS_H_
 
 #include sys/vnode.h
+#include sys/types.h
+
+struct componentname;
+struct mount;
 
 int	genfs_badop(void *);
 int	genfs_nullop(void *);
@@ -47,4 +51,68 @@ int	genfs_can_chflags(kauth_cred_t, enum
 int	genfs_can_sticky(kauth_cred_t, uid_t, uid_t);
 int	genfs_can_extattr(kauth_cred_t, int, vnode_t *, const char *);
 
+/*
+ * Rename is complicated.  Sorry.
+ */
+
+struct genfs_rename_ops;
+
+
+int	genfs_insane_rename(void *,
+	int (*)(struct vnode *, struct componentname *,
+		struct vnode *, struct componentname *,
+		kauth_cred_t, bool));
+int	genfs_sane_rename(const struct genfs_rename_ops *,
+	struct vnode *, struct componentname *, void *,
+	struct vnode *, struct componentname *, void *,
+	kauth_cred_t, bool);
+
+void	genfs_rename_knote(struct vnode *, struct vnode *, struct vnode *,
+	struct vnode *, bool);
+void	genfs_rename_cache_purge(struct vnode *, struct vnode *, struct vnode *,
+	struct vnode *);
+
+int	genfs_ufslike_rename_check_possible(unsigned long, unsigned long,
+	unsigned long, unsigned long, bool,
+	unsigned long, unsigned long);
+int	genfs_ufslike_rename_check_permitted(kauth_cred_t,
+	struct vnode *, mode_t, uid_t,
+	struct vnode *, uid_t,
+	struct vnode *, mode_t, uid_t,
+	struct vnode *, uid_t);
+int	genfs_ufslike_remove_check_possible(unsigned long, unsigned long,
+	unsigned long, unsigned long);
+int	genfs_ufslike_remove_check_permitted(kauth_cred_t,
+	struct vnode *, mode_t, uid_t,
+	struct vnode *, uid_t);
+
+struct genfs_rename_ops {
+	bool (*gro_directory_empty_p)(struct mount *mp, kauth_cred_t cred,
+	struct vnode *vp, struct vnode *dvp);
+	int (*gro_rename_check_possible)(struct mount *mp,
+	struct vnode *fdvp, struct vnode *fvp,
+	struct vnode *tdvp, struct vnode *tvp);
+	int (*gro_rename_check_permitted)(struct mount *mp, kauth_cred_t cred,
+	struct vnode *fdvp, struct vnode *fvp,
+	struct vnode *tdvp, struct vnode *tvp);
+	int (*gro_remove_check_possible)(struct mount *mp,
+	struct vnode *dvp, struct vnode *vp);
+	int (*gro_remove_check_permitted)(struct mount *mp, kauth_cred_t cred,
+	struct vnode *dvp, struct vnode *vp);
+	int (*gro_rename)(struct mount *mp, kauth_cred_t cred,
+	struct vnode *fdvp, struct componentname *fcnp,
+	void *fde, struct vnode *fvp,
+	struct vnode *tdvp, struct componentname *tcnp,
+	void *tde, struct vnode *tvp);
+	int (*gro_remove)(struct mount *mp, kauth_cred_t cred,
+	struct vnode *dvp, struct componentname *cnp, void *de,
+	struct vnode *vp);
+	int (*gro_lookup)(struct mount *mp, struct vnode *dvp,
+	struct componentname *cnp, void *fde_ret, struct vnode **vp_ret);
+	int (*gro_genealogy)(struct mount *mp, kauth_cred_t cred,
+	struct vnode *fdvp, struct vnode *tdvp,
+	struct vnode **intermediate_node_ret);
+	int (*gro_lock_directory)(struct mount *mp, struct vnode *vp);
+};
+
 #endif /* !_MISCFS_GENFS_GENFS_H_ */

Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u 

CVS commit: src/sys

2012-05-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed May  9 00:16:07 UTC 2012

Modified Files:
src/sys/fs/tmpfs: files.tmpfs tmpfs_vnops.c
src/sys/rump/fs/lib/libtmpfs: Makefile
Added Files:
src/sys/fs/tmpfs: tmpfs_rename.c

Log Message:
Adapt tmpfs_rename to use genfs_rename.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/fs/tmpfs/files.tmpfs
cvs rdiff -u -r0 -r1.1 src/sys/fs/tmpfs/tmpfs_rename.c
cvs rdiff -u -r1.96 -r1.97 src/sys/fs/tmpfs/tmpfs_vnops.c
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/fs/lib/libtmpfs/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/tmpfs/files.tmpfs
diff -u src/sys/fs/tmpfs/files.tmpfs:1.4 src/sys/fs/tmpfs/files.tmpfs:1.5
--- src/sys/fs/tmpfs/files.tmpfs:1.4	Tue Jun 22 18:32:07 2010
+++ src/sys/fs/tmpfs/files.tmpfs	Wed May  9 00:16:07 2012
@@ -1,9 +1,10 @@
-#	$NetBSD: files.tmpfs,v 1.4 2010/06/22 18:32:07 rmind Exp $
+#	$NetBSD: files.tmpfs,v 1.5 2012/05/09 00:16:07 riastradh Exp $
 
 deffs	TMPFS
 
 file	fs/tmpfs/tmpfs_fifoops.c	tmpfs
 file	fs/tmpfs/tmpfs_mem.c		tmpfs
+file	fs/tmpfs/tmpfs_rename.c	tmpfs
 file	fs/tmpfs/tmpfs_specops.c	tmpfs
 file	fs/tmpfs/tmpfs_subr.c		tmpfs
 file	fs/tmpfs/tmpfs_vfsops.c		tmpfs

Index: src/sys/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.96 src/sys/fs/tmpfs/tmpfs_vnops.c:1.97
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.96	Tue Mar 13 18:40:50 2012
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Wed May  9 00:16:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.96 2012/03/13 18:40:50 elad Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.97 2012/05/09 00:16:07 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.96 2012/03/13 18:40:50 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.97 2012/05/09 00:16:07 riastradh Exp $);
 
 #include sys/param.h
 #include sys/dirent.h
@@ -775,1274 +775,6 @@ out:
 	return error;
 }
 
-/*
- * tmpfs_rename: rename routine, the hairiest system call, with the
- * insane API.
- *
- * Arguments: fdvp (from-parent vnode), fvp (from-leaf), tdvp (to-parent)
- * and tvp (to-leaf), if exists (NULL if not).
- *
- * = Caller holds a reference on fdvp and fvp, they are unlocked.
- *Note: fdvp and fvp can refer to the same object (i.e. when it is root).
- *
- * = Both tdvp and tvp are referenced and locked.  It is our responsibility
- *to release the references and unlock them (or destroy).
- */
-
-/*
- * First, some forward declarations of subroutines.
- */
-
-static int tmpfs_sane_rename(struct vnode *, struct componentname *,
-struct vnode *, struct componentname *, kauth_cred_t, bool);
-static int tmpfs_rename_enter(struct mount *, struct tmpfs_mount *,
-kauth_cred_t,
-struct vnode *, struct tmpfs_node *, struct componentname *,
-struct tmpfs_dirent **, struct vnode **,
-struct vnode *, struct tmpfs_node *, struct componentname *,
-struct tmpfs_dirent **, struct vnode **);
-static int tmpfs_rename_enter_common(struct mount *, struct tmpfs_mount *,
-kauth_cred_t,
-struct vnode *, struct tmpfs_node *,
-struct componentname *, struct tmpfs_dirent **, struct vnode **,
-struct componentname *, struct tmpfs_dirent **, struct vnode **);
-static int tmpfs_rename_enter_separate(struct mount *, struct tmpfs_mount *,
-kauth_cred_t,
-struct vnode *, struct tmpfs_node *, struct componentname *,
-struct tmpfs_dirent **, struct vnode **,
-struct vnode *, struct tmpfs_node *, struct componentname *,
-struct tmpfs_dirent **, struct vnode **);
-static void tmpfs_rename_exit(struct tmpfs_mount *,
-struct vnode *, struct vnode *, struct vnode *, struct vnode *);
-static int tmpfs_rename_lock_directory(struct vnode *, struct tmpfs_node *);
-static int tmpfs_rename_genealogy(struct tmpfs_node *, struct tmpfs_node *,
-struct tmpfs_node **);
-static int tmpfs_rename_lock(struct mount *, kauth_cred_t, int,
-struct vnode *, struct tmpfs_node *, struct componentname *, bool,
-struct tmpfs_dirent **, struct vnode **,
-struct vnode *, struct tmpfs_node *, struct componentname *, bool,
-struct tmpfs_dirent **, struct vnode **);
-static void tmpfs_rename_attachdetach(struct tmpfs_mount *,
-struct vnode *, struct tmpfs_dirent *, struct vnode *,
-struct vnode *, struct tmpfs_dirent *, struct vnode *);
-static int tmpfs_do_remove(struct tmpfs_mount *, struct vnode *,
-struct tmpfs_node *, struct tmpfs_dirent *, struct vnode *, kauth_cred_t);
-static int tmpfs_rename_check_possible(struct tmpfs_node *,
-struct tmpfs_node *, struct tmpfs_node *, struct tmpfs_node *);
-static int tmpfs_rename_check_permitted(kauth_cred_t,
-struct tmpfs_node *, struct tmpfs_node *,
-struct tmpfs_node *, struct tmpfs_node *);
-static int tmpfs_remove_check_possible(struct 

CVS commit: src/tests/fs/vfs

2012-05-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed May  9 00:22:26 UTC 2012

Modified Files:
src/tests/fs/vfs: t_renamerace.c

Log Message:
Adjust t_renamerace now that ext2fs and ffs have good rename.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/tests/fs/vfs/t_renamerace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/vfs/t_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.25 src/tests/fs/vfs/t_renamerace.c:1.26
--- src/tests/fs/vfs/t_renamerace.c:1.25	Thu Feb 16 02:47:56 2012
+++ src/tests/fs/vfs/t_renamerace.c	Wed May  9 00:22:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.25 2012/02/16 02:47:56 perseant Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.26 2012/05/09 00:22:26 riastradh Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -129,13 +129,9 @@ renamerace_dirs(const atf_tc_t *tc, cons
 		atf_tc_skip(rename not supported by file system);
 
 	/* XXX: msdosfs also sometimes hangs */
-	if (FSTYPE_EXT2FS(tc) || FSTYPE_MSDOS(tc))
+	if (FSTYPE_MSDOS(tc))
 		atf_tc_expect_signal(-1, PR kern/43626);
 
-	/* XXX: unracy execution not caught */
-	if (FSTYPE_P2K_FFS(tc))
-		atf_tc_expect_fail(PR kern/44336); /* child dies */
-
 	RZ(rump_pub_lwproc_rfork(RUMP_RFCFDG));
 	RL(wrkpid = rump_sys_getpid());
 
@@ -154,14 +150,8 @@ renamerace_dirs(const atf_tc_t *tc, cons
 	 * Doesn't always trigger when run on a slow backend
 	 * (i.e. not on tmpfs/mfs).  So do the usual kludge.
 	 */
-	if (FSTYPE_EXT2FS(tc) || FSTYPE_MSDOS(tc))
+	if (FSTYPE_MSDOS(tc))
 		abort();
-
-	if (FSTYPE_P2K_FFS(tc)) {
-		/* XXX: some races may hang test run if we don't unmount */
-		puffs_fstest_unmount(tc, mp, MNT_FORCE);
-		atf_tc_fail(problem did not trigger);
-	}
 }
 
 ATF_TC_FSAPPLY(renamerace, rename(2) race with file unlinked mid-operation);



CVS commit: [netbsd-6] src/sys

2012-05-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed May  9 03:22:55 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-6]: genassym.cf mptramp.S
src/sys/arch/amd64/include [netbsd-6]: param.h
src/sys/arch/i386/i386 [netbsd-6]: genassym.cf mptramp.S
src/sys/arch/i386/include [netbsd-6]: param.h
src/sys/arch/x86/acpi [netbsd-6]: acpi_wakeup.c
src/sys/arch/x86/include [netbsd-6]: cpu.h cpuvar.h pmap.h
src/sys/arch/x86/x86 [netbsd-6]: cpu.c mtrr_i686.c pmap.c pmap_tlb.c
src/sys/arch/xen/include [netbsd-6]: xenpmap.h
src/sys/arch/xen/x86 [netbsd-6]: cpu.c x86_xpmap.c xen_pmap.c
src/sys/kern [netbsd-6]: subr_kcpuset.c sys_sched.c
src/sys/sys [netbsd-6]: kcpuset.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #202):
sys/arch/x86/include/cpuvar.h: revision 1.46
sys/arch/xen/include/xenpmap.h: revision 1.34
sys/arch/i386/include/param.h: revision 1.77
sys/arch/x86/x86/pmap_tlb.c: revision 1.5
sys/arch/x86/x86/pmap_tlb.c: revision 1.6
sys/arch/i386/i386/genassym.cf: revision 1.92
sys/arch/xen/x86/cpu.c: revision 1.91
sys/arch/x86/x86/pmap.c: revision 1.177
sys/arch/xen/x86/xen_pmap.c: revision 1.21
sys/arch/x86/acpi/acpi_wakeup.c: revision 1.31
sys/kern/subr_kcpuset.c: revision 1.5
sys/arch/amd64/include/param.h: revision 1.18
sys/sys/kcpuset.h: revision 1.5
sys/arch/x86/x86/mtrr_i686.c: revision 1.26
sys/arch/x86/x86/mtrr_i686.c: revision 1.27
sys/arch/xen/x86/x86_xpmap.c: revision 1.43
sys/arch/x86/x86/cpu.c: revision 1.98
sys/arch/amd64/amd64/mptramp.S: revision 1.14
sys/kern/sys_sched.c: revision 1.42
sys/arch/amd64/amd64/genassym.cf: revision 1.50
sys/arch/i386/i386/mptramp.S: revision 1.24
sys/arch/x86/include/pmap.h: revision 1.52
sys/arch/x86/include/cpu.h: revision 1.50
- Convert x86 MD code, mainly pmap(9) e.g. TLB shootdown code, to use
  kcpuset(9) and thus replace hardcoded CPU bitmasks.  This removes the
  limitation of maximum CPUs.
- Support up to 256 CPUs on amd64 architecture by default.
Bug fixes, improvements, completion of Xen part and testing on 64-core
AMD Opteron(tm) Processor 6282 SE (also, as Xen HVM domU with 128 CPUs)
by Manuel Bouyer.
- pmap_tlb_shootdown: do not overwrite tp_cpumask with pm_cpus, but merge
  like pm_kernel_cpus.  Remove unecessary intersection with kcpuset_running.
  Do not reset tp_userpmap if pmap_kernel().
- Remove pmap_tlb_mailbox_t wrapping, which is pointless after recent changes.
- pmap_tlb_invalidate, pmap_tlb_intr: constify for packet structure.
i686_mtrr_init_first: handle the case when there are no variable-size MTRR
registers available (i686_mtrr_vcnt == 0).


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.49.2.1 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.12.14.1 -r1.12.14.2 src/sys/arch/amd64/amd64/mptramp.S
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/amd64/include/param.h
cvs rdiff -u -r1.91 -r1.91.2.1 src/sys/arch/i386/i386/genassym.cf
cvs rdiff -u -r1.22.14.1 -r1.22.14.2 src/sys/arch/i386/i386/mptramp.S
cvs rdiff -u -r1.76 -r1.76.2.1 src/sys/arch/i386/include/param.h
cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.47.2.2 -r1.47.2.3 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.45 -r1.45.8.1 src/sys/arch/x86/include/cpuvar.h
cvs rdiff -u -r1.49.2.1 -r1.49.2.2 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.96.8.1 -r1.96.8.2 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/arch/x86/x86/mtrr_i686.c
cvs rdiff -u -r1.164.2.3 -r1.164.2.4 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/x86/x86/pmap_tlb.c
cvs rdiff -u -r1.33 -r1.33.2.1 src/sys/arch/xen/include/xenpmap.h
cvs rdiff -u -r1.80.2.3 -r1.80.2.4 src/sys/arch/xen/x86/cpu.c
cvs rdiff -u -r1.38.2.3 -r1.38.2.4 src/sys/arch/xen/x86/x86_xpmap.c
cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/arch/xen/x86/xen_pmap.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/kern/subr_kcpuset.c
cvs rdiff -u -r1.39 -r1.39.2.1 src/sys/kern/sys_sched.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/sys/kcpuset.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/genassym.cf
diff -u src/sys/arch/amd64/amd64/genassym.cf:1.49 src/sys/arch/amd64/amd64/genassym.cf:1.49.2.1
--- src/sys/arch/amd64/amd64/genassym.cf:1.49	Wed Dec  7 15:47:41 2011
+++ src/sys/arch/amd64/amd64/genassym.cf	Wed May  9 03:22:55 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.49 2011/12/07 15:47:41 cegger Exp $
+#	$NetBSD: genassym.cf,v 1.49.2.1 2012/05/09 03:22:55 riz Exp $
 
 #
 # Copyright (c) 1998, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -228,12 +228,10 @@ define	CPU_INFO_RESCHED	offsetof(struct 
 define	CPU_INFO_WANT_PMAPLOAD	offsetof(struct 

CVS commit: [netbsd-6] src/doc

2012-05-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed May  9 03:23:32 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Ticket 202.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.83 -r1.1.2.84 src/doc/CHANGES-6.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.83 src/doc/CHANGES-6.0:1.1.2.84
--- src/doc/CHANGES-6.0:1.1.2.83	Tue May  8 13:38:58 2012
+++ src/doc/CHANGES-6.0	Wed May  9 03:23:32 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.83 2012/05/08 13:38:58 sborrill Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.84 2012/05/09 03:23:32 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -2157,3 +2157,30 @@ usr.bin/passwd/krb5_passwd.c			1.20
 	Fix non-PAM build of Kerberos 5 passwd.
 	[christos, ticket #231]
 
+sys/arch/amd64/amd64/genassym.cf		1.50
+sys/arch/amd64/amd64/mptramp.S			1.14
+sys/arch/amd64/include/param.h			1.18
+sys/arch/i386/i386/genassym.cf			1.92
+sys/arch/i386/i386/mptramp.S			1.24
+sys/arch/i386/include/param.h			1.77
+sys/arch/x86/acpi/acpi_wakeup.c			1.31
+sys/arch/x86/include/cpu.h			1.50
+sys/arch/x86/include/cpuvar.h			1.46
+sys/arch/x86/include/pmap.h			1.52
+sys/arch/x86/x86/cpu.c1.98
+sys/arch/x86/x86/mtrr_i686.c			1.26
+sys/arch/x86/x86/mtrr_i686.c			1.27
+sys/arch/x86/x86/pmap.c1.177
+sys/arch/x86/x86/pmap_tlb.c			1.5
+sys/arch/x86/x86/pmap_tlb.c			1.6
+sys/arch/xen/include/xenpmap.h			1.34
+sys/arch/xen/x86/cpu.c1.91
+sys/arch/xen/x86/x86_xpmap.c			1.43 via patch
+sys/arch/xen/x86/xen_pmap.c			1.21
+sys/kern/subr_kcpuset.c1.5
+sys/kern/sys_sched.c1.42
+sys/sys/kcpuset.h1.5
+
+	Add support for up to 256 CPUs on amd64 by default.
+	[rmind, ticket #202]
+



CVS commit: [netbsd-6] src/usr.sbin/makemandb

2012-05-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed May  9 03:41:00 UTC 2012

Modified Files:
src/usr.sbin/makemandb [netbsd-6]: DBSCHEMA apropos-utils.c
apropos-utils.h makemandb.c

Log Message:
Pull up following revision(s) (requested by wiz in ticket #229):
usr.sbin/makemandb/makemandb.c: revision 1.9
usr.sbin/makemandb/DBSCHEMA: revision 1.2
usr.sbin/makemandb/apropos-utils.c: revision 1.5
usr.sbin/makemandb/apropos-utils.h: revision 1.3
PR 46419 by Abhinav Upadhyay using his updated patch:
Clean up after removing man page aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 src/usr.sbin/makemandb/DBSCHEMA
cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/usr.sbin/makemandb/apropos-utils.c
cvs rdiff -u -r1.2 -r1.2.2.1 src/usr.sbin/makemandb/apropos-utils.h
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/usr.sbin/makemandb/makemandb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makemandb/DBSCHEMA
diff -u src/usr.sbin/makemandb/DBSCHEMA:1.1 src/usr.sbin/makemandb/DBSCHEMA:1.1.2.1
--- src/usr.sbin/makemandb/DBSCHEMA:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/DBSCHEMA	Wed May  9 03:41:00 2012
@@ -50,3 +50,4 @@ There are three tables in the database a
   3. sectionThe section number  
   4. machineThe machine architecture (if any) for which 
 the page is relevant
+  5. md5_hash   MD5 Hash of the target man page.

Index: src/usr.sbin/makemandb/apropos-utils.c
diff -u src/usr.sbin/makemandb/apropos-utils.c:1.2.2.1 src/usr.sbin/makemandb/apropos-utils.c:1.2.2.2
--- src/usr.sbin/makemandb/apropos-utils.c:1.2.2.1	Thu Apr 19 20:03:00 2012
+++ src/usr.sbin/makemandb/apropos-utils.c	Wed May  9 03:41:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apropos-utils.c,v 1.2.2.1 2012/04/19 20:03:00 riz Exp $	*/
+/*	$NetBSD: apropos-utils.c,v 1.2.2.2 2012/05/09 03:41:00 riz Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: apropos-utils.c,v 1.2.2.1 2012/04/19 20:03:00 riz Exp $);
+__RCSID($NetBSD: apropos-utils.c,v 1.2.2.2 2012/05/09 03:41:00 riz Exp $);
 
 #include sys/stat.h
 
@@ -172,7 +172,7 @@ create_db(sqlite3 *db)
 			file UNIQUE, md5_hash UNIQUE, id  INTEGER PRIMARY KEY); 
 //mandb_meta
 			CREATE TABLE IF NOT EXISTS mandb_links(link, target, section, 
-			machine); ;	//mandb_links
+			machine, md5_hash); ;	//mandb_links
 
 	sqlite3_exec(db, sqlstr, NULL, NULL, errmsg);
 	if (errmsg != NULL)
@@ -181,7 +181,9 @@ create_db(sqlite3 *db)
 	sqlstr = CREATE INDEX IF NOT EXISTS index_mandb_links ON mandb_links 
 			(link); 
 			CREATE INDEX IF NOT EXISTS index_mandb_meta_dev ON mandb_meta 
-			(device, inode);
+			(device, inode); 
+			CREATE INDEX IF NOT EXISTS index_mandb_links_md5 ON mandb_links 
+			(md5_hash);;
 	sqlite3_exec(db, sqlstr, NULL, NULL, errmsg);
 	if (errmsg != NULL)
 		goto out;

Index: src/usr.sbin/makemandb/apropos-utils.h
diff -u src/usr.sbin/makemandb/apropos-utils.h:1.2 src/usr.sbin/makemandb/apropos-utils.h:1.2.2.1
--- src/usr.sbin/makemandb/apropos-utils.h:1.2	Tue Feb  7 19:17:16 2012
+++ src/usr.sbin/makemandb/apropos-utils.h	Wed May  9 03:41:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apropos-utils.h,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
+/*	$NetBSD: apropos-utils.h,v 1.2.2.1 2012/05/09 03:41:00 riz Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com
  * All rights reserved.
@@ -43,7 +43,7 @@
 #define MANDB_WRITE SQLITE_OPEN_READWRITE
 #define MANDB_CREATE SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE
 
-#define APROPOS_SCHEMA_VERSION 20120130
+#define APROPOS_SCHEMA_VERSION 20120507
 
 /*
  * Used to identify the section of a man(7) page.

Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.2.2.4 src/usr.sbin/makemandb/makemandb.c:1.2.2.5
--- src/usr.sbin/makemandb/makemandb.c:1.2.2.4	Mon May  7 17:02:07 2012
+++ src/usr.sbin/makemandb/makemandb.c	Wed May  9 03:41:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.2.2.4 2012/05/07 17:02:07 riz Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.2.2.5 2012/05/09 03:41:00 riz Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com
  * Copyright (c) 2011 Kristaps Dzonsons krist...@bsd.lv
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: makemandb.c,v 1.2.2.4 2012/05/07 17:02:07 riz Exp $);
+__RCSID($NetBSD: makemandb.c,v 1.2.2.5 2012/05/09 03:41:00 riz Exp $);
 
 #include sys/stat.h
 #include sys/types.h
@@ -780,6 +780,8 @@ update_db(sqlite3 *db, struct mparse *mp
 
 	sqlstr = DELETE FROM mandb_meta WHERE file NOT IN
 		  (SELECT file FROM metadb.file_cache);
+		 DELETE FROM mandb_links WHERE md5_hash NOT IN
+		  (SELECT md5_hash from mandb_meta);
 		 DROP TABLE metadb.file_cache;
 		 DELETE FROM mandb WHERE rowid NOT 

CVS commit: [netbsd-6] src/doc

2012-05-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed May  9 03:42:54 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Ticket 229.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-6.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.84 src/doc/CHANGES-6.0:1.1.2.85
--- src/doc/CHANGES-6.0:1.1.2.84	Wed May  9 03:23:32 2012
+++ src/doc/CHANGES-6.0	Wed May  9 03:42:54 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.84 2012/05/09 03:23:32 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.85 2012/05/09 03:42:54 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -2184,3 +2184,11 @@ sys/sys/kcpuset.h1.5
 	Add support for up to 256 CPUs on amd64 by default.
 	[rmind, ticket #202]
 
+usr.sbin/makemandb/DBSCHEMA			1.2
+usr.sbin/makemandb/apropos-utils.c		1.5
+usr.sbin/makemandb/apropos-utils.h		1.3
+usr.sbin/makemandb/makemandb.c			1.9
+
+	Clean up after removing man page aliases. PR#46419.
+	[wiz, ticket #229]
+