Date: Sat, 1 Dec 2012 18:13:54 +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: r243763 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201212011813.qB1IDs4l063887@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Sat Dec 1 18:13:53 2012 New Revision: 243763 URL: http://svnweb.freebsd.org/changeset/base/243763 Log: zfs_getpages: make use of vm_page_readahead_finish Suggested by: kib MFC after: 5 days 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 Sat Dec 1 18:12:55 2012 (r243762) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Dec 1 18:13:53 2012 (r243763) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212011813.qB1IDs4l063887>