diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-12-20 02:38:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-12-20 02:38:36 +0100 |
commit | bc85bfee87e11317fbcd1160c9003860dc6edde9 (patch) | |
tree | fe6aa27940fc07ca9d74927d0b6474f053698d45 /src/journal/journal-file.h | |
parent | 466ccd92e2f9ad712332012e1b3643a34b006a45 (diff) |
journal: fix space reservation limit enforcement
Diffstat (limited to 'src/journal/journal-file.h')
-rw-r--r-- | src/journal/journal-file.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 664f917bb0..20712b5dcc 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -28,6 +28,11 @@ #include "util.h" #include "sd-id128.h" +#define DEFAULT_MAX_SIZE (1024ULL*128ULL) +#define DEFAULT_MIN_SIZE (256ULL*1024ULL) +#define DEFAULT_KEEP_FREE (1ULL*1024ULL*1024ULL) +#define DEFAULT_MAX_USE (16ULL*1024ULL*1024ULL*16ULL) + typedef struct Window { void *ptr; uint64_t offset; @@ -45,6 +50,12 @@ enum { _WINDOW_MAX }; +typedef struct JournalMetrics { + uint64_t max_size; + uint64_t min_size; + uint64_t keep_free; +} JournalMetrics; + typedef struct JournalFile { int fd; char *path; @@ -62,6 +73,8 @@ typedef struct JournalFile { Window windows[_WINDOW_MAX]; uint64_t current_offset; + + JournalMetrics metrics; } JournalFile; typedef enum direction { |