diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-07-19 03:21:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-19 03:21:04 +0200 |
commit | a1a1898f7190a25a579556826379f7486f87459b (patch) | |
tree | ac101ed2243ebe3e29a560da0b0135c80ef974bf | |
parent | 6f5878a286c34739d8d6759de5f5a77e56daeb61 (diff) |
journal: rotate busy files away when we try to write to them
-rw-r--r-- | src/journal/journal-file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 9efa82cbe0..b840124c9f 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -2142,7 +2142,9 @@ int journal_file_open_reliably( if (r != -EBADMSG && /* corrupted */ r != -ENODATA && /* truncated */ r != -EHOSTDOWN && /* other machine */ - r != -EPROTONOSUPPORT) /* incompatible feature */ + r != -EPROTONOSUPPORT && /* incompatible feature */ + r != -EBUSY && /* unclean shutdown */ + r != -ESHUTDOWN /* already archived */) return r; if ((flags & O_ACCMODE) == O_RDONLY) @@ -2165,7 +2167,7 @@ int journal_file_open_reliably( if (r < 0) return -errno; - log_warning("File %s corrupted, renaming and replacing.", fname); + log_warning("File %s corrupted or uncleanly shut down, renaming and replacing.", fname); return journal_file_open(fname, flags, mode, metrics, template, ret); } |