Page MenuHomeFreeBSD

witness_warn: Redirect output through kwarn(9)
AbandonedPublic

Authored by cem on May 10 2016, 3:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 23, 12:41 AM
Unknown Object (File)
Jun 26 2025, 7:56 AM
Unknown Object (File)
Jun 26 2025, 7:56 AM
Unknown Object (File)
Jun 26 2025, 6:03 AM
Unknown Object (File)
Jun 24 2025, 10:14 PM
Unknown Object (File)
Jun 24 2025, 2:48 AM
Unknown Object (File)
Jun 19 2025, 12:30 AM
Unknown Object (File)
Jun 16 2025, 11:49 AM
Subscribers

Details

Reviewers
jhb
Summary

Follow-up to D6134. I'm not sure I love the change since the kwarn
functionality is really all about per-message. Alternatively, the individual
output could be accrued in an sbuf before sending it over to kwarn.

Previous revision: https://reviews.freebsd.org/D6134

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3675
Build 3718: arc lint + arc unit

Event Timeline

cem retitled this revision from to witness_warn: Redirect output through kwarn(9).
cem updated this object.
cem edited the test plan for this revision. (Show Details)
cem added a reviewer: jhb.

Hmm, the rate limiting stuff might chop one of these messages in half though? (That is, truncate the larger message by having the throttling kick in one of the "middle" lines) Also, if you have 'drop to ddb for a warning' enabled you'd drop to DDB for each line rather than at the end. I appreciate the thought, but I think witness_warn is just not a great match for kwarn unfortunately (even though I had originally thought it would be).

Let's do this. First, send a mail to arch@ saying that we want to fix KASSERT, but that if people want optional warnings you have a KWARN ready to go. However, I'd like to get the first patch into fix KASSERT no matter what.

cem edited edge metadata.

Cast printer function for silly caller that doesn't use int result.

In D6306#133863, @jhb wrote:

Hmm, the rate limiting stuff might chop one of these messages in half though? (That is, truncate the larger message by having the throttling kick in one of the "middle" lines)

Yes, exactly.

Also, if you have 'drop to ddb for a warning' enabled you'd drop to DDB for each line rather than at the end. I appreciate the thought, but I think witness_warn is just not a great match for kwarn unfortunately (even though I had originally thought it would be).

Right. We could compile output from individual witness_warn() calls into a single sbuf, then kwarn on that.

Let's do this. First, send a mail to arch@ saying that we want to fix KASSERT, but that if people want optional warnings you have a KWARN ready to go. However, I'd like to get the first patch into fix KASSERT no matter what.

Ok.