]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: handle clock rollback error in managed_journal_file_open_reliably 24939/head
authormsizanoen1 <msizanoen@qtmlabs.xyz>
Mon, 9 Jan 2023 16:05:19 +0000 (23:05 +0700)
committermsizanoen1 <msizanoen@qtmlabs.xyz>
Mon, 9 Jan 2023 16:05:19 +0000 (23:05 +0700)
-EREMCHG was introduced to denote a clock rollback detection error.
Handle this in managed_journal_file_open_reliably.

src/journal/managed-journal-file.c

index 810167772ad924ec629788947bc0d620613b0d6b..6e313f2a05466363ea262ca14cea9e8de72288a7 100644 (file)
@@ -524,7 +524,8 @@ int managed_journal_file_open_reliably(
                     -ESHUTDOWN,         /* Already archived */
                     -EIO,               /* IO error, including SIGBUS on mmap */
                     -EIDRM,             /* File has been deleted */
-                    -ETXTBSY))          /* File is from the future */
+                    -ETXTBSY,           /* File is from the future */
+                    -EREMCHG))          /* Clock rolled back */
                 return r;
 
         if ((open_flags & O_ACCMODE) == O_RDONLY)