[systemd-devel] [PATCH] readahead: add option to create pack in directory other than root

Lennart Poettering lennart at poettering.net
Fri Aug 15 08:17:01 PDT 2014

On Tue, 08.07.14 19:02, Chaiken, Alison (Alison_Chaiken at mentor.com) wrote:

> Lennart suggest:
> >I am actually all for moving the file, though. But can't we find a more
> >automatic solution for this, that doesn't
> >require manual configuration. Maybe a scheme like this could work:
> >a) readahead-reply would look for both /.readahead and
> >   /var/lib/systemd/readahead. If both files exist, it picks the newer
>  >  one, if only one exists it picks that one.
> Upon further consideration, do we want a SUID program that is active
> at early boot to *automatically* prefer a newer file on a writable
> partition to an older one on a read-only partition?

systemd-readahead is not SUID, it just runs as root...

> Another aspect worth further consideration is, what is a graceful
> fallback strategy if for some reason the pack file gets corrupted?
> Might it prevent a board with systemd-readahead-replay enabled from
> coming all the way up?  Has anyone ever observed a hang due to a
> corrupt pack?  When a watchdog reboots a hung board, perhaps we want
> to use a dynamic mechanism to point the pack file to /dev/null if we
> don't come up far enough to run "systemctl disable
> systemd-readahead-replay"?

The tool is only an optimization anyway. if something goes wrong, we
immediately terminate and do nothing.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list