diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-03-15 02:58:27 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-03-15 03:01:09 +0100 |
commit | 15944db87130f9b58565023c46c22bd73b0b71be (patch) | |
tree | 40a13adc0facb9a32a2d07c001bd87049a67f01f /src | |
parent | 71100051c5d351daac20610f3a4b8c14901088d8 (diff) |
journald: copy metrics/compression state from template when rotating
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journal-file.c | 5 | ||||
-rw-r--r-- | src/journal/journald.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 7f5d7c27b2..a784a3391b 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1740,6 +1740,11 @@ int journal_file_open( f->writable = (flags & O_ACCMODE) != O_RDONLY; f->prot = prot_from_flags(flags); + if (template) { + f->metrics = template->metrics; + f->compress = template->compress; + } + f->path = strdup(fname); if (!f->path) { r = -ENOMEM; diff --git a/src/journal/journald.c b/src/journal/journald.c index e9ac897de7..fb298be758 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -308,8 +308,6 @@ static JournalFile* find_journal(Server *s, uid_t uid) { return s->system_journal; server_fix_perms(s, f, uid); - f->metrics = s->system_metrics; - f->compress = s->compress; r = hashmap_put(s->user_journals, UINT32_TO_PTR(uid), f); if (r < 0) { |