chiark / gitweb /
journald: copy metrics/compression state from template when rotating
[elogind.git] / src / journal / journal-file.c
index c3b56ddc87d0d25439f8cc80495ab996024500cf..a784a3391b9271cdfc7b612957e9570ec1146ec7 100644 (file)
@@ -48,7 +48,7 @@
 #define DEFAULT_MAX_USE_UPPER (4ULL*1024ULL*1024ULL*1024ULL)   /* 4 GiB */
 
 /* This is the upper bound if we deduce max_size from max_use */
-#define DEFAULT_MAX_SIZE_UPPER (16ULL*1024ULL*1024ULL)         /* 16 MiB */
+#define DEFAULT_MAX_SIZE_UPPER (128ULL*1024ULL*1024ULL)        /* 128 MiB */
 
 /* This is the upper bound if we deduce the keep_free value from the
  * file system size */
@@ -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;