]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journal-internal.h
sd-journal: properly handle inotify queue overflow
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Feb 2018 19:11:43 +0000 (20:11 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 12 Feb 2018 10:07:55 +0000 (11:07 +0100)
commit858749f7312bd0adb5433075a92e1c35a2fb56ac
tree69057fbed17283d5ea48f0731636aa3ad890b692
parenta9be06926924e150991306ae596b951d779b80db
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
src/journal/journal-file.h
src/journal/journal-internal.h
src/journal/sd-journal.c