Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2010 07:20:20 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212782 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201009170720.o8H7KKfm021761@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 		}



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