Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Feb 2005 01:37:03 GMT
From:      Eric Anholt <anholt@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 71353 for review
Message-ID:  <200502200137.j1K1b3f9082336@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=71353

Change 71353 by anholt@anholt_leguin on 2005/02/20 01:36:40

	IFC @71352 to get uipc_syscalls.c fix.

Affected files ...

.. //depot/projects/drm-merge/sys/alpha/include/exec.h#2 integrate
.. //depot/projects/drm-merge/sys/amd64/include/exec.h#2 integrate
.. //depot/projects/drm-merge/sys/arm/arm/cpufunc_asm.S#2 integrate
.. //depot/projects/drm-merge/sys/arm/include/exec.h#2 integrate
.. //depot/projects/drm-merge/sys/dev/acpica/acpi_perf.c#2 integrate
.. //depot/projects/drm-merge/sys/geom/geom_vfs.c#2 integrate
.. //depot/projects/drm-merge/sys/i386/include/_types.h#2 integrate
.. //depot/projects/drm-merge/sys/i386/include/exec.h#2 integrate
.. //depot/projects/drm-merge/sys/ia64/include/exec.h#2 integrate
.. //depot/projects/drm-merge/sys/kern/kern_cpu.c#2 integrate
.. //depot/projects/drm-merge/sys/kern/kern_module.c#2 integrate
.. //depot/projects/drm-merge/sys/kern/kern_sig.c#2 integrate
.. //depot/projects/drm-merge/sys/kern/uipc_syscalls.c#2 integrate
.. //depot/projects/drm-merge/sys/kern/vfs_subr.c#2 integrate
.. //depot/projects/drm-merge/sys/net/if_ethersubr.c#2 integrate
.. //depot/projects/drm-merge/sys/net/if_vlan.c#2 integrate
.. //depot/projects/drm-merge/sys/net/if_vlan_var.h#2 integrate
.. //depot/projects/drm-merge/sys/netgraph/ng_ksocket.c#2 integrate
.. //depot/projects/drm-merge/sys/nfsclient/nfs_socket.c#2 integrate
.. //depot/projects/drm-merge/sys/nfsclient/nfs_vnops.c#2 integrate
.. //depot/projects/drm-merge/sys/powerpc/include/exec.h#2 integrate
.. //depot/projects/drm-merge/sys/sys/bufobj.h#2 integrate
.. //depot/projects/drm-merge/sys/sys/cpu.h#2 integrate
.. //depot/projects/drm-merge/sys/sys/mbuf.h#2 integrate
.. //depot/projects/drm-merge/sys/sys/param.h#2 integrate
.. //depot/projects/drm-merge/sys/ufs/ffs/ffs_snapshot.c#2 integrate
.. //depot/projects/drm-merge/sys/ufs/ffs/ffs_vfsops.c#2 integrate
.. //depot/projects/drm-merge/sys/ufs/ufs/ufs_inode.c#2 integrate
.. //depot/projects/drm-merge/sys/vm/vnode_pager.c#2 integrate

Differences ...

==== //depot/projects/drm-merge/sys/alpha/include/exec.h#2 (text+ko) ====

@@ -29,7 +29,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/alpha/include/exec.h,v 1.3 2005/01/05 20:05:50 imp Exp $
+ * $FreeBSD: src/sys/alpha/include/exec.h,v 1.4 2005/02/19 21:16:48 ru Exp $
  */
 
-#define __LDPGSZ	8192
+#ifndef	_MACHINE_EXEC_H_
+#define	_MACHINE_EXEC_H_
+
+#define	__LDPGSZ	8192
+
+#endif /* !_MACHINE_EXEC_H_ */

==== //depot/projects/drm-merge/sys/amd64/include/exec.h#2 (text+ko) ====

