Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2009 19:11:18 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 165196 for review
Message-ID:  <200906251911.n5PJBIWZ071979@repoman.freebsd.org>

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

Change 165196 by mav@mav_mavbook on 2009/06/25 19:10:54

	IFC

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_target.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/iscsi/initiator/isc_soc.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ixgbe/ixgbe.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/midi/midi.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/midi/sequencer.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/speaker/spkr.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_psdev.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_vnops.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_vnops.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_lockf.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/net/if_tap.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/net/if_tun.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/conf.h#14 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/uio.h#8 integrate

Differences ...

==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_target.c#16 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.77 2009/06/10 20:59:32 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.78 2009/06/25 18:46:30 kib Exp $");
 
 
 #include <sys/param.h>
@@ -552,7 +552,7 @@
 	softc = (struct targ_softc *)dev->si_drv1;
 	write_len = error = 0;
 	CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
-		  ("write - uio_resid %d\n", uio->uio_resid));
+		  ("write - uio_resid %zd\n", uio->uio_resid));
 	while (uio->uio_resid >= sizeof(user_ccb) && error == 0) {
 		union ccb *ccb;
 

==== //depot/projects/scottl-camlock/src/sys/dev/iscsi/initiator/isc_soc.c#3 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iscsi/initiator/isc_soc.c,v 1.5 2008/11/25 07:17:11 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iscsi/initiator/isc_soc.c,v 1.6 2009/06/25 18:46:30 kib Exp $");
 
 #include "opt_iscsi_initiator.h"
 
@@ -322,12 +322,12 @@
      error = soreceive(sp->soc, NULL, uio, 0, 0, &flags);
 
      if(error)
-	  debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd",
+	  debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd",
 		error,
 		sp->soc->so_error, uio->uio_resid, iov->iov_len);
      if(!error && (uio->uio_resid > 0)) {
 	  error = EPIPE; // was EAGAIN
-	  debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd so_state=%x",
+	  debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd so_state=%x",
 		error,
 		sp->soc->so_error, uio->uio_resid, iov->iov_len, sp->soc->so_state);
      }
@@ -442,7 +442,7 @@
 			      }
 			      mp = NULL;
 			      
-			      sdebug(4, "uio_resid=0x%x itt=0x%x bp=%p bo=%x len=%x/%x",
+			      sdebug(4, "uio_resid=0x%zx itt=0x%x bp=%p bo=%x len=%x/%x",
 				     uio->uio_resid,
 				     ntohl(pq->pdu.ipdu.bhs.itt),
 				     csio->data_ptr, ntohl(rcmd->bo), ntohl(cmd->edtlen), pq->pdu.ds_len);

==== //depot/projects/scottl-camlock/src/sys/dev/ixgbe/ixgbe.c#6 (text+ko) ====

@@ -30,7 +30,7 @@
   POSSIBILITY OF SUCH DAMAGE.
 
 ******************************************************************************/
-/*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.12 2009/06/25 17:16:26 jfv Exp $*/
+/*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.13 2009/06/25 18:40:27 jfv Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -2156,7 +2156,8 @@
 		** Bind the msix vector, and thus the
 		** ring to the corresponding cpu.
 		*/
-		bus_bind_intr(dev, txr->res, i);
+		if (adapter->num_queues > 1)
+			bus_bind_intr(dev, txr->res, i);
 
 		TASK_INIT(&txr->tx_task, 0, ixgbe_handle_tx, txr);
 		txr->tq = taskqueue_create_fast("ixgbe_txq", M_NOWAIT,
@@ -2192,7 +2193,8 @@
 		** Bind the msix vector, and thus the
 		** ring to the corresponding cpu.
 		*/
-		bus_bind_intr(dev, rxr->res, i);
+		if (adapter->num_queues > 1)
+			bus_bind_intr(dev, rxr->res, i);
 
 		TASK_INIT(&rxr->rx_task, 0, ixgbe_handle_rx, rxr);
 		rxr->tq = taskqueue_create_fast("ixgbe_rxq", M_NOWAIT,

==== //depot/projects/scottl-camlock/src/sys/dev/sound/midi/midi.c#11 (text) ====

@@ -35,7 +35,7 @@
   */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sound/midi/midi.c,v 1.27 2009/06/11 09:06:09 ariff Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sound/midi/midi.c,v 1.28 2009/06/25 18:46:30 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -852,7 +852,7 @@
 
 		used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid);
 		used = MIN(used, MIDI_WSIZE);
-		MIDI_DEBUG(5, printf("midiout: resid %d len %jd avail %jd\n",
+		MIDI_DEBUG(5, printf("midiout: resid %zd len %jd avail %jd\n",
 		    uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq),
 		    (intmax_t)MIDIQ_AVAIL(m->outq)));
 

==== //depot/projects/scottl-camlock/src/sys/dev/sound/midi/sequencer.c#13 (text) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sound/midi/sequencer.c,v 1.31 2009/06/07 19:12:08 ariff Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sound/midi/sequencer.c,v 1.32 2009/06/25 18:46:30 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -878,7 +878,7 @@
 	if (scp == NULL)
 		return ENXIO;
 
-	SEQ_DEBUG(7, printf("seq_read: unit %d, resid %d.\n",
+	SEQ_DEBUG(7, printf("seq_read: unit %d, resid %zd.\n",
 	    scp->unit, uio->uio_resid));
 
 	mtx_lock(&scp->seq_lock);
@@ -936,7 +936,7 @@
 	retval = 0;
 err1:
 	mtx_unlock(&scp->seq_lock);
-	SEQ_DEBUG(6, printf("seq_read: ret %d, resid %d.\n",
+	SEQ_DEBUG(6, printf("seq_read: ret %d, resid %zd.\n",
 	    retval, uio->uio_resid));
 
 	return retval;
@@ -950,7 +950,7 @@
 	int retval;
 	int used;
 
-	SEQ_DEBUG(7, printf("seq_write: unit %d, resid %d.\n",
+	SEQ_DEBUG(7, printf("seq_write: unit %d, resid %zd.\n",
 	    scp->unit, uio->uio_resid));
 
 	if (scp == NULL)
@@ -995,7 +995,7 @@
 
 		used = MIN(uio->uio_resid, 4);
 
-		SEQ_DEBUG(8, printf("seqout: resid %d len %jd avail %jd\n",
+		SEQ_DEBUG(8, printf("seqout: resid %zd len %jd avail %jd\n",
 		    uio->uio_resid, (intmax_t)MIDIQ_LEN(scp->out_q),
 		    (intmax_t)MIDIQ_AVAIL(scp->out_q)));
 
@@ -1115,7 +1115,7 @@
 
 err0:
 	SEQ_DEBUG(6,
-	    printf("seq_write done: leftover buffer length %d retval %d\n",
+	    printf("seq_write done: leftover buffer length %zd retval %d\n",
 	    uio->uio_resid, retval));
 	mtx_unlock(&scp->seq_lock);
 	return retval;

==== //depot/projects/scottl-camlock/src/sys/dev/speaker/spkr.c#5 (text+ko) ====

@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/speaker/spkr.c,v 1.78 2009/01/25 09:20:59 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/speaker/spkr.c,v 1.79 2009/06/25 18:46:30 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -439,7 +439,7 @@
 	int ioflag;
 {
 #ifdef DEBUG
-	printf("spkrwrite: entering with dev = %s, count = %d\n",
+	printf("spkrwrite: entering with dev = %s, count = %zd\n",
 		devtoname(dev), uio->uio_resid);
 #endif /* DEBUG */
 

==== //depot/projects/scottl-camlock/src/sys/fs/coda/coda_psdev.c#2 (text+ko) ====

@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/fs/coda/coda_psdev.c,v 1.48 2008/02/17 14:33:28 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/fs/coda/coda_psdev.c,v 1.49 2009/06/25 18:46:30 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -331,7 +331,7 @@
 	 * Get the rest of the data.
 	 */
 	if (vmp->vm_outSize < uiop->uio_resid) {
-		myprintf(("vcwrite: more data than asked for (%d < %d)\n",
+		myprintf(("vcwrite: more data than asked for (%d < %zd)\n",
 		    vmp->vm_outSize, uiop->uio_resid));
 
 		/*

==== //depot/projects/scottl-camlock/src/sys/fs/coda/coda_vnops.c#3 (text+ko) ====

@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/fs/coda/coda_vnops.c,v 1.100 2009/02/13 18:18:14 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/fs/coda/coda_vnops.c,v 1.101 2009/06/25 18:46:30 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -331,7 +331,7 @@
 	int error = 0;
 
 	MARK_ENTRY(CODA_RDWR_STATS);
-	CODADEBUG(CODA_RDWR, myprintf(("coda_rdwr(%d, %p, %d, %lld, %d)\n",
+	CODADEBUG(CODA_RDWR, myprintf(("coda_rdwr(%d, %p, %zd, %lld, %d)\n",
 	    rw, (void *)uiop->uio_iov->iov_base, uiop->uio_resid,
 	    (long long)uiop->uio_offset, uiop->uio_segflg)););
 
@@ -1470,7 +1470,7 @@
 	int opened_internally = 0;
 
 	MARK_ENTRY(CODA_READDIR_STATS);
-	CODADEBUG(CODA_READDIR, myprintf(("coda_readdir(%p, %d, %lld, %d)\n",
+	CODADEBUG(CODA_READDIR, myprintf(("coda_readdir(%p, %zd, %lld, %d)\n",
 	    (void *)uiop->uio_iov->iov_base, uiop->uio_resid,
 	    (long long)uiop->uio_offset, uiop->uio_segflg)););
 

==== //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_vnops.c#14 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/fs/pseudofs/pseudofs_vnops.c,v 1.78 2009/06/10 13:57:36 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/fs/pseudofs/pseudofs_vnops.c,v 1.79 2009/06/25 18:46:30 kib Exp $");
 
 #include "opt_pseudofs.h"
 
@@ -622,9 +622,9 @@
 	VOP_UNLOCK(vn, 0);
 
 	if (pn->pn_flags & PFS_RAWRD) {
-		PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid));
+		PFS_TRACE(("%zd resid", uio->uio_resid));
 		error = pn_fill(curthread, proc, pn, NULL, uio);
-		PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid));
+		PFS_TRACE(("%zd resid", uio->uio_resid));
 		goto ret;
 	}
 

==== //depot/projects/scottl-camlock/src/sys/kern/kern_lockf.c#11 (text+ko) ====

@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_lockf.c,v 1.73 2009/06/17 12:43:04 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_lockf.c,v 1.74 2009/06/25 18:54:56 kib Exp $");
 
 #include "opt_debug_lockf.h"
 
@@ -1937,9 +1937,14 @@
 	 * make sure it doesn't go away before we are finished.
 	 */
 	STAILQ_INIT(&locks);
+	VI_LOCK(vp);
 	ls = vp->v_lockf;
-	if (!ls)
+	if (!ls) {
+		VI_UNLOCK(vp);
 		return (0);
+	}
+	ls->ls_threads++;
+	VI_UNLOCK(vp);
 
 	sx_xlock(&ls->ls_lock);
 	LIST_FOREACH(lf, &ls->ls_active, lf_link) {
@@ -1960,6 +1965,10 @@
 		STAILQ_INSERT_TAIL(&locks, ldesc, link);
 	}
 	sx_xunlock(&ls->ls_lock);
+	VI_LOCK(vp);
+	ls->ls_threads--;
+	wakeup(ls);
+	VI_UNLOCK(vp);
 
 	/*
 	 * Call the iterator function for each lock in turn. If the

==== //depot/projects/scottl-camlock/src/sys/net/if_tap.c#16 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 /*
- * $FreeBSD: src/sys/net/if_tap.c,v 1.80 2009/06/10 20:59:32 kib Exp $
+ * $FreeBSD: src/sys/net/if_tap.c,v 1.81 2009/06/25 18:46:30 kib Exp $
  * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $
  */
 
@@ -934,7 +934,7 @@
 		return (0);
 
 	if ((uio->uio_resid < 0) || (uio->uio_resid > TAPMRU)) {
-		TAPDEBUG("%s invalid packet len = %d, minor = %#x\n",
+		TAPDEBUG("%s invalid packet len = %zd, minor = %#x\n",
 			ifp->if_xname, uio->uio_resid, dev2unit(dev));
 
 		return (EIO);

==== //depot/projects/scottl-camlock/src/sys/net/if_tun.c#18 (text+ko) ====

@@ -13,7 +13,7 @@
  * UCL. This driver is based much more on read/write/poll mode of
  * operation though.
  *
- * $FreeBSD: src/sys/net/if_tun.c,v 1.181 2009/06/17 15:01:01 bz Exp $
+ * $FreeBSD: src/sys/net/if_tun.c,v 1.182 2009/06/25 18:46:30 kib Exp $
  */
 
 #include "opt_atalk.h"
@@ -888,7 +888,7 @@
 		return (0);
 
 	if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) {
-		TUNDEBUG(ifp, "len=%d!\n", uio->uio_resid);
+		TUNDEBUG(ifp, "len=%zd!\n", uio->uio_resid);
 		return (EIO);
 	}
 

==== //depot/projects/scottl-camlock/src/sys/sys/conf.h#14 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)conf.h	8.5 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/sys/conf.h,v 1.250 2009/06/01 21:32:52 jhb Exp $
+ * $FreeBSD: src/sys/sys/conf.h,v 1.251 2009/06/25 18:44:05 jhb Exp $
  */
 
 #ifndef _SYS_CONF_H_
@@ -141,8 +141,6 @@
     vm_size_t size, struct vm_object **object, int nprot);
 typedef void d_purge_t(struct cdev *dev);
 
-typedef int d_spare2_t(struct cdev *dev);
-
 typedef int dumper_t(
 	void *_priv,		/* Private to the driver. */
 	void *_virtual,		/* Virtual (mapped) address. */

==== //depot/projects/scottl-camlock/src/sys/sys/uio.h#8 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)uio.h	8.5 (Berkeley) 2/22/94
- * $FreeBSD: src/sys/sys/uio.h,v 1.41 2009/03/14 19:07:58 das Exp $
+ * $FreeBSD: src/sys/sys/uio.h,v 1.42 2009/06/25 18:46:30 kib Exp $
  */
 
 #ifndef _SYS_UIO_H_
@@ -64,7 +64,7 @@
 	struct	iovec *uio_iov;		/* scatter/gather list */
 	int	uio_iovcnt;		/* length of scatter/gather list */
 	off_t	uio_offset;		/* offset in target object */
-	int	uio_resid;		/* remaining bytes to process */
+	ssize_t	uio_resid;		/* remaining bytes to process */
 	enum	uio_seg uio_segflg;	/* address space */
 	enum	uio_rw uio_rw;		/* operation */
 	struct	thread *uio_td;		/* owner */



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