Yea, the early lookup behavior is weird. But it also dates back a long time, so I'm not sure this changed, except for maybe timings?
This might just be a timing change. I don't know. As mentioned in the initial email, this change looks relevant: https://lore.kernel.org/all/20230531125535.676098-19-hch@xxxxxx/
If you go down the device open route it should us the kernel open routins and not just the not open ones.
OK. Would you mind elaborating why?
That being said the right fix is to not use this code at all, which was only shoe horned together and doesn't have a chance to work solidly and just wait for the device in userspace because we do have reliably udev events there.
I cannot wait for user space because my root device is dm-verity-backed which is why I am using dm-init in the first place. And I am not using an initramfs. Isn't the point of dm-init to be able to use e.g. dm-verity for the root device or did I misunderstand the docs?
Thanks, Sven