Page MenuHomeFreeBSD

namei: Allow for runtime debug messages in name lookup
AbandonedPublic

Authored by mjg on Jul 27 2023, 3:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
May 9 2024, 9:02 AM
Unknown Object (File)
May 9 2024, 12:46 AM
Unknown Object (File)
Apr 21 2024, 11:57 PM
Unknown Object (File)
Apr 14 2024, 2:35 AM
Unknown Object (File)
Feb 17 2024, 1:04 PM
Unknown Object (File)
Dec 28 2023, 3:51 AM
Unknown Object (File)
Dec 22 2023, 9:44 PM
Unknown Object (File)
Dec 12 2023, 9:46 AM
Subscribers

Details

Reviewers
kib
stevek
Summary

Changed the NAMEI_DIAGNOSIC check to NAMEI_DEBUG instead and added
a kernel config option for it.

Added the vfs.namei_debug sysctl/tunable to control the debug
message output. Default value is the value assigned via the
NAMEI_DEBUG kernel config option.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52864
Build 49755: arc lint + arc unit

Event Timeline

is this really of practical usage today? i was considering removing these printfs to begin with

In D41207#938511, @mjg wrote:

is this really of practical usage today? i was considering removing these printfs to begin with

I agree, better to remove it.

sys/kern/vfs_lookup.c
1118

This code better to be removed. At very least, print cn_name by one char, instead of patching it forth and back.

In D41207#938522, @kib wrote:
In D41207#938511, @mjg wrote:

is this really of practical usage today? i was considering removing these printfs to begin with

I agree, better to remove it.

I'm fine with removing it. We had someone use it recently and I did the change to make it easier to set.
Although I'm not sure how much use it would be, since I would expect it to be rather spammy.

But I think they were having a panic occurring in VFS code and, for some reason, they were not getting into the kernel debugger, even though it was supposed to be enabled. Therefore, they wanted to be able to tell what was being looked up. (Because of the panic, they could not use dtrace, as I would usually suggest.)

I can do the pruning, if you'd like and update this review to instead prune it out.

In D41207#938522, @kib wrote:
In D41207#938511, @mjg wrote:

is this really of practical usage today? i was considering removing these printfs to begin with

I agree, better to remove it.

I'm fine with removing it. We had someone use it recently and I did the change to make it easier to set.
Although I'm not sure how much use it would be, since I would expect it to be rather spammy.

But I think they were having a panic occurring in VFS code and, for some reason, they were not getting into the kernel debugger, even though it was supposed to be enabled. Therefore, they wanted to be able to tell what was being looked up. (Because of the panic, they could not use dtrace, as I would usually suggest.)

I can do the pruning, if you'd like and update this review to instead prune it out.

I somehow missed this update.

Please submit a patch whacking this.

In absolute worst case if some printing from namei will be the thing to do, interested parties can trivially patch the kernel as needed.

So I went ahead and whacked this, see https://cgit.FreeBSD.org/src/commit/?id=b8b33f3b3b71ad7b4b5714afec21d6e8ad7fd6ce

As such I think the review can be abandoned.

mjg edited reviewers, added: stevek; removed: mjg.

Given the above I'm closing this.