Date: Fri, 18 Feb 2011 09:47:58 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r218795 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201102180947.p1I9lwON050840@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Feb 18 09:47:58 2011 New Revision: 218795 URL: http://svn.freebsd.org/changeset/base/218795 Log: MFC r218550: For UIO_NOCOPY case of reading request on zfs vnode, which has vm object attached, activate the page after the successful read, and free the page if read was unsuccessfull. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 18 09:40:13 2011 (r218794) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 18 09:47:58 2011 (r218795) @@ -504,9 +504,15 @@ again: zfs_unmap_page(sf); } VM_OBJECT_LOCK(obj); - if (error == 0) - m->valid = VM_PAGE_BITS_ALL; vm_page_io_finish(m); + vm_page_lock_queues(); + if (error == 0) { + m->valid = VM_PAGE_BITS_ALL; + vm_page_activate(m); + } else + vm_page_free(m); + vm_page_unlock_queues(); + if (error == 0) { uio->uio_resid -= bytes; uio->uio_offset += bytes;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102180947.p1I9lwON050840>