Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Feb 2018 11:56:30 +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: r328773 - head/sys/vm
Message-ID:  <201802021156.w12BuUbj024203@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Feb  2 11:56:30 2018
New Revision: 328773
URL: https://svnweb.freebsd.org/changeset/base/328773

Log:
  On pageout, in vnode generic pager, for partially dirty page, only
  clear dirty bits for completely invalid blocks.
  
  Otherwise we might not write out the last chunk that is shorter than
  512 bytes, if the file end is not aligned on disk block boundary.
  This become important after the r324794.
  
  PR:	225586
  Reported by:	tris_vern@hotmail.com
  Tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Fri Feb  2 07:55:31 2018	(r328772)
+++ head/sys/vm/vnode_pager.c	Fri Feb  2 11:56:30 2018	(r328773)
@@ -1266,6 +1266,8 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page
 			maxsize = object->un_pager.vnp.vnp_size - poffset;
 			ncount = btoc(maxsize);
 			if ((pgoff = (int)maxsize & PAGE_MASK) != 0) {
+				pgoff = roundup2(pgoff, DEV_BSIZE);
+
 				/*
 				 * If the object is locked and the following
 				 * conditions hold, then the page's dirty



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802021156.w12BuUbj024203>