svn commit: r245692 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Sun Jan 20 16:07:01 UTC 2013


Author: avg
Date: Sun Jan 20 16:07:00 2013
New Revision: 245692
URL: http://svnweb.freebsd.org/changeset/base/245692

Log:
  MFC r243763: zfs_getpages: make use of vm_page_readahead_finish

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Sun Jan 20 16:03:51 2013	(r245691)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Sun Jan 20 16:07:00 2013	(r245692)
@@ -5675,27 +5675,11 @@ zfs_getpages(struct vnode *vp, vm_page_t
 	VM_OBJECT_LOCK(object);
 
 	for (i = reqstart; i < reqstart + reqsize; i++) {
-		m[i]->valid = VM_PAGE_BITS_ALL;
+		if (!error)
+			m[i]->valid = VM_PAGE_BITS_ALL;
 		KASSERT(m[i]->dirty == 0, ("zfs_getpages: page %p is dirty", m[i]));
-		if (i != reqpage) {
-			if (!error) {
-				if (m[i]->oflags & VPO_WANTED) {
-					vm_page_lock(m[i]);
-					vm_page_activate(m[i]);
-					vm_page_unlock(m[i]);
-				} else {
-					vm_page_lock(m[i]);
-					vm_page_deactivate(m[i]);
-					vm_page_unlock(m[i]);
-				}
-				vm_page_wakeup(m[i]);
-			} else {
-				vm_page_lock(m[i]);
-				vm_page_free(m[i]);
-				vm_page_unlock(m[i]);
-			}
-		}
-
+		if (i != reqpage)
+			vm_page_readahead_finish(m[i]);
 	}
 
 	VM_OBJECT_UNLOCK(object);


More information about the svn-src-stable-9 mailing list