summaryrefslogtreecommitdiff
path: root/src/journal/journal-vacuum.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-02 23:21:59 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-02 23:21:59 +0200
commit8580d1f73db36e9383e674e388b4fb55828c0c66 (patch)
tree10bc3a9d7bd0f27a7df2b2d32558431ecbae6737 /src/journal/journal-vacuum.h
parent0fb398316c6705dfc168733361650fdb6824896d (diff)
journal: rework vacuuming logic
Implement a maximum limit on number of journal files to keep around. Enforcing a limit is useful on this since our performance when viewing pays a heavy penalty for each journal file to interleve. This setting is turned on now by default, and set to 100. Also, actully implement what 348ced909724a1331b85d57aede80a102a00e428 promised: use whatever we find on disk at startup as lower bound on how much disk space we can use. That commit introduced some provisions to implement this, but actually never did. This also adds "journalctl --vacuum-files=" to vacuum files on disk by their number explicitly.
Diffstat (limited to 'src/journal/journal-vacuum.h')
-rw-r--r--src/journal/journal-vacuum.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal/journal-vacuum.h b/src/journal/journal-vacuum.h
index c45cc31d0e..49ab90af91 100644
--- a/src/journal/journal-vacuum.h
+++ b/src/journal/journal-vacuum.h
@@ -21,5 +21,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <inttypes.h>
+#include <stdbool.h>
-int journal_directory_vacuum(const char *directory, uint64_t max_use, usec_t max_retention_usec, usec_t *oldest_usec, bool vacuum);
+#include "time-util.h"
+
+int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t n_max_files, usec_t max_retention_usec, usec_t *oldest_usec, bool verbose);