Still don't understand how this is ok...
I have /dev/nvme0 represents a network endpoint that I would discover
from, it is raising me an event to do a discovery operation (namely to
issue an ioctl to it) so my udev code calls a systemd script.
By the time I actually get to do that, /dev/nvme0 represents now a new
network endpoint (where the event is no longer relevant to). I would
rather the discovery to explicitly fail than to give me something
different, so we pass some arguments that we verify in the operation.
Its a stretch case, but it was raised by people as a potential issue.
Ok, and how do you handle this same thing for something like /dev/sda ?
(hint, it isn't new, and is something we solved over a decade ago)
If you worry about stuff like this, use a persistant device naming
scheme and have your device node be pointed to by a symlink. Create
that symlink by using the information in the initial 'ADD' uevent.
That way, when userspace opens the device node, it "knows" exactly which
one it opens. It sounds like you have a bunch of metadata to describe
these uniquely, so pass that in the ADD event, not in some other crazy
non-standard manner.