From owner-svn-src-stable-8@FreeBSD.ORG Thu Dec 2 00:49:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30F5C1065673; Thu, 2 Dec 2010 00:49:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC518FC22; Thu, 2 Dec 2010 00:49:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB20n3hx062168; Thu, 2 Dec 2010 00:49:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB20n2vG062166; Thu, 2 Dec 2010 00:49:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012020049.oB20n2vG062166@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 2 Dec 2010 00:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216102 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2010 00:49:03 -0000 Author: kib Date: Thu Dec 2 00:49:02 2010 New Revision: 216102 URL: http://svn.freebsd.org/changeset/base/216102 Log: MFC r215838: Account i/o done on cdevs. Approved by: re (bz) Modified: stable/8/sys/kern/kern_physio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_physio.c ============================================================================== --- stable/8/sys/kern/kern_physio.c Thu Dec 2 00:47:55 2010 (r216101) +++ stable/8/sys/kern/kern_physio.c Thu Dec 2 00:49:02 2010 (r216102) @@ -57,10 +57,13 @@ physio(struct cdev *dev, struct uio *uio for (i = 0; i < uio->uio_iovcnt; i++) { while (uio->uio_iov[i].iov_len) { bp->b_flags = 0; - if (uio->uio_rw == UIO_READ) + if (uio->uio_rw == UIO_READ) { bp->b_iocmd = BIO_READ; - else + curthread->td_ru.ru_inblock++; + } else { bp->b_iocmd = BIO_WRITE; + curthread->td_ru.ru_oublock++; + } bp->b_iodone = bdone; bp->b_data = uio->uio_iov[i].iov_base; bp->b_bcount = uio->uio_iov[i].iov_len;