]> err.no Git - systemd/commitdiff
journal: react with immediate rotation to a couple of more errors
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Mar 2012 22:40:51 +0000 (23:40 +0100)
committerTollef Fog Heen <tfheen@err.no>
Mon, 2 Apr 2012 18:47:13 +0000 (20:47 +0200)
src/journal/journal-file.c
src/journal/journald.c

index 474dd5ca7c2d7b65e046c9d834b8e17ca3ffdfb5..5d540a7d407da1be3babba109f7fdf210f08db6b 100644 (file)
@@ -1887,7 +1887,10 @@ int journal_file_open_reliably(
         char *p;
 
         r = journal_file_open(fname, flags, mode, template, ret);
-        if (r != -EBADMSG)
+        if (r != -EBADMSG && /* corrupted */
+            r != -ENODATA && /* truncated */
+            r != -EHOSTDOWN && /* other machine */
+            r != -EPROTONOSUPPORT) /* incompatible feature */
                 return r;
 
         if ((flags & O_ACCMODE) == O_RDONLY)
index baad3ab1adc8029b25cf9a71859c63b680a1490c..d27cb60ac7e7791b137c4c9a7c44859e544272dd 100644 (file)
@@ -609,7 +609,15 @@ retry:
         else {
                 r = journal_file_append_entry(f, NULL, iovec, n, &s->seqnum, NULL, NULL);
 
-                if ((r == -EBADMSG || r == -E2BIG) && !vacuumed) {
+                if ((r == -E2BIG || /* hit limit */
+                     r == -EFBIG || /* hit fs limit */
+                     r == -EDQUOT || /* quota hit */
+                     r == -ENOSPC || /* disk full */
+                     r == -EBADMSG || /* corrupted */
+                     r == -ENODATA || /* truncated */
+                     r == -EHOSTDOWN || /* other machine */
+                     r == -EPROTONOSUPPORT) && /* unsupported feature */
+                    !vacuumed) {
 
                         if (r == -E2BIG)
                                 log_info("Allocation limit reached, rotating.");