diff options
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r-- | src/journal/journald.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index a25f81ef66..78ccb4e05a 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -76,7 +76,6 @@ typedef struct Server { JournalRateLimit *rate_limit; JournalMetrics metrics; - uint64_t max_use; bool compress; uint64_t cached_available_space; @@ -176,7 +175,7 @@ static uint64_t available_space(Server *s) { sum += (uint64_t) st.st_blocks * (uint64_t) st.st_blksize; } - avail = sum >= s->max_use ? 0 : s->max_use - sum; + avail = sum >= s->metrics.max_use ? 0 : s->metrics.max_use - sum; ss_avail = ss.f_bsize * ss.f_bavail; @@ -341,7 +340,7 @@ static void server_vacuum(Server *s) { return; } - r = journal_directory_vacuum(p, s->max_use, s->metrics.keep_free); + r = journal_directory_vacuum(p, s->metrics.max_use, s->metrics.keep_free); if (r < 0 && r != -ENOENT) log_error("Failed to vacuum %s: %s", p, strerror(-r)); free(p); @@ -351,7 +350,7 @@ static void server_vacuum(Server *s) { return; } - r = journal_directory_vacuum(p, s->max_use, s->metrics.keep_free); + r = journal_directory_vacuum(p, s->metrics.max_use, s->metrics.keep_free); if (r < 0 && r != -ENOENT) log_error("Failed to vacuum %s: %s", p, strerror(-r)); free(p); @@ -1721,7 +1720,7 @@ static int server_init(Server *s) { s->metrics.max_size = DEFAULT_MAX_SIZE; s->metrics.min_size = DEFAULT_MIN_SIZE; s->metrics.keep_free = DEFAULT_KEEP_FREE; - s->max_use = DEFAULT_MAX_USE; + s->metrics.max_use = DEFAULT_MAX_USE; s->compress = true; s->user_journals = hashmap_new(trivial_hash_func, trivial_compare_func); |