[systemd-devel] fsckd needs to go

cee1 fykcee1 at gmail.com
Fri May 22 06:30:05 PDT 2015


2015-05-22 20:23 GMT+08:00 Martin Pitt <martin.pitt at ubuntu.com>:
> Hello Lennart,
>
> sorry for the late answer, got stuck in different things in the past
> two weeks..
>
> Lennart Poettering [2015-04-28 17:33 +0200]:
>> On Fri, 03.04.15 14:58, Lennart Poettering (lennart at poettering.net) wrote:
>>
>> > systemd-fsckd would try to connect to some AF_UNIX/SOCK_STREAM socket
>> > in the fs, after forking and before execing fsck in the child, and
>> > pass the connected socket to fsck via the -C switch. If the socket is
>> > not connectable it would avoid any -C switch. With this simple change
>> > you can make this work for you: simply write a daemon (outside of
>> > systemd) that listens on that sockets and reads the progress data from
>> > it. Using SO_PEERCRED you can query which fsck PID this is from and
>> > use it to kill it. You could even add this to ply natively if you
>> > wish, since it's kinda strange to bump this all off another daemon in
>> > the middle, unnecessarily.
>>
>> I implemented this now, and removed fsckd in the progress. The
>> progress data is now available on /run/systemd/fsck.progress which
>> should be an AF_UNIX/SOCK_STREAM socket.
>
> Great, thanks! This works fine, it's very similar to what Didier did
> before. I. e. fsckd essentially works almost unmodified (except for
> adjusting the socket path).
>
> So we'll maintain that patch downstream now. It makes maintaining
> translations harder, but so be it.
>
>> Please test this, I only did some artifical testing myself, since I
>> don't use file systems that require fsck anymore myself.
>
> Neither do I, but there's always test/mocks/fsck which works very
> nicely.
>
> Thanks,
>
> Martin
>
> --
> Martin Pitt                        | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Hey,

Just mention it, we've implemented similar fsck progress report in
LOonux3[1] several years ago.

FYI:
* http://lists.freedesktop.org/archives/systemd-devel/2011-June/002654.html
* patch for systemd:
https://github.com/cee1/systemd/commit/c04c709880f0619434ff58580609300d892f281b
* patch for plymouth:
https://github.com/cee1/plymouth/commit/5be1bb7751b547fe5c125a42c3f2fe607568fa0f



--
1. http://dev.lemote.com/category/loonux3



Regards,

- cee1


More information about the systemd-devel mailing list