Systemd/src
Zbigniew Jędrzejewski-Szmek 348ced9097 journald: do not free space when disk space runs low
Before, journald would remove journal files until both MaxUse= and
KeepFree= settings would be satisfied. The first one depends (if set
automatically) on the size of the file system and is constant.  But
the second one depends on current use of the file system, and a spike
in disk usage would cause journald to delete journal files, trying to
reach usage which would leave 15% of the disk free. This behaviour is
surprising for the user who doesn't expect his logs to be purged when
disk usage goes above 85%, which on a large disk could be some
gigabytes from being full. In addition attempting to keep 15% free
provides an attack vector where filling the disk sufficiently disposes
of almost all logs.

Instead, obey KeepFree= only as a limit on adding additional files.
When replacing old files with new, ignore KeepFree=. This means that
if journal disk usage reached some high point that at some later point
start to violate the KeepFree= constraint, journald will not add files
to go above this point, but it will stay (slightly) below it. When
journald is restarted, it forgets the previous maximum usage value,
and sets the limit based on the current usage, so if disk remains to
be filled, journald might use one journal-file-size less on each
restart, if restarts happen just after rotation. This seems like a
reasonable compromise between implementation complexity and robustness.
2014-01-11 16:54:59 -05:00
..
ac-power unit: add ConditionACPower= 2012-12-31 21:24:26 +01:00
activate acticate: rename --environment to --setenv 2013-12-30 00:17:15 -05:00
analyze trivial coding style clean ups 2013-12-03 22:27:45 +01:00
ask-password clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
backlight Remove duplicate includes 2013-11-18 20:28:55 -05:00
binfmt log: log_error() and friends add a newline after each line anyway, so avoid including it in the log strings 2013-12-24 16:39:37 +01:00
boot boot-efi: Remove superfluous assignment 2013-12-31 17:53:30 +01:00
bootchart bootchart: Remove unneeded check for NULL 2013-12-30 19:10:22 +01:00
bus-driverd bus: make the bus driver support the driver interface under both / and /org/freedesktop/DBus 2014-01-09 08:19:22 +08:00
bus-proxyd Use format patterns for usec_t, pid_t, nsec_t, usec_t 2014-01-02 19:45:47 -05:00
cgls clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
cgroups-agent cgroups-agent: down-grade log level 2013-11-25 17:40:53 +01:00
cgtop build-sys: minor fixes found with cppcheck 2013-12-25 19:00:38 +01:00
core make socket_instantiate_service use cleanup gcc attribute 2014-01-11 17:08:39 +00:00
cryptsetup util: unify reading of /proc/cmdline 2013-11-06 03:15:16 +01:00
dbus1-generator dbus1-generator: fix copy-pasto 2014-01-07 22:19:01 -05:00
delta delta: ensure that d_type will be set on every fs 2014-01-09 16:43:00 +01:00
detect-virt clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
efi-boot-generator efi-boot-generator: don't mount /boot eagerly 2013-11-21 12:36:05 +01:00
fsck systemctl: simplify start_unit 2013-12-26 11:24:42 -05:00
fstab-generator fstab-generator: Do not try to fsck non-devices 2013-12-21 22:52:56 -05:00
getty-generator getty-generator: fix stripping /dev/ 2013-12-13 23:24:16 +01:00
gpt-auto-generator gpt-auto-generator: use EBADSLT code when unable to detect partition type 2014-01-11 16:50:09 -05:00
gudev licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
hostname bus: fix exit-on-idle for driverd 2013-12-19 22:18:39 +01:00
initctl trivial coding style clean ups 2013-12-03 22:27:45 +01:00
journal journald: do not free space when disk space runs low 2014-01-11 16:54:59 -05:00
kernel-install kernel-install: fix help output 2013-12-09 23:19:16 -05:00
libsystemd-bus bus: fix length calculation when serializing SD_BUS_TYPE_SIGNATURE 2014-01-12 00:30:49 +08:00
libsystemd-daemon sd-daemon: introduce sd_watchdog_enabled() for parsing $WATCHDOG_USEC 2013-12-22 22:19:03 +01:00
libsystemd-dhcp libsystemd-dns: expose list of DNS servers 2014-01-06 12:41:27 +01:00
libsystemd-id128 __thread --> thread_local for C11 compat 2013-12-17 21:45:43 +01:00
libsystemd-rtnl rtnl: fix memory corruptions after realloc 2014-01-02 19:45:47 -05:00
libudev libudev: ship the original MurmurHash2.[ch] file 2013-12-23 02:55:06 +01:00
locale bus: fix a couple of format string mistakes 2013-12-28 15:09:26 +01:00
login pam: skip DBUS_SESSION_BUS_ADDRESS export when kdbus is not active 2014-01-12 01:45:42 +08:00
machine machinectl: fix success check when getting pty from within container 2013-12-23 20:25:57 +01:00
machine-id-setup clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
modules-load Remove unused variables 2014-01-05 09:16:15 -05:00
network network: use GNU-ism to simplify macros 2014-01-11 10:07:22 -05:00
notify clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
nspawn nspawn: do not invoke RegisterMachine on machined from inside the new PID namespace 2014-01-09 08:46:23 +08:00
nss-myhostname Remove duplicate includes 2013-11-18 20:28:55 -05:00
python-systemd systemd-python: fix listen_fds under Python 2 2013-12-30 00:17:16 -05:00
quotacheck util: unify reading of /proc/cmdline 2013-11-06 03:15:16 +01:00
random-seed random-seed: improve debugging messages a bit 2013-11-15 22:53:14 -05:00
rc-local-generator rc-local: use access(X_OK) to check if files are executable 2013-10-29 19:34:59 +01:00
readahead clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
remount-fs Introduce _cleanup_endmntent_ 2013-10-03 22:13:55 -04:00
reply-password Use initalization instead of explicit zeroing 2013-04-05 19:50:57 -04:00
rfkill rfkill: Avoid error when state restore is disabled 2013-12-06 16:44:38 +01:00
run Use enums to make it obvious what boolean params mean 2013-12-26 15:49:54 -05:00
shared journald: do not free space when disk space runs low 2014-01-11 16:54:59 -05:00
shutdownd Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
sleep sleep.c: fix typo 2014-01-07 21:54:28 -05:00
socket-proxy event: be more conservative when returning errors from event handler callbacks 2013-12-13 04:06:43 +01:00
sysctl Remove unused variables 2014-01-05 09:16:15 -05:00
system-update-generator Standarize on one spelling of symlink error message 2013-04-24 00:25:04 -04:00
systemctl strv: multiple cleanups 2014-01-05 09:16:15 -05:00
systemd sd-dns: cleanup public header 2014-01-11 15:03:25 +00:00
test strv: multiple cleanups 2014-01-05 09:16:15 -05:00
timedate bus: fix exit-on-idle for driverd 2013-12-19 22:18:39 +01:00
tmpfiles tmpfiles: don't allow label_fix to print ENOENT when we want to ignore it 2014-01-09 18:00:50 +01:00
tty-ask-password-agent clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
udev udev/net_id: Introduce predictable network names for Linux on System z 2014-01-11 15:03:25 +00:00
update-utmp bus: use new property retrieval calls everywhere 2013-11-07 22:17:19 +01:00
vconsole move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
.gitignore Add test coverage and generate report with lcov 2013-07-13 21:56:33 -04:00
Makefile