[Bug 253158] Panic: snapacct_ufs2: bad block - Non-suJ mksnap_ffs(8) crash

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 15 07:28:22 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253158

--- Comment #41 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Kirk McKusick from comment #40)
There are actually two bugs, fixed by two patches.  One is the wrong size of
the vnode vm object.  BTW, I opted for additional vnode_pager_setsize()
instead of setting fs_size + fs_blksize in initial vnode_create_vobject(),
but I might reconsider this.  It is somewhat simpler to see consequences
of the fix/no fix when testing this variant of the patch alone.

Second bug is that page cache read path in vfs_vnops.c is confused when
uio_offset is past the end of file as recorded by vnode_pager_setsize().
It results in negative resid corrupting the state of the io request.

Either of changes should fix the problem, which I want to get confirmations
for.
But both bugs should be fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list