diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-02-08 20:11:43 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-02-12 11:07:55 +0100 |
commit | 858749f7312bd0adb5433075a92e1c35a2fb56ac (patch) | |
tree | 69057fbed17283d5ea48f0731636aa3ad890b692 /src/journal/journal-file.h | |
parent | sd-journal: use more appropriate API to validate 128bit ids (diff) | |
download | systemd-858749f7312bd0adb5433075a92e1c35a2fb56ac.tar.xz systemd-858749f7312bd0adb5433075a92e1c35a2fb56ac.zip |
sd-journal: properly handle inotify queue overflow
This adds proper handling of IN_Q_OVERFLOW: when the inotify queue runs
over we'll reiterate all directories we are looking at. At the same time
we'll mark all files and directories we encounter that way with a
generation counter we first increased. All files and directories not
marked like this are then unloaded.
With this logic we do the best when the inotify queue overflows: we
synchronize our in-memory state again with what's on disk.
This contains some refactoring of the directory logic, to share more
code between uuid directories and "root" directories and generally make
things a bit more readable by splitting things up into smaller bits.
See: #7998 #8032
Diffstat (limited to 'src/journal/journal-file.h')
-rw-r--r-- | src/journal/journal-file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index c5cfa3d878..67abf8da49 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -122,6 +122,8 @@ typedef struct JournalFile { pthread_t offline_thread; volatile OfflineState offline_state; + unsigned last_seen_generation; + #if HAVE_XZ || HAVE_LZ4 void *compress_buffer; size_t compress_buffer_size; |