Skip to content

udev: don't spread variables through all nodes#3097

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
howl:dont-spread-variable
Feb 16, 2026
Merged

udev: don't spread variables through all nodes#3097
igaw merged 1 commit intolinux-nvme:masterfrom
howl:dont-spread-variable

Conversation

@howl
Copy link
Contributor

@howl howl commented Feb 13, 2026

This has been discussed here systemd/systemd#40670

NVME_HOST_IFACE=none is being set to every existing node device but this
shouldn't be done, we don't want this in /dev/peanutbutter.

Set it only for nvme subsystem devices.

While at it remove all the action change conditions that are always true
given the if it's any other kind of action a goto end in the beginning.

@igaw
Copy link
Collaborator

igaw commented Feb 15, 2026

Could you elaborate 'we don't want'? Who is we and why? Just trying to figure out what the problem is. Maybe you could share some logs or explain what's going wrong. Thanks!

@howl
Copy link
Contributor Author

howl commented Feb 15, 2026

@igaw you need to ask? Is anything but not normal to set variables unconditionally to absolutely all the nodes in dev.

Just reporting it into systemd @yuwata set this to v260 milestone and look the issue was here.

No need for logs just do yourself sudo udevadm trigger and then udevadm info yourself the device you want as is spreaded over absolutely all nodes, I suggest /dev/zero, /dev/null, /dev/full, /dev/kmesg you shouldn't do that by no mean.

I have set it to the just the only same subsystem this project checks that variable and removed unnecessary conditionals.

@igaw
Copy link
Collaborator

igaw commented Feb 15, 2026

Not everyone understands udev and all the dark corners. Having a proper commit message is important. And yes I have to ask, I am not an expert.

NVME_HOST_IFACE=none is being set to every existing node device but this
shouldn't be done, we don't want this in /dev/peanutbutter.

To quick check this error just launch "udevadm trigger" and then
"udevadm info" any dev node you want, the variable will be set for all
the nodes. The easier way to understand this /dev/zero, /dev/null,
/dev/random has nothing to do with this variable.

To solve this a condition to only apply for the nvme subsystem is added
as is the only subsystem later check for this variable to be present.

While at it remove all the action change conditions that are always true
given the if it's any other kind of action a goto end in the beginning.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
@howl howl force-pushed the dont-spread-variable branch from 54ba976 to d912707 Compare February 15, 2026 18:19
@howl
Copy link
Contributor Author

howl commented Feb 15, 2026

Not everyone understands udev and all the dark corners. Having a proper commit message is important. And yes I have to ask, I am not an expert.

I have just edited the commit message to explain even more a very trivial change. Did you read the commit message or just the PR message?

Because you complain about commit message but replied to things only in the PR and as far I can see misunderstanding the intention of it .

Take a look for /dev/mordor, it exists in some systems, peanutbutter just means what it means, is meaningless to alter every device node unconditionally for this variable.

@igaw
Copy link
Collaborator

igaw commented Feb 16, 2026

Thanks for taking the time to explain it to me and make the commit message a bit clearer. Really appreciated.

@igaw igaw merged commit 8652b35 into linux-nvme:master Feb 16, 2026
@howl
Copy link
Contributor Author

howl commented Feb 17, 2026

@igaw and sorry my nearly bad manners, I assumed a just because I want it but you haven't the full context.

Thanks for taking this issue into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants