diff options
author | Alex Gartrell <agartrell@fb.com> | 2018-02-26 21:56:35 -0800 |
---|---|---|
committer | Alex Gartrell <agartrell@fb.com> | 2018-03-20 11:48:52 -0700 |
commit | 57850536d501376feb46fe908418937376efe85f (patch) | |
tree | 69a87d5dd5209cec0ad7cf77fcb2d0c4425e0056 /src/journal-remote | |
parent | 3ceae1bc14d2da3fc1fe4753d6657759012256dc (diff) | |
download | systemd-57850536d501376feb46fe908418937376efe85f.tar.gz |
journal: provide compress_threshold_bytes parameter
Previously the compression threshold was hardcoded to 512, which meant that
smaller values wouldn't be compressed. This left some storage savings on the
table, so instead, we make that number tunable.
Diffstat (limited to 'src/journal-remote')
-rw-r--r-- | src/journal-remote/journal-remote-write.c | 2 | ||||
-rw-r--r-- | src/journal-remote/journal-remote.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/journal-remote/journal-remote-write.c b/src/journal-remote/journal-remote-write.c index c5c6abbd5c..2836ba8b48 100644 --- a/src/journal-remote/journal-remote-write.c +++ b/src/journal-remote/journal-remote-write.c @@ -22,7 +22,7 @@ #include "journal-remote.h" static int do_rotate(JournalFile **f, bool compress, bool seal) { - int r = journal_file_rotate(f, compress, seal, NULL); + int r = journal_file_rotate(f, compress, (uint64_t) -1, seal, NULL); if (r < 0) { if (*f) log_error_errno(r, "Failed to rotate %s: %m", (*f)->path); diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 428725223d..ff46023920 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -185,7 +185,7 @@ static int open_output(Writer *w, const char* host) { r = journal_file_open_reliably(output, O_RDWR|O_CREAT, 0640, - arg_compress, arg_seal, + arg_compress, (uint64_t) -1, arg_seal, &w->metrics, w->mmap, NULL, NULL, &w->journal); @@ -729,7 +729,7 @@ static int setup_microhttpd_server(RemoteServer *s, } r = sd_event_add_time(s->events, &d->timer_event, - CLOCK_MONOTONIC, UINT64_MAX, 0, + CLOCK_MONOTONIC, (uint64_t) -1, 0, null_timer_event_handler, d); if (r < 0) { log_error_errno(r, "Failed to add timer_event: %m"); |