chiark / gitweb /
journald: always vacuum empty offline files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 25 Jun 2013 01:00:28 +0000 (21:00 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 25 Jun 2013 01:06:06 +0000 (21:06 -0400)
commit9d64774057400ee15e7ffb159294f73bb665eb84
tree569b7730f8146a78abb45481bde6813e2990fc56
parent670b110c3b59dfa335ac43065b2038400d1d04a9
journald: always vacuum empty offline files

Corrupted empty files are relatively common. I think they are created
when a coredump for a user who never logged anything before is
attempted to be written, but the write does not succeed because the
coredump is too big, but there are probably other ways to create
those, especially if the machine crashes at the right time.
Non-corrupted empty files can also happen, e.g. if a journal file is
opened, but nothing is ever successfully written to it and it is
rotated because of MaxFileSec=. Either way, each "empty" journal file
costs around 3 MB, and there's little point in keeping them around.
src/journal/journal-vacuum.c