Systemd/src/journal
Lennart Poettering f78273c8da journald: don't flush to /var/log/journal before we get asked to
This changes journald to not write to /var/log/journal until it received
SIGUSR1 for the first time, thus having been requested to flush the runtime
journal to disk.

This makes the journal work nicer with systems which have the root file system
writable early, but still need to rearrange /var before journald should start
writing and creating files to it, for example because ACLs need to be applied
first, or because /var is to be mounted from another file system, NFS or tmpfs
(as is the case for systemd.volatile=state).

Before this change we required setupts with /var split out to mount the root
disk read-only early on, and ship an /etc/fstab that remounted it writable only
after having placed /var at the right place. But even that was racy for various
preparations as journald might end up accessing the file system before it was
entirely set up, as soon as it was writable.

With this change we make scheduling when to start writing to /var/log/journal
explicit. This means persistent mode now requires
systemd-journal-flush.service in the mix to work, as otherwise journald would
never write to the directory.

See: #1397
2016-12-21 19:09:29 +01:00
..
.gitignore gitignore: libsystemd-journal.pc is no more (#3863) 2016-08-02 16:04:39 +02:00
audit-type.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
audit-type.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
cat.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
catalog.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
catalog.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
compress.c journal: fix warning about LZ4_compress_limitedOutput 2016-12-10 13:52:49 -05:00
compress.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
fsprg.c journal: assert gcry_mpi_scan succeeded 2016-04-08 21:08:54 -04:00
fsprg.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journal-authenticate.c Merge pull request #2589 from keszybz/resolve-tool-2 2016-02-13 11:15:41 +01:00
journal-authenticate.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journal-def.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journal-file.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
journal-file.h journal: set STATE_ARCHIVED as part of offlining (#2740) 2016-04-27 08:29:43 +02:00
journal-internal.h sd-journal: add API for opening journal files or directories by fd 2016-04-25 15:24:46 +02:00
journal-qrcode.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journal-qrcode.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journal-send.c sd-journal: suppress empty lines 2016-07-19 17:51:20 +02:00
journal-vacuum.c journalctl: say in which directory we vacuum stuff 2016-10-12 20:25:20 +02:00
journal-vacuum.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journal-verify.c journal-verify: get rid of strerror 2016-09-13 20:10:56 -04:00
journal-verify.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journalctl.c journalctl: improve wording in an errors message 2016-12-14 18:29:30 +01:00
journald-audit.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
journald-audit.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-console.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
journald-console.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-gperf.gperf journal: introduce JournalStorage and JournalStorageSpace structures 2016-10-19 09:53:07 +02:00
journald-kmsg.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
journald-kmsg.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-native.c tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhere 2016-05-05 22:24:36 +02:00
journald-native.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-rate-limit.c journald, ratelimit: fix inaccurate message suppression in journal_rate_limit_test() (#4291) 2016-10-06 11:44:51 +02:00
journald-rate-limit.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-server.c journald: don't flush to /var/log/journal before we get asked to 2016-12-21 19:09:29 +01:00
journald-server.h journald: don't flush to /var/log/journal before we get asked to 2016-12-21 19:09:29 +01:00
journald-stream.c journal: add stdout_stream_scan() comment (#4102) 2016-09-28 07:35:48 +02:00
journald-stream.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-syslog.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
journald-syslog.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald-wall.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
journald-wall.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
journald.c journald: don't flush to /var/log/journal before we get asked to 2016-12-21 19:09:29 +01:00
journald.conf core: rename StartLimitInterval= to StartLimitIntervalSec= 2016-04-29 16:27:48 +02:00
lookup3.c buildsys,journal: allow -fsanitize=address without VALGRIND defined 2016-08-06 02:14:51 +00:00
lookup3.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
Makefile journal: add preliminary incomplete implementation 2011-10-07 22:02:05 +02:00
mmap-cache.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
mmap-cache.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
sd-journal.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
test-audit-type.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-catalog.c fileio: simplify mkostemp_safe() (#4090) 2016-09-13 08:20:38 +02:00
test-compress-benchmark.c test-compress-benchmark: fix argument parsing on 32bit 2016-04-02 18:58:21 -04:00
test-compress.c test-compress: fix warning about LZ4_compress_limitedOutput 2016-12-17 18:27:01 -05:00
test-journal-enum.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
test-journal-flush.c sd-journal: add API for opening journal files or directories by fd 2016-04-25 15:24:46 +02:00
test-journal-init.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-journal-interleaving.c tests: get rid of strerror 2016-09-13 20:10:57 -04:00
test-journal-match.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-journal-send.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-journal-stream.c sd-journal: add API for opening journal files or directories by fd 2016-04-25 15:24:46 +02:00
test-journal-syslog.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-journal-verify.c sd-journal: add API for opening journal files or directories by fd 2016-04-25 15:24:46 +02:00
test-journal.c sd-journal: add API for opening journal files or directories by fd 2016-04-25 15:24:46 +02:00
test-mmap-cache.c fileio: simplify mkostemp_safe() (#4090) 2016-09-13 08:20:38 +02:00