diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-06-06 22:28:05 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-06-10 10:10:07 -0400 |
commit | 87011c25d96e9fbcd8a465ba758fa037c7d08203 (patch) | |
tree | 0b15d26d6152566d701b4bf3908ac7507dea45c9 /src/journal/journal-file.h | |
parent | 8d98da3f1107529d5ba49aea1fa285f7264b7cba (diff) |
journal: remember last direction of search and keep offset cache
The fields in JournalFile are moved around to avoid wasting
7 bytes because of alignment.
Diffstat (limited to 'src/journal/journal-file.h')
-rw-r--r-- | src/journal/journal-file.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 7b1cd42854..5cc2c2d28d 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -42,10 +42,14 @@ typedef struct JournalMetrics { uint64_t keep_free; } JournalMetrics; +typedef enum direction { + DIRECTION_UP, + DIRECTION_DOWN +} direction_t; + typedef struct JournalFile { int fd; - char *path; - struct stat last_stat; + mode_t mode; int flags; @@ -56,6 +60,11 @@ typedef struct JournalFile { bool tail_entry_monotonic_valid; + direction_t last_direction; + + char *path; + struct stat last_stat; + Header *header; HashItem *data_hash_table; HashItem *field_hash_table; @@ -90,11 +99,6 @@ typedef struct JournalFile { #endif } JournalFile; -typedef enum direction { - DIRECTION_UP, - DIRECTION_DOWN -} direction_t; - int journal_file_open( const char *fname, int flags, |