journal: stat journal file after truncating
Let's make sure the data stored in last_stat is up-to-date after truncating the journal file.
This commit is contained in:
@@ -31,9 +31,9 @@ static int journald_file_truncate(JournalFile *f) {
|
||||
f->header->arena_size = htole64(p - le64toh(f->header->header_size));
|
||||
|
||||
if (ftruncate(f->fd, p) < 0)
|
||||
log_debug_errno(errno, "Failed to truncate %s: %m", f->path);
|
||||
return log_debug_errno(errno, "Failed to truncate %s: %m", f->path);
|
||||
|
||||
return 0;
|
||||
return journal_file_fstat(f);
|
||||
}
|
||||
|
||||
static int journald_file_entry_array_punch_hole(JournalFile *f, uint64_t p, uint64_t n_entries) {
|
||||
|
||||
Reference in New Issue
Block a user