guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] dmd: Allow storing early logs before writing to disk


From: Ludovic Courtès
Subject: Re: [PATCH] dmd: Allow storing early logs before writing to disk
Date: Thu, 11 Sep 2014 16:31:36 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

David Michael <address@hidden> skribis:

> When using dmd to bring up a read-only file system, it will quit when it
> fails to open a log file for writing.

Out of curiosity, are you trying to use dmd in the initrd, or maybe on
GNU/Hurd?

> This is a proof-of-concept patch that adds the option to start writing
> logs to a string port.  It allows having a dmdconf.scm that runs fsck,
> makes the disk writable, and then starts writing past and future log
> messages to disk with (start-logging "/var/log/dmd.log").

That sounds useful.

> Does anyone have any thoughts on this?  Is there a better way to handle
> this case?

The problem is: when does it figure out that it can now write to the
file?

The ideal thing would be:

  1. Run ‘dmd -l foo.log’.
  2. If foo.log is not writable, then make ‘log-output-port’ a string
     port.
  3. When foo.log becomes writable, have ‘log-output-port’ point to it
     and dump previously buffered data.

But #3 is difficult.

Maybe instead of using a string port, we could use a string port that
keeps trying to open the log file?

It would be best to use inotify (or the Hurd’s fs_notify), of course.

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]