summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-09-15 10:48:16 +0000
committeravg <avg@FreeBSD.org>2010-09-15 10:48:16 +0000
commit23cfa76cb657f044e8e8fc40646566230d74deaa (patch)
tree8c13b566193bf707a9d2d7c18fe57a76cde64c09 /sys/cddl/contrib
parent204e0a0decf0ba67518f045fac9a26db0bfb63e6 (diff)
downloadFreeBSD-src-23cfa76cb657f044e8e8fc40646566230d74deaa.zip
FreeBSD-src-23cfa76cb657f044e8e8fc40646566230d74deaa.tar.gz
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
Diffstat (limited to 'sys/cddl/contrib')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 7f3b0a8..24b1556 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -387,7 +387,7 @@ update_pages(vnode_t *vp, int64_t start, int len, objset_t *os, uint64_t oid,
{
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, int len, objset_t *os, uint64_t oid,
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_t *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_t *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
OpenPOWER on IntegriCloud