Page MenuHomeFreeBSD

vfs: add VNPASS macro and augment VNASSERT to print more about the assert
ClosedPublic

Authored by mjg on Jan 28 2020, 11:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:01 AM
Unknown Object (File)
Aug 2 2023, 6:22 PM
Unknown Object (File)
Jul 15 2023, 10:22 PM
Unknown Object (File)
Jun 29 2023, 5:41 AM
Unknown Object (File)
Jun 25 2023, 12:18 PM
Unknown Object (File)
Jun 14 2023, 2:18 PM
Unknown Object (File)
May 4 2023, 4:10 AM
Unknown Object (File)
Jan 12 2023, 6:50 AM
Subscribers

Details

Summary

Inspired by MPASS.

VNPASS repeats the first line for panicstr, I don't know if that's a problem apart from looking weird.

Sample output:

VNASSERT failed: vp->v_holdcnt == 1234 not true at /usr/src/sys/kern/vfs_subr.c:3148 (vputx)
0xfffff80003ba71e8: type VDIR
    usecount 7, writecount 0, refcount 1 mountedhere 0
    flags (VV_ROOT)
    lock type devfs: EXCL by thread 0xfffff800027d96e0 (pid 1, kernel, tid 100002)
panic: foo test
VNASSERT failed: vp->v_holdcnt == 1234 not true at /usr/src/sys/kern/vfs_subr.c:3148 (vputx)
0xfffff80003ba51e8: type VDIR
    usecount 7, writecount 0, refcount 1 mountedhere 0
    flags (VV_ROOT)
    lock type devfs: EXCL by thread 0xfffff800027d96e0 (pid 1, kernel, tid 100002)
panic: condition vp->v_holdcnt == 1234 not met at /usr/src/sys/kern/vfs_subr.c:3148 (vputx)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I would also change VNASSERT in the way you proposed.

This revision is now accepted and ready to land.Jan 28 2020, 4:46 PM
mjg retitled this revision from vfs: add VNPASS macro to vfs: add VNPASS macro and augment VNASSERT to print more about the assert.
mjg edited the summary of this revision. (Show Details)
  • augment VNASSERT
This revision now requires review to proceed.Jan 28 2020, 6:29 PM
mjg edited the summary of this revision. (Show Details)
mjg edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 28 2020, 7:11 PM