diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-03-30 14:20:34 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-19 17:24:15 -0400 |
commit | 70576d825cd412d9ed40a3dd34bb4999760a1ead (patch) | |
tree | 84f8aba54ca936a5fdf4dc3050af79478961777c | |
parent | fa6ce82a4c63b7c50e6c461e3c947db61232b7b5 (diff) |
journal: allow files with no data whatsoever
If a file was opened for writing, and then closed immediately without
actually writing any entries, on subsequent opening, it would be
considered "corrupted". This should be totally fine, and even in
read mode, an empty file can become non-empty later on.
(cherry picked from commit b3306e9c3c1e036396bc6bf74555eecea3f45ad9)
(cherry picked from commit ae1d412f96829802688194e6957f75d37da9d7e9)
-rw-r--r-- | src/journal/journal-file.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 2d2d28926..2d79dcee7 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -274,12 +274,6 @@ static int journal_file_verify_header(JournalFile *f) { !VALID64(le64toh(f->header->entry_array_offset))) return -ENODATA; - if (le64toh(f->header->data_hash_table_offset) < le64toh(f->header->header_size) || - le64toh(f->header->field_hash_table_offset) < le64toh(f->header->header_size) || - le64toh(f->header->tail_object_offset) < le64toh(f->header->header_size) || - le64toh(f->header->entry_array_offset) < le64toh(f->header->header_size)) - return -ENODATA; - if (f->writable) { uint8_t state; sd_id128_t machine_id; |