From owner-freebsd-fs@FreeBSD.ORG Wed Sep 15 10:40:03 2010 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 333B41065673 for ; Wed, 15 Sep 2010 10:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 063C88FC25 for ; Wed, 15 Sep 2010 10:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8FAe2Fd060989 for ; Wed, 15 Sep 2010 10:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8FAe2U4060988; Wed, 15 Sep 2010 10:40:02 GMT (envelope-from gnats) Date: Wed, 15 Sep 2010 10:40:02 GMT Message-Id: <201009151040.o8FAe2U4060988@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/141305: commit references a PR X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:40:03 -0000 The following reply was made to PR kern/141305; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/141305: commit references a PR Date: Wed, 15 Sep 2010 10:31:35 +0000 (UTC) Author: avg Date: Wed Sep 15 10:31:27 2010 New Revision: 212650 URL: http://svn.freebsd.org/changeset/base/212650 Log: tmpfs, zfs + sendfile: mark page bits as valid after populating it with data Otherwise, adding insult to injury, in addition to double-caching of data we would always copy the data into a vnode's vm object page from backend. This is specific to sendfile case only (VOP_READ with UIO_NOCOPY). PR: kern/141305 Reported by: Wiktor Niesiobedzki Reviewed by: alc Tested by: tools/regression/sockets/sendfile MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/tmpfs/tmpfs_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:18:18 2010 (r212649) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:31:27 2010 (r212650) @@ -498,6 +498,8 @@ again: sched_unpin(); } VM_OBJECT_LOCK(obj); + if (error == 0) + vm_page_set_valid(m, off, bytes); vm_page_wakeup(m); if (error == 0) uio->uio_resid -= bytes; Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed Sep 15 10:18:18 2010 (r212649) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed Sep 15 10:31:27 2010 (r212650) @@ -562,6 +562,8 @@ lookupvpg: sf_buf_free(sf); sched_unpin(); VM_OBJECT_LOCK(vobj); + if (error == 0) + vm_page_set_valid(m, offset, tlen); vm_page_wakeup(m); VM_OBJECT_UNLOCK(vobj); return (error); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"