From owner-svn-src-all@FreeBSD.ORG Thu Nov 25 20:05:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC8B7106564A; Thu, 25 Nov 2010 20:05:11 +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 DA5598FC12; Thu, 25 Nov 2010 20:05:11 +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 oAPK5BAf016131; Thu, 25 Nov 2010 20:05:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAPK5Box016129; Thu, 25 Nov 2010 20:05:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011252005.oAPK5Box016129@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 25 Nov 2010 20:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215838 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2010 20:05:12 -0000 Author: kib Date: Thu Nov 25 20:05:11 2010 New Revision: 215838 URL: http://svn.freebsd.org/changeset/base/215838 Log: Account i/o done on cdevs. Reported and tested by: Adam Vande More MFC after: 1 week Modified: head/sys/kern/kern_physio.c Modified: head/sys/kern/kern_physio.c ============================================================================== --- head/sys/kern/kern_physio.c Thu Nov 25 19:33:39 2010 (r215837) +++ head/sys/kern/kern_physio.c Thu Nov 25 20:05:11 2010 (r215838) @@ -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;