]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: clear cached journal storage space before vacuum journals
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Jul 2025 12:14:13 +0000 (21:14 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Jul 2025 12:18:16 +0000 (21:18 +0900)
Otherwise, the cached storage space may be calculated based on the old
journald.conf settings.

Follow-up for 922d037f349b72139480cdded41b3fa23a3001be and
df5b3426f60bb626f46f93fbdacecae274c1645b.

src/journal/journald-manager.c

index 743aea3868a39f201b7b6dbe9189ad0ad3351701..f984c4a7cc005be9ec2280b525f5f72febc06fea 100644 (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);
 }