Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2010 10:48:16 +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: r212655 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201009151048.o8FAmG14030735@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed Sep 15 10:48:16 2010
New Revision: 212655
URL: http://svn.freebsd.org/changeset/base/212655

Log:
  zfs mappedread, update_pages: use int for offset and length within a page
  
  uint64_t, int64_t were redundant there
  
  Approved by:	pjd
  Tested by:	tools/regression/fsx
  MFC after:	2 weeks

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	Wed Sep 15 10:44:20 2010	(r212654)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Wed Sep 15 10:48:16 2010	(r212655)
@@ -387,7 +387,7 @@ update_pages(vnode_t *vp, int64_t start,
 {
 	vm_object_t obj;
 	struct sf_buf *sf;
-	int64_t off;
+	int off;
 
 	ASSERT(vp->v_mount != NULL);
 	obj = vp->v_object;
@@ -397,7 +397,7 @@ update_pages(vnode_t *vp, int64_t start,
 	VM_OBJECT_LOCK(obj);
 	for (start &= PAGEMASK; len > 0; start += PAGESIZE) {
 		vm_page_t pp;
-		uint64_t nbytes = MIN(PAGESIZE - off, len);
+		int nbytes = MIN(PAGESIZE - off, len);
 
 		if ((pp = page_lookup(vp, start, off, nbytes)) != NULL) {
 			caddr_t va;
@@ -440,9 +440,10 @@ mappedread(vnode_t *vp, int nbytes, uio_
 	vm_object_t obj;
 	vm_page_t m;
 	struct sf_buf *sf;
-	int64_t start, off;
+	int64_t start;
 	caddr_t va;
 	int len = nbytes;
+	int off;
 	int error = 0;
 	uint64_t dirbytes;
 
@@ -455,11 +456,11 @@ mappedread(vnode_t *vp, int nbytes, uio_
 	dirbytes = 0;
 	VM_OBJECT_LOCK(obj);
 	for (start &= PAGEMASK; len > 0; start += PAGESIZE) {
-		uint64_t bytes = MIN(PAGESIZE - off, len);
+		int bytes = MIN(PAGESIZE - off, len);
 
 again:
 		if ((m = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL &&
-		    vm_page_is_valid(m, (vm_offset_t)off, bytes)) {
+		    vm_page_is_valid(m, off, bytes)) {
 			if ((m->oflags & VPO_BUSY) != 0) {
 				/*
 				 * Reference the page before unlocking and



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