@@ -27,12 +27,12 @@
  * SUCH DAMAGE.
  *
  *	@(#)exec.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/amd64/include/exec.h,v 1.9 2004/04/05 21:25:51 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/exec.h,v 1.10 2005/02/19 21:16:48 ru Exp $
  */
 
-#ifndef	_EXEC_H_
-#define	_EXEC_H_
+#ifndef	_MACHINE_EXEC_H_
+#define	_MACHINE_EXEC_H_
 
-#define __LDPGSZ	4096
+#define	__LDPGSZ	4096
 
-#endif /* !_EXEC_H_ */
+#endif /* !_MACHINE_EXEC_H_ */

==== //depot/projects/drm-merge/sys/arm/arm/cpufunc_asm.S#2 (text+ko) ====

@@ -43,7 +43,7 @@
  */
  
 #include <machine/asm.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc_asm.S,v 1.3 2005/01/05 21:58:47 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc_asm.S,v 1.5 2005/02/20 01:26:01 cognet Exp $");
 
 	.text
 	.align	0
@@ -121,9 +121,7 @@
 
 	teq	r2, r3			/* Only write if there is a change */
 	mcrne	p15, 0, r2, c1, c0, 0	/* Write new control register */
-	#if 0
 	mov	r0, r3			/* Return old value */
-	#endif
 
 	RET
 .Lglou:

==== //depot/projects/drm-merge/sys/arm/include/exec.h#2 (text+ko) ====

@@ -26,12 +26,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/arm/include/exec.h,v 1.2 2005/01/05 21:58:48 imp Exp $
+ * $FreeBSD: src/sys/arm/include/exec.h,v 1.3 2005/02/19 21:16:48 ru Exp $
  */
 
-#ifndef _EXEC_H_
-#define	_EXEC_H_
+#ifndef	_MACHINE_EXEC_H_
+#define	_MACHINE_EXEC_H_
 
-#define __LDPGSZ	4096
+#define	__LDPGSZ	4096
 
-#endif /* !_EXEC_H_ */
+#endif /* !_MACHINE_EXEC_H_ */

==== //depot/projects/drm-merge/sys/dev/acpica/acpi_perf.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_perf.c,v 1.9 2005/02/18 00:23:36 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_perf.c,v 1.10 2005/02/19 06:13:26 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -64,7 +64,11 @@
 	uint32_t	 sts_val;
 };
 
-#define MAX_PX_STATES	 16
+/* Offsets in struct cf_setting array for storing driver-specific values. */
+#define PX_SPEC_CONTROL	0
+#define PX_SPEC_STATUS	1
+
+#define MAX_PX_STATES	16
 
 struct acpi_perf_softc {
 	device_t	 dev;
@@ -389,6 +393,8 @@
 	set->lat = px->trans_lat;
 	set->volts = CPUFREQ_VAL_UNKNOWN;
 	set->dev = dev;
+	set->spec[PX_SPEC_CONTROL] = px->ctrl_val;
+	set->spec[PX_SPEC_STATUS] = px->sts_val;
 
 	return (0);
 }

==== //depot/projects/drm-merge/sys/geom/geom_vfs.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/geom_vfs.c,v 1.8 2005/02/10 12:10:35 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/geom_vfs.c,v 1.9 2005/02/19 11:44:56 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -153,6 +153,7 @@
 	bo->bo_ops = g_vfs_bufops;
 	bo->bo_private = cp;
 	bo->bo_bsize = pp->sectorsize;
+	gp->softc = bo;
 
 	return (error);
 }
@@ -161,9 +162,12 @@
 g_vfs_close(struct g_consumer *cp, struct thread *td)
 {
 	struct g_geom *gp;
+	struct bufobj *bo;
 
 	g_topology_assert();
 
 	gp = cp->geom;
+	bo = gp->softc;
+	bufobj_invalbuf(bo, V_SAVE, td, 0, 0);
 	g_wither_geom_close(gp, ENXIO);
 }

==== //depot/projects/drm-merge/sys/i386/include/_types.h#2 (text+ko) ====

