Skip to content

Commit

Permalink
decrease fixed housekeeping interval from 10 to 60m
Browse files Browse the repository at this point in the history
short interval prevents some drives from spinning down when idle see
storaged-project/udisks#407
  • Loading branch information
jpalus committed Nov 13, 2020
1 parent 11dd28f commit 326b182
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions udisks2-housekeeping_interval.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --color -urN udisks-2.9.1.orig/src/udiskslinuxprovider.c udisks-2.9.1/src/udiskslinuxprovider.c
--- udisks-2.9.1.orig/src/udiskslinuxprovider.c 2020-08-12 16:05:39.000000000 +0200
+++ udisks-2.9.1/src/udiskslinuxprovider.c 2020-11-13 01:06:57.098257205 +0100
@@ -720,8 +720,8 @@
g_list_free_full (udisks_devices, g_object_unref);
udisks_info ("Initialization complete");

- /* schedule housekeeping for every 10 minutes */
- provider->housekeeping_timeout = g_timeout_add_seconds (10*60,
+ /* schedule housekeeping for every 60 minutes */
+ provider->housekeeping_timeout = g_timeout_add_seconds (60*60,
on_housekeeping_timeout,
provider);
/* ... and also do an initial run */
@@ -1502,7 +1502,7 @@
G_UNLOCK (provider_lock);
}

-/* called from the main thread on start-up and every 10 minutes or so */
+/* called from the main thread on start-up and every 60 minutes or so */
static gboolean
on_housekeeping_timeout (gpointer user_data)
{
2 changes: 2 additions & 0 deletions udisks2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Group: Libraries
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
# Source0-md5: aad9c50f4cafccee01a621a6a6665784
Patch0: automake-1.12.patch
Patch1: %{name}-housekeeping_interval.patch
URL: https://www.freedesktop.org/wiki/Software/udisks
BuildRequires: acl-devel
BuildRequires: autoconf >= 2.50
Expand Down Expand Up @@ -154,6 +155,7 @@ Pakiet ten dostarcza bashowe uzupełnianie parametrów dla udisks2
%prep
%setup -q -n udisks-%{version}
%patch0 -p1
%patch1 -p1

%build
%{__libtoolize}
Expand Down

0 comments on commit 326b182

Please sign in to comment.