[systemd-devel] How to implement fsck progress report with systemd and plymouth?
Lennart Poettering
lennart at poettering.net
Tue Apr 26 14:11:00 PDT 2011
On Tue, 26.04.11 16:59, Ray Strode (halfline at gmail.com) wrote:
> > Here's what I'd suggest: We already have systemd-fsck, which we could
> > beef up slightly to pass progress data to a tiny AF_UNIX socket
> > activated service (let's call it fsckd) which integrates the data from
> > multiple instances of systemd-fsck and sends it off to plymouth. And if
> > a cancel request is received from plymouth it would send off SIGINT to
> > the the systemd-fsck instances which it got data from.
> So on the plymouth side of the fence, I had origionally envisioned
> something analagous to how passwords are handled. So instead of
>
> plymouth ask-for-password --command "cryptsetup ...."
>
> something like
>
> plymouth show-filesystem-check --command "fsck ..."
>
> So in your proposal (which sounds fine) we wouldn't have that at all,
> but instead of have fsckd take that role.
>
> So we'll need some new protocol, I guess, to notify plymouthd of a new
> fsck operations as they come in, and protocol for updating the status
> of existing fsck operations. Then plymouthd will just pass that info
> on to the theme and let it figure out what to do with it. I guess
> fsckd will have multiple concurrent connections to plymouthd that
> don't close until the fscks complete. That way we have a
> communication channel back to fsckd to report cancelation.
I would suggest to leave the parsing of the fsck -C output to fsckd, as
well as the integration of multiple of these streams. fsckd would then
only pass one stream of progress bar information to plymouth. The
handling in Plymouth would be very simple: you'd just add a single
request which gets a percentage. You show the bar on the first of those
you get, you hide the bar if the percentage you get is >= 100. And all
the dirty stuff would stay in fsckd. fsckd would probably just take the
minimum of the most recent percentage data from all its clients and pass
that on to plymouth.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list