summaryrefslogtreecommitdiff
path: root/src/journal/journal-vacuum.c
AgeCommit message (Collapse)Author
2013-10-13Never call qsort on potentially NULL arraysZbigniew Jędrzejewski-Szmek
This extends 62678ded 'efi: never call qsort on potentially NULL arrays' to all other places where qsort is used and it is not obvious that the count is non-zero.
2013-10-09journald: fix minor memory leakLennart Poettering
2013-09-10journald: be a bit more verbose when vacuumingZbigniew Jędrzejewski-Szmek
Vacuuming behaviour is a bit confusing, and/or we have some bugs, so those additional messages should help to find out what's going on. Also, rotation of journal files shouldn't be happening too often, so the level of the messages is bumped to info, so that they'll be logged under normal operation.
2013-09-06journald: fix fd leak in journal_file_emptyGeorge McCollister
Before my previous patch, journal_file_empty wasn't be called with the correct filename. Now that it's being called with the correct filename it leaks file descriptors. This patch closes the file descriptors before returning. Signed-off-by: George McCollister <george.mccollister@gmail.com> [Edit harald@redhat.com: make use of _cleanup_close_ instead]
2013-09-06journald: fix vacuuming of archived journalsGeorge McCollister
d_name is modified on line 227 so if the entire journal name is needed again p must be used. Before this change when journal_file_empty was called on archived journals it would always return with -2. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2013-06-24journald: always vacuum empty offline filesZbigniew Jędrzejewski-Szmek
Corrupted empty files are relatively common. I think they are created when a coredump for a user who never logged anything before is attempted to be written, but the write does not succeed because the coredump is too big, but there are probably other ways to create those, especially if the machine crashes at the right time. Non-corrupted empty files can also happen, e.g. if a journal file is opened, but nothing is ever successfully written to it and it is rotated because of MaxFileSec=. Either way, each "empty" journal file costs around 3 MB, and there's little point in keeping them around.
2013-06-24journal/vacuum: cleanupZbigniew Jędrzejewski-Szmek
2013-03-21Fix vacuum logic errorJan Alexander Steffens (heftig)
The vacuum code used to stop vacuuming after one deletion, even when max_use was still exceeded. Also make usage a uint64_t, as the code already pretends it is one. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2012-10-17journal: fix potential integer overflowLennart Poettering
2012-10-16journal: implement time-based rotation/vacuumingLennart Poettering
This also enables time-based rotation (but not vacuuming) after 1month, so that not more one month of journal is lost at a time per vacuuming.
2012-09-19util: define union dirent_storage and make use of it everywhereLennart Poettering
Make sure to allocate enough space for readdir_r(). https://bugzilla.redhat.com/show_bug.cgi?id=858754
2012-09-06journald: avoid logging to kmsg in the normal pathsLennart Poettering
2012-08-16journal: split up journal-file.cLennart Poettering