summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-16 22:51:28 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-17 00:59:03 +0200
commit71fa6f006f92831c0c02e844b4c35e4b7197c6d6 (patch)
tree5797bb3dc0a4a4579cc0880658ddfdec8bb4aaf7 /src/journal/journald.c
parentdca6219e04505e9fa10b32e71059ce2abfae1dad (diff)
journal: immediately rotate when the journal was previously not closed properly
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r--src/journal/journald.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index e66bb07f84..8f00aef5bd 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -493,7 +493,9 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
r != -EBADMSG && /* corrupted */
r != -ENODATA && /* truncated */
r != -EHOSTDOWN && /* other machine */
- r != -EPROTONOSUPPORT /* unsupported feature */)) {
+ r != -EPROTONOSUPPORT && /* unsupported feature */
+ r != -EBUSY && /* unclean shutdown */
+ r != -ESHUTDOWN /* already archived */)) {
log_error("Failed to write entry, ignoring: %s", strerror(-r));
return;
}
@@ -502,6 +504,8 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
log_info("Allocation limit reached, rotating.");
else if (r == -EHOSTDOWN)
log_info("Journal file from other machine, rotating.");
+ else if (r == -EBUSY)
+ log_info("Unlcean shutdown, rotating.");
else
log_warning("Journal file corrupted, rotating.");