diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-12-31 00:57:14 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-12-31 00:57:14 +0100 |
commit | 74ef2d16ada74db3059d825ce8d24ea74946bf8f (patch) | |
tree | 468f53e73744012b0ee22f8d9b46a932df09824d /src/journal/journald.c | |
parent | b3a0ad5ab142a142ab526aeb3d0b69e98e4e523c (diff) |
journal: move max_use into metrics structure
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); |