]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
UFS snapshots: properly set the vm object size.
authorKonstantin Belousov <kib@FreeBSD.org>
Mon, 15 Feb 2021 03:36:02 +0000 (05:36 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 16 Feb 2021 05:11:52 +0000 (07:11 +0200)
commitc31480a1f66537e59b02e935a547bcfc76715278
tree71ef1067397d2b8dedd2fb7f4c6ef2e6e8fa7387
parentc61fae1475f1864dc4bba667b642f279afd44855
UFS snapshots: properly set the vm object size.

Citing Kirk:
The previous code [before 8563de2f2799b2cb -- kib] did not call
vnode_pager_setsize() but worked because later in ffs_snapshot() it
does a UFS_WRITE() to output the snaplist. Previously the UFS_WRITE()
allocated the extra block at the end of the file which caused it to do
the needed vnode_pager_setsize(). But the new code had already allocated
the extra block, so UFS_WRITE() did not extend the size and thus did not
do the vnode_pager_setsize().

PR: 253158
Reported by: Harald Schmalzbauer <bugzilla.freebsd@omnilan.de>
Reviewed by: mckusick
Tested by: cy
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/ufs/ffs/ffs_snapshot.c