systemd/fix-journal-vacuum-logic.patch
Marcus Meissner 739df9b3b2 - Add improve-readahead-spinning.patch: improve readahead
performance on spinning media with ext4.
- Add fix-journal-vacuum-logic.patch: fix vacuum logic in journal
  (bnc#789589).
- Add fix-lsb-provides.patch: ensure LSB provides are correctly
  handled if also referenced as dependencies (bnc#809646).
- Add fix-loopback-mount.patch: ensure udevd is started (and
  therefore static devices are created) before mounting
  (bnc#809820).
- Update systemd-sysv-convert to search services files in new
  location (bnc#809695).
- Add logind-nvidia-acl.diff: set ACL on nvidia devices
  (bnc#808319).
- Add do-no-isolate-on-fsck-failure.patch: do not turn off services
  if fsck fails (bnc#812874)
- Add wait-for-processes-killed.patch: wait for processes killed by
  SIGTERM before killing them with SIGKILL.
- Update systemctl-options.patch to only apply SYSTEMCTL_OPTIONS to
  systemctl command (bnc#801878).

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=361
2013-04-11 10:11:09 +00:00

41 lines
1.3 KiB
Diff

From 6c142648aaced56ab681fcc97a71b06d588122a9 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Wed, 20 Mar 2013 21:32:05 +0100
Subject: [PATCH] Fix vacuum logic error
The vacuum code used to stop vacuuming after one deletion, even
when max_use was still exceeded.
Also make usage a uint64_t, as the code already pretends it is one.
Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
---
src/journal/journal-vacuum.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index 731f6c7..4a3a5a9 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -36,7 +36,7 @@
#include "util.h"
struct vacuum_info {
- off_t usage;
+ uint64_t usage;
char *filename;
uint64_t realtime;
@@ -293,7 +293,7 @@ int journal_directory_vacuum(
if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) {
log_debug("Deleted archived journal %s/%s.", directory, list[i].filename);
- if ((uint64_t) list[i].usage > sum)
+ if (list[i].usage < sum)
sum -= list[i].usage;
else
sum = 0;
--
1.8.1.4