From: Yu Watanabe Date: Thu, 24 Jul 2025 12:14:13 +0000 (+0900) Subject: journal: clear cached journal storage space before vacuum journals X-Git-Tag: v258-rc2~95^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cfffab0e54b54f9a4cbbcee7b331199dff21d41;p=thirdparty%2Fsystemd.git 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 922d037f349b72139480cdded41b3fa23a3001be and df5b3426f60bb626f46f93fbdacecae274c1645b. --- diff --git a/src/journal/journald-manager.c b/src/journal/journald-manager.c index 743aea3868a..f984c4a7cc0 100644 --- a/src/journal/journald-manager.c +++ b/src/journal/journald-manager.c @@ -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); }