journal: introduce JournalStorage and JournalStorageSpace structures
authorFranck Bui <fbui@suse.com>
Tue, 4 Oct 2016 15:13:21 +0000 (17:13 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 19 Oct 2016 07:53:07 +0000 (09:53 +0200)
commit266a470005c65851bb5cf6ab6fc1bb0828456ae2
tree42c482d1e99617d386d40bdb9f0326afed79f1de
parente0ed6db9cdde5ee64fb91f131beb0aa1690bc59a
journal: introduce JournalStorage and JournalStorageSpace structures

This structure keeps track of specificities for a given journal type
(persistent or volatile) such as metrics, name, etc...

The cached space values are now moved in this structure so that each
journal has its own set of cached values.

Previously only one set existed and we didn't know if the cached
values were for the runtime journal or the persistent one.

When doing:

   determine_space_for(s, runtime_metrics, ...);
   determine_space_for(s, system_metrics, ...);

the second call returned the cached values for the runtime metrics.
src/journal/journald-gperf.gperf
src/journal/journald-server.c
src/journal/journald-server.h