From owner-svn-src-all@FreeBSD.ORG Thu Jul 11 05:36:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9F59131B; Thu, 11 Jul 2013 05:36:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 938E21118; Thu, 11 Jul 2013 05:36:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5aQtP039542; Thu, 11 Jul 2013 05:36:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5aQeL039541; Thu, 11 Jul 2013 05:36:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307110536.r6B5aQeL039541@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 11 Jul 2013 05:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253187 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 05:36:26 -0000 Author: kib Date: Thu Jul 11 05:36:26 2013 New Revision: 253187 URL: http://svnweb.freebsd.org/changeset/base/253187 Log: Do not invalidate page of the B_NOCACHE buffer or buffer after an I/O error if any user wired mappings exist. Doing the invalidation destroys the user wiring. The change is the temporal measure to close the bug, the more proper fix is to delegate the invalidation of the page to upper layers always. Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Jul 11 05:15:30 2013 (r253186) +++ head/sys/kern/vfs_bio.c Thu Jul 11 05:36:26 2013 (r253187) @@ -1692,7 +1692,8 @@ brelse(struct buf *bp) KASSERT(presid >= 0, ("brelse: extra page")); VM_OBJECT_WLOCK(obj); - vm_page_set_invalid(m, poffset, presid); + if (pmap_page_wired_mappings(m) == 0) + vm_page_set_invalid(m, poffset, presid); VM_OBJECT_WUNLOCK(obj); if (had_bogus) printf("avoided corruption bug in bogus_page/brelse code\n");