diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2018-02-02 11:56:30 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2018-02-02 11:56:30 +0000 |
commit | 938cdc42640c08c96ab2f8e0ba46bf28597c9905 (patch) | |
tree | a95290a5cebd5f3a46f492811b9a9bc28344321a /sys/vm/vnode_pager.c | |
parent | 883cd89b05a4fbf2834ff5410573cd3165a4c248 (diff) |
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
Notes
Notes:
svn path=/head/; revision=328773
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r-- | sys/vm/vnode_pager.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index cd5a749d4f9d..966897243814 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1266,6 +1266,8 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, 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 |