journal: clear cached journal storage space before vacuum journals

Otherwise, the cached storage space may be calculated based on the old
journald.conf settings.

Follow-up for 922d037f34 and
df5b3426f6.
This commit is contained in:
Yu Watanabe
2025-07-24 21:14:13 +09:00
parent 7532bc8718
commit 8cfffab0e5

View File

@@ -2290,6 +2290,8 @@ void manager_reopen_journals(Manager *m, const JournalConfig *old) {
(void) manager_system_journal_open(m, /* flush_requested = */ false, /* relinquish_requested = */ false);
/* To make the storage related settings applied, vacuum the storage. */
cache_space_invalidate(&m->system_storage.space);
cache_space_invalidate(&m->runtime_storage.space);
manager_vacuum(m, /* verbose = */ false);
}