@@ -33,7 +33,7 @@
  *
  *	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
  *	From: @(#)types.h	8.3 (Berkeley) 1/5/94
- * $FreeBSD: src/sys/i386/include/_types.h,v 1.9 2004/03/20 20:41:40 marcel Exp $
+ * $FreeBSD: src/sys/i386/include/_types.h,v 1.10 2005/02/19 13:46:40 marius Exp $
  */
 
 #ifndef _MACHINE__TYPES_H_
@@ -119,7 +119,7 @@
 #else
 typedef	char *			__va_list;
 #endif /* ! (__GNUC__ post 2.95 || __INTEL_COMPILER) */
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
+#if defined(__GNUC__) && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
 #define __GNUC_VA_LIST
 typedef __va_list		__gnuc_va_list;	/* compatibility w/GNU headers*/
 #endif

==== //depot/projects/drm-merge/sys/i386/include/exec.h#2 (text+ko) ====

@@ -27,12 +27,12 @@
  * SUCH DAMAGE.
  *
  *	@(#)exec.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/i386/include/exec.h,v 1.9 2004/04/07 20:46:05 imp Exp $
+ * $FreeBSD: src/sys/i386/include/exec.h,v 1.10 2005/02/19 21:16:48 ru Exp $
  */
 
-#ifndef	_EXEC_H_
-#define	_EXEC_H_
+#ifndef	_MACHINE_EXEC_H_
+#define	_MACHINE_EXEC_H_
 
-#define __LDPGSZ	4096
+#define	__LDPGSZ	4096
 
-#endif /* !_EXEC_H_ */
+#endif /* !_MACHINE_EXEC_H_ */

==== //depot/projects/drm-merge/sys/ia64/include/exec.h#2 (text+ko) ====

@@ -29,7 +29,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/ia64/include/exec.h,v 1.2 2005/01/06 22:18:23 imp Exp $
+ * $FreeBSD: src/sys/ia64/include/exec.h,v 1.3 2005/02/19 21:16:48 ru Exp $
  */
 
-#define __LDPGSZ	4096
+#ifndef	_MACHINE_EXEC_H_
+#define	_MACHINE_EXEC_H_
+
+#define	__LDPGSZ	4096
+
+#endif /* !_MACHINE_EXEC_H_ */

==== //depot/projects/drm-merge/sys/kern/kern_cpu.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_cpu.c,v 1.8 2005/02/18 00:23:36 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_cpu.c,v 1.9 2005/02/20 00:59:15 njl Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -91,6 +91,7 @@
 		    struct cf_level *dup, struct cf_setting *set);
 static int	cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS);
 static int	cpufreq_levels_sysctl(SYSCTL_HANDLER_ARGS);
+static int	cpufreq_settings_sysctl(SYSCTL_HANDLER_ARGS);
 
 static device_method_t cpufreq_methods[] = {
 	DEVMETHOD(device_probe,		bus_generic_probe),
@@ -745,12 +746,52 @@
 	return (error);
 }
 
