diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-07-17 00:36:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-17 00:59:03 +0200 |
commit | 4a92baf3fa97c73f04438b5814db58783f920b32 (patch) | |
tree | f5e102e67986e5de420fea219ab7fa0237e17503 /src/journal/journal-file.h | |
parent | 71fa6f006f92831c0c02e844b4c35e4b7197c6d6 (diff) |
journal: size journal data hash table based on maximum file size metrics
The default of 2047 hash table entries turned out to result in way too
many collisions for bigger files, hence scale the hash table size by the
estimated maximum file size.
Diffstat (limited to 'src/journal/journal-file.h')
-rw-r--r-- | src/journal/journal-file.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 62197429ae..1f7f73a78d 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -88,10 +88,23 @@ typedef enum direction { DIRECTION_DOWN } direction_t; -int journal_file_open(const char *fname, int flags, mode_t mode, JournalFile *template, JournalFile **ret); +int journal_file_open( + const char *fname, + int flags, + mode_t mode, + JournalMetrics *metrics, + JournalFile *template, + JournalFile **ret); + void journal_file_close(JournalFile *j); -int journal_file_open_reliably(const char *fname, int flags, mode_t mode, JournalFile *template, JournalFile **ret); +int journal_file_open_reliably( + const char *fname, + int flags, + mode_t mode, + JournalMetrics *metrics, + JournalFile *template, + JournalFile **ret); int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Object **ret); |