diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-24 01:55:45 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-24 01:55:45 +0200 |
commit | dade37d403f1b8c1d7bb2efbe2361f2a3e999613 (patch) | |
tree | 854ef27f7463a0e56cf03c5acffab76b28a03b40 /src/journal/test-coredump-vacuum.c | |
parent | 45c047b227d96e98e7076c15ae774ff6390dc403 (diff) |
journal: avoid mapping empty data and field hash tables
When a new journal file is created we write the header first, then sync
and only then create the data and field hash tables in them. That means
to other processes it might appear that the files have a valid header
but not data and field hash tables. Our reader code should be able to
deal with this.
With this change we'll not map the two hash tables right-away after
opening a file for reading anymore (because that will of course fail if
the objects are missing), but delay this until the first time we access
them. On top of that, when we want to look something up in the hash
tables and we notice they aren't initialized yet, we consider them
empty.
This improves handling of some journal files reported in #487.
Diffstat (limited to 'src/journal/test-coredump-vacuum.c')
0 files changed, 0 insertions, 0 deletions