[arch-commits] Commit in systemd/trunk (0001-Fix-vacuum-logic-error.patch PKGBUILD)

Jan Steffens heftig at nymeria.archlinux.org
Fri Mar 22 03:48:07 UTC 2013


    Date: Friday, March 22, 2013 @ 04:48:07
  Author: heftig
Revision: 180505

Add patch to fix vacuum problem

Added:
  systemd/trunk/0001-Fix-vacuum-logic-error.patch
Modified:
  systemd/trunk/PKGBUILD

-----------------------------------+
 0001-Fix-vacuum-logic-error.patch |   40 ++++++++++++++++++++++++++++++++++++
 PKGBUILD                          |    5 ++++
 2 files changed, 45 insertions(+)

Added: 0001-Fix-vacuum-logic-error.patch
===================================================================
--- 0001-Fix-vacuum-logic-error.patch	                        (rev 0)
+++ 0001-Fix-vacuum-logic-error.patch	2013-03-22 03:48:07 UTC (rev 180505)
@@ -0,0 +1,40 @@
+From 6c142648aaced56ab681fcc97a71b06d588122a9 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at 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 at 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.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-03-22 00:18:17 UTC (rev 180504)
+++ PKGBUILD	2013-03-22 03:48:07 UTC (rev 180505)
@@ -19,6 +19,7 @@
         '0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch'
         '0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch'
         '0001-rules-move-builtin-calls-before-the-permissions-sect.patch'
+        '0001-Fix-vacuum-logic-error.patch'
         'use-split-usr-path.patch')
 md5sums=('26a75e2a310f8c1c1ea9ec26ddb171c5'
          'e99e9189aa2f6084ac28b8ddf605aeb8'
@@ -27,6 +28,7 @@
          'c93785560cd33e25013224ac84689aa3'
          '80db2672a49667a3add02fb07dee9dca'
          'a0d3aca35ff7f71d1a5a79022b715ae0'
+         '7ae8e22cef30e57de02ca623b0673f76'
          '76bf83fe34c5b40533abc5dc940576a6')
 
 build() {
@@ -44,6 +46,9 @@
   # upstream commit bbb7f2ae5035105575365750592caa87213d7072
   patch -Np1 <"$srcdir"/0001-rules-move-builtin-calls-before-the-permissions-sect.patch
 
+  # upstream commit 6c142648aaced56ab681fcc97a71b06d588122a9
+  patch -Np1 <"$srcdir"/0001-Fix-vacuum-logic-error.patch
+
   ./configure \
       --enable-static \
       --libexecdir=/usr/lib \




More information about the arch-commits mailing list