From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:20:20 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 75E31106566C; Fri, 17 Sep 2010 07:20:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 660368FC16; Fri, 17 Sep 2010 07:20:20 +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 o8H7KK0P021763; Fri, 17 Sep 2010 07:20:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7KKfm021761; Fri, 17 Sep 2010 07:20:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170720.o8H7KKfm021761@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 07:20:20 +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: r212782 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Fri, 17 Sep 2010 07:20:20 -0000 Author: avg Date: Fri Sep 17 07:20:20 2010 New Revision: 212782 URL: http://svn.freebsd.org/changeset/base/212782 Log: zfs+sendfile: advance uio_offset upon reading as well Picked from analogous code in tmpfs. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 17 07:17:38 2010 (r212781) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 17 07:20:20 2010 (r212782) @@ -523,8 +523,10 @@ again: if (error == 0) vm_page_set_valid(m, off, bytes); vm_page_wakeup(m); - if (error == 0) + if (error == 0) { uio->uio_resid -= bytes; + uio->uio_offset += bytes; + } } else { dirbytes += bytes; }