svn commit: r350092 - projects/fuse2/sys/vm
Alan Somers
asomers at FreeBSD.org
Wed Jul 17 19:39:09 UTC 2019
Author: asomers
Date: Wed Jul 17 19:39:08 2019
New Revision: 350092
URL: https://svnweb.freebsd.org/changeset/base/350092
Log:
Revert r346608
That change was intended to be cosmetic, but it inadvertenly caused
vnode_pager_setsize to discard cached indirect blocks and extended
attributes on UFS during truncation. The reason is because those blocks
have negative LBNs, which get sign-cast to positive VM indexes.
Reported by: kib
Sponsored by: The FreeBSD Foundation
Modified:
projects/fuse2/sys/vm/vnode_pager.c
Modified: projects/fuse2/sys/vm/vnode_pager.c
==============================================================================
--- projects/fuse2/sys/vm/vnode_pager.c Wed Jul 17 19:29:55 2019 (r350091)
+++ projects/fuse2/sys/vm/vnode_pager.c Wed Jul 17 19:39:08 2019 (r350092)
@@ -464,7 +464,8 @@ vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsi
* File has shrunk. Toss any cached pages beyond the new EOF.
*/
if (nobjsize < object->size)
- vm_object_page_remove(object, nobjsize, 0, 0);
+ vm_object_page_remove(object, nobjsize, object->size,
+ 0);
/*
* this gets rid of garbage at the end of a page that is now
* only partially backed by the vnode.
More information about the svn-src-projects
mailing list