[systemd-devel] [PATCH] libudev: replace name_to_handle_at with normal sscanf

Kay Sievers kay at vrfy.org
Sun Apr 20 06:53:05 PDT 2014


On Sun, Apr 20, 2014 at 5:36 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:

> Hi Kay,
> it seems that handles are not crucial, and the simplified version below
> works too. Is there something I'm missing?

The name_to_handle API works properly with bind mounts, it's the more
reliable API.

It also was intentional to support any filesystem with the prefix
devtmpfs*, like "devtmpfs2" or whatever it might be named in the
future.

What actual problem are we trying to solve here with not requiring a
common kernel config option? We want/need it in other places too, and
the current fallback logic to figure out the mount point is really not
that great with bind mounts. We just need the fallback for filesystems
which do not support the API, but most common and tmpfs/devtmpfs do.

I don't necessarily see the point in supporting the idea of the
kernel's uber-configurability and the massive pain it causes for tools
to make things work.

Looking into the not-to-far future, we will hard-require a specific
kernel version to provide us with the new cgroups logic and kdbus
functionality to boot up properly; I think we should just document and
explain what we need, and fail to boot with a proper error, and not
try to work around insufficient kernel configs and compiled-out
features we rely on.

We should turn the current failure into a real error message though,
instead of patching things back to less reliable APIs.

Btw, the same applies to the !cgroups config, that code should just be
removed and we error out with a proper explanation, instead of booting
(or even segfault at the moment) a half-working system and pretend
systemd would magically find a way to make it work without cgroups.

Kay


More information about the systemd-devel mailing list