]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: handle EADDRNOTAVAIL in two more cases gracefully
authorLennart Poettering <lennart@poettering.net>
Tue, 2 May 2023 10:23:07 +0000 (12:23 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 May 2023 15:13:40 +0000 (00:13 +0900)
Follow-up for #27488.

src/journal/journald-server.c
src/journal/managed-journal-file.c

index 47f1d8b5043c427ae60a42a16f038a4779cdb2a4..1763a2556ea9ef3788ee57fcd38bc48dcf8edc44 100644 (file)
@@ -866,6 +866,7 @@ static bool shall_try_append_again(JournalFile *f, int r) {
         case -EBADMSG:         /* Corrupted                     */
         case -ENODATA:         /* Truncated                     */
         case -ESHUTDOWN:       /* Already archived              */
+        case -EADDRNOTAVAIL:   /* Referenced object offset out of bounds */
                 log_ratelimit_info_errno(r, JOURNAL_LOG_RATELIMIT, "%s: Journal file corrupted, rotating.", f->path);
                 return true;
 
index 37d41f0678e2491cfba10a53ddab78c78c51366a..9b1fe30747e4f5b806bfdeb1f5dffe8f294c913a 100644 (file)
@@ -537,6 +537,7 @@ int managed_journal_file_open_reliably(
                         ret);
         if (!IN_SET(r,
                     -EBADMSG,           /* Corrupted */
+                    -EADDRNOTAVAIL,     /* Referenced object offset out of bounds */
                     -ENODATA,           /* Truncated */
                     -EHOSTDOWN,         /* Other machine */
                     -EPROTONOSUPPORT,   /* Incompatible feature */