[systemd-devel] [PATCH 3/3] Use a stamp file to avoid running systemd-fsck-root.service twice

Lennart Poettering lennart at poettering.net
Sun May 3 18:06:17 PDT 2015

On Sun, 03.05.15 18:06, Andrei Borzenkov (arvidjaar at gmail.com) wrote:

> > On Sat, 02.05.15 13:16, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> > 
> > So, the last time we discussed this we figured we should do this
> > differently, and simply generate systemd-fsck-root.service in the
> > initrd as well, that uses a different command line internally. The end
> > result would then be that we can do without flag file, and always have
> > the guarantee that "systemd-fsck-root.service" is the services that
> > fsck'ed the root file system, regardless whether in initrd or not.
> > 
> systemd-fsck at .service has explicit dependency on
> systemd-fsck-root.service so other mounts (/usr, anything else?) will
> be serialized after it. Currently they can run in parallel.
> Not I think it is a big problem, but at least to consider.

One option could be to introduce a new target "root-fs-ready.target"
that is pulled in from the host OS but not in the initrd. s-f-r.s
would order itself before it, and s-f at .s after. Hence, if the target
is in the initial transaction then it will effectively serialize
things as we want if no initrd is in the mix, and if it is missing
from the initial transaction then everything will be parallelize it.

That said, I don't think it's worth it. I'd just accept that things in
the initrd as as parallel or serial as they are on the host...


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list