[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1035810: unblock: btrfsmaintenance/0.5-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package btrfsmaintenance

[ Reason ]
Bug #1027846 was reported 3 Jan, but due to personal circumstances I
wasn't able to truly follow-up until 03 March, and it appears I didn't
file an unblock request in April (as planned).

[ Impact ]
User-defined schedule/configuration is non-functional without
0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch.
There is now consensus that regular 'btrfs balance' (rewriting data at
rest) operations aren't useful or needed, so the default has been
updated to reflect this.  This also saves resources.  Finally, I
believe that there is now sufficient evidence to say that rewriting
data at rest--particularly metadata--on btrfs systems that don't have
ECC exposes users to unnecessary risk of corruption (linux-btrfs
mailing list receives periodic bug reports where a bitflip has
corrupted btrees).

Other than that, this upload fixes out-of-date and sometimes
misleading documentation, which is now slightly more concise and easy
to translate.

[ Tests ]
Dog-fooding on my own system, as well as user testing in sid/unstable
for >67 days.

[ Risks ]
Negative.
0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch. is a
oneliner, plus lots of metadata.
0004-disable-periodic-balance-by-default.patch reduces rather than
introduces risk.  The rest of the changes are documentation and
paper-work-related.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock btrfsmaintenance/0.5-4
diff -Nru btrfsmaintenance-0.5/debian/btrfsmaintenance.lintian-overrides btrfsmaintenance-0.5/debian/btrfsmaintenance.lintian-overrides
--- btrfsmaintenance-0.5/debian/btrfsmaintenance.lintian-overrides	2022-03-13 20:00:44.000000000 -0400
+++ btrfsmaintenance-0.5/debian/btrfsmaintenance.lintian-overrides	2023-03-02 20:11:16.000000000 -0500
@@ -3,4 +3,4 @@
 btrfsmaintenance: script-not-executable
 
 # Man page is provided for the systemd services' Documentation key
-btrfsmaintenance: spare-manual-page usr/share/man/man8/btrfsmaintenance.8.gz
+btrfsmaintenance: spare-manual-page [usr/share/man/man8/btrfsmaintenance.8.gz]
diff -Nru btrfsmaintenance-0.5/debian/changelog btrfsmaintenance-0.5/debian/changelog
--- btrfsmaintenance-0.5/debian/changelog	2022-10-15 05:55:57.000000000 -0400
+++ btrfsmaintenance-0.5/debian/changelog	2023-03-02 20:11:16.000000000 -0500
@@ -1,3 +1,19 @@
+btrfsmaintenance (0.5-4) unstable; urgency=medium
+
+  * Acknowledge buggy NMU.  Debian/NEWS refers to changelog entry 0.4-1~exp1,
+    which was removed by the "rebuild with debhelper 13.10".  The purpose of
+    this NMU appears to have been to unilaterally push changelog trimming.
+  * Drop NEWS, and recommend against periodic balancing in README.Debian.
+  * Import 0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch
+    from upstream (Closes: #1027846).  Thanks to Andrew Bezella for reporting
+    this bug as well as testing the fix.
+  * Add 0004-disable-periodic-balance-by-default.patch.
+  * Update my copyright years.
+  * Declare Standards-Version: 4.6.2. (No additional changes needed)
+  * Update lintian override for "spare-manual-page".
+
+ -- Nicholas D Steeves <sten@debian.org>  Thu, 02 Mar 2023 20:11:16 -0500
+
 btrfsmaintenance (0.5-3.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru btrfsmaintenance-0.5/debian/control btrfsmaintenance-0.5/debian/control
--- btrfsmaintenance-0.5/debian/control	2022-03-13 20:00:44.000000000 -0400
+++ btrfsmaintenance-0.5/debian/control	2023-03-02 20:11:16.000000000 -0500
@@ -5,7 +5,7 @@
 Build-Depends: debhelper-compat (= 13), dh-exec (>= 0.14)
              , go-md2man
 Rules-Requires-Root: no
-Standards-Version: 4.6.0
+Standards-Version: 4.6.2
 Homepage: https://github.com/kdave/btrfsmaintenance
 Vcs-Git: https://salsa.debian.org/sten-guest/btrfsmaintenance.git
 Vcs-Browser: https://salsa.debian.org/sten-guest/btrfsmaintenance
diff -Nru btrfsmaintenance-0.5/debian/copyright btrfsmaintenance-0.5/debian/copyright
--- btrfsmaintenance-0.5/debian/copyright	2022-03-13 20:00:44.000000000 -0400
+++ btrfsmaintenance-0.5/debian/copyright	2023-03-02 20:11:16.000000000 -0500
@@ -9,7 +9,7 @@
 License: GPL-2
 
 Files: debian/*
-Copyright: 2017 Nicholas D Steeves <sten@debian.org>
+Copyright: 2017-2023 Nicholas D Steeves <sten@debian.org>
 License: GPL-2
 
 License: GPL-2
diff -Nru btrfsmaintenance-0.5/debian/NEWS btrfsmaintenance-0.5/debian/NEWS
--- btrfsmaintenance-0.5/debian/NEWS	2022-03-13 20:00:44.000000000 -0400
+++ btrfsmaintenance-0.5/debian/NEWS	1969-12-31 19:00:00.000000000 -0500
@@ -1,18 +0,0 @@
-btrfsmaintenance (0.4-1~exp1) experimental; urgency=medium
-
-    Btrfsmaintenance now ships systemd units, but they are not
-    automatically enabled for this release.  Consult README.Debian for
-    more information.  Please file a bug against this package to express
-    your configuration preferences.  Additionally, I am interested in what
-    all Debian users have to say about "Recommendations for balancing as
-    part of regular maintenance"
-    (https://www.spinics.net/lists/linux-btrfs/msg73292.html).  The goal
-    is to ship a configuration that will satisfy the requirements of the
-    majority of users in the first upload to unstable.
-
-    All users will need to decide whether they want to use
-    btrfsmaintenance-refresh-cron.sh or the new systemd units.  To use the
-    new systemd units, take care to insure that all cron jobs involving
-    btrfsmaintenance have been removed.
-
- -- Nicholas D Steeves <nsteeves@gmail.com>  Sun, 04 Feb 2018 16:08:08 -0500
diff -Nru btrfsmaintenance-0.5/debian/patches/0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch btrfsmaintenance-0.5/debian/patches/0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch
--- btrfsmaintenance-0.5/debian/patches/0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch	1969-12-31 19:00:00.000000000 -0500
+++ btrfsmaintenance-0.5/debian/patches/0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch	2023-03-02 20:11:16.000000000 -0500
@@ -0,0 +1,35 @@
+From: David Wilkinson <davidmwilkinson@protonmail.com>
+Date: Thu, 10 Jun 2021 13:51:38 -0400
+Subject: btrfsmaintenance-refresh-cron.sh: reset OnCalendar for generated
+ drop-in files
+
+Add an empty OnCalendar line to the generated drop-in conf file. This
+fixes the linked issues where the default periods are used in addition
+to any periods provided in the btrfsmaintenance config, which is not
+what users expect.
+
+See systemd.timer(5) why it needs to be reset.
+
+Issue: #71
+Issue: #91
+Pull-request: #94
+Author: David Wilkinson <davidmwilkinson@protonmail.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Bug-Debian: https://bugs.debian.org/1027846
+Source: https://github.com/kdave/btrfsmaintenance/commit/3d595098a4dca42d6c4c5c6835cefd89e28147eb
+---
+ btrfsmaintenance-refresh-cron.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/btrfsmaintenance-refresh-cron.sh b/btrfsmaintenance-refresh-cron.sh
+index 7aaa5c8..3b796d9 100755
+--- a/btrfsmaintenance-refresh-cron.sh
++++ b/btrfsmaintenance-refresh-cron.sh
+@@ -74,6 +74,7 @@ refresh_timer() {
+ 			mkdir -p /etc/systemd/system/"$SERVICE".timer.d/
+ 			cat << EOF > /etc/systemd/system/"$SERVICE".timer.d/schedule.conf
+ [Timer]
++OnCalendar=
+ OnCalendar=$PERIOD
+ EOF
+ 			systemctl enable "$SERVICE".timer &> /dev/null
diff -Nru btrfsmaintenance-0.5/debian/patches/0004-disable-periodic-balance-by-default.patch btrfsmaintenance-0.5/debian/patches/0004-disable-periodic-balance-by-default.patch
--- btrfsmaintenance-0.5/debian/patches/0004-disable-periodic-balance-by-default.patch	1969-12-31 19:00:00.000000000 -0500
+++ btrfsmaintenance-0.5/debian/patches/0004-disable-periodic-balance-by-default.patch	2023-03-02 20:11:16.000000000 -0500
@@ -0,0 +1,34 @@
+From: Nicholas D Steeves <sten@debian.org>
+Date: Thu, 2 Mar 2023 20:00:22 -0500
+Subject: disable periodic balance by default
+
+Forwarded: no
+---
+ sysconfig.btrfsmaintenance | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/sysconfig.btrfsmaintenance b/sysconfig.btrfsmaintenance
+index cfaa81e..0678066 100644
+--- a/sysconfig.btrfsmaintenance
++++ b/sysconfig.btrfsmaintenance
+@@ -44,15 +44,17 @@ BTRFS_BALANCE_MOUNTPOINTS="/"
+ 
+ ## Path:           System/File systems/btrfs
+ ## Type:           string(none,daily,weekly,monthly)
+-## Default:        "weekly"
++## Default:        "none"
+ ## ServiceRestart: btrfsmaintenance-refresh
+ #
+-# Frequency of periodic balance.
++# Frequency of periodic balance.  Periodic balance is not required,
++# nor useful, in most cases.  Cases where it is beneficial should be
++# reported upstream.
+ #
+ # The frequency may be specified using one of the listed values or
+ # in the format documented in the "Calendar Events" section of systemd.time(7),
+ # if available.
+-BTRFS_BALANCE_PERIOD="weekly"
++BTRFS_BALANCE_PERIOD="none"
+ 
+ ## Path:        System/File systems/btrfs
+ ## Type:        string
diff -Nru btrfsmaintenance-0.5/debian/patches/series btrfsmaintenance-0.5/debian/patches/series
--- btrfsmaintenance-0.5/debian/patches/series	2022-03-13 20:00:44.000000000 -0400
+++ btrfsmaintenance-0.5/debian/patches/series	2023-03-02 20:11:16.000000000 -0500
@@ -1,2 +1,4 @@
 0001-use-default-not-sysconfig.patch
 0002-Add-doc-key-to-btrfsmaintenance-refresh.service.patch
+0003-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch
+0004-disable-periodic-balance-by-default.patch
diff -Nru btrfsmaintenance-0.5/debian/README.Debian btrfsmaintenance-0.5/debian/README.Debian
--- btrfsmaintenance-0.5/debian/README.Debian	2022-03-13 20:00:44.000000000 -0400
+++ btrfsmaintenance-0.5/debian/README.Debian	2023-03-02 20:11:16.000000000 -0500
@@ -39,25 +39,10 @@
   systemctl enable btrfs-scrub.timer    # [3]
   systemctl enable btrfs-trim.timer     # [4]
 
-[1] This rewrites all data that is not excluded by a filter.  Consensus has
-    not yet been reached on how much nor how often to run balance, and the
-    ideal policy is workload-dependent.  Some advocate not running it at all.
-    Eg: Qu Wenruo, writes:
-        Full balance makes no sense.
-
-        For older kernel we used to recommend balance based on usage
-        filter to free empty block groups, but now empty block groups
-        are automatically freed thus should cause no problem.
-
-        Balance should be triggered when:
-
-          - There is very unbalanced data/metadata block groups usage.
-            E.g. a lot of data block groups are almost empty while
-            metadata block groups are almost full.  However this
-            should be really rare.
-
-          - You want to convert profile
-        (https://lore.kernel.org/linux-btrfs/fddf59e6-b4c5-307b-2cb4-fbb8e120ac61@gmx.com/)
+[1] This rewrites all data that is not excluded by a filter.  Periodic
+    balancing is not useful, nor recommended, for the vast majority of
+    workloads.  If a corner case is found where balancing is useful,
+    this case (with steps to reproduce) should be reported upstream.
 [2] See wiki.debian.org/Btrfs for issues with defrag eg: out of space errors,
     complications when using snapshots, fewer more fine-grained paths are
     better, etc.  This is also workload-dependent.  Directories with logs,
@@ -86,4 +71,4 @@
 with cron conflicts with automatically enabled scheduling with
 systemd.
 
- -- Nicholas D Steeves <nsteeves@gmail.com>, Tue,  4 Aug 2020 10:43:20 -0400
+ -- Nicholas D Steeves <sten@debian.org>, Thu,  2 Mar 2023 19:46:36 -0500

Reply to: