Date: Thu, 11 Jul 2013 05:36:26 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253187 - head/sys/kern Message-ID: <201307110536.r6B5aQeL039541@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307110536.r6B5aQeL039541>