+static int
+cpufreq_settings_sysctl(SYSCTL_HANDLER_ARGS)
+{
+	device_t dev;
+	struct cf_setting *sets;
+	struct sbuf sb;
+	int error, i, set_count;
+
+	dev = oidp->oid_arg1;
+	sbuf_new(&sb, NULL, 128, SBUF_AUTOEXTEND);
+
+	/* Get settings from the device and generate the output string. */
+	set_count = MAX_SETTINGS;
+	sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT);
+	if (sets == NULL)
+		return (ENOMEM);
+	error = CPUFREQ_DRV_SETTINGS(dev, sets, &set_count);
+	if (error)
+		goto out;
+	if (set_count) {
+		for (i = 0; i < set_count; i++)
+			sbuf_printf(&sb, "%d/%d ", sets[i].freq, sets[i].power);
+	} else
+		sbuf_cpy(&sb, "0");
+	sbuf_trim(&sb);
+	sbuf_finish(&sb);
+	error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req);
+
+out:
+	free(sets, M_TEMP);
+	sbuf_delete(&sb);
+	return (error);
+}
+
 int
 cpufreq_register(device_t dev)
 {
 	struct cpufreq_softc *sc;
 	device_t cf_dev, cpu_dev;
 
+	/* Add a sysctl to get each driver's settings separately. */
+	SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+	    OID_AUTO, "freq_settings", CTLTYPE_STRING | CTLFLAG_RD, dev, 0,
+	    cpufreq_settings_sysctl, "A", "CPU frequency driver settings");
+
 	/*
 	 * Add only one cpufreq device to each CPU.  Currently, all CPUs
 	 * must offer the same levels and be switched at the same time.

==== //depot/projects/drm-merge/sys/kern/kern_module.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
 #include "opt_compat.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_module.c,v 1.47 2005/01/19 17:53:06 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_module.c,v 1.48 2005/02/18 22:14:40 ps Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -457,10 +457,10 @@
 	id = mod->id;
 	refs = mod->refs;
 	name = mod->name;
-	CP(data32, mod->data, intval);
-	CP(data32, mod->data, uintval);
-	CP(data32, mod->data, longval);
-	CP(data32, mod->data, ulongval);
+	CP(mod->data, data32, intval);
+	CP(mod->data, data32, uintval);
+	CP(mod->data, data32, longval);
+	CP(mod->data, data32, ulongval);
 	MOD_SUNLOCK;
 	stat32 = uap->stat;
 

==== //depot/projects/drm-merge/sys/kern/kern_sig.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.300 2005/02/13 17:37:18 sobomax Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.301 2005/02/19 06:05:49 davidxu Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -846,10 +846,9 @@
 	struct sigacts *ps;
 	sigset_t savedmask, sigset;
 	struct proc *p;
-	int error;
-	int sig;
-	int hz;
-	int i;
+	int error, sig, hz, i, timevalid = 0;
+	struct timespec rts, ets, ts;
+	struct timeval tv;
 
 	p = td->td_proc;
 	error = 0;
@@ -859,6 +858,14 @@
 	PROC_LOCK(p);
 	ps = p->p_sigacts;
 	savedmask = td->td_sigmask;
+	if (timeout) {
+		if (timeout->tv_nsec >= 0 && timeout->tv_nsec < 1000000000) {
+			timevalid = 1;
+			getnanouptime(&rts);
+		 	ets = rts;
+			timespecadd(&ets, timeout);
+		}
+	}
 
 again:
 	for (i = 1; i <= _SIG_MAXSIG; ++i) {
@@ -909,17 +916,18 @@
 	 * signals.
 	 */
 	if (timeout) {
-		struct timeval tv;
-
-		if (timeout->tv_nsec < 0 || timeout->tv_nsec > 1000000000) {
+		if (!timevalid) {
 			error = EINVAL;
 			goto out;
 		}
-		if (timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
+		getnanouptime(&rts);
+		if (timespeccmp(&rts, &ets, >=)) {
 			error = EAGAIN;
 			goto out;
 		}
-		TIMESPEC_TO_TIMEVAL(&tv, timeout);
+		ts = ets;
+		timespecsub(&ts, &rts);
+		TIMESPEC_TO_TIMEVAL(&tv, &ts);
 		hz = tvtohz(&tv);
 	} else
 		hz = 0;
@@ -927,8 +935,15 @@
 	td->td_waitset = &waitset;
 	error = msleep(&ps, &p->p_mtx, PPAUSE|PCATCH, "sigwait", hz);
 	td->td_waitset = NULL;
-	if (error == 0) /* surplus wakeup ? */
-		error = EINTR;
+	if (timeout) {
+		if (error == ERESTART) {
+			/* timeout can not be restarted. */
+			error = EINTR;
+		} else if (error == EAGAIN) {
+			/* will calculate timeout by ourself. */
+			error = 0;
+		}
+	}
 	goto again;
 
 out:
@@ -946,6 +961,7 @@
 		_STOPEVENT(p, S_SIG, sig);
 
 		SIGDELSET(td->td_siglist, sig);
+		bzero(info, sizeof(*info));
 		info->si_signo = sig;
 		info->si_code = 0;
 	}

==== //depot/projects/drm-merge/sys/kern/uipc_syscalls.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.215 2005/02/18 19:37:36 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.216 2005/02/18 21:39:55 rwatson Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -501,7 +501,7 @@
 {
 	struct socket *so;
 	struct file *fp;
-	int error, s;
+	int error;
 	int interrupted = 0;
 
 	NET_LOCK_GIANT();

==== //depot/projects/drm-merge/sys/kern/vfs_subr.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.582 2005/02/18 11:13:56 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.583 2005/02/19 11:44:56 phk Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mac.h"
@@ -84,7 +84,7 @@
 static void	delmntque(struct vnode *vp);
 static void	insmntque(struct vnode *vp, struct mount *mp);
 static void	vlruvp(struct vnode *vp);
-static int	flushbuflist(struct bufv *bufv, int flags, struct vnode *vp,
+static int	flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo,
 		    int slpflag, int slptimeo);
 static void	syncer_shutdown(void *arg, int howto);
 static int	vtryrecycle(struct vnode *vp);
@@ -927,22 +927,14 @@
 }
 
 /*
- * Flush out and invalidate all buffers associated with a vnode.
+ * Flush out and invalidate all buffers associated with a bufobj
  * Called with the underlying object locked.
  */
 int
-vinvalbuf(vp, flags, td, slpflag, slptimeo)
-	struct vnode *vp;
-	int flags;
-	struct thread *td;
-	int slpflag, slptimeo;
+bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag, int slptimeo)
 {
 	int error;
-	struct bufobj *bo;
 
-	ASSERT_VOP_LOCKED(vp, "vinvalbuf");
-
-	bo = &vp->v_bufobj;
 	BO_LOCK(bo);
 	if (flags & V_SAVE) {
 		error = bufobj_wwait(bo, slpflag, slptimeo);
@@ -970,10 +962,10 @@
 	 */
 	do {
 		error = flushbuflist(&bo->bo_clean,
-		    flags, vp, slpflag, slptimeo);
+		    flags, bo, slpflag, slptimeo);
 		if (error == 0)
 			error = flushbuflist(&bo->bo_dirty,
-			    flags, vp, slpflag, slptimeo);
+			    flags, bo, slpflag, slptimeo);
 		if (error != 0 && error != EAGAIN) {
 			BO_UNLOCK(bo);
 			return (error);
@@ -990,7 +982,7 @@
 		BO_UNLOCK(bo);
 		if (bo->bo_object != NULL) {
 			VM_OBJECT_LOCK(bo->bo_object);
-			vm_object_pip_wait(bo->bo_object, "vnvlbx");
+			vm_object_pip_wait(bo->bo_object, "bovlbx");
 			VM_OBJECT_UNLOCK(bo->bo_object);
 		}
 		BO_LOCK(bo);
@@ -1018,21 +1010,31 @@
 }
 
 /*
+ * Flush out and invalidate all buffers associated with a vnode.
+ * Called with the underlying object locked.
+ */
+int
+vinvalbuf(struct vnode *vp, int flags, struct thread *td, int slpflag, int slptimeo)
+{
+
+	ASSERT_VOP_LOCKED(vp, "vinvalbuf");
+	return (bufobj_invalbuf(&vp->v_bufobj, flags, td, slpflag, slptimeo));
+}
+
+/*
  * Flush out buffers on the specified list.
  *
  */
 static int
-flushbuflist(bufv, flags, vp, slpflag, slptimeo)
+flushbuflist(bufv, flags, bo, slpflag, slptimeo)
 	struct bufv *bufv;
 	int flags;
-	struct vnode *vp;
+	struct bufobj *bo;
 	int slpflag, slptimeo;
 {
 	struct buf *bp, *nbp;
 	int retval, error;
-	struct bufobj *bo;
 
-	bo = &vp->v_bufobj;
 	ASSERT_BO_LOCKED(bo);
 
 	retval = 0;
@@ -1049,31 +1051,23 @@
 			BO_LOCK(bo);
 			return (error != ENOLCK ? error : EAGAIN);
 		}
+		if (bp->b_bufobj != bo) {	/* XXX: necessary ? */
+			BO_LOCK(bo);
+			return (EAGAIN);
+		}
 		/*
 		 * XXX Since there are no node locks for NFS, I
 		 * believe there is a slight chance that a delayed
 		 * write will occur while sleeping just above, so
-		 * check for it.  Note that vfs_bio_awrite expects
-		 * buffers to reside on a queue, while bwrite and
-		 * brelse do not.
+		 * check for it.
 		 */
 		if (((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI) &&
-			(flags & V_SAVE)) {
-
-			if (bp->b_vp == vp) {
-				if (bp->b_flags & B_CLUSTEROK) {
-					vfs_bio_awrite(bp);
-				} else {
-					bremfree(bp);
-					bp->b_flags |= B_ASYNC;
-					bwrite(bp);
-				}
-			} else {
-				bremfree(bp);
-				(void) bwrite(bp);
-			}
+		    (flags & V_SAVE)) {
+			bremfree(bp);
+			bp->b_flags |= B_ASYNC;
+			bwrite(bp);
 			BO_LOCK(bo);
-			return (EAGAIN);
+			return (EAGAIN);	/* XXX: why not loop ? */
 		}
 		bremfree(bp);
 		bp->b_flags |= (B_INVAL | B_NOCACHE | B_RELBUF);

==== //depot/projects/drm-merge/sys/net/if_ethersubr.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)if_ethersubr.c	8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.184 2005/02/14 11:58:54 glebius Exp $
+ * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.185 2005/02/18 22:31:19 ru Exp $
  */
 
 #include "opt_atalk.h"
@@ -604,7 +604,8 @@
 #endif
 
 	if (!(BDG_ACTIVE(ifp)) &&
-	    !(ether_type == ETHERTYPE_VLAN && ifp->if_nvlans > 0)) {
+	    !((ether_type == ETHERTYPE_VLAN || m->m_flags & M_VLANTAG) &&
+	    ifp->if_nvlans > 0)) {
 		/*
 		 * Discard packet if upper layers shouldn't see it because it
 		 * was unicast to a different Ethernet address. If the driver
@@ -618,7 +619,7 @@
 		 * it's undesired.
 		 */
 		if ((ifp->if_flags & IFF_PROMISC) != 0
-		    && (eh->ether_dhost[0] & 1) == 0
+		    && !ETHER_IS_MULTICAST(eh->ether_dhost)
 		    && bcmp(eh->ether_dhost,
 		      IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0
 		    && (ifp->if_flags & IFF_PPROMISC) == 0) {
@@ -657,8 +658,7 @@
 	 * Check to see if the device performed the VLAN decapsulation and
 	 * provided us with the tag.
 	 */
-	if (m_tag_first(m) != NULL &&
-	    m_tag_locate(m, MTAG_VLAN, MTAG_VLAN_TAG, NULL) != NULL) {
+	if (m->m_flags & M_VLANTAG) {
 		/*
 		 * If no VLANs are configured, drop.
 		 */

==== //depot/projects/drm-merge/sys/net/if_vlan.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net/if_vlan.c,v 1.76 2005/01/24 15:48:00 yar Exp $
+ * $FreeBSD: src/sys/net/if_vlan.c,v 1.77 2005/02/18 22:31:19 ru Exp $
  */
 
 /*
@@ -563,6 +563,7 @@
 		 */
 		tag = EVL_VLANOFTAG(VLAN_TAG_VALUE(mtag));
 		m_tag_delete(m, mtag);
+		m->m_flags &= ~M_VLANTAG;
 	} else {
 		switch (ifp->if_type) {
 		case IFT_ETHER:

==== //depot/projects/drm-merge/sys/net/if_vlan_var.h#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net/if_vlan_var.h,v 1.20 2005/01/07 01:45:34 imp Exp $
+ * $FreeBSD: src/sys/net/if_vlan_var.h,v 1.21 2005/02/18 22:31:19 ru Exp $
  */
 
 #ifndef _NET_IF_VLAN_VAR_H_
@@ -80,8 +80,8 @@
  *
  * to mark the packet m with the specified VLAN tag.  The last
  * parameter provides code to execute in case of an error.  On
- * output the driver should check ifnet to see if any VLANs are
- * in use and only then check for a packet tag; this is done with:
+ * output the driver should check mbuf to see if a VLAN tag is
+ * present and only then check for a tag; this is done with:
  *
  *	struct m_tag *mtag;
  *	mtag = VLAN_OUTPUT_TAG(ifp, m);
@@ -107,10 +107,11 @@
 	}							\
 	*(u_int *)(mtag+1) = (_t);				\
 	m_tag_prepend((_m), mtag);				\
+	(_m)->m_flags |= M_VLANTAG;				\
 } while (0)
 
 #define	VLAN_OUTPUT_TAG(_ifp, _m)				\
-	((_ifp)->if_nvlans != 0 ?				\
+	((_m)->m_flags & M_VLANTAG ?				\
 		m_tag_locate((_m), MTAG_VLAN, MTAG_VLAN_TAG, NULL) : NULL)
 #define	VLAN_TAG_VALUE(_mt)	(*(u_int *)((_mt)+1))
 #endif /* _KERNEL */

==== //depot/projects/drm-merge/sys/netgraph/ng_ksocket.c#2 (text+ko) ====

@@ -37,7 +37,7 @@
  *
  * Author: Archie Cobbs <archie@freebsd.org>
  *
- * $FreeBSD: src/sys/netgraph/ng_ksocket.c,v 1.51 2005/02/16 16:00:35 glebius Exp $
+ * $FreeBSD: src/sys/netgraph/ng_ksocket.c,v 1.52 2005/02/19 14:41:49 glebius Exp $
  * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $
  */
 
@@ -897,6 +897,12 @@
 	struct mbuf *m;
 	struct sa_tag *stag;
 
+	/* Avoid reentrantly sending on the socket */
+	if (SOCKBUF_OWNED(&so->so_snd)) {
+		NG_FREE_ITEM(item);
+		return (EDEADLK);
+	}
+
 	/* Extract data */
 	NGI_GET_M(item, m);
 	NG_FREE_ITEM(item);

==== //depot/projects/drm-merge/sys/nfsclient/nfs_socket.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.119 2005/01/07 01:45:50 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.120 2005/02/18 23:41:39 ps Exp $");
 
 /*
  * Socket operations for use by nfs
@@ -1027,10 +1027,12 @@
 			error = nfs_send(nmp->nm_so, nmp->nm_nam, m2, rep);
 			nfs_sndunlock(rep);
 		}
+		mtx_lock(&nfs_reqq_mtx);
 		if (!error && (rep->r_flags & R_MUSTRESEND) == 0) {
 			nmp->nm_sent += NFS_CWNDSCALE;
 			rep->r_flags |= R_SENT;
 		}
+		mtx_unlock(&nfs_reqq_mtx);
 	} else {
 		splx(s);
 		rep->r_rtt = -1;
@@ -1056,10 +1058,12 @@
 	/*
 	 * Decrement the outstanding request count.
 	 */
+	mtx_lock(&nfs_reqq_mtx);
 	if (rep->r_flags & R_SENT) {
 		rep->r_flags &= ~R_SENT;	/* paranoia */
 		nmp->nm_sent -= NFS_CWNDSCALE;
 	}
+	mtx_unlock(&nfs_reqq_mtx);
 
 	/*
 	 * If there was a successful reply and a tprintf msg.

==== //depot/projects/drm-merge/sys/nfsclient/nfs_vnops.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.250 2005/01/29 23:19:08 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.251 2005/02/19 11:44:56 phk Exp $");
 
 /*
  * vnode op calls for Sun NFS version 2 and 3
@@ -538,7 +538,9 @@
 		    error = nfs_flush(vp, MNT_WAIT, ap->a_td, cm);
 		    /* np->n_flag &= ~NMODIFIED; */
 		} else {
+		    VOP_LOCK(vp, LK_EXCLUSIVE, curthread);
 		    error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1);
+		    VOP_UNLOCK(vp, 0, curthread);
 		}
 	    }
  	    /* 

==== //depot/projects/drm-merge/sys/powerpc/include/exec.h#2 (text+ko) ====

@@ -26,12 +26,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/powerpc/include/exec.h,v 1.2 2005/01/07 02:29:19 imp Exp $
+ * $FreeBSD: src/sys/powerpc/include/exec.h,v 1.3 2005/02/19 21:16:48 ru Exp $
  */
 
-#ifndef _EXEC_H_
-#define	_EXEC_H_
+#ifndef	_MACHINE_EXEC_H_
+#define	_MACHINE_EXEC_H_
 
-#define __LDPGSZ	4096
+#define	__LDPGSZ	4096
 
-#endif /* !_EXEC_H_ */
+#endif /* !_MACHINE_EXEC_H_ */

==== //depot/projects/drm-merge/sys/sys/bufobj.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/bufobj.h,v 1.12 2005/01/11 10:43:08 phk Exp $
+ * $FreeBSD: src/sys/sys/bufobj.h,v 1.13 2005/02/19 11:44:57 phk Exp $
  */
 
 /*
@@ -125,6 +125,7 @@
 
 void bufobj_wdrop(struct bufobj *bo);
 void bufobj_wref(struct bufobj *bo);
+int bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag, int slptimeo);
 int bufobj_wwait(struct bufobj *bo, int slpflag, int timeo);
 int bufsync(struct bufobj *bo, int waitfor, struct thread *td);
 

==== //depot/projects/drm-merge/sys/sys/cpu.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/cpu.h,v 1.2 2005/02/13 05:37:19 njl Exp $
+ * $FreeBSD: src/sys/sys/cpu.h,v 1.3 2005/02/19 06:13:25 njl Exp $
  */
 
 #ifndef _SYS_CPU_H_
@@ -53,6 +53,7 @@
 	int	power;	/* Power consumed in mW. */
 	int	lat;	/* Transition latency in us. */
 	device_t dev;	/* Driver providing this setting. */
+	int	spec[4];/* Driver-specific storage for non-standard info. */
 };
 
 /* Maximum number of settings a given driver can have. */

==== //depot/projects/drm-merge/sys/sys/mbuf.h#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)mbuf.h	8.5 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/mbuf.h,v 1.165 2005/02/10 22:23:02 bmilekic Exp $
+ * $FreeBSD: src/sys/sys/mbuf.h,v 1.166 2005/02/18 22:31:18 ru Exp $
  */
 
 #ifndef _SYS_MBUF_H_
@@ -178,6 +178,7 @@
 #define	M_FRAG		0x0800	/* packet is a fragment of a larger packet */
 #define	M_FIRSTFRAG	0x1000	/* packet is first fragment */
 #define	M_LASTFRAG	0x2000	/* packet is last fragment */
+#define	M_VLANTAG	0x10000	/* packet has VLAN tag attached */
 
 /*
  * External buffer types: identify ext_buf type.
@@ -195,7 +196,8 @@
  */
 #define	M_COPYFLAGS	(M_PKTHDR|M_EOR|M_RDONLY|M_PROTO1|M_PROTO1|M_PROTO2|\
 			    M_PROTO3|M_PROTO4|M_PROTO5|M_SKIP_FIREWALL|\
-			    M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG)
+			    M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG|\
+			    M_VLANTAG)
 
 /*
  * Flags indicating hw checksum support and sw checksum requirements.

==== //depot/projects/drm-merge/sys/sys/param.h#2 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)param.h	8.3 (Berkeley) 4/4/95
- * $FreeBSD: src/sys/sys/param.h,v 1.224 2005/02/15 06:33:28 njl Exp $
+ * $FreeBSD: src/sys/sys/param.h,v 1.225 2005/02/19 13:48:53 marius Exp $
  */
 
 #ifndef _SYS_PARAM_H_
@@ -57,7 +57,7 @@
  *		is created, otherwise 1.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 600012	/* Master, propagated to newvers */
+#define __FreeBSD_version 600013	/* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include <sys/types.h>

==== //depot/projects/drm-merge/sys/ufs/ffs/ffs_snapshot.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_snapshot.c,v 1.97 2005/02/08 17:40:01 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_snapshot.c,v 1.98 2005/02/19 07:31:33 delphij Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -474,7 +474,7 @@
 		loc = howmany(xp->i_size, fs->fs_bsize) - 1;
 		if (loc < NDADDR) {
 			len = fragroundup(fs, blkoff(fs, xp->i_size));
-			if (len < fs->fs_bsize) {
+			if (len != 0 && len < fs->fs_bsize) {
 				ffs_blkfree(ump, copy_fs, vp,
 				    DIP(xp, i_db[loc]), len, xp->i_number);
 				blkno = DIP(xp, i_db[loc]);

==== //depot/projects/drm-merge/sys/ufs/ffs/ffs_vfsops.c#2 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.278 2005/02/10 12:20:08 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.279 2005/02/19 11:44:57 phk Exp $");
 
 #include "opt_mac.h"
 #include "opt_quota.h"
@@ -794,7 +794,6 @@
 out:
 	if (bp)
 		brelse(bp);
-	vinvalbuf(devvp, V_SAVE, td, 0, 0);
 	if (cp != NULL) {
 		DROP_GIANT();
 		g_topology_lock();
@@ -956,7 +955,6 @@
 			return (error);
 		}
 	}
-	vinvalbuf(ump->um_devvp, V_SAVE, td, 0, 0);
 	DROP_GIANT();
 	g_topology_lock();
 	g_vfs_close(ump->um_cp, td);

==== //depot/projects/drm-merge/sys/ufs/ufs/ufs_inode.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ufs/ufs_inode.c,v 1.57 2005/01/28 14:42:17 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ufs/ufs_inode.c,v 1.58 2005/02/19 11:44:57 phk Exp $");
 
 #include "opt_quota.h"
 #include "opt_ufs.h"
@@ -173,12 +173,12 @@
 		}
 	}
 #endif
+	vnode_destroy_vobject(vp);
 #ifdef UFS_DIRHASH
 	if (ip->i_dirhash != NULL)
 		ufsdirhash_free(ip);
 #endif
 	UFS_IFREE(ump, ip);
 	vp->v_data = 0;
-	vnode_destroy_vobject(vp);
 	return (0);
 }

==== //depot/projects/drm-merge/sys/vm/vnode_pager.c#2 (text+ko) ====

@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vnode_pager.c,v 1.212 2005/01/28 08:56:47 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vnode_pager.c,v 1.213 2005/02/19 11:44:57 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,6 +158,7 @@
 	obj = vp->v_object;
 	if (obj == NULL)
 		return;
+	VOP_LOCK(vp, LK_EXCLUSIVE, curthread);
 	vp->v_object = NULL;
 	VM_OBJECT_LOCK(obj);
 	if (obj->ref_count == 0) {
@@ -180,6 +181,7 @@
 		vm_pager_deallocate(obj);
 		VM_OBJECT_UNLOCK(obj);
 	}
+	VOP_UNLOCK(vp, 0, curthread);
 }
 

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502200137.j1K1b3f9082336>