Date: Mon, 24 Nov 2003 09:51:16 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 42999 for review Message-ID: <200311241751.hAOHpGv7014884@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=42999 Change 42999 by sam@sam_ebb on 2003/11/24 09:50:24 IFC @ 42998 Affected files ... .. //depot/projects/netperf/sys/dev/ata/ata-raid.c#7 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cd.c#15 integrate .. //depot/projects/netperf/sys/dev/led/led.c#2 integrate .. //depot/projects/netperf/sys/dev/vinum/vinuminterrupt.c#3 integrate .. //depot/projects/netperf/sys/dev/vinum/vinumio.c#3 integrate .. //depot/projects/netperf/sys/dev/vinum/vinumrequest.c#4 integrate .. //depot/projects/netperf/sys/kern/vfs_mount.c#7 integrate .. //depot/projects/netperf/sys/netinet/ip_dummynet.c#18 integrate .. //depot/projects/netperf/sys/netinet/ip_fw2.c#18 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#27 integrate .. //depot/projects/netperf/sys/sys/mbuf.h#8 integrate .. //depot/projects/netperf/sys/sys/timepps.h#2 integrate Differences ... ==== //depot/projects/netperf/sys/dev/ata/ata-raid.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.71 2003/11/08 09:56:34 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.73 2003/11/24 14:54:41 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -774,17 +774,24 @@ return; } if (bp->bio_cmd == BIO_READ) { + int src_online = + (rdp->disks[buf1->drive].flags & AR_DF_ONLINE); + int mir_online = + (rdp->disks[buf1->drive+rdp->width].flags & AR_DF_ONLINE); + /* if mirror gone or close to last access on source */ - if (!(rdp->disks[buf1->drive+rdp->width].flags & AR_DF_ONLINE)|| - (buf1->bp.bio_pblkno >= + if (!mir_online || + ((src_online) && + buf1->bp.bio_pblkno >= (rdp->disks[buf1->drive].last_lba - AR_PROXIMITY) && buf1->bp.bio_pblkno <= (rdp->disks[buf1->drive].last_lba + AR_PROXIMITY))) { rdp->flags &= ~AR_F_TOGGLE; } /* if source gone or close to last access on mirror */ - else if (!(rdp->disks[buf1->drive].flags & AR_DF_ONLINE) || - (buf1->bp.bio_pblkno >= + else if (!src_online || + ((mir_online) && + buf1->bp.bio_pblkno >= (rdp->disks[buf1->drive + rdp->width].last_lba - AR_PROXIMITY) && buf1->bp.bio_pblkno <= ==== //depot/projects/netperf/sys/dev/ata/atapi-cd.c#15 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.155 2003/11/18 15:23:37 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.156 2003/11/24 14:20:19 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -1000,6 +1000,11 @@ return; } + if (bp->bio_cmd == BIO_READ && cdp->disk_size == -1) { + g_io_deliver(bp, EIO); + return; + } + /* GEOM classes must do their own request limiting */ if (bp->bio_length <= cdp->iomax) { mtx_lock(&cdp->queue_mtx); ==== //depot/projects/netperf/sys/dev/led/led.c#2 (text+ko) ==== @@ -9,7 +9,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/led/led.c,v 1.2 2003/11/03 15:45:42 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/led/led.c,v 1.3 2003/11/23 10:22:51 phk Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -254,7 +254,8 @@ mtx_lock(&led_mtx); LIST_REMOVE(sc, list); mtx_unlock(&led_mtx); - sbuf_delete(sc->spec); + if (sc->spec != NULL) + sbuf_delete(sc->spec); destroy_dev(dev); free(sc, M_LED); } ==== //depot/projects/netperf/sys/dev/vinum/vinuminterrupt.c#3 (text+ko) ==== @@ -1,7 +1,7 @@ /* vinuminterrupt.c: bottom half of the driver */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/vinum/vinuminterrupt.c,v 1.41 2003/08/24 17:55:56 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/vinum/vinuminterrupt.c,v 1.43 2003/11/24 04:06:56 grog Exp $"); /*- * Copyright (c) 1997, 1998, 1999 @@ -42,7 +42,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinuminterrupt.c,v 1.14 2001/05/23 23:03:37 grog Exp grog $ + * $Id: vinuminterrupt.c,v 1.41 2003/08/24 17:55:56 obrien Exp $ */ #include <dev/vinum/vinumhdr.h> @@ -398,6 +398,8 @@ rqe->b.b_bufsize = rqe->b.b_bcount; /* don't claim more */ rqe->b.b_resid = rqe->b.b_bcount; /* nothing transferred */ rqe->b.b_blkno += rqe->dataoffset; /* point to the correct block */ + rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT; + rqe->b.b_iooffset = rqe->b.b_offset; rqg->active++; /* another active request */ drive = &DRIVE[rqe->driveno]; /* drive to access */ @@ -434,6 +436,8 @@ rqe->b.b_iodone = complete_rqe; /* call us here when done */ rqg->flags &= ~XFR_PARITYOP; /* reset flags that brought us here */ rqe->b.b_bcount = rqe->buflen << DEV_BSHIFT; /* length to write */ + rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT; + rqe->b.b_iooffset = rqe->b.b_offset; rqe->b.b_bufsize = rqe->b.b_bcount; /* don't claim we have more */ rqe->b.b_resid = rqe->b.b_bcount; /* nothing transferred */ rqg->active++; /* another active request */ ==== //depot/projects/netperf/sys/dev/vinum/vinumio.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ * advised of the possibility of such damage. * * $Id: vinumio.c,v 1.39 2003/05/23 00:59:53 grog Exp grog $ - * $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.93 2003/08/15 17:56:44 rwatson Exp $ + * $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.95 2003/11/24 04:06:56 grog Exp $ */ #include <dev/vinum/vinumhdr.h> @@ -255,6 +255,8 @@ bp->b_iocmd = flag; bp->b_dev = drive->dev; /* device */ bp->b_blkno = offset / drive->sectorsize; /* block number */ + bp->b_offset = offset; + bp->b_iooffset = offset; bp->b_saveaddr = bp->b_data; bp->b_data = buf; bp->b_bcount = len; ==== //depot/projects/netperf/sys/dev/vinum/vinumrequest.c#4 (text+ko) ==== @@ -37,11 +37,11 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinumrequest.c,v 1.36 2003/05/08 04:34:55 grog Exp grog $ + * $Id: vinumrequest.c,v 1.69 2003/10/18 17:57:48 phk Exp $ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/vinum/vinumrequest.c,v 1.69 2003/10/18 17:57:48 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/vinum/vinumrequest.c,v 1.71 2003/11/24 04:06:56 grog Exp $"); #include <dev/vinum/vinumhdr.h> #include <dev/vinum/request.h> @@ -447,6 +447,8 @@ } #endif /* fire off the request */ + rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT; + rqe->b.b_iooffset = rqe->b.b_offset; DEV_STRATEGY(&rqe->b); } } @@ -991,6 +993,8 @@ if (debug & DEBUG_LASTREQS) logrq(loginfo_sdiol, (union rqinfou) &sbp->b, &sbp->b); #endif + sbp->b.b_offset = sbp->b.b_blkno << DEV_BSHIFT; + sbp->b.b_iooffset = sbp->b.b_offset; DEV_STRATEGY(&sbp->b); splx(s); } ==== //depot/projects/netperf/sys/kern/vfs_mount.c#7 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.115 2003/11/14 05:27:41 kan Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.116 2003/11/23 17:13:48 kan Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -533,7 +533,7 @@ #ifdef MAC mac_destroy_mount(mp); #endif - if (mp->mnt_op->vfs_mount == NULL) + if (mp->mnt_opt != NULL) vfs_freeopts(mp->mnt_opt); crfree(mp->mnt_cred); free(mp, M_MOUNT); ==== //depot/projects/netperf/sys/netinet/ip_dummynet.c#18 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/netinet/ip_dummynet.c,v 1.73 2003/11/08 23:36:31 sam Exp $ + * $FreeBSD: src/sys/netinet/ip_dummynet.c,v 1.74 2003/11/23 18:13:41 sam Exp $ */ #define DUMMYNET_DEBUG @@ -1995,7 +1995,7 @@ ip_dn_io_ptr = dummynet_io; ip_dn_ruledel_ptr = dn_rule_delete; - callout_init(&dn_timeout, CALLOUT_MPSAFE); + callout_init(&dn_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0); callout_reset(&dn_timeout, 1, dummynet, NULL); } ==== //depot/projects/netperf/sys/netinet/ip_fw2.c#18 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.47 2003/11/20 20:07:37 andre Exp $ + * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.49 2003/11/24 03:57:03 sam Exp $ */ #define DEB(x) @@ -82,12 +82,16 @@ #include <machine/in_cksum.h> /* XXX for in_cksum */ /* - * XXX This one should go in sys/mbuf.h. It is used to avoid that - * a firewall-generated packet loops forever through the firewall. + * This is used to avoid that a firewall-generated packet + * loops forever through the firewall. Note that it must + * be a flag that is unused by other protocols that might + * be called from ip_output (e.g. IPsec) and it must be + * listed in M_COPYFLAGS in mbuf.h so that if the mbuf chain + * is altered on the way through ip_output it is not lost. + * It might be better to add an m_tag since the this happens + * infrequently. */ -#ifndef M_SKIP_FIREWALL -#define M_SKIP_FIREWALL 0x4000 -#endif +#define M_SKIP_FIREWALL M_PROTO6 /* * set_disable contains one bit per set value (0..31). @@ -2924,7 +2928,7 @@ layer3_chain.rules = NULL; IPFW_LOCK_INIT(&layer3_chain); IPFW_DYN_LOCK_INIT(); - callout_init(&ipfw_timeout, CALLOUT_MPSAFE); + callout_init(&ipfw_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0); bzero(&default_rule, sizeof default_rule); ==== //depot/projects/netperf/sys/netinet6/ip6_output.c#27 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.70 2003/11/20 20:07:39 andre Exp $ */ +/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.71 2003/11/24 01:53:36 ume Exp $ */ /* $KAME: ip6_output.c,v 1.279 2002/01/26 06:12:30 jinmei Exp $ */ /* @@ -2417,6 +2417,9 @@ { int needfree; + if (pktopt == NULL) + return; + needfree = pktopt->needfree; if (optname == -1 || optname == IPV6_PKTINFO) { ==== //depot/projects/netperf/sys/sys/mbuf.h#8 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mbuf.h 8.5 (Berkeley) 2/19/95 - * $FreeBSD: src/sys/sys/mbuf.h,v 1.127 2003/11/14 23:58:01 bde Exp $ + * $FreeBSD: src/sys/sys/mbuf.h,v 1.128 2003/11/24 03:57:03 sam Exp $ */ #ifndef _SYS_MBUF_H_ @@ -153,6 +153,7 @@ #define M_PROTO3 0x0040 /* protocol-specific */ #define M_PROTO4 0x0080 /* protocol-specific */ #define M_PROTO5 0x0100 /* protocol-specific */ +#define M_PROTO6 0x4000 /* protocol-specific (avoid M_BCAST conflict) */ #define M_FREELIST 0x8000 /* mbuf is on the free list */ /* @@ -178,8 +179,8 @@ * Flags copied when copying m_pkthdr. */ #define M_COPYFLAGS (M_PKTHDR|M_EOR|M_RDONLY|M_PROTO1|M_PROTO1|M_PROTO2|\ - M_PROTO3|M_PROTO4|M_PROTO5|M_BCAST|M_MCAST|\ - M_FRAG|M_FIRSTFRAG|M_LASTFRAG) + M_PROTO3|M_PROTO4|M_PROTO5|M_PROTO6|\ + M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG) /* * Flags indicating hw checksum support and sw checksum requirements. ==== //depot/projects/netperf/sys/sys/timepps.h#2 (text+ko) ==== @@ -6,10 +6,10 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/sys/timepps.h,v 1.17 2002/04/30 19:46:20 phk Exp $ + * $FreeBSD: src/sys/sys/timepps.h,v 1.18 2003/11/23 18:52:23 phk Exp $ * - * The is a FreeBSD protype version of the "draft-mogul-pps-api-05.txt" - * specification for Pulse Per Second timing interfaces. + * The is a FreeBSD version of the RFC 2783 API for Pulse Per Second + * timing interfaces. */ #ifndef _SYS_TIMEPPS_H_
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311241751.hAOHpGv7014884>