openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2017
- 1 participants
- 2052 discussions
Hello community,
here is the log from the commit of package convmv for openSUSE:Factory checked in at 2017-06-23 09:18:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/convmv (Old)
and /work/SRC/openSUSE:Factory/.convmv.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "convmv"
Fri Jun 23 09:18:34 2017 rev:21 rq:505687 version:2.01
Changes:
--------
--- /work/SRC/openSUSE:Factory/convmv/convmv.changes 2015-12-17 15:54:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.convmv.new/convmv.changes 2017-06-23 09:18:57.345425004 +0200
@@ -1,0 +2,7 @@
+Wed Jun 21 15:26:29 UTC 2017 - tchvatal(a)suse.com
+
+- Update to 2.01:
+ * map : instead of / in SFU mapping tables
+- Cleanup a bit with spec-cleaner
+
+-------------------------------------------------------------------
Old:
----
convmv-2.0.tar.gz
New:
----
convmv-2.01.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ convmv.spec ++++++
--- /var/tmp/diff_new_pack.i66S8P/_old 2017-06-23 09:18:57.853353232 +0200
+++ /var/tmp/diff_new_pack.i66S8P/_new 2017-06-23 09:18:57.857352667 +0200
@@ -1,7 +1,7 @@
#
# spec file for package convmv
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +17,12 @@
Name: convmv
-Version: 2.0
+Version: 2.01
Release: 0
-Url: http://j3e.de/linux/convmv/
Summary: Converts File Names from One Encoding to Another
License: GPL-2.0+
Group: Productivity/File utilities
+Url: http://j3e.de/linux/convmv/
Source: http://j3e.de/linux/convmv/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@@ -38,27 +38,22 @@
convmv can convert names to both the NFC and NFD normalization forms.
NFC is commonly used on Linux and (most?) other Unix-like OSes,
-though does not enforce it. Darwin, the base of Macintosh OS X,
+though does not enforce it. Darwin, the base of Macintosh OS X,
enforces normalization form D (NFD).
-
-Authors:
---------
- Bjoern Jacke <bjoern(a)j3e.de>
-
%prep
%setup -q
-%{__tar} xf testsuite.tar
+tar xf testsuite.tar
%build
-make PREFIX=/usr
+make %{?_smp_mflags} PREFIX=%{_prefix}
%install
-mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_mandir}/man1
-make DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr install
+mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1
+make DESTDIR=%{buildroot} PREFIX=%{_prefix} install
%check
-make test
+make %{?_smp_mflags} test
%files
%defattr(-, root, root)
++++++ convmv-2.0.tar.gz -> convmv-2.01.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/convmv-2.0/Changes new/convmv-2.01/Changes
--- old/convmv-2.0/Changes 2015-04-24 23:56:06.980196266 +0200
+++ new/convmv-2.01/Changes 2017-05-04 03:33:18.000000000 +0200
@@ -1,3 +1,6 @@
+2.01
+- map : instead of / in SFU mapping tables
+
2.0
- fix checks for NFD conversion, where convmv could run into a "resulting filename is ... bytes long (max: 255) error message for no obvious reason.
- the --preserve-mtimes option is the default now
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/convmv-2.0/SHA256sums new/convmv-2.01/SHA256sums
--- old/convmv-2.0/SHA256sums 2015-05-16 01:36:51.876019295 +0200
+++ new/convmv-2.01/SHA256sums 2017-05-05 04:55:29.000000000 +0200
@@ -1,18 +1,18 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
-58ecf5c6fd30a4dbc6398cdf8b0dc503dcf879a47a51eccd0d8b86f83d5672ac ./Changes
+6cd57b452e9e2be5a9ca992831f96e4a8317c1bc37171f237094d8dc0a6e0d27 ./TODO
+f759d3169c063594b04a9b1714a52e09f881dd7bc49ff65cf1c468d4e6a8dbbc ./convmv
+31a04f0b0584237d6f81fab7e77b0d43e307230102f09db947e20b2a3103a108 ./testsuite.tar
42b2cfe802e3bac5bdc2462a0d61de002991125053e41c18d5cd7799b4cebf2b ./CREDITS
-a2a9cfa48ba7f7453edf1c43bb8bb1aef5fcd1b87dde11420edceee2e2528db0 ./GPL2
+4d7d6c70f3f7bd5127794e01ccfc42b1f3dcd882d229ad6c9d274104eb6db6b5 ./VERSION
+9c1d31097f289010a598ed3656ee9a00b56221c8d87893db005f2635250b640b ./Changes
10f96f4cf2f61333c289f603cedd4c0f5e523d2da05486d9bea670f3877d8592 ./Makefile
-31a04f0b0584237d6f81fab7e77b0d43e307230102f09db947e20b2a3103a108 ./testsuite.tar
-6cd57b452e9e2be5a9ca992831f96e4a8317c1bc37171f237094d8dc0a6e0d27 ./TODO
-d526eb4e878a23ef26ae190031b4efd2d58ed66789ac049ea3dbaf74c9df7402 ./VERSION
-10260daf5535038858393f47f0b700c0e7164f02092eb8131eada2d62e97cd3b ./convmv
+a2a9cfa48ba7f7453edf1c43bb8bb1aef5fcd1b87dde11420edceee2e2528db0 ./GPL2
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
+Version: GnuPG v1
-iEYEARECAAYFAlVWgxEACgkQdoo0s+hIejnq4gCeOExEQwBJ1fsTDykLtt3atHC4
-OYMAoPTvQqEUNSM63RGlL/niYZuSN3kF
-=srw5
+iEYEAREIAAYFAlkL6Z4ACgkQdoo0s+hIejmBZwCgs6PP1YWsa9ifUTosGfwEaNeS
+WJIAni4rsOvom8Nxks8Io0dHDht5Se8m
+=n1Km
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/convmv-2.0/VERSION new/convmv-2.01/VERSION
--- old/convmv-2.0/VERSION 2015-05-16 01:36:49.724019263 +0200
+++ new/convmv-2.01/VERSION 2017-05-05 04:55:26.000000000 +0200
@@ -1 +1 @@
-2.0
+2.01
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/convmv-2.0/convmv new/convmv-2.01/convmv
--- old/convmv-2.0/convmv 2015-05-16 01:36:37.128019074 +0200
+++ new/convmv-2.01/convmv 2017-05-04 03:31:19.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# convmv 2.0 - converts filenames from one encoding to another
-# Copyright © 2003-2015 Bjoern JACKE <bjoern(a)j3e.de>
+# convmv 2.01 - converts filenames from one encoding to another
+# Copyright © 2003-2017 Bjoern JACKE <bjoern(a)j3e.de>
#
# This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
# under the terms of the GNU General Public License version 2 or 3 as
@@ -57,7 +57,8 @@
execute the given command. You have to quote the command and #1 will be
substituted by the old, #2 by the new filename. Using this option link
-targets will stay untouched.
+targets will stay untouched. Have in mind that #1 and #2 will be quoted
+by convmv already, you must not add extra quotation marks around them.
Example:
@@ -792,8 +793,8 @@
sub printusage {
&check_for_perl_bugs;
print <<END;
-convmv 2.0 - converts filenames from one encoding to another
-Copyright (C) 2003-2015 Bjoern JACKE <bjoern\(a)j3e.de>
+convmv 2.01 - converts filenames from one encoding to another
+Copyright (C) 2003-2017 Bjoern JACKE <bjoern\(a)j3e.de>
This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
under the terms of the GNU General Public License version 2 or 3 as published
@@ -919,12 +920,12 @@
return $_ if ($_ eq "." or $_ eq "..");
_utf8_on($_); # this is needed for tr/multibyte/non-multibyte/ to work! Otherwise we would
# have to make a s/// for each character, grrr...
- if ($opt_map eq "ntfs-sfm") { # see MS KB 117258
- tr/\x01-\x1f\"\*\/\<\>\?\\\|/\x{f001}-\x{f027}/;
+ if ($opt_map eq "ntfs-sfm") { # see MS KB 117258 (but map : instead of /
+ tr/\x01-\x1f\"\*\:\<\>\?\\\|/\x{f001}-\x{f027}/;
s/ $/\x{f028}/; # Space, only if occurring as the last character of the name
s/\.$/\x{f029}/; # period, only if occurring as the last character of the name
} elsif ($opt_map eq "ntfs-sfm-undo") {
- tr/\x{f001}-\x{f027}/\x01-\x1f"*\/<>?\\| /;
+ tr/\x{f001}-\x{f027}/\x01-\x1f"*:<>?\\| /;
s/\x{f028}$/ /; # Space, only if occurring as the last character of the name
s/\x{f029}$/./; # period, only if occurring as the last character of the name
} elsif ($opt_map eq "ntfs-sfu") { # +0xF000, see MS KB ???? anyone knows a link or has archived an old one?
1
0
Hello community,
here is the log from the commit of package fwts for openSUSE:Factory checked in at 2017-06-23 09:18:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fwts (Old)
and /work/SRC/openSUSE:Factory/.fwts.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fwts"
Fri Jun 23 09:18:30 2017 rev:25 rq:505681 version:17.06.00
Changes:
--------
--- /work/SRC/openSUSE:Factory/fwts/fwts.changes 2017-06-08 15:04:48.851687704 +0200
+++ /work/SRC/openSUSE:Factory/.fwts.new/fwts.changes 2017-06-23 09:18:54.925766909 +0200
@@ -1,0 +2,17 @@
+Thu Jun 22 12:56:12 UTC 2017 - mpluskal(a)suse.com
+
+- Update to version 17.06.00:
+ * ACPICA: Update to version 20170531
+ * olog: olog.json: Update OPAL skiboot errors to check on olog
+ scan
+ * bios: mtrr: print out actual default type of MTRR
+ * lib: fwts_alloc: only parse mem info once we have a valid line
+ read in
+ * lib: fwts_safe_mem: add SIGBUS handling
+ * lib: fwts_alloc: re-work the memory parsing again
+ * acpi: method use correct format specifier for uint32_t type
+ * bios: mtrr: fix compile error in ubuntu trusty
+ * opal: fix tests dependency on libfdt
+ * bios: mtrr: fix overlaped MTRR (LP: #1694710)
+
+-------------------------------------------------------------------
Old:
----
fwts-V17.05.00.tar.gz
New:
----
fwts-V17.06.00.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fwts.spec ++++++
--- /var/tmp/diff_new_pack.EB5SL4/_old 2017-06-23 09:18:55.541679878 +0200
+++ /var/tmp/diff_new_pack.EB5SL4/_new 2017-06-23 09:18:55.545679313 +0200
@@ -17,7 +17,7 @@
Name: fwts
-Version: 17.05.00
+Version: 17.06.00
Release: 0
Summary: Firmware Test Suite
License: GPL-2.0+
@@ -52,7 +52,7 @@
%prep
%setup -q -c %{name}-%{version}
-%patch1
+%patch1 -p1
%build
autoreconf -fiv
++++++ fwts-V17.05.00.tar.gz -> fwts-V17.06.00.tar.gz ++++++
++++ 13425 lines of diff (skipped)
++++++ fwts-no-compiletime.patch ++++++
--- /var/tmp/diff_new_pack.EB5SL4/_old 2017-06-23 09:18:56.285574764 +0200
+++ /var/tmp/diff_new_pack.EB5SL4/_new 2017-06-23 09:18:56.285574764 +0200
@@ -1,8 +1,8 @@
-Index: src/acpica/source/compiler/aslutils.c
+Index: fwts-17.06.00/src/acpica/source/compiler/aslutils.c
===================================================================
---- src/acpica/source/compiler/aslutils.c.orig
-+++ src/acpica/source/compiler/aslutils.c
-@@ -454,7 +454,7 @@ UtDisplaySummary (
+--- fwts-17.06.00.orig/src/acpica/source/compiler/aslutils.c
++++ fwts-17.06.00/src/acpica/source/compiler/aslutils.c
+@@ -490,7 +490,7 @@ UtDisplaySummary (
/* Compiler name and version number */
FlPrintFile (FileId, "%s version %X [%s]\n\n",
1
0
Hello community,
here is the log from the commit of package tint2 for openSUSE:Factory checked in at 2017-06-23 09:18:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tint2 (Old)
and /work/SRC/openSUSE:Factory/.tint2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tint2"
Fri Jun 23 09:18:28 2017 rev:10 rq:505671 version:0.14.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/tint2/tint2.changes 2017-04-03 11:06:07.559052843 +0200
+++ /work/SRC/openSUSE:Factory/.tint2.new/tint2.changes 2017-06-23 09:18:53.361987875 +0200
@@ -1,0 +2,18 @@
+Thu Jun 22 12:16:18 UTC 2017 - mvetter(a)suse.com
+
+- Update to 0.14.6:
+ Fixes:
+ * Make versioning more robust when building as package
+ * Fix regression in executor (issue #639)
+ * Fix crash when _NET_WM_ICON is set but empty (https://github.com/jmc-88/tint3/issues/21)
+ * Take into account border width when computing text height
+ * Taskbar: Fix task icon size limits
+ * Executor: Do not output last line if it is not terminated by newline
+ * Fixed a couple of memory leaks
+ Enhancements:
+ * Tint2conf: Open current tint2 config automatically when started from tint2
+ * Re-execute tint2 on SIGUSR2.
+ This is useful for preserving config options and environment when updating tint2.
+- Add File: tint2conf.xml
+
+-------------------------------------------------------------------
Old:
----
tint2-0.14.1.tar.gz
New:
----
tint2-0.14.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tint2.spec ++++++
--- /var/tmp/diff_new_pack.pzCNu6/_old 2017-06-23 09:18:54.293856199 +0200
+++ /var/tmp/diff_new_pack.pzCNu6/_new 2017-06-23 09:18:54.293856199 +0200
@@ -17,7 +17,7 @@
Name: tint2
-Version: 0.14.1
+Version: 0.14.6
Release: 0
Summary: A lightweight X11 desktop panel and task manager
License: GPL-2.0
@@ -49,7 +49,7 @@
%lang_package
%prep
-%setup -q -n %{name}-v%{version}-6cde7bef1e698c924f4c7fd65b71dd69e6173909/
+%setup -q -n %{name}-v%{version}-8046600a552774253939b8a83bdd3fc0e60dacec/
%build
%cmake -DENABLE_EXAMPLES=ON -DDOCDIR=%{_docdir}/%{name}
@@ -102,6 +102,7 @@
%dir %{_datadir}/doc/tint2/html
%dir %{_datadir}/doc/tint2/html/images
%{_datadir}/doc/tint2/*
+%{_datadir}/mime/packages/tint2conf.xml
%files lang -f tint2conf.lang
%defattr(-,root,root)
++++++ tint2-0.14.1.tar.gz -> tint2-0.14.6.tar.gz ++++++
++++ 56097 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2017-06-23 09:18:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
and /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh"
Fri Jun 23 09:18:26 2017 rev:124 rq:505664 version:3.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2017-06-09 15:56:32.223039733 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2017-06-23 09:18:50.798350125 +0200
@@ -1,0 +2,8 @@
+Thu Jun 22 11:23:22 UTC 2017 - kgronlund(a)suse.com
+
+- high: bootstrap: Add option to enable diskless SBD mode to cluster init (bsc#1045118)
+ * Add 0016-high-bootstrap-Add-option-to-enable-diskless-SBD-mod.patch
+- medium: ui_cluster: Add --force to ha-cluster-remove (bsc#1044071)
+ * Add 0015-medium-ui_cluster-Add-force-to-ha-cluster-remove-bsc.patch
+
+-------------------------------------------------------------------
New:
----
0015-medium-ui_cluster-Add-force-to-ha-cluster-remove-bsc.patch
0016-high-bootstrap-Add-option-to-enable-diskless-SBD-mod.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.LeLLme/_old 2017-06-23 09:18:52.146159675 +0200
+++ /var/tmp/diff_new_pack.LeLLme/_new 2017-06-23 09:18:52.150159110 +0200
@@ -70,6 +70,10 @@
Patch13: 0013-medium-bootstrap-Make-arbitrator-argument-optional-b.patch
# PATCH-FIX-UPSTREAM: medium: history: Revert preference of messages over ha-log.txt (bsc#1031138)
Patch14: 0014-medium-history-Revert-preference-of-messages-over-ha.patch
+# PATCH-FIX-UPSTREAM: medium: ui_cluster: Add --force to ha-cluster-remove (bsc#1044071)
+Patch15: 0015-medium-ui_cluster-Add-force-to-ha-cluster-remove-bsc.patch
+# PATCH-FIX-UPSTREAM: high: bootstrap: Add option to enable diskless SBD mode to cluster init (bsc#1045118)
+Patch16: 0016-high-bootstrap-Add-option-to-enable-diskless-SBD-mod.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
@@ -186,6 +190,8 @@
%patch12 -p1
%patch13 -p1
%patch14 -p1
+%patch15 -p1
+%patch16 -p1
# Force the local time
#
++++++ 0015-medium-ui_cluster-Add-force-to-ha-cluster-remove-bsc.patch ++++++
>From a2d241d90164946e0740c791d8d1bb2ef66d22db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig(a)koru.se>
Date: Tue, 13 Jun 2017 14:51:56 +0200
Subject: [PATCH 15/16] medium: ui_cluster: Add --force to ha-cluster-remove
(bsc#1044071)
---
crmsh/bootstrap.py | 5 +++--
crmsh/ui_cluster.py | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/crmsh/bootstrap.py b/crmsh/bootstrap.py
index 3d648539..2fcd55b6 100644
--- a/crmsh/bootstrap.py
+++ b/crmsh/bootstrap.py
@@ -1551,11 +1551,12 @@ def bootstrap_join(cluster_node=None, nic=None, quiet=False, yes_to_all=False, w
status("Done (log saved to %s)" % (LOG_FILE))
-def bootstrap_remove(cluster_node=None, quiet=False, yes_to_all=False):
+def bootstrap_remove(cluster_node=None, quiet=False, yes_to_all=False, force=False):
"""
-c <cluster-node> - node to remove from cluster
-q - quiet
-y - yes to all
+ -f - force removal of self
"""
global _context
_context = Context(quiet=quiet, yes_to_all=yes_to_all)
@@ -1573,7 +1574,7 @@ def bootstrap_remove(cluster_node=None, quiet=False, yes_to_all=False):
init()
remove_ssh()
if remove_localhost_check():
- if not config.core.force:
+ if not config.core.force and not force:
error("Removing self requires --force")
# get list of cluster nodes
me = utils.this_node()
diff --git a/crmsh/ui_cluster.py b/crmsh/ui_cluster.py
index 96166713..9be66522 100644
--- a/crmsh/ui_cluster.py
+++ b/crmsh/ui_cluster.py
@@ -288,6 +288,7 @@ If stage is not specified, each stage will be invoked in sequence.
parser.add_option("-q", "--quiet", help="Be quiet (don't describe what's happening, just do it)", action="store_true", dest="quiet")
parser.add_option("-y", "--yes", help='Answer "yes" to all prompts (use with caution)', action="store_true", dest="yes_to_all")
parser.add_option("-c", "--cluster-node", dest="cluster_node", help="IP address or hostname of cluster node which will be deleted", metavar="HOST")
+ parser.add_option("-F", "--force", dest="force", help="Remove current node", action="store_true")
options, args = parser.parse_args(list(args))
if options.cluster_node is not None and options.cluster_node not in args:
@@ -302,7 +303,8 @@ If stage is not specified, each stage will be invoked in sequence.
bootstrap.bootstrap_remove(
cluster_node=node,
quiet=options.quiet,
- yes_to_all=options.yes_to_all)
+ yes_to_all=options.yes_to_all,
+ force=options.force)
return True
def _parse_clustermap(self, clusters):
--
2.12.2
++++++ 0016-high-bootstrap-Add-option-to-enable-diskless-SBD-mod.patch ++++++
>From 6f0b4d75121973a69d783ac6b0480f0516936227 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig(a)koru.se>
Date: Tue, 20 Jun 2017 14:53:16 +0200
Subject: [PATCH 16/16] high: bootstrap: Add option to enable diskless SBD mode
to cluster init (bsc#1045118)
---
crmsh/bootstrap.py | 94 +++++++++++++++++++++++++++++++++++++++++++++--------
crmsh/ui_cluster.py | 3 ++
doc/crm.8.adoc | 3 ++
3 files changed, 87 insertions(+), 13 deletions(-)
diff --git a/crmsh/bootstrap.py b/crmsh/bootstrap.py
index 2fcd55b6..6e4c5049 100644
--- a/crmsh/bootstrap.py
+++ b/crmsh/bootstrap.py
@@ -53,6 +53,7 @@ class Context(object):
self.ocfs2_device = None
self.shared_device = None
self.sbd_device = None
+ self.diskless_sbd = False # if True, enable SBD for diskless operation
self.unicast = None
self.admin_ip = None
self.watchdog = None
@@ -515,7 +516,9 @@ def init_cluster_local():
if pass_msg:
warn("You should change the hacluster password to something more secure!")
- if configured_sbd_device():
+ # for cluster join, diskless_sbd flag is set in join_cluster() if
+ # sbd is running on seed host
+ if configured_sbd_device() or _context.diskless_sbd:
invoke("systemctl enable sbd.service")
else:
invoke("systemctl disable sbd.service")
@@ -876,9 +879,9 @@ Configure Shared Storage:
status("Created %s for OCFS2 partition" % (_context.ocfs2_device))
-def check_watchdog():
+def detect_watchdog_device():
"""
- Verify watchdog device. Fall back to /dev/watchdog.
+ Find the watchdog device. Fall back to /dev/watchdog.
"""
wdconf = "/etc/modules-load.d/watchdog.conf"
watchdog_dev = "/dev/watchdog"
@@ -888,15 +891,66 @@ def check_watchdog():
m = re.match(r'^\s*watchdog-device\s*=\s*(.*)$', line)
if m:
watchdog_dev = m.group(1)
+ return watchdog_dev
+
+
+def check_watchdog():
+ """
+ Verify watchdog device. Fall back to /dev/watchdog.
+ """
+ watchdog_dev = detect_watchdog_device()
rc, _out, _err = utils.get_stdout_stderr("wdctl %s" % (watchdog_dev))
return rc == 0
+def sysconfig_comment_out(scfile, key):
+ """
+ Comments out the given key in the sysconfig file
+ """
+ matcher = re.compile(r'^\s*{}\s*='.format(key))
+ outp, ncomments = "", 0
+ for line in scfile.readlines():
+ if matcher.match(line):
+ outp += '#' + line
+ ncomments += 1
+ else:
+ outp += line
+ return outp, ncomments
+
+
+def init_sbd_diskless():
+ """
+ Initialize SBD in diskless mode.
+ """
+ status_long("Initializing diskless SBD...")
+ if os.path.isfile(SYSCONFIG_SBD):
+ log("Overwriting {} with diskless configuration".format(SYSCONFIG_SBD))
+ scfg, nmatches = sysconfig_comment_out(open(SYSCONFIG_SBD), "SBD_DEVICE")
+ if nmatches > 0:
+ utils.str2file(scfg, SYSCONFIG_SBD)
+ else:
+ log("Creating {} with diskless configuration".format(SYSCONFIG_SBD))
+ utils.sysconfig_set(SYSCONFIG_SBD,
+ SBD_WATCHDOG="yes",
+ SBD_PACEMAKER="yes",
+ SBD_STARTMODE="always",
+ SBD_DELAY_START="no",
+ SBD_WATCHDOG_DEVICE=detect_watchdog_device())
+ csync2_update(SYSCONFIG_SBD)
+ status_done()
+
+
def init_sbd():
"""
Configure SBD (Storage-based fencing).
+
+ SBD can also run in diskless mode if no device
+ is configured.
"""
- if not _context.sbd_device:
+ if not _context.sbd_device and _context.diskless_sbd:
+ init_sbd_diskless()
+ return
+ elif not _context.sbd_device:
# SBD device not set up by init_storage (ocfs2 template) and
# also not passed in as command line argument - prompt user
if _context.yes_to_all:
@@ -921,17 +975,21 @@ Configure SBD:
if not confirm("Do you wish to use SBD?"):
warn("Not configuring SBD - STONITH will be disabled.")
# Comment out SBD devices if present
- scfg = open(SYSCONFIG_SBD).read()
- scfg, nmatches = re.subn(r'^\([^#].*\)$', r'#\1', scfg)
- if nmatches > 0:
- utils.str2file(scfg, SYSCONFIG_SBD)
- csync2_update(SYSCONFIG_SBD)
+ if os.path.isfile(SYSCONFIG_SBD):
+ scfg, nmatches = sysconfig_comment_out(open(SYSCONFIG_SBD), "SBD_DEVICE")
+ if nmatches > 0:
+ utils.str2file(scfg, SYSCONFIG_SBD)
+ csync2_update(SYSCONFIG_SBD)
return
dev = ""
dev_looks_sane = False
while not dev_looks_sane:
- dev = prompt_for_string('Path to storage device (e.g. /dev/disk/by-id/...)', r'\/.*', dev)
+ dev = prompt_for_string('Path to storage device (e.g. /dev/disk/by-id/...), or "none"', r'none|\/.*', dev)
+ if dev == "none":
+ _context.diskless_sbd = True
+ init_sbd_diskless()
+ return
if not is_block_device(dev):
print >>sys.stderr, " That doesn't look like a block device"
else:
@@ -978,11 +1036,14 @@ op_defaults op-options: timeout=600 record-pending=true
rsc_defaults rsc-options: resource-stickiness=1 migration-threshold=3
""")
- if utils.parse_sysconfig(SYSCONFIG_SBD).get("SBD_DEVICE"):
+ if configured_sbd_device():
if not invoke("crm configure primitive stonith-sbd stonith:external/sbd pcmk_delay_max=30s"):
error("Can't create stonith-sbd primitive")
if not invoke("crm configure property stonith-enabled=true"):
- error("Can't enable STONITH")
+ error("Can't enable STONITH for SBD")
+ elif _context.diskless_sbd:
+ if not invoke("crm configure property stonith-enabled=true"):
+ error("Can't enable STONITH for diskless SBD")
def init_vgfs():
@@ -1235,6 +1296,11 @@ def join_cluster(seed_host):
if is_unicast:
corosync.add_node(utils.this_node())
+ # if no SBD devices are configured,
+ # check the existing cluster if the sbd service is enabled
+ if not configured_sbd_device() and invoke("ssh root@{} systemctl is-enabled sbd.service".format(seed_host)):
+ _context.diskless_sbd = True
+
# Initialize the cluster before adjusting quorum. This is so
# that we can query the cluster to find out how many nodes
# there are (so as not to adjust multiple times if a previous
@@ -1414,7 +1480,7 @@ def remove_localhost_check():
def bootstrap_init(cluster_name="hacluster", nic=None, ocfs2_device=None,
- shared_device=None, sbd_device=None, quiet=False,
+ shared_device=None, sbd_device=None, diskless_sbd=False, quiet=False,
template=None, admin_ip=None, yes_to_all=False,
unicast=False, watchdog=None, stage=None, args=None):
"""
@@ -1422,6 +1488,7 @@ def bootstrap_init(cluster_name="hacluster", nic=None, ocfs2_device=None,
-o <ocfs2-device>
-p <shared-device>
-s <sbd-device>
+ -S - configure SBD without disk
-t <template>
-A [<admin-ip>]
-q - quiet
@@ -1447,6 +1514,7 @@ def bootstrap_init(cluster_name="hacluster", nic=None, ocfs2_device=None,
_context.ocfs2_device = ocfs2_device
_context.shared_device = shared_device
_context.sbd_device = sbd_device
+ _context.diskless_sbd = diskless_sbd
_context.unicast = unicast
_context.admin_ip = admin_ip
_context.watchdog = watchdog
diff --git a/crmsh/ui_cluster.py b/crmsh/ui_cluster.py
index 9be66522..6db3f401 100644
--- a/crmsh/ui_cluster.py
+++ b/crmsh/ui_cluster.py
@@ -142,6 +142,8 @@ Note:
help='Additional nodes to add to the created cluster. ' +
'May include the current node, which will always be the initial cluster node.')
# parser.add_option("--quick-start", dest="quickstart", action="store_true", help="Perform basic system configuration (NTP, watchdog, /etc/hosts)")
+ parser.add_option("-S", "--enable-sbd", dest="diskless_sbd", action="store_true",
+ help="Enable SBD even if no SBD device is configured (diskless mode)")
parser.add_option("-w", "--watchdog", dest="watchdog", metavar="WATCHDOG",
help="Use the given watchdog device")
@@ -187,6 +189,7 @@ Note:
ocfs2_device=options.ocfs2_device,
shared_device=options.shared_device,
sbd_device=options.sbd_device,
+ diskless_sbd=options.diskless_sbd,
quiet=options.quiet,
template=options.template,
admin_ip=options.admin_ip,
diff --git a/doc/crm.8.adoc b/doc/crm.8.adoc
index 6b7ec2f9..7bb902a8 100644
--- a/doc/crm.8.adoc
+++ b/doc/crm.8.adoc
@@ -1140,6 +1140,9 @@ Options:
*-w WATCHDOG, --watchdog=WATCHDOG*::
Use the given watchdog device.
+*-S, --enable-sbd*::
+ Enable SBD even if no SBD device is configured (diskless mode).
+
Network configuration:
Options for configuring the network and messaging layer.
--
2.12.2
1
0
Hello community,
here is the log from the commit of package offlineimap for openSUSE:Factory checked in at 2017-06-23 09:18:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/offlineimap (Old)
and /work/SRC/openSUSE:Factory/.offlineimap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "offlineimap"
Fri Jun 23 09:18:23 2017 rev:40 rq:505633 version:7.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/offlineimap/offlineimap.changes 2017-06-02 10:34:20.595334733 +0200
+++ /work/SRC/openSUSE:Factory/.offlineimap.new/offlineimap.changes 2017-06-23 09:18:49.198576177 +0200
@@ -1,0 +2,5 @@
+Wed Jun 21 13:40:22 UTC 2017 - bwiedemann(a)suse.com
+
+- Do not include unneccessary undeterministic environment.pickle in package
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ offlineimap.spec ++++++
--- /var/tmp/diff_new_pack.hBBsbv/_old 2017-06-23 09:18:49.858482931 +0200
+++ /var/tmp/diff_new_pack.hBBsbv/_new 2017-06-23 09:18:49.858482931 +0200
@@ -91,6 +91,7 @@
install -D -m 444 contrib/systemd/%{name}@.timer %{buildroot}%{_userunitdir}/%{name}@.timer
install -D -m 444 contrib/systemd/%{name}-oneshot.service %{buildroot}%{_userunitdir}/%{name}-oneshot.service
install -D -m 444 contrib/systemd/%{name}-oneshot@.service %{buildroot}%{_userunitdir}/%{name}-oneshot@.service
+rm docs/html/doctrees/environment.pickle
%files -f INSTALLED_FILES
%defattr(-,root,root)
1
0
Hello community,
here is the log from the commit of package stress-ng for openSUSE:Factory checked in at 2017-06-23 09:18:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stress-ng (Old)
and /work/SRC/openSUSE:Factory/.stress-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "stress-ng"
Fri Jun 23 09:18:21 2017 rev:14 rq:505632 version:0.08.06
Changes:
--------
--- /work/SRC/openSUSE:Factory/stress-ng/stress-ng.changes 2017-06-19 13:23:49.288790295 +0200
+++ /work/SRC/openSUSE:Factory/.stress-ng.new/stress-ng.changes 2017-06-23 09:18:47.890760975 +0200
@@ -1,0 +2,31 @@
+Thu Jun 22 08:16:57 UTC 2017 - mardnh(a)gmx.de
+
+- update to version 0.08.06:
+ * Makefile: bump version
+ * Debian/control: update standards version to 4.0.0
+ * Make test-sem-sysv.c fail for GNU/HURD
+ * Make test-mq-sysv.c fail for GNU/HURD
+ * Make test-affinity fail for GNU/HURD
+ * stress-cyclic: fix build issues on non-Linux platforms
+ * Clean up some warnings found on test config code
+ * Add --cyclic-method to cyclic measurements stressor
+ * Add build-time checks for SYSV shared memory APIs
+ * stress-sigsegv: add NOCLOBBER hint to fix warning with gcc 5.4.1
+ * test-sem-posix: include time.h to build on BSD
+ * stress-sem-sysv: make semtimedop a linux only feature
+ * Add build-time checks for SYSV message queues
+ * Forgot to add in new test-mq-posix.c test source
+ * Add build-time checks for POSIX message queues
+ * Add in cyclic help options
+ * stress-vforkmany: add self adjusting waste memory allocation
+ * stress-vforkmany: make child processes larger to be more OOM'able
+ * stress-socket-fd: Add checks for sendmsg failures
+ * stress-socket-fd: send SIGALRM rathe rather than SIGKILL to child
+ * Add new --cyclic-dist distribution option
+ * stress-vforkmany: allow children to be OOM'd (LP: #1698747)
+ * sem-sysv: add linux checks for linux only semctl commands
+ * Add SYSV semaphore autodetection at build time
+ * job: voidify some function returns and constify len
+ * stress-cyclic: fix tab/spacing indentation
+
+-------------------------------------------------------------------
Old:
----
stress-ng-0.08.05.tar.gz
New:
----
stress-ng-0.08.06.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ stress-ng.spec ++++++
--- /var/tmp/diff_new_pack.ktjegd/_old 2017-06-23 09:18:48.674650209 +0200
+++ /var/tmp/diff_new_pack.ktjegd/_new 2017-06-23 09:18:48.674650209 +0200
@@ -18,7 +18,7 @@
Name: stress-ng
-Version: 0.08.05
+Version: 0.08.06
Release: 0
Summary: Tool to load and stress a computer
License: GPL-2.0
++++++ stress-ng-0.08.05.tar.gz -> stress-ng-0.08.06.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/Makefile new/stress-ng-0.08.06/Makefile
--- old/stress-ng-0.08.05/Makefile 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/Makefile 2017-06-21 18:34:24.000000000 +0200
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-VERSION=0.08.05
+VERSION=0.08.06
#
# Codename "harmful hardware harasser"
#
@@ -272,7 +272,8 @@
HAVE_FLOAT_DECIMAL=0 HAVE_SECCOMP_H=0 HAVE_LIB_AIO=0 HAVE_SYS_CAP_H=0 \
HAVE_VECMATH=0 HAVE_ATOMIC=0 HAVE_LIB_SCTP=0 HAVE_ASM_NOP=0 \
HAVE_ALIGNED_64K=0 HAVE_ALIGNED_64=0 HAVE_ALIGNED_128=0 \
- HAVE_AFFINITY=0 HAVE_MADVISE=0 HAVE_SEM_POSIX=0
+ HAVE_AFFINITY=0 HAVE_MADVISE=0 HAVE_SEM_POSIX=0 HAVE_SEM_SYSV=0 \
+ HAVE_MQ_POSIX=0 HAVE_MQ_SYSV=0 HAVE_SHM_SYSV=0
#
# Load in current config; use 'make clean' to clear this
@@ -490,6 +491,38 @@
endif
endif
+ifndef $(HAVE_SEM_SYSV)
+HAVE_SEM_SYSV = $(shell $(MAKE) --no-print-directory $(HAVE_NOT) have_sem_sysv)
+ifeq ($(HAVE_SEM_SYSV),1)
+ CONFIG_CFLAGS += -DHAVE_SEM_SYSV
+$(info autoconfig: using SYSV semaphores)
+endif
+endif
+
+ifndef $(HAVE_MQ_POSIX)
+HAVE_MQ_POSIX = $(shell $(MAKE) --no-print-directory $(HAVE_NOT) have_mq_posix)
+ifeq ($(HAVE_MQ_POSIX),1)
+ CONFIG_CFLAGS += -DHAVE_MQ_POSIX
+$(info autoconfig: using POSIX message queues)
+endif
+endif
+
+ifndef $(HAVE_MQ_SYSV)
+HAVE_MQ_SYSV = $(shell $(MAKE) --no-print-directory $(HAVE_NOT) have_mq_sysv)
+ifeq ($(HAVE_MQ_SYSV),1)
+ CONFIG_CFLAGS += -DHAVE_MQ_SYSV
+$(info autoconfig: using SYSV message queues)
+endif
+endif
+
+ifndef $(HAVE_SHM_SYSV)
+HAVE_SHM_SYSV = $(shell $(MAKE) --no-print-directory $(HAVE_NOT) have_shm_sysv)
+ifeq ($(HAVE_SHM_SYSV),1)
+ CONFIG_CFLAGS += -DHAVE_SHM_SYSV
+$(info autoconfig: using SYSV shared memory)
+endif
+endif
+
endif
endif
@@ -830,6 +863,57 @@
fi
@rm -rf test-sem-posix
+#
+# check if we can build using SYSV semaphores
+#
+.PHONY: have_sem_sysv
+have_sem_sysv: test-sem-sysv.c
+ @$(CC) $(CPPFLAGS) test-sem-sysv.c -o test-sem-sysv 2> /dev/null || true
+ @if [ -f test-sem-sysv ]; then \
+ echo 1 ;\
+ else \
+ echo 0 ;\
+ fi
+ @rm -rf test-sem-sysv
+
+#
+# check if we can build using POSIX message queues
+#
+.PHONY: have_mq_posix
+have_mq_posix: test-mq-posix.c
+ @$(CC) $(CPPFLAGS) test-mq-posix.c -o test-mq-posix -lrt 2> /dev/null || true
+ @if [ -f test-mq-posix ]; then \
+ echo 1 ;\
+ else \
+ echo 0 ;\
+ fi
+ @rm -rf test-mq-posix
+
+#
+# check if we can build using SYSV message queues
+#
+.PHONY: have_mq_sysv_
+have_mq_sysv: test-mq-sysv.c
+ @$(CC) $(CPPFLAGS) test-mq-sysv.c -o test-mq-sysv 2> /dev/null || true
+ @if [ -f test-mq-sysv ]; then \
+ echo 1 ;\
+ else \
+ echo 0 ;\
+ fi
+ @rm -rf test-mq-sysv
+
+#
+# check if we can build using SYSV shared memory
+#
+.PHONY: have_shm_sysv_
+have_shm_sysv: test-shm-sysv.c
+ @$(CC) $(CPPFLAGS) test-shm-sysv.c -o test-shm-sysv 2> /dev/null || true
+ @if [ -f test-shm-sysv ]; then \
+ echo 1 ;\
+ else \
+ echo 0 ;\
+ fi
+ @rm -rf test-shm-sysv
#
# extract the PER_* personality enums
@@ -882,6 +966,8 @@
test-asm-nop.c test-aligned-64K.c test-aligned-64.c \
test-aligned-128.c usr.bin.pulseaudio.eg perf-event.c \
test-affinity.c test-madvise.c test-sem-posix.c \
+ test-sem-sysv.c test-mq-posix.c test-mq-sysv.c \
+ test-shm-sysv.c \
snapcraft smatchify.sh config TODO \
example-jobs stress-ng-$(VERSION)
tar -zcf stress-ng-$(VERSION).tar.gz stress-ng-$(VERSION)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/job.c new/stress-ng-0.08.06/job.c
--- old/stress-ng-0.08.05/job.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/job.c 2017-06-21 18:34:24.000000000 +0200
@@ -118,7 +118,7 @@
char *ptr = buf;
int argc = 1;
- memset(new_argv, 0, sizeof(new_argv));
+ (void)memset(new_argv, 0, sizeof(new_argv));
new_argv[0] = argv[0];
/* remove \n */
@@ -152,7 +152,7 @@
/* managed to get any tokens? */
if (argc > 1) {
- size_t len = strlen(new_argv[1]) + 3;
+ const size_t len = strlen(new_argv[1]) + 3;
char tmp[len];
int rc;
@@ -173,7 +173,7 @@
}
/* prepend -- to command to make them into stress-ng options */
- snprintf(tmp, len, "--%s", new_argv[1]);
+ (void)snprintf(tmp, len, "--%s", new_argv[1]);
new_argv[1] = tmp;
parse_opts(argc, new_argv);
new_argv[1] = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-cyclic.c new/stress-ng-0.08.06/stress-cyclic.c
--- old/stress-ng-0.08.05/stress-cyclic.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-cyclic.c 2017-06-21 18:34:24.000000000 +0200
@@ -53,9 +53,16 @@
double std_dev; /* standard deviation */
} rt_stats_t;
+typedef int (*cyclic_func)(const args_t *args, rt_stats_t *rt_stats, uint64_t cyclic_sleep);
+
+typedef struct {
+ const char *name;
+ const cyclic_func func;
+} stress_cyclic_method_info_t;
+
static const policy_t policies[] = {
#if defined(SCHED_DEADLINE)
- { SCHED_DEADLINE, "SCHED_DEADLINBE", "deadline" },
+ { SCHED_DEADLINE, "SCHED_DEADLINE", "deadline" },
#endif
#if defined(SCHED_FIFO)
{ SCHED_FIFO, "SCHED_FIFO", "fifo" },
@@ -67,7 +74,6 @@
static const size_t num_policies = SIZEOF_ARRAY(policies);
-
void stress_set_cyclic_sleep(const char *opt)
{
uint64_t cyclic_sleep;
@@ -105,6 +111,15 @@
set_setting("cyclic-prio", TYPE_ID_INT32, &cyclic_prio);
}
+void stress_set_cyclic_dist(const char *opt)
+{
+ uint64_t cyclic_dist;
+
+ cyclic_dist = get_uint64(opt);
+ check_range_bytes("cyclic-dist", cyclic_dist, 1, 10000000);
+ set_setting("cyclic-dist", TYPE_ID_UINT64, &cyclic_dist);
+}
+
/*
* stress_cyclic_supported()
* check if we can run this as root
@@ -120,8 +135,213 @@
return 0;
}
+
+/*
+ * stress_cyclic_clock_nanosleep()
+ * measure latencies with clock_nanosleep
+ */
+static int stress_cyclic_clock_nanosleep(
+ const args_t *args,
+ rt_stats_t *rt_stats,
+ uint64_t cyclic_sleep)
+{
+#if defined(__linux__)
+ struct timespec t1, t2, t, trem;
+ int ret;
+
+ (void)args;
+
+ t.tv_sec = cyclic_sleep / NANOSECS;
+ t.tv_nsec = cyclic_sleep % NANOSECS;
+ clock_gettime(CLOCK_REALTIME, &t1);
+ ret = clock_nanosleep(CLOCK_REALTIME, 0, &t, &trem);
+ clock_gettime(CLOCK_REALTIME, &t2);
+ if (ret == 0) {
+ int64_t delta_ns;
+
+ delta_ns = ((t2.tv_sec - t1.tv_sec) * NANOSECS) + (t2.tv_nsec - t1.tv_nsec);
+ delta_ns -= cyclic_sleep;
+
+ if (rt_stats->index < MAX_SAMPLES)
+ rt_stats->latencies[rt_stats->index++] = delta_ns;
+
+ rt_stats->ns += (double)delta_ns;
+ }
+#else
+ (void)args;
+ (void)rt_stats;
+ (void)cyclic_sleep;
+#endif
+ return 0;
+}
+
+/*
+ * stress_cyclic_posix_nanosleep()
+ * measure latencies with posix nanosleep
+ */
+static int stress_cyclic_posix_nanosleep(
+ const args_t *args,
+ rt_stats_t *rt_stats,
+ uint64_t cyclic_sleep)
+{
#if defined(__linux__)
+ struct timespec t1, t2, t, trem;
+ int ret;
+
+ (void)args;
+
+ t.tv_sec = cyclic_sleep / NANOSECS;
+ t.tv_nsec = cyclic_sleep % NANOSECS;
+ clock_gettime(CLOCK_REALTIME, &t1);
+ ret = nanosleep(&t, &trem);
+ clock_gettime(CLOCK_REALTIME, &t2);
+ if (ret == 0) {
+ int64_t delta_ns;
+
+ delta_ns = ((t2.tv_sec - t1.tv_sec) * NANOSECS) + (t2.tv_nsec - t1.tv_nsec);
+ delta_ns -= cyclic_sleep;
+
+ if (rt_stats->index < MAX_SAMPLES)
+ rt_stats->latencies[rt_stats->index++] = delta_ns;
+
+ rt_stats->ns += (double)delta_ns;
+ }
+#else
+ (void)args;
+ (void)rt_stats;
+ (void)cyclic_sleep;
+#endif
+ return 0;
+}
+
+/*
+ * stress_cyclic_poll()
+ * measure latencies of heavy polling the clock
+ */
+static int stress_cyclic_poll(
+ const args_t *args,
+ rt_stats_t *rt_stats,
+ uint64_t cyclic_sleep)
+{
+#if defined(__linux__)
+ struct timespec t1, t2;
+
+ (void)args;
+
+ /* find nearest point to clock roll over */
+ clock_gettime(CLOCK_REALTIME, &t1);
+ for (;;) {
+ clock_gettime(CLOCK_REALTIME, &t2);
+ if ((t1.tv_sec != t2.tv_sec) || (t1.tv_nsec != t2.tv_nsec))
+ break;
+ }
+ t1 = t2;
+
+ for (;;) {
+ int64_t delta_ns;
+
+ clock_gettime(CLOCK_REALTIME, &t2);
+
+ delta_ns = ((t2.tv_sec - t1.tv_sec) * NANOSECS) + (t2.tv_nsec - t1.tv_nsec);
+ if (delta_ns >= (int64_t)cyclic_sleep) {
+ delta_ns -= cyclic_sleep;
+
+ if (rt_stats->index < MAX_SAMPLES)
+ rt_stats->latencies[rt_stats->index++] = delta_ns;
+
+ rt_stats->ns += (double)delta_ns;
+ break;
+ }
+ }
+#else
+ (void)args;
+ (void)rt_stats;
+ (void)cyclic_sleep;
+#endif
+ return 0;
+}
+
+
+#if defined(__linux__)
+static struct timespec itimer_time;
+static timer_t timerid;
+
+static void MLOCKED stress_cyclic_itimer_handler(int sig)
+{
+ (void)sig;
+
+ clock_gettime(CLOCK_REALTIME, &itimer_time);
+}
+#endif
+
+/*
+ * stress_cyclic_itimer()
+ * measure latencies with itimers
+ */
+static int stress_cyclic_itimer(
+ const args_t *args,
+ rt_stats_t *rt_stats,
+ uint64_t cyclic_sleep)
+{
+#if defined(__linux__)
+ struct itimerspec timer;
+ struct timespec t1;
+ int64_t delta_ns;
+ struct sigaction old_action;
+ struct sigevent sev;
+ int ret = -1;
+
+ timer.it_interval.tv_sec = timer.it_value.tv_sec = cyclic_sleep / NANOSECS;
+ timer.it_interval.tv_nsec = timer.it_value.tv_nsec = cyclic_sleep % NANOSECS;
+
+ if (stress_sighandler(args->name, SIGRTMIN, stress_cyclic_itimer_handler, &old_action) < 0)
+ return ret;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGRTMIN;
+ sev.sigev_value.sival_ptr = &timerid;
+ if (timer_create(CLOCK_REALTIME, &sev, &timerid) < 0)
+ goto restore;
+
+ memset(&itimer_time, 0, sizeof(itimer_time));
+ clock_gettime(CLOCK_REALTIME, &t1);
+ if (timer_settime(timerid, 0, &timer, NULL) < 0)
+ goto restore;
+
+ pause();
+ if ((itimer_time.tv_sec == 0) &&
+ (itimer_time.tv_nsec == 0))
+ goto tidy;
+
+ delta_ns = ((itimer_time.tv_sec - t1.tv_sec) * NANOSECS) + (itimer_time.tv_nsec - t1.tv_nsec);
+ delta_ns -= cyclic_sleep;
+
+ if (rt_stats->index < MAX_SAMPLES)
+ rt_stats->latencies[rt_stats->index++] = delta_ns;
+
+ rt_stats->ns += (double)delta_ns;
+
+ (void)timer_delete(timerid);
+
+ ret = 0;
+tidy:
+ /* And cancel timer */
+ (void)memset(&timer, 0, sizeof(timer));
+ (void)timer_settime(timerid, 0, &timer, NULL);
+restore:
+ stress_sigrestore(args->name, SIGRTMIN, &old_action);
+ return ret;
+#else
+ (void)args;
+ (void)rt_stats;
+ (void)cyclic_sleep;
+
+ return 0;
+#endif
+}
+
+#if defined(__linux__)
static sigjmp_buf jmp_env;
/*
@@ -135,6 +355,7 @@
g_keep_stressing_flag = 1;
siglongjmp(jmp_env, 1);
}
+#endif
/*
* stress_cyclic_cmp()
@@ -206,8 +427,77 @@
}
}
+/*
+ * cyclic methods
+ */
+static const stress_cyclic_method_info_t cyclic_methods[] = {
+ { "clock_ns", stress_cyclic_clock_nanosleep },
+ { "itimer", stress_cyclic_itimer },
+ { "poll", stress_cyclic_poll },
+ { "posix_ns", stress_cyclic_posix_nanosleep },
+ { NULL, NULL }
+};
+
+/*
+ * stress_set_cyclic_method()
+ * set the default cyclic method
+ */
+int stress_set_cyclic_method(const char *name)
+{
+ stress_cyclic_method_info_t const *info;
+
+ for (info = cyclic_methods; info->func; info++) {
+ if (!strcmp(info->name, name)) {
+ set_setting("cyclic-method", TYPE_ID_UINTPTR_T, &info);
+ return 0;
+ }
+ }
+
+ (void)fprintf(stderr, "cyclic-method must be one of:");
+ for (info = cyclic_methods; info->func; info++) {
+ (void)fprintf(stderr, " %s", info->name);
+ }
+ (void)fprintf(stderr, "\n");
+
+ return -1;
+}
+
+#if defined(__linux__)
+
+/*
+ * stress_rt_dist()
+ * show real time distribution
+ */
+void stress_rt_dist(const char *name, rt_stats_t *rt_stats, const uint64_t cyclic_dist)
+{
+ size_t dist_max_size = (cyclic_dist > 0) ? (rt_stats->max_ns / cyclic_dist) + 1 : 1;
+ size_t dist_size = STRESS_MINIMUM(100, dist_max_size);
+ size_t i;
+ int64_t dist[dist_size];
+
+ if (!cyclic_dist)
+ return;
+
+ memset(dist, 0, sizeof(dist));
+
+ for (i = 0; i < rt_stats->index; i++) {
+ int64_t lat = rt_stats->latencies[i] / cyclic_dist;
+
+ if (lat < (int64_t)dist_size)
+ dist[lat]++;
+ }
+
+ pr_inf("%s: latency distribution (%" PRIu64 " us intervals):\n", name, cyclic_dist);
+ pr_inf("%s: %12s %10s\n", name, "latency (us)", "frequency");
+ for (i = 0; i < dist_size; i++) {
+ pr_inf("%s: %12" PRIu64 " %10" PRId64 "\n",
+ name, cyclic_dist * i, dist[i]);
+ }
+}
+
int stress_cyclic(const args_t *args)
{
+ const stress_cyclic_method_info_t *cyclic_method = &cyclic_methods[0];
const uint32_t num_instances = args->num_instances;
struct sigaction old_action_xcpu;
struct sched_param param = { 0 };
@@ -215,6 +505,7 @@
pid_t pid;
NOCLOBBER uint64_t timeout;
uint64_t cyclic_sleep = DEFAULT_DELAY_NS;
+ uint64_t cyclic_dist = 0;
int32_t cyclic_prio = INT32_MAX;
int policy;
size_t cyclic_policy = 0;
@@ -222,12 +513,16 @@
rt_stats_t *rt_stats;
const size_t page_size = args->page_size;
const size_t size = (sizeof(rt_stats_t) + page_size - 1) & (~(page_size - 1));
+ cyclic_func func;
timeout = g_opt_timeout;
- (void)get_setting("cyclic-sleep", &cyclic_sleep);
- (void)get_setting("cyclic-prio", &cyclic_prio);
+ (void)get_setting("cyclic-sleep", &cyclic_sleep);
+ (void)get_setting("cyclic-prio", &cyclic_prio);
(void)get_setting("cyclic-policy", &cyclic_policy);
+ (void)get_setting("cyclic-dist", &cyclic_dist);
+ (void)get_setting("cyclic-method", &cyclic_method);
+ func = cyclic_method->func;
policy = policies[cyclic_policy].policy;
if (!args->instance) {
@@ -269,6 +564,8 @@
}
}
+ pr_dbg("%s: using method '%s'\n", args->name, cyclic_method->name);
+
pid = fork();
if (pid < 0) {
pr_inf("%s: cannot fork, errno=%d (%s)\n",
@@ -329,27 +626,7 @@
}
do {
- struct timespec t1, t2, t, trem;
- double ns = 0.0;
-
- t.tv_sec = cyclic_sleep / NANOSECS;
- t.tv_nsec = cyclic_sleep % NANOSECS;
- clock_gettime(CLOCK_REALTIME, &t1);
- ret = clock_nanosleep(CLOCK_REALTIME, 0, &t, &trem);
- clock_gettime(CLOCK_REALTIME, &t2);
- if (ret == 0) {
- int64_t delta_ns;
-
- delta_ns = ((t2.tv_sec - t1.tv_sec) * NANOSECS) + (t2.tv_nsec - t1.tv_nsec);
- delta_ns -= cyclic_sleep;
-
- ns += delta_ns;
-
- if (rt_stats->index < MAX_SAMPLES)
- rt_stats->latencies[rt_stats->index++] = delta_ns;
-
- rt_stats->ns += ns;
- }
+ func(args, rt_stats, cyclic_sleep);
inc_counter(args);
/* Ensure we NEVER spin forever */
@@ -409,8 +686,8 @@
rt_stats->min_ns,
rt_stats->max_ns,
rt_stats->std_dev);
-
- pr_inf("%s: latencies:\n", args->name);
+
+ pr_inf("%s: latency percentiles:\n", args->name);
for (i = 0; i < sizeof(percentiles) / sizeof(percentiles[0]); i++) {
size_t j = (size_t)(((double)rt_stats->index * percentiles[i]) / 100.0);
pr_inf("%s: %5.2f%%: %10" PRId64 " us\n",
@@ -418,6 +695,7 @@
percentiles[i],
rt_stats->latencies[j]);
}
+ stress_rt_dist(args->name, rt_stats, cyclic_dist);
} else {
pr_inf("%s: %10s: no latency information available\n",
args->name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-mq.c new/stress-ng-0.08.06/stress-mq.c
--- old/stress-ng-0.08.05/stress-mq.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-mq.c 2017-06-21 18:34:24.000000000 +0200
@@ -24,7 +24,7 @@
*/
#include "stress-ng.h"
-#if defined(HAVE_LIB_RT) && defined(__linux__)
+#if defined(HAVE_LIB_RT) && defined(HAVE_MQ_POSIX)
#include <mqueue.h>
typedef struct {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-msg.c new/stress-ng-0.08.06/stress-msg.c
--- old/stress-ng-0.08.05/stress-msg.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-msg.c 2017-06-21 18:34:24.000000000 +0200
@@ -24,7 +24,7 @@
*/
#include "stress-ng.h"
-#if !defined(__gnu_hurd__) && NEED_GLIBC(2,0,0)
+#if defined(HAVE_MQ_SYSV)
#include <sys/ipc.h>
#include <sys/msg.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-ng.1 new/stress-ng-0.08.06/stress-ng.1
--- old/stress-ng-0.08.05/stress-ng.1 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-ng.1 2017-06-21 18:34:24.000000000 +0200
@@ -956,6 +956,36 @@
.B \-\-cyclic\-ops N
stop after N sleeps.
.TP
+.B \-\-cyclic\-dist N
+calculate and print a latency distribution with the interval of N nanoseconds.
+This is helpful to see where the latencies are clustering.
+.TP
+.B \-\-cyclic\-method [ clock_ns | itimer | poll | posix_ns ]
+specify the cyclic method to be used. The availble cyclic methods are as
+follows:
+.TS
+expand;
+lB2 lBw(\n[SZ]n)
+l l.
+Method Description
+clock_ns T{
+sleep for the specified time using the clock_nanosleep(2) high
+resolution nanosleep and the CLOCK_REALTIME real time clock.
+T}
+itimer T{
+wakeup a paused process with a CLOCK_REALTIME itimer signal.
+T}
+poll T{
+delay for the specified time using a poll delay loop that checks
+for time changes using clock_gettime(2) on the CLOCK_REALTIME clock.
+T}
+posix_ns T{
+sleep for the specified time using the POSIX nanosleep(2) high
+resolution nanosleep.
+T}
+
+.TE
+.TP
.B \-\-cyclic\-policy [ fifo | rr ]
specify the desired real time scheduling policy, ff (first-in, first-out)
or rr (round robin).
@@ -3119,6 +3149,15 @@
available file system space for 10 minutes. Each stressor will use 5% of the
available file system space.
.LP
+stress\-ng \-\-cyclic 1 \-\-cyclic\-dist 2500 \-\-cyclic\-method clock_ns \-\-cyclic\-prio 100 \-\-cyclic\-sleep 10000 \-\-hdd 0 -t 1m
+.IP
+measures real time scheduling latencies created by the hdd stressor. This
+uses the high resolution nanosecond clock to measure latencies during
+sleeps of 10,000 nanoseconds. At the end of 1 minute of stressing, the
+latency distribution with 2500 ns intervals will be displayed. NOTE: this
+must be run with super user privileges to enable the real time scheduling
+to get accurate measurements.
+.LP
stress\-ng \-\-cpu 8 \-\-cpu\-ops 800000
.IP
runs 8 cpu stressors and stops after 800000 bogo operations.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-ng.c new/stress-ng-0.08.06/stress-ng.c
--- old/stress-ng-0.08.05/stress-ng.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-ng.c 2017-06-21 18:34:24.000000000 +0200
@@ -468,6 +468,8 @@
{ "crypt", 1, 0, OPT_CRYPT },
{ "crypt-ops", 1, 0, OPT_CRYPT_OPS },
{ "cyclic", 1, 0, OPT_CYCLIC },
+ { "cyclic-dist",1, 0, OPT_CYCLIC_DIST },
+ { "cyclic-method",1, 0, OPT_CYCLIC_METHOD },
{ "cyclic-ops",1, 0, OPT_CYCLIC_OPS },
{ "cyclic-policy",1, 0, OPT_CYCLIC_POLICY },
{ "cyclic-prio",1, 0, OPT_CYCLIC_PRIO },
@@ -1040,6 +1042,13 @@
{ NULL, "crypt N", "start N workers performing password encryption" },
{ NULL, "crypt-ops N", "stop after N bogo crypt operations" },
{ NULL, "daemon N", "start N workers creating multiple daemons" },
+ { NULL, "cyclic N", "start N cyclic real time benchmark stressors" },
+ { NULL, "cyclic-ops N", "stop after N cyclic timing cycles" },
+ { NULL, "cyclic-method M", "specify cyclic method M, default is clock_ns" },
+ { NULL, "cyclic-dist N", "calculate distribution of interval N nanosecs" },
+ { NULL, "cyclic-policy P", "used rr or fifo scheduling policy" },
+ { NULL, "cyclic-prio N", "real time scheduling priority 1..100" },
+ { NULL, "cyclic-sleep N", "sleep time of real time timer in nanosecs" },
{ NULL, "daemon-ops N", "stop when N daemons have been created" },
{ NULL, "dccp N", "start N workers exercising network DCCP I/O" },
{ NULL, "dccp-domain D", "specify DCCP domain, default is ipv4" },
@@ -2879,6 +2888,23 @@
if (stress_set_cpu_method(optarg) < 0)
exit(EXIT_FAILURE);
break;
+ case OPT_CYCLIC_DIST:
+ stress_set_cyclic_dist(optarg);
+ break;
+ case OPT_CYCLIC_METHOD:
+ if (stress_set_cyclic_method(optarg) < 0)
+ exit(EXIT_FAILURE);
+ break;
+ case OPT_CYCLIC_POLICY:
+ if (stress_set_cyclic_policy(optarg) < 0)
+ exit(EXIT_FAILURE);
+ break;
+ case OPT_CYCLIC_PRIO:
+ stress_set_cyclic_prio(optarg);
+ break;
+ case OPT_CYCLIC_SLEEP:
+ stress_set_cyclic_sleep(optarg);
+ break;
case OPT_DRY_RUN:
g_opt_flags |= OPT_FLAGS_DRY_RUN;
break;
@@ -3111,16 +3137,6 @@
case OPT_READAHEAD_BYTES:
stress_set_readahead_bytes(optarg);
break;
- case OPT_CYCLIC_POLICY:
- if (stress_set_cyclic_policy(optarg) < 0)
- exit(EXIT_FAILURE);
- break;
- case OPT_CYCLIC_PRIO:
- stress_set_cyclic_prio(optarg);
- break;
- case OPT_CYCLIC_SLEEP:
- stress_set_cyclic_sleep(optarg);
- break;
case OPT_SCHED:
i32 = get_opt_sched(optarg);
set_setting("sched", TYPE_ID_INT32, &i32);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-ng.h new/stress-ng-0.08.06/stress-ng.h
--- old/stress-ng-0.08.05/stress-ng.h 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-ng.h 2017-06-21 18:34:24.000000000 +0200
@@ -77,6 +77,10 @@
#include <linux/fiemap.h>
#include <linux/posix_types.h>
#endif
+#if defined(HAVE_SEM_SYSV)
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#endif
#include <fcntl.h>
#include <errno.h>
#if defined (__GLIBC__)
@@ -1452,9 +1456,11 @@
OPT_CYCLIC,
OPT_CYCLIC_OPS,
+ OPT_CYCLIC_METHOD,
OPT_CYCLIC_POLICY,
OPT_CYCLIC_PRIO,
OPT_CYCLIC_SLEEP,
+ OPT_CYCLIC_DIST,
OPT_DAEMON,
OPT_DAEMON_OPS,
@@ -2421,9 +2427,11 @@
extern void stress_set_cpu_load(const char *opt);
extern void stress_set_cpu_load_slice(const char *opt);
extern int stress_set_cpu_method(const char *name);
-extern int stress_set_cyclic_policy(const char *optarg);
-extern void stress_set_cyclic_prio(const char *optarg);
-extern void stress_set_cyclic_sleep(const char *optarg);
+extern void stress_set_cyclic_dist(const char *opt);
+extern int stress_set_cyclic_method(const char *opt);
+extern int stress_set_cyclic_policy(const char *opt);
+extern void stress_set_cyclic_prio(const char *opt);
+extern void stress_set_cyclic_sleep(const char *opt);
extern int stress_set_dccp_domain(const char *name);
extern int stress_set_dccp_opts(const char *opt);
extern void stress_set_dccp_port(const char *opt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-sem-sysv.c new/stress-ng-0.08.06/stress-sem-sysv.c
--- old/stress-ng-0.08.05/stress-sem-sysv.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-sem-sysv.c 2017-06-21 18:34:24.000000000 +0200
@@ -24,10 +24,7 @@
*/
#include "stress-ng.h"
-#if defined(__linux__)
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
+#if defined(HAVE_SEM_SYSV)
typedef union _semun {
int val; /* Value for SETVAL */
struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
@@ -46,7 +43,7 @@
set_setting("sem-sysv-procs", TYPE_ID_UINT64, &semaphore_sysv_procs);
}
-#if defined(__linux__)
+#if defined(HAVE_SEM_SYSV)
/*
* stress_semaphore_sysv_init()
@@ -129,7 +126,11 @@
semsignal.sem_op = 1;
semsignal.sem_flg = SEM_UNDO;
+#if defined(__linux__)
if (semtimedop(sem_id, &semwait, 1, &timeout) < 0) {
+#else
+ if (semop(sem_id, &semwait, 1) < 0) {
+#endif
if (errno == EAGAIN) {
pr_inf("Semaphore timed out: errno=%d (%s)\n",
errno, strerror(errno));
@@ -169,7 +170,7 @@
pr_fail_dbg("semctl SEM_STAT");
}
#endif
-#if defined(IPC_INFO)
+#if defined(IPC_INFO) && defined(__linux__)
{
struct seminfo si;
semun_t s;
@@ -179,7 +180,7 @@
pr_fail_dbg("semctl IPC_INFO");
}
#endif
-#if defined(SEM_INFO)
+#if defined(SEM_INFO) && defined(__linux__)
{
struct seminfo si;
semun_t s;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-shm-sysv.c new/stress-ng-0.08.06/stress-shm-sysv.c
--- old/stress-ng-0.08.05/stress-shm-sysv.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-shm-sysv.c 2017-06-21 18:34:24.000000000 +0200
@@ -24,6 +24,8 @@
*/
#include "stress-ng.h"
+#if defined(HAVE_SHM_SYSV)
+
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -62,6 +64,7 @@
*/
0
};
+#endif
void stress_set_shm_sysv_bytes(const char *opt)
{
@@ -83,6 +86,7 @@
set_setting("shm-sysv-segs", TYPE_ID_SIZE_T, &shm_sysv_segments);
}
+#if defined(HAVE_SHM_SYSV)
/*
* stress_shm_sysv_check()
* simple check if shared memory is sane
@@ -472,3 +476,10 @@
}
return rc;
}
+
+#else
+int stress_shm_sysv(const args_t *args)
+{
+ return stress_not_implemented(args);
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-sigsegv.c new/stress-ng-0.08.06/stress-sigsegv.c
--- old/stress-ng-0.08.05/stress-sigsegv.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-sigsegv.c 2017-06-21 18:34:24.000000000 +0200
@@ -45,7 +45,7 @@
int stress_sigsegv(const args_t *args)
{
uint8_t *ptr;
- int rc = EXIT_FAILURE;
+ NOCLOBBER int rc = EXIT_FAILURE;
/* Allocate read only page */
ptr = mmap(NULL, args->page_size, PROT_READ,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-socket-fd.c new/stress-ng-0.08.06/stress-socket-fd.c
--- old/stress-ng-0.08.05/stress-socket-fd.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-socket-fd.c 2017-06-21 18:34:24.000000000 +0200
@@ -54,7 +54,7 @@
* stress_socket_fd_send()
* send a fd (fd_send) over a socket fd
*/
-static inline int stress_socket_fd_send(const int fd, const int fd_send)
+static inline int stress_socket_fd_sendmsg(const int fd, const int fd_send)
{
struct iovec iov;
struct msghdr msg;
@@ -250,12 +250,23 @@
size_t i;
for (i = 0; i < max_fd; i++) {
- int newfd = open("/dev/null", O_RDWR);
+ int newfd;
- if (stress_socket_fd_send(sfd, newfd) < 0)
- break;
- if (newfd >= 0)
+ newfd = open("/dev/null", O_RDWR);
+ if (newfd >= 0) {
+ int ret;
+
+ ret = stress_socket_fd_sendmsg(sfd, newfd);
+ if ((ret < 0) &&
+ ((errno != EAGAIN) && (errno != EINTR) &&
+ (errno != EWOULDBLOCK) && (errno != ECONNRESET) &&
+ (errno != ENOMEM) && (errno != EPIPE))) {
+ pr_fail_dbg("sendmsg");
+ (void)close(newfd);
+ break;
+ }
(void)close(newfd);
+ }
}
(void)close(sfd);
}
@@ -271,7 +282,7 @@
}
if (pid) {
- (void)kill(pid, SIGKILL);
+ (void)kill(pid, SIGALRM);
(void)waitpid(pid, &status, 0);
}
pr_dbg("%s: %" PRIu64 " messages sent\n", args->name, msgs);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/stress-vforkmany.c new/stress-ng-0.08.06/stress-vforkmany.c
--- old/stress-ng-0.08.05/stress-vforkmany.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/stress-vforkmany.c 2017-06-21 18:34:24.000000000 +0200
@@ -25,6 +25,7 @@
#include "stress-ng.h"
#define STACK_SIZE (16384)
+#define WASTE_SIZE (64 * MB)
/*
* stress_vforkmany()
@@ -70,8 +71,35 @@
munmap((void *)terminate, args->page_size);
return EXIT_FAILURE;
} else if (chpid == 0) {
+ static uint8_t *waste;
+ static size_t waste_size = WASTE_SIZE;
+
(void)setpgid(0, g_pgrp);
+ /*
+ * We want the children to be OOM'd if we
+ * eat up too much memory
+ */
+ set_oom_adjustment(args->name, true);
+ stress_parent_died_alarm();
+
+ /*
+ * Allocate some wasted space so this child
+ * scores more on the OOMable score than the
+ * parent waiter so in theory it should be
+ * OOM'd before the parent.
+ */
+ do {
+ waste = mmap(NULL, waste_size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (waste != MAP_FAILED)
+ break;
+
+ waste_size >>= 1;
+ } while (waste_size > 4096);
+
+ if (waste != MAP_FAILED)
+ (void)memset(waste, 0, WASTE_SIZE);
do {
/*
* Force pid to be a register, if it's
@@ -82,6 +110,7 @@
*/
register pid_t pid;
register bool first = (instance == 0);
+
vfork_again:
/*
* SIGALRM is not inherited over vfork so
@@ -104,6 +133,13 @@
if (!first)
_exit(0);
} else if (pid == 0) {
+ if (waste != MAP_FAILED) {
+ register size_t i;
+
+ for (i = 0; i < WASTE_SIZE; i += 4096)
+ waste[i] = 0;
+ }
+
/* child, parent is blocked, spawn new child */
if (!args->max_ops || *args->counter < args->max_ops)
goto vfork_again;
@@ -114,6 +150,10 @@
if (!first)
_exit(0);
} while (keep_stressing());
+
+ if (waste != MAP_FAILED)
+ munmap(waste, WASTE_SIZE);
+ _exit(0);
} else {
/*
* Parent sleeps until timeout/SIGALRM and then
@@ -123,6 +163,10 @@
*/
int chstatus;
+ (void)setpgid(chpid, g_pgrp);
+ g_opt_flags &= ~OPT_FLAGS_OOMABLE;
+ set_oom_adjustment(args->name, false);
+
sleep(g_opt_timeout);
*terminate = true;
kill(chpid, SIGALRM);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/test-affinity.c new/stress-ng-0.08.06/test-affinity.c
--- old/stress-ng-0.08.05/test-affinity.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/test-affinity.c 2017-06-21 18:34:24.000000000 +0200
@@ -25,6 +25,10 @@
#define _GNU_SOURCE
#include <sched.h>
+#if defined(__gnu_hurd__)
+#error sched_getaffinity and sched_setaffinity are not implemented
+#endif
+
int main(void)
{
cpu_set_t mask;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/test-mq-posix.c new/stress-ng-0.08.06/test-mq-posix.c
--- old/stress-ng-0.08.05/test-mq-posix.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.08.06/test-mq-posix.c 2017-06-21 18:34:24.000000000 +0200
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2013-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <mqueue.h>
+
+
+typedef struct {
+ unsigned int value;
+} msg_t;
+
+static void notify_func(union sigval s)
+{
+ (void)s;
+}
+
+int main(int argc, char **argv)
+{
+ mqd_t mq;
+ msg_t msg;
+ struct mq_attr attr;
+ int ret;
+ struct timespec abs_timeout;
+ struct sigevent sigev;
+ char mq_name[64];
+
+ attr.mq_flags = 0;
+ attr.mq_maxmsg = 32;
+ attr.mq_msgsize = sizeof(msg_t);
+ attr.mq_curmsgs = 0;
+
+ snprintf(mq_name, sizeof(mq_name), "/%s-%i",
+ argv[0], getpid());
+ /*
+ * This is not meant to be functionally
+ * correct, it is just used to check we
+ * can build minimal POSIX message queue
+ * based code
+ */
+ mq = mq_open(mq_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+ if (mq < 0)
+ return -1;
+
+ (void)memset(&sigev, 0, sizeof sigev);
+ sigev.sigev_notify = SIGEV_THREAD;
+ sigev.sigev_notify_function = notify_func;
+ sigev.sigev_notify_attributes = NULL;
+
+ ret = mq_notify(mq, &sigev);
+ (void)ret;
+ memset((void *)&abs_timeout, 0, sizeof(abs_timeout));
+ ret = mq_timedreceive(mq, (char *)&msg, sizeof(msg), NULL, &abs_timeout);
+ (void)ret;
+ ret = mq_receive(mq, (char *)&msg, sizeof(msg), NULL);
+ (void)ret;
+ ret = mq_getattr(mq, &attr);
+ (void)ret;
+ ret = mq_timedsend(mq, (char *)&msg, sizeof(msg), 1, &abs_timeout);
+ (void)ret;
+ ret = mq_send(mq, (char *)&msg, sizeof(msg), 1);
+ (void)ret;
+ ret = mq_close(mq);
+ (void)ret;
+ ret = mq_unlink(mq_name);
+ (void)ret;
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/test-mq-sysv.c new/stress-ng-0.08.06/test-mq-sysv.c
--- old/stress-ng-0.08.05/test-mq-sysv.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.08.06/test-mq-sysv.c 2017-06-21 18:34:24.000000000 +0200
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2013-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#define _GNU_SOURCE
+
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#if defined(__gnu_hurd__)
+#error msgsnd, msgrcv, msgget, msgctl are not implemented
+#endif
+
+#define MAX_SIZE (8)
+
+typedef struct {
+ long mtype;
+ char msg[MAX_SIZE];
+} msg_t;
+
+int main(int argc, char **argv)
+{
+ int msgq_id;
+ msg_t msg;
+ int ret;
+ struct msqid_ds buf;
+#if defined(__linux__)
+ struct msginfo info;
+#endif
+
+ /*
+ * This is not meant to be functionally
+ * correct, it is just used to check we
+ * can build minimal POSIX message queue
+ * based code
+ */
+ msgq_id = msgget(IPC_PRIVATE, S_IRUSR | S_IWUSR | IPC_CREAT | IPC_EXCL);
+ if (msgq_id < 0)
+ return -1;
+
+ strncpy(msg.msg, "TESTMSG", sizeof(msg.msg));
+ msg.mtype = 1;
+ ret = msgsnd(msgq_id, &msg, sizeof(msg.msg), 0);
+ (void)msg;
+ ret = msgrcv(msgq_id, &msg, sizeof(msg.msg), 0, 0);
+ (void)ret;
+ ret = msgctl(msgq_id, IPC_STAT, &buf);
+ (void)ret;
+ ret = msgctl(msgq_id, IPC_RMID, NULL);
+ (void)ret;
+#if defined(__linux__)
+ ret = msgctl(msgq_id, IPC_INFO, (struct msqid_ds *)&info);
+ (void)ret;
+ ret = msgctl(msgq_id, MSG_INFO, (struct msqid_ds *)&info);
+ (void)ret;
+#endif
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/test-sem-posix.c new/stress-ng-0.08.06/test-sem-posix.c
--- old/stress-ng-0.08.05/test-sem-posix.c 2017-06-16 12:43:44.000000000 +0200
+++ new/stress-ng-0.08.06/test-sem-posix.c 2017-06-21 18:34:24.000000000 +0200
@@ -23,6 +23,7 @@
*
*/
+#include <time.h>
#include <semaphore.h>
#if defined(__FreeBSD_kernel__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/test-sem-sysv.c new/stress-ng-0.08.06/test-sem-sysv.c
--- old/stress-ng-0.08.05/test-sem-sysv.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.08.06/test-sem-sysv.c 2017-06-21 18:34:24.000000000 +0200
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2013-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#define _GNU_SOURCE
+
+#include <time.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#if defined(__gnu_hurd__)
+#error semop, semget and semctl are not implemented
+#endif
+
+typedef union _semun {
+ int val; /* Value for SETVAL */
+ struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
+ unsigned short *array; /* Array for GETALL, SETALL */
+ struct seminfo *__buf; /* Buffer for IPC_INFO (Linux-specific) */
+} semun_t;
+
+int main(void)
+{
+ key_t key;
+ int sem;
+ semun_t arg;
+ int ret;
+ struct sembuf semwait, semsignal;
+ struct timespec timeout;
+
+ /*
+ * This is not meant to be functionally
+ * correct, it is just used to check we
+ * can build minimal POSIX semaphore
+ * based code
+ */
+ key = (key_t)getpid();
+ sem = semget(key, 1, IPC_CREAT | S_IRUSR | S_IWUSR);
+ arg.val = 1;
+ ret = semctl(sem, 0, SETVAL, arg);
+ (void)ret;
+ semwait.sem_num = 0;
+ semwait.sem_op = -1;
+ semwait.sem_flg = SEM_UNDO;
+ (void)clock_gettime(CLOCK_REALTIME, &timeout);
+ timeout.tv_sec++;
+#if defined(__linux__)
+ ret = semtimedop(sem, &semwait, 1, &timeout);
+ (void)ret;
+#endif
+
+ semsignal.sem_num = 0;
+ semsignal.sem_op = 1;
+ semsignal.sem_flg = SEM_UNDO;
+
+ ret = semop(sem, &semsignal, 1);
+ (void)ret;
+
+#if defined(IPC_STAT)
+ {
+ struct semid_ds ds;
+ semun_t s;
+
+ s.buf = &ds;
+ ret = semctl(sem, 0, IPC_STAT, &s);
+ (void)ret;
+ }
+#endif
+#if defined(SEM_STAT)
+ {
+ struct semid_ds ds;
+ semun_t s;
+
+ s.buf = &ds;
+ ret = semctl(sem, 0, SEM_STAT, &s);
+ (void)ret;
+ }
+#endif
+#if defined(IPC_INFO) && defined(__linux__)
+ {
+ struct seminfo si;
+ semun_t s;
+
+ s.__buf = &si;
+ ret = semctl(sem, 0, IPC_INFO, &s);
+ (void)ret;
+ }
+#endif
+#if defined(SEM_INFO) && defined(__linux__)
+ {
+ struct seminfo si;
+ semun_t s;
+
+ s.__buf = &si;
+ ret = semctl(sem, 0, SEM_INFO, &s);
+ (void)ret;
+ }
+#endif
+#if defined(GETVAL)
+ ret = semctl(sem, 0, GETVAL);
+ (void)ret;
+#endif
+#if defined(GETPID)
+ ret = semctl(sem, 0, GETPID);
+ (void)ret;
+#endif
+#if defined(GETNCNT)
+ ret = semctl(sem, 0, GETNCNT);
+ (void)ret;
+#endif
+#if defined(GEZCNT)
+ ret = semctl(sem, 0, GETZCNT);
+ (void)ret;
+#endif
+ ret = semctl(sem, 0, IPC_RMID);
+ (void)ret;
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stress-ng-0.08.05/test-shm-sysv.c new/stress-ng-0.08.06/test-shm-sysv.c
--- old/stress-ng-0.08.05/test-shm-sysv.c 1970-01-01 01:00:00.000000000 +0100
+++ new/stress-ng-0.08.06/test-shm-sysv.c 2017-06-21 18:34:24.000000000 +0200
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2013-2017 Canonical, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * This code is a complete clean re-write of the stress tool by
+ * Colin Ian King <colin.king(a)canonical.com> and attempts to be
+ * backwardly compatible with the stress tool by Amos Waterland
+ * <apw(a)rossby.metr.ou.edu> but has more stress tests and more
+ * functionality.
+ *
+ */
+#define _GNU_SOURCE
+
+#include <unistd.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+int main(void)
+{
+ int shm_id, ret;
+ key_t key;
+ size_t sz = 64 * 1024;
+ char *addr;
+
+ /*
+ * This is not meant to be functionally
+ * correct, it is just used to check we
+ * can build minimal POSIX semaphore
+ * based code
+ */
+ key = (key_t)getpid();
+
+ shm_id = shmget(key, sz, IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
+ if (shm_id < 0)
+ return -1;
+ addr = shmat(shm_id, NULL, 0);
+ if (addr == (char *)-1)
+ goto reap;
+
+#if defined(IPC_STAT)
+ {
+ struct shmid_ds s;
+
+ ret = shmctl(shm_id, IPC_INFO, (struct shmid_ds *)&s);
+ (void)ret;
+ }
+#endif
+#if defined(__linux__) && defined(IPC_INFO)
+ {
+ struct shminfo s;
+
+ ret = shmctl(shm_id, IPC_INFO, (struct shmid_ds *)&s);
+ (void)ret;
+ }
+#endif
+#if defined(__linux__) && defined(SHM_INFO)
+ {
+ struct shm_info s;
+
+ ret = shmctl(shm_id, SHM_INFO, (struct shmid_ds *)&s);
+ (void)ret;
+ }
+#endif
+
+ shmdt(addr);
+reap:
+ ret = shmctl(shm_id, IPC_RMID, NULL);
+ (void)ret;
+ return 0;
+}
1
0
Hello community,
here is the log from the commit of package drbd-utils for openSUSE:Factory checked in at 2017-06-23 09:18:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd-utils (Old)
and /work/SRC/openSUSE:Factory/.drbd-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drbd-utils"
Fri Jun 23 09:18:19 2017 rev:14 rq:505631 version:9.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd-utils/drbd-utils.changes 2017-04-28 09:14:21.757119801 +0200
+++ /work/SRC/openSUSE:Factory/.drbd-utils.new/drbd-utils.changes 2017-06-23 09:18:46.818912430 +0200
@@ -1,0 +2,13 @@
+Wed Jun 7 08:13:07 UTC 2017 - nwang(a)suse.com
+
+- Update to v9.0.0
+ * drbd udev: fix inconsistent inheritance of implicit volumes
+ * Fix regressions of the out-of-the-box DRBD 8.4 experience
+ * DrbdMon: can now focus on "problem" resources
+ * v9: support new option on_no_quorum
+ * drbdadm: fix segfaults, improve error reporting
+ * adjust: fix deleting unrelated peer(s) on "adjust resource:specific-peer"
+ * drbdmeta create-md/convert: fix check for existing external meta-data
+- Merged into upstream, remove Pass-md_index-information-to-detect_md.patch
+
+-------------------------------------------------------------------
Old:
----
Pass-md_index-information-to-detect_md.patch
drbd-utils-8.9.11.tar.gz
New:
----
_service
drbd-utils-9.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ drbd-utils.spec ++++++
--- /var/tmp/diff_new_pack.QH1Xwb/_old 2017-06-23 09:18:47.350837268 +0200
+++ /var/tmp/diff_new_pack.QH1Xwb/_new 2017-06-23 09:18:47.350837268 +0200
@@ -1,7 +1,7 @@
#
# spec file for package drbd-utils
#
-# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,16 +16,14 @@
#
-%define real_version 8.9.11
-
Name: drbd-utils
-Version: 8.9.11rc2
+Version: 9.0.0
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: http://www.drbd.org/
-Source: http://www.drbd.org/download/drbd/utils/%{name}-%{real_version}.tar.gz
+Source: http://www.drbd.org/download/drbd/utils/%{name}-%{version}.tar.gz
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff
@@ -34,8 +32,6 @@
Patch4: fix-segfault-up-stacked-resource.patch
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
Patch5: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
-# Patch will be merged to upstream in 8.9.12 (bsc#1032074)
-Patch6: Pass-md_index-information-to-detect_md.patch
Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version}
@@ -61,7 +57,7 @@
BuildRequires: glibc-devel
BuildRequires: libxslt
BuildRequires: make
-BuildRequires: pkg-config
+BuildRequires: pkgconfig
BuildRequires: systemd
BuildRequires: udev
Provides: drbd-control
@@ -74,13 +70,12 @@
raid 1. It is a building block for setting up clusters.
%prep
-%setup -q -n %{name}-%{real_version}
+%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
-%patch6 -p1
%build
./autogen.sh
@@ -92,16 +87,16 @@
--with-xen \
--with-bashcompletion \
--with-initscripttype=systemd \
- --with-systemdunitdir=/usr/lib/systemd/system \
+ --with-systemdunitdir=%{_prefix}/lib/systemd/system \
--prefix=/ \
--sbindir=/sbin \
- --libdir=/usr/lib \
+ --libdir=%{_prefix}/lib \
--mandir=%{_mandir} \
--sysconfdir=%{_sysconfdir} \
- --datarootdir=/usr/share \
- --datadir=/usr/share \
- --libdir=/usr/lib \
- --exec_prefix=/usr/lib \
+ --datarootdir=%{_datadir} \
+ --datadir=%{_datadir} \
+ --libdir=%{_prefix}/lib \
+ --exec_prefix=%{_prefix}/lib \
--with-tmpfilesdir=%{_tmpfilesdir}
make OPTFLAGS="%{optflags}" %{?_smp_mflags}
@@ -152,10 +147,10 @@
%{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh
%{_udevrulesdir}/65-drbd.rules
%{_unitdir}/drbd.service
-/usr/lib/systemd/system/drbd.service
+%{_prefix}/lib/systemd/system/drbd.service
%defattr(-, root, root)
%{_localstatedir}/lib/drbd
-/usr/lib/drbd
+%{_prefix}/lib/drbd
/lib/drbd
/lib/drbd/drbd*
%dir %{_prefix}/lib/ocf
++++++ 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch ++++++
--- /var/tmp/diff_new_pack.QH1Xwb/_old 2017-06-23 09:18:47.382832747 +0200
+++ /var/tmp/diff_new_pack.QH1Xwb/_new 2017-06-23 09:18:47.386832182 +0200
@@ -1,26 +1,11 @@
-From f4a2325172bb011db033ee1d8d1fc747c22f254f Mon Sep 17 00:00:00 2001
-From: Kristoffer Gronlund <kgronlund(a)suse.com>
-Date: Tue, 4 Apr 2017 11:22:23 +0200
-Subject: [PATCH] Disable quorum in default configuration (bsc#1032142)
-
----
- scripts/global_common.conf | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/global_common.conf b/scripts/global_common.conf
-index dd36e92..545b600 100644
---- a/scripts/global_common.conf
-+++ b/scripts/global_common.conf
-@@ -32,7 +32,8 @@ common {
+diff -Naur drbd-utils-9.0.0+git.98b6340c.orig/scripts/global_common.conf drbd-utils-9.0.0+git.98b6340c/scripts/global_common.conf
+--- drbd-utils-9.0.0+git.98b6340c.orig/scripts/global_common.conf 2017-06-07 16:04:14.063680274 +0800
++++ drbd-utils-9.0.0+git.98b6340c/scripts/global_common.conf 2017-06-07 16:04:45.519644428 +0800
+@@ -42,6 +42,7 @@
- options {
- # cpu-mask on-no-data-accessible
-- quorum majority;
-+ # quorum majority;
+ # RECOMMENDED for three or more storage nodes with DRBD 9:
+ # quorum majority;
+ quorum off;
+ # on-no-quorum suspend-io | io-error;
}
- disk {
---
-2.12.0
-
++++++ _service ++++++
<services>
<service name="tar_scm" mode="disabled">
<param name="url">git://git.linbit.com/drbd-utils.git</param>
<param name="scm">git</param>
<param name="filename">drbd-utils</param>
<!--
build service using release drbd-utils atm.
<param name="version">9.0.0</param>
-->
<param name="versionformat">9.0.0+git.%h</param>
<param name="revision">master</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*drbd-utils*.tar</param>
<param name="compression">gz</param>
</service>
<service name="set_version" mode="disabled">
<param name="basename">drbd-utils</param>
</service>
</services>
++++++ drbd-utils-8.9.11.tar.gz -> drbd-utils-9.0.0.tar.gz ++++++
++++ 2285 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package drbd for openSUSE:Factory checked in at 2017-06-23 09:18:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd (Old)
and /work/SRC/openSUSE:Factory/.drbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drbd"
Fri Jun 23 09:18:17 2017 rev:59 rq:505630 version:9.0.8+git.c8bc3670
Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd/drbd.changes 2017-05-29 22:19:25.189937271 +0200
+++ /work/SRC/openSUSE:Factory/.drbd.new/drbd.changes 2017-06-23 09:18:45.627080839 +0200
@@ -1,0 +2,15 @@
+Wed Jun 14 03:21:59 UTC 2017 - nwang(a)suse.com
+
+- bsc#1045473, update to 9.0.8
+ fix a race condition between adding connections and receiving data
+ fix a OOPS on a diskfull node when a request from a diskless node
+ fix a distributed deadlock when doing a discard/write-same burst
+ fix an issue with diskless nodes adopting wrong current UUIDs
+ fix wrongly rejected two-phase-state transactions
+ fix initial resync, triggered by "--force primary"(regression 9.0.7)
+ Speed-up AL-updates with bio flags REQ_META and REQ_PRIO
+ Merged changes from 8.4.10 and with that compatibility with Linux-4.12
+- Remove patch fix-initial-sync-stop.patch
+- Fix the license to GPL-2.0+
+
+-------------------------------------------------------------------
Old:
----
drbd-9.0.7rc2+git.36abd387.tar.bz2
fix-initial-sync-stop.patch
New:
----
drbd-9.0.8+git.c8bc3670.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ drbd.spec ++++++
--- /var/tmp/diff_new_pack.Y5oLyz/_old 2017-06-23 09:18:46.238994374 +0200
+++ /var/tmp/diff_new_pack.Y5oLyz/_new 2017-06-23 09:18:46.238994374 +0200
@@ -1,7 +1,7 @@
#
# spec file for package drbd
#
-# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,10 +25,10 @@
%endif
Name: drbd
-Version: 9.0.7rc2+git.36abd387
+Version: 9.0.8+git.c8bc3670
Release: 0
Summary: DRBD driver for Linux
-License: GPL-2.0
+License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: http://drbd.linbit.com/
Source: %{name}-%{version}.tar.bz2
@@ -37,12 +37,11 @@
Source2: Module.supported
Source3: drbd_git_revision
Patch1: fix-resync-finished-with-syncs-have-bits-set.patch
-Patch2: fix-initial-sync-stop.patch
BuildRequires: kernel-source
BuildRequires: kernel-syms
BuildRequires: module-init-tools
-Requires: drbd-utils >= 8.9.11
-Supplements: drbd-utils >= 8.9.11
+Requires: drbd-utils >= 9.0.0
+Supplements: drbd-utils >= 9.0.0
Obsoletes: drbd-kmp < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: i586 s390
@@ -70,7 +69,6 @@
%prep
%setup -q -n drbd-%{version}
%patch1 -p1
-%patch2 -p1
mkdir source
cp -a drbd/. source/. || :
@@ -100,7 +98,7 @@
done
mkdir -p %{buildroot}/%{_sbindir}
-%{__ln_s} -f %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
+ln -s -f %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
rm -f drbd.conf
%clean
++++++ _service ++++++
--- /var/tmp/diff_new_pack.Y5oLyz/_old 2017-06-23 09:18:46.286987593 +0200
+++ /var/tmp/diff_new_pack.Y5oLyz/_new 2017-06-23 09:18:46.286987593 +0200
@@ -7,10 +7,10 @@
To update to a new release, change "revision" to the desired
git commit hash and bump "version" if necessary
- <param name="version">9.0.7rc2</param>
+ <param name="version">9.0.8</param>
-->
- <param name="versionformat">9.0.7rc2+git.%h</param>
- <param name="revision">36abd387b6e4341a58117711b2e95777c1dad8ab</param>
+ <param name="versionformat">9.0.8+git.%h</param>
+ <param name="revision">c8bc36701c7c7ffc2c208f620c6d89e4ec265704</param>
</service>
<service name="recompress" mode="disabled">
++++++ drbd-9.0.7rc2+git.36abd387.tar.bz2 -> drbd-9.0.8+git.c8bc3670.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/ChangeLog new/drbd-9.0.8+git.c8bc3670/ChangeLog
--- old/drbd-9.0.7rc2+git.36abd387/ChangeLog 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/ChangeLog 2017-06-19 15:49:34.000000000 +0200
@@ -2,6 +2,38 @@
------
For even more detail, use "git log" or visit http://git.drbd.org/.
+9.0.8-1 (api:genl2/proto:86-112/transport:14)
+--------
+ * fix a race condition between adding connections and receiving data
+ blocks; When you hit it caused an OOPS
+ * fix a OOPS on a diskfull node when a request from a diskless
+ node causes an error from the back-end device. (This is a regression that
+ was introduced with the 9.0.7 release)
+ * fix a distributed deadlock when doing a discard/write-same burst
+ * fix an issue with diskless nodes adopting wrong current UUIDs
+ * fix wrongly rejected two-phase-state transactions; this issue was a
+ cause for drbdmanage init failing for 3 nodes
+ * fix attach of first disk after resource had no disk at all
+ * fix to not clear bitmap content and UUIDs in case we ignored a
+ split-brain situation
+ * fix a possible OOPS, caused when the sender thread tries to send
+ something after the sockets where free()'ed
+ * fix ignoring split-brain situations to the rare cases it was
+ intended to in the first place
+ * fix an issue with current-uuid not getting written for 5 seconds. When a
+ resources was down'd/up'd or the node rebooted, you got split brain
+ afterwards
+ * fix a race that caused DRBD to go StandAlone instead of Connecting
+ after loosing a connection
+ * Serialize reconciliation resync after the nodes found it if they
+ are UpToDate
+ * fix initial resync, triggered by "--force primary"; this is a fix
+ for a regression introduced in 9.0.7
+ * new configuration option that allows to report back IO errors instead
+ of freezing IO in case a partition looses quorum
+ * Speed-up AL-updates with bio flags REQ_META and REQ_PRIO
+ * merged changes from 8.4.10 and with that compatibility with Linux-4.12
+
9.0.7-1 (api:genl2/proto:86-112/transport:14)
--------
* various fixes to the 2-phase-commit online resize
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/Makefile new/drbd-9.0.8+git.c8bc3670/Makefile
--- old/drbd-9.0.7rc2+git.36abd387/Makefile 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/Makefile 2017-06-19 15:49:34.000000000 +0200
@@ -246,7 +246,7 @@
ifdef DEBBUILD
.PHONY: km-deb
-km-deb: distclean drbd/.drbd_git_revision
+km-deb: check-submods distclean drbd/.drbd_git_revision
$(DEBBUILD) -i -us -uc -b
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/debian/changelog new/drbd-9.0.8+git.c8bc3670/debian/changelog
--- old/drbd-9.0.7rc2+git.36abd387/debian/changelog 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/debian/changelog 2017-06-19 15:49:34.000000000 +0200
@@ -1,3 +1,9 @@
+drbd (9.0.8-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Philipp Reisner <phil(a)linbit.com> Mon, 19 Jun 2017 15:27:42 +0800
+
drbd (9.0.7-1) unstable; urgency=low
* New upstream release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/debian/control new/drbd-9.0.8+git.c8bc3670/debian/control
--- old/drbd-9.0.7rc2+git.36abd387/debian/control 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/debian/control 2017-06-19 15:49:34.000000000 +0200
@@ -15,7 +15,7 @@
Section: admin
Depends: debhelper (>=7),
dkms (>= 1.9.5),
- drbd-utils (>= 8.9.11),
+ drbd-utils (>= 9.0.0),
${misc:Depends}
Conflicts: drbd-module-source,
drbd8-module-source
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/blkdev_issue_zeroout.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/blkdev_issue_zeroout.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/blkdev_issue_zeroout.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/blkdev_issue_zeroout.c 2017-06-19 15:49:34.000000000 +0200
@@ -28,15 +28,14 @@
* @sector: start sector
* @nr_sects: number of sectors to write
* @gfp_mask: memory allocation flags (for bio_alloc)
- * @discard: whether to discard the block range.
- * IGNORED in this compat implementation.
+ * @flags: controls detailed behavior (ignored)
*
* Description:
* Generate and issue number of bios with zerofiled pages.
*/
int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
- sector_t nr_sects, gfp_t gfp_mask, bool discard)
+ sector_t nr_sects, gfp_t gfp_mask, unsigned int flags)
{
int ret;
struct bio *bio;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/drbd_wrappers.h new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/drbd_wrappers.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/drbd_wrappers.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/drbd_wrappers.h 2017-06-19 15:49:34.000000000 +0200
@@ -906,20 +906,28 @@
} \
} while(0)
-#ifdef COMPAT_HAVE_POINTER_BACKING_DEV_INFO
+#ifdef BDI_CAP_STABLE_WRITES /* >= v3.9 */
+#define set_bdi_cap_stable_writes(cap) do { (cap) |= BDI_CAP_STABLE_WRITES; } while (0)
+#else /* < v3.9 */
+#define set_bdi_cap_stable_writes(cap) do { } while (0)
+#endif
+
+#ifdef COMPAT_HAVE_POINTER_BACKING_DEV_INFO /* >= v4.11 */
#define bdi_from_device(device) (device->ldev->backing_bdev->bd_disk->queue->backing_dev_info)
#define init_bdev_info(bdev_info, drbd_congested, device) do { \
(bdev_info)->congested_fn = drbd_congested; \
(bdev_info)->congested_data = device; \
+ set_bdi_cap_stable_writes(bdev_info->capabilities); \
} while(0)
#define adjust_ra_pages(q, b) _adjust_ra_pages((q)->backing_dev_info->ra_pages, (b)->backing_dev_info->ra_pages)
-#else
+#else /* < v4.11 */
#define bdi_rw_congested(BDI) bdi_rw_congested(&BDI)
#define bdi_congested(BDI, BDI_BITS) bdi_congested(&BDI, (BDI_BITS))
#define bdi_from_device(device) (&device->ldev->backing_bdev->bd_disk->queue->backing_dev_info)
#define init_bdev_info(bdev_info, drbd_congested, device) do { \
(bdev_info).congested_fn = drbd_congested; \
(bdev_info).congested_data = device; \
+ set_bdi_cap_stable_writes((bdev_info).capabilities); \
} while(0)
#define adjust_ra_pages(q, b) _adjust_ra_pages((q)->backing_dev_info.ra_pages, (b)->backing_dev_info.ra_pages)
#endif
@@ -1203,6 +1211,18 @@
#endif
/*
+ * v4.12 fceb6435e852 netlink: pass extended ACK struct to parsing functions
+ * and some preparation commits introduce a new "netlink extended ack" error
+ * reporting mechanism. For now, only work around that here. As trigger, use
+ * NETLINK_MAX_COOKIE_LEN introduced somewhere in the middle of that patchset.
+ */
+#ifndef NETLINK_MAX_COOKIE_LEN
+#include <net/netlink.h>
+#define nla_parse_nested(tb, maxtype, nla, policy, extack) \
+ nla_parse_nested(tb, maxtype, nla, policy)
+#endif
+
+/*
* genlmsg_reply() was added to <net/genetlink.h> in mainline commit 81878d27
* (v2.6.20-rc2).
*/
@@ -1339,18 +1359,6 @@
#endif
/*
- * kref_sub() was introduced in mainline commit ecf7ace9 (v2.6.38-rc1).
- */
-#ifndef COMPAT_HAVE_KREF_SUB
-static inline void kref_sub(struct kref *kref, unsigned int count,
- void (*release) (struct kref *kref))
-{
- while (count--)
- kref_put(kref, release);
-}
-#endif
-
-/*
* list_for_each_entry_continue_rcu() was introduced in mainline commit
* 254245d2 (v2.6.33-rc1).
*/
@@ -1455,13 +1463,22 @@
#ifndef BLKDEV_ISSUE_ZEROOUT_EXPORTED
/* Was introduced with 2.6.34 */
extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
- sector_t nr_sects, gfp_t gfp_mask, bool discard);
+ sector_t nr_sects, gfp_t gfp_mask, unsigned flags);
#else
/* synopsis changed a few times, though */
-#ifdef COMPAT_BLKDEV_ISSUE_ZEROOUT_BLKDEV_IFL_WAIT
-#define blkdev_issue_zeroout(BDEV, SS, NS, GFP, discard) \
+#if defined(BLKDEV_ZERO_NOUNMAP)
+/* >= v4.12 */
+/* use blkdev_issue_zeroout() as written out in the actual source code.
+ * right now, we only use it with flags = BLKDEV_ZERO_NOUNMAP */
+#elif defined(COMPAT_BLKDEV_ISSUE_ZEROOUT_BLKDEV_IFL_WAIT)
+/* cannot yet tell it to use (or not use) discard,
+ * but must tell it to be synchronous */
blkdev_issue_zeroout(BDEV, SS, NS, GFP, BLKDEV_IFL_WAIT)
-#elif !defined(COMPAT_BLKDEV_ISSUE_ZEROOUT_DISCARD)
+#elif defined(COMPAT_BLKDEV_ISSUE_ZEROOUT_DISCARD)
+/* no BLKDEV_ZERO_NOUNMAP as last parameter, but a bool discard instead */
+#define blkdev_issue_zeroout(BDEV, SS, NS, GFP, flags /* = NOUNMAP */) \
+ blkdev_issue_zeroout(BDEV, SS, NS, GFP, false /* bool discard */)
+#else /* !defined(COMPAT_BLKDEV_ISSUE_ZEROOUT_DISCARD) */
#define blkdev_issue_zeroout(BDEV, SS, NS, GFP, discard) \
blkdev_issue_zeroout(BDEV, SS, NS, GFP)
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/tests/have_ib_get_dma_mr.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/tests/have_ib_get_dma_mr.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/tests/have_ib_get_dma_mr.c 1970-01-01 01:00:00.000000000 +0100
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/tests/have_ib_get_dma_mr.c 2017-06-19 15:49:34.000000000 +0200
@@ -0,0 +1,11 @@
+#include <rdma/ib_verbs.h>
+
+struct ib_mr * foo(void)
+{
+ struct ib_pd *pd = NULL;
+ struct ib_mr *mr;
+
+ mr = ib_get_dma_mr(pd, 0);
+
+ return mr;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/tests/have_kref_sub.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/tests/have_kref_sub.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd-kernel-compat/tests/have_kref_sub.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd-kernel-compat/tests/have_kref_sub.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#include <linux/kref.h>
-
-void test(void)
-{
- struct kref kref = { };
-
- kref_sub(&kref, 2, NULL);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_actlog.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_actlog.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_actlog.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_actlog.c 2017-06-19 15:49:34.000000000 +0200
@@ -159,6 +159,12 @@
op_flags |= DRBD_REQ_FUA | DRBD_REQ_PREFLUSH;
op_flags |= DRBD_REQ_UNPLUG | DRBD_REQ_SYNC | REQ_NOIDLE;
+#ifdef REQ_PRIO
+ op_flags |= REQ_PRIO;
+#endif
+#ifdef REQ_META
+ op_flags |= REQ_META;
+#endif
#ifdef COMPAT_MAYBE_RETRY_HARDBARRIER
/* < 2.6.36, "barrier" semantic may fail with EOPNOTSUPP */
retry:
@@ -1144,6 +1150,9 @@
return 0;
}
+ if (peer_device->bitmap_index == -1) /* no bitmap... */
+ return 0;
+
if (!get_ldev(device))
return 0; /* no disk, no metadata, no bitmap to manipulate bits in */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_debugfs.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_debugfs.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_debugfs.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_debugfs.c 2017-06-19 15:49:34.000000000 +0200
@@ -1299,7 +1299,7 @@
seq_putc(seq, '=');
seq_putc(seq, '>');
for (i = 0; i < y; i++)
- seq_printf(seq, ".");
+ seq_putc(seq, '.');
seq_puts(seq, "] ");
if (repl_state == L_VERIFY_S || repl_state == L_VERIFY_T)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_int.h new/drbd-9.0.8+git.c8bc3670/drbd/drbd_int.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_int.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_int.h 2017-06-19 15:49:34.000000000 +0200
@@ -748,6 +748,7 @@
RECONNECT,
CONN_DISCARD_MY_DATA,
SEND_STATE_AFTER_AHEAD_C,
+ NOTIFY_PEERS_LOST_PRIMARY,
};
/* flag bits per resource */
@@ -1274,7 +1275,7 @@
* are deferred to this single-threaded work queue */
struct submit_worker submit;
u64 read_nodes; /* used for balancing read requests among peers */
- bool susp_quorum[2]; /* IO suspended quorum lost */
+ bool have_quorum[2]; /* no quorum -> suspend IO or error IO */
};
struct drbd_bm_aio_ctx {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_main.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_main.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_main.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_main.c 2017-06-19 15:49:34.000000000 +0200
@@ -759,19 +759,19 @@
#define drbd_calc_cpu_mask(A) ({})
#endif
-static bool drbd_all_neighbor_secondary(struct drbd_resource *resource, u64 *authoritative_ptr)
+static bool drbd_all_neighbor_secondary(struct drbd_device *device, u64 *authoritative_ptr)
{
- struct drbd_connection *connection;
+ struct drbd_peer_device *peer_device;
bool all_secondary = true;
u64 authoritative = 0;
int id;
rcu_read_lock();
- for_each_connection_rcu(connection, resource) {
- if (connection->cstate[NOW] >= C_CONNECTED &&
- connection->peer_role[NOW] == R_PRIMARY) {
+ for_each_peer_device_rcu(peer_device, device) {
+ if (peer_device->repl_state[NOW] >= L_ESTABLISHED &&
+ peer_device->connection->peer_role[NOW] == R_PRIMARY) {
all_secondary = false;
- id = connection->peer_node_id;
+ id = peer_device->node_id;
authoritative |= NODE_MASK(id);
}
}
@@ -796,7 +796,7 @@
if (resource->role[NOW] == R_PRIMARY)
return true;
- if (!drbd_all_neighbor_secondary(resource, authoritative_ptr))
+ if (!drbd_all_neighbor_secondary(device, authoritative_ptr))
return false;
rcu_read_lock();
@@ -3677,6 +3677,8 @@
}
add_disk(disk);
+ device->have_quorum[OLD] = true;
+ device->have_quorum[NEW] = true;
for_each_peer_device(peer_device, device) {
connection = peer_device->connection;
@@ -3760,17 +3762,21 @@
void drbd_put_device(struct drbd_device *device)
{
struct drbd_peer_device *peer_device;
- int refs = 3;
+ int i;
destroy_workqueue(device->submit.wq);
device->submit.wq = NULL;
del_timer_sync(&device->request_timer);
- for_each_peer_device(peer_device, device)
- refs++;
+ for_each_peer_device(peer_device, device) {
+ kref_debug_put(&device->kref_debug, 1);
+ kref_put(&device->kref, drbd_destroy_device);
+ }
- kref_debug_sub(&device->kref_debug, refs, 1);
- kref_sub(&device->kref, refs, drbd_destroy_device);
+ for (i = 0; i < 3; i++) {
+ kref_debug_put(&device->kref_debug, 1);
+ kref_put(&device->kref, drbd_destroy_device);
+ }
}
/**
@@ -3812,11 +3818,9 @@
void drbd_put_connection(struct drbd_connection *connection)
{
struct drbd_peer_device *peer_device;
- int vnr, rr, refs = 1;
+ int vnr, rr;
del_connect_timer(connection);
- idr_for_each_entry(&connection->peer_devices, peer_device, vnr)
- refs++;
rr = drbd_free_peer_reqs(connection->resource, &connection->done_ee, false);
if (rr)
@@ -3828,9 +3832,12 @@
drbd_transport_shutdown(connection, DESTROY_TRANSPORT);
- kref_debug_sub(&connection->kref_debug, refs - 1, 3);
+ idr_for_each_entry(&connection->peer_devices, peer_device, vnr) {
+ kref_debug_put(&connection->kref_debug, 3);
+ kref_put(&connection->kref, drbd_destroy_connection);
+ }
kref_debug_put(&connection->kref_debug, 10);
- kref_sub(&connection->kref, refs, drbd_destroy_connection);
+ kref_put(&connection->kref, drbd_destroy_connection);
}
static int __init drbd_init(void)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_nl.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_nl.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_nl.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_nl.c 2017-06-19 15:49:34.000000000 +0200
@@ -3385,6 +3385,33 @@
goto unlock_fail_free_connection;
}
+ /* Set bitmap_index if it was allocated previously */
+ idr_for_each_entry(&connection->peer_devices, peer_device, i) {
+ unsigned int bitmap_index;
+
+ device = peer_device->device;
+ if (!get_ldev(device))
+ continue;
+
+ bitmap_index = device->ldev->md.peers[adm_ctx->peer_node_id].bitmap_index;
+ if (bitmap_index != -1)
+ peer_device->bitmap_index = bitmap_index;
+ put_ldev(device);
+ }
+
+ idr_for_each_entry(&connection->peer_devices, peer_device, i) {
+ if (get_ldev_if_state(peer_device->device, D_NEGOTIATING)) {
+ err = drbd_attach_peer_device(peer_device);
+ put_ldev(peer_device->device);
+ if (err) {
+ retcode = ERR_NOMEM;
+ goto unlock_fail_free_connection;
+ }
+ }
+ peer_device->send_cnt = 0;
+ peer_device->recv_cnt = 0;
+ }
+
idr_for_each_entry(&connection->peer_devices, peer_device, i) {
struct drbd_device *device = peer_device->device;
@@ -3422,20 +3449,6 @@
if (connection->peer_node_id > adm_ctx->resource->max_node_id)
adm_ctx->resource->max_node_id = connection->peer_node_id;
- /* Set bitmap_index if it was allocated previously */
- idr_for_each_entry(&connection->peer_devices, peer_device, i) {
- unsigned int bitmap_index;
-
- device = peer_device->device;
- if (!get_ldev(device))
- continue;
-
- bitmap_index = device->ldev->md.peers[adm_ctx->peer_node_id].bitmap_index;
- if (bitmap_index != -1)
- peer_device->bitmap_index = bitmap_index;
- put_ldev(device);
- }
-
connection_to_info(&connection_info, connection);
flags = (peer_devices--) ? NOTIFY_CONTINUES : 0;
mutex_lock(¬ification_mutex);
@@ -3449,18 +3462,6 @@
}
mutex_unlock(¬ification_mutex);
- idr_for_each_entry(&connection->peer_devices, peer_device, i) {
- if (get_ldev_if_state(peer_device->device, D_NEGOTIATING)) {
- err = drbd_attach_peer_device(peer_device);
- put_ldev(peer_device->device);
- if (err) {
- retcode = ERR_NOMEM;
- goto unlock_fail_free_connection;
- }
- }
- peer_device->send_cnt = 0;
- peer_device->recv_cnt = 0;
- }
mutex_unlock(&adm_ctx->resource->conf_update);
drbd_debugfs_connection_add(connection); /* after ->net_conf was assigned */
@@ -4506,7 +4507,10 @@
__change_io_susp_no_data(resource, false);
for_each_connection(connection, resource)
__change_io_susp_fencing(connection, false);
- __change_io_susp_quorum(device, false);
+
+ if (resource->res_opts.on_no_quorum == ONQ_SUSPEND_IO)
+ __change_have_quorum(device, true);
+
/* TODO: Throw away queued IO requests... */
retcode = end_state_change(resource, &irq_flags);
if (retcode == SS_SUCCESS) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_nla.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_nla.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_nla.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_nla.c 2017-06-19 15:49:34.000000000 +0200
@@ -35,7 +35,7 @@
err = drbd_nla_check_mandatory(maxtype, nla);
if (!err)
- err = nla_parse_nested(tb, maxtype, nla, policy);
+ err = nla_parse_nested(tb, maxtype, nla, policy, NULL);
return err;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_receiver.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_receiver.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_receiver.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_receiver.c 2017-06-19 15:49:34.000000000 +0200
@@ -1287,7 +1287,7 @@
tmp = start + granularity - sector_div(tmp, granularity);
nr = tmp - start;
- err |= blkdev_issue_zeroout(bdev, start, nr, GFP_NOIO, 0);
+ err |= blkdev_issue_zeroout(bdev, start, nr, GFP_NOIO, BLKDEV_ZERO_NOUNMAP);
nr_sectors -= nr;
start = tmp;
}
@@ -1299,7 +1299,7 @@
}
zero_out:
if (nr_sectors) {
- err |= blkdev_issue_zeroout(bdev, start, nr_sectors, GFP_NOIO, 0);
+ err |= blkdev_issue_zeroout(bdev, start, nr_sectors, GFP_NOIO, BLKDEV_ZERO_NOUNMAP);
}
return err != 0;
}
@@ -3740,8 +3740,11 @@
} else if (hg < 0) { /* become sync target */
rv = L_WF_BITMAP_T;
} else {
+ u64 peer_current_uuid = peer_device->current_uuid & ~UUID_PRIMARY;
+ u64 my_current_uuid = drbd_current_uuid(device) & ~UUID_PRIMARY;
+
rv = L_ESTABLISHED;
- if (drbd_bitmap_uuid(peer_device)) {
+ if (drbd_bitmap_uuid(peer_device) && peer_current_uuid == my_current_uuid) {
drbd_info(peer_device, "clearing bitmap UUID and bitmap content (%lu bits)\n",
drbd_bm_total_weight(peer_device));
drbd_uuid_set_bitmap(peer_device, 0);
@@ -8559,7 +8562,7 @@
drbd_uncork(connection, CONTROL_STREAM);
if (err)
- change_cstate(connection, C_DISCONNECTING, CS_HARD);
+ change_cstate(connection, C_NETWORK_FAILURE, CS_HARD);
}
void drbd_send_peer_ack_wf(struct work_struct *ws)
@@ -8568,7 +8571,7 @@
container_of(ws, struct drbd_connection, peer_ack_work);
if (process_peer_ack_list(connection))
- change_cstate(connection, C_DISCONNECTING, CS_HARD);
+ change_cstate(connection, C_NETWORK_FAILURE, CS_HARD);
}
EXPORT_SYMBOL(drbd_alloc_pages); /* for transports */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_req.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_req.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_req.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_req.c 2017-06-19 15:49:34.000000000 +0200
@@ -179,22 +179,10 @@
struct drbd_request *destroy_next;
struct drbd_device *device;
struct drbd_peer_device *peer_device;
- unsigned int s, device_refs = 0;
+ unsigned int s;
bool was_last_ref = false;
tail_recursion:
- if (device_refs > 0 && device != req->device) {
- /* We accumulate device refs to put, it is very likely that we
- * destroy a number of requests for the same volume in a row.
- * But if the tail-recursed request happens to be for a
- * different volume, we need to put the accumulated device refs
- * now, while we still know the corresponding device,
- * and start accumulating for the other device.
- */
- kref_debug_sub(&device->kref_debug, device_refs, 6);
- kref_sub(&device->kref, device_refs, drbd_destroy_device);
- device_refs = 0;
- }
device = req->device;
s = req->rq_state[0];
destroy_next = req->destroy_next;
@@ -210,7 +198,7 @@
drbd_err(device,
"drbd_req_destroy: Logic BUG rq_state: (0:%x, %d:%x), completion_ref = %d\n",
s, 1 + peer_device->node_id, ns, atomic_read(&req->completion_ref));
- goto out;
+ return;
}
/* more paranoia */
@@ -218,7 +206,7 @@
atomic_read(&req->completion_ref) || (s & RQ_LOCAL_PENDING)) {
drbd_err(device, "drbd_req_destroy: Logic BUG rq_state: %x, completion_ref = %d\n",
s, atomic_read(&req->completion_ref));
- goto out;
+ return;
}
list_del_init(&req->tl_requests);
@@ -293,7 +281,6 @@
}
}
- device_refs++; /* In both branches of the if the reference to device gets released */
if (s & RQ_WRITE && req->i.size) {
struct drbd_resource *resource = device->resource;
struct drbd_request *peer_ack_req = resource->peer_ack_req;
@@ -317,6 +304,10 @@
} else
mempool_free(req, drbd_request_mempool);
+ /* In both branches of the if above, the reference to device gets released */
+ kref_debug_put(&device->kref_debug, 6);
+ kref_put(&device->kref, drbd_destroy_device);
+
/*
* Do the equivalent of:
* kref_put(&req->kref, drbd_req_destroy)
@@ -327,10 +318,6 @@
if (refcount_dec_and_test(&req->kref.refcount))
goto tail_recursion;
}
-
-out:
- kref_debug_sub(&device->kref_debug, device_refs, 6);
- kref_sub(&device->kref, device_refs, drbd_destroy_device);
}
static void wake_all_senders(struct drbd_resource *resource) {
@@ -494,23 +481,31 @@
}
/* still holds resource->req_lock */
-static int drbd_req_put_completion_ref(struct drbd_request *req, struct bio_and_error *m, int put)
+static void drbd_req_put_completion_ref(struct drbd_request *req, struct bio_and_error *m, int put)
{
D_ASSERT(req->device, m || (req->rq_state[0] & RQ_POSTPONED));
+ if (!put)
+ return;
+
if (!atomic_sub_and_test(put, &req->completion_ref))
- return 0;
+ return;
drbd_req_complete(req, m);
+ /* local completion may still come in later,
+ * we need to keep the req object around. */
+ if (req->rq_state[0] & RQ_LOCAL_ABORTED)
+ return;
+
if (req->rq_state[0] & RQ_POSTPONED) {
/* don't destroy the req object just yet,
* but queue it for retry */
drbd_restart_request(req);
- return 0;
+ return;
}
- return 1;
+ kref_put(&req->kref, drbd_req_destroy);
}
static void set_if_null_req_next(struct drbd_peer_device *peer_device, struct drbd_request *req)
@@ -602,7 +597,6 @@
unsigned set_local = set & RQ_STATE_0_MASK;
unsigned clear_local = clear & RQ_STATE_0_MASK;
int c_put = 0;
- int k_put = 0;
const int idx = peer_device ? 1 + peer_device->node_id : 0;
/* FIXME n_connections, when this request was created/scheduled. */
@@ -639,6 +633,8 @@
/* intent: get references */
+ kref_get(&req->kref);
+
if (!(old_local & RQ_LOCAL_PENDING) && (set_local & RQ_LOCAL_PENDING))
atomic_inc(&req->completion_ref);
@@ -675,15 +671,12 @@
if (!(old_local & RQ_LOCAL_ABORTED) && (set_local & RQ_LOCAL_ABORTED)) {
D_ASSERT(req->device, req->rq_state[0] & RQ_LOCAL_PENDING);
- /* local completion may still come in later,
- * we need to keep the req object around. */
- kref_get(&req->kref);
++c_put;
}
if ((old_local & RQ_LOCAL_PENDING) && (clear_local & RQ_LOCAL_PENDING)) {
if (req->rq_state[0] & RQ_LOCAL_ABORTED)
- ++k_put;
+ kref_put(&req->kref, drbd_req_destroy);
else
++c_put;
list_del_init(&req->req_pending_local);
@@ -705,7 +698,7 @@
if (old_net & RQ_NET_SENT)
atomic_sub(req->i.size >> 9, &peer_device->connection->ap_in_flight);
if (old_net & RQ_EXP_BARR_ACK)
- ++k_put;
+ kref_put(&req->kref, drbd_req_destroy);
req->net_done_jif[peer_device->node_id] = jiffies;
/* in ahead/behind mode, or just in case,
@@ -718,27 +711,12 @@
/* potentially complete and destroy */
- if (k_put || c_put) {
- /* Completion does it's own kref_put. If we are going to
- * kref_sub below, we need req to be still around then. */
- int at_least = k_put + !!c_put;
- int refcount = refcount_read(&req->kref.refcount);
- if (refcount < at_least)
- drbd_err(req->device,
- "mod_rq_state: Logic BUG: 0: %x -> %x, %d: %x -> %x: refcount = %d, should be >= %d\n",
- old_local, req->rq_state[0],
- idx, old_net, req->rq_state[idx],
- refcount, at_least);
- }
-
/* If we made progress, retry conflicting peer requests, if any. */
if (req->i.waiting)
wake_up(&req->device->misc_wait);
- if (c_put)
- k_put += drbd_req_put_completion_ref(req, m, c_put);
- if (k_put)
- kref_sub(&req->kref, k_put, drbd_req_destroy);
+ drbd_req_put_completion_ref(req, m, c_put);
+ kref_put(&req->kref, drbd_req_destroy);
}
static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req)
@@ -1748,8 +1726,7 @@
}
out:
- if (drbd_req_put_completion_ref(req, &m, 1))
- kref_put(&req->kref, drbd_req_destroy);
+ drbd_req_put_completion_ref(req, &m, 1);
spin_unlock_irq(&resource->req_lock);
/* Even though above is a kref_put(), this is safe.
@@ -2104,13 +2081,38 @@
drbd_kick_lo(device);
}
+/* 54efd50 block: make generic_make_request handle arbitrarily sized bios
+ * introduced blk_queue_split(), which is supposed to split (and put on the
+ * current->bio_list bio chain) any bio that is violating the queue limits.
+ * Before that, any user was supposed to go through bio_add_page(), which
+ * would call our merge bvec function, and that should already be sufficient
+ * to not violate queue limits.
+ *
+ * The way blk_queue_split() was implemented, together with the recursion-to-
+ * iteration loop in generic_make_request(), introduced a possible deadlock,
+ * which we worked around with drbd out-of-tree commit
+ * ab6ab5061f6d drbd: fix for possible deadlock in kernel >= 4.3
+ *
+ * Upstream 4.11 finally took and improved our suggested fix with:
+ * 79bd99596b73 blk: improve order of bio handling in generic_make_request()
+ * f5fe1b51905d blk: Ensure users for current->bio_list can see the full list.
+ */
+#undef COMPAT_NEED_MAKE_REQUEST_RECURSION
+#ifdef COMPAT_HAVE_BLK_QUEUE_SPLIT
+# if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+# define COMPAT_NEED_MAKE_REQUEST_RECURSION
+# endif
+#else
+# define blk_queue_split(q,b,l) do { } while (0)
+#endif
+
MAKE_REQUEST_TYPE drbd_make_request(struct request_queue *q, struct bio *bio)
{
struct drbd_device *device = (struct drbd_device *) q->queuedata;
+ struct drbd_resource *resource = device->resource;
unsigned long start_jif;
-#ifdef COMPAT_HAVE_BLK_QUEUE_SPLIT
- struct bio_list *current_bio_list = NULL;
- struct bio_list my_on_stack_bl;
+#ifdef COMPAT_NEED_MAKE_REQUEST_RECURSION
+ struct bio_list *current_bio_list;
#endif
/* We never supported BIO_RW_BARRIER.
@@ -2122,35 +2124,24 @@
MAKE_REQUEST_RETURN;
}
-#ifdef COMPAT_HAVE_BLK_QUEUE_SPLIT
-/* 54efd50 block: make generic_make_request handle arbitrarily sized bios
- * introduced blk_queue_split(), which is supposed to split (and put on the
- * current->bio_list bio chain) any bio that is violating the queue limits.
- * Before that, any user was supposed to go through bio_add_page(), which
- * would call our merge bvec function, and that should already be sufficient
- * to not violate queue limits.
- */
blk_queue_split(q, &bio, q->bio_split);
- if (current->bio_list && !bio_list_empty(current->bio_list)) {
- bio_list_init(&my_on_stack_bl);
- current_bio_list = current->bio_list;
- current->bio_list = &my_on_stack_bl;
- }
+#ifdef COMPAT_NEED_MAKE_REQUEST_RECURSION
+ current_bio_list = current->bio_list;
+ current->bio_list = NULL;
#endif
+ if (!device->have_quorum[NOW] && resource->res_opts.on_no_quorum == ONQ_IO_ERROR) {
+ bio_endio(bio, -EIO);
+ MAKE_REQUEST_RETURN;
+ }
+
start_jif = jiffies;
inc_ap_bio(device, bio_data_dir(bio));
__drbd_make_request(device, bio, start_jif);
-#ifdef COMPAT_HAVE_BLK_QUEUE_SPLIT
- if (current_bio_list) {
- /* REAL RECURSION */
- current->bio_list = NULL;
- while ((bio = bio_list_pop(&my_on_stack_bl)))
- generic_make_request(bio);
- current->bio_list = current_bio_list;
- }
+#ifdef COMPAT_NEED_MAKE_REQUEST_RECURSION
+ current->bio_list = current_bio_list;
#endif
MAKE_REQUEST_RETURN;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_sender.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_sender.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_sender.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_sender.c 2017-06-19 15:49:34.000000000 +0200
@@ -43,6 +43,7 @@
static int make_ov_request(struct drbd_peer_device *, int);
static int make_resync_request(struct drbd_peer_device *, int);
+static bool should_send_barrier(struct drbd_connection *, unsigned int epoch);
static void maybe_send_barrier(struct drbd_connection *, unsigned int);
/* endio handlers:
@@ -2158,6 +2159,7 @@
up(&resource->state_sem);
if (rv == SS_TIMEOUT || rv == SS_CONCURRENT_ST_CHG)
goto repost;
+ drbd_notify_peers_lost_primary(resource);
} else {
repost:
mod_timer(&resource->repost_up_to_date_timer, jiffies + HZ/10);
@@ -2486,17 +2488,22 @@
* from the epoch of the last request we communicated, it is
* safe to send the epoch separating barrier now.
*/
- send_barrier =
- atomic_read(&connection->resource->current_tle_nr) !=
- connection->send.current_epoch_nr;
+ send_barrier = should_send_barrier(connection,
+ atomic_read(&connection->resource->current_tle_nr));
spin_unlock_irq(&connection->resource->req_lock);
- if (send_barrier)
+ if (send_barrier) {
+ finish_wait(&connection->sender_work.q_wait, &wait);
maybe_send_barrier(connection,
connection->send.current_epoch_nr + 1);
+ continue;
+ }
- if (test_and_clear_bit(SEND_STATE_AFTER_AHEAD_C, &connection->flags))
+ if (test_and_clear_bit(SEND_STATE_AFTER_AHEAD_C, &connection->flags)) {
+ finish_wait(&connection->sender_work.q_wait, &wait);
maybe_send_state_afer_ahead(connection);
+ continue;
+ }
/* drbd_send() may have called flush_signals() */
if (get_t_state(&connection->sender) != RUNNING)
@@ -2533,12 +2540,16 @@
}
}
+static bool should_send_barrier(struct drbd_connection *connection, unsigned int epoch)
+{
+ if (!connection->send.seen_any_write_yet)
+ return false;
+ return connection->send.current_epoch_nr != epoch;
+}
static void maybe_send_barrier(struct drbd_connection *connection, unsigned int epoch)
{
/* re-init if first write on this connection */
- if (!connection->send.seen_any_write_yet)
- return;
- if (connection->send.current_epoch_nr != epoch) {
+ if (should_send_barrier(connection, epoch)) {
if (connection->send.current_epoch_writes)
drbd_send_barrier(connection);
connection->send.current_epoch_nr = epoch;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_state.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_state.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_state.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_state.c 2017-06-19 15:49:34.000000000 +0200
@@ -64,6 +64,11 @@
PH_COMMIT,
};
+struct change_disk_state_context {
+ struct change_context context;
+ struct drbd_device *device;
+};
+
static bool lost_contact_to_peer_data(enum drbd_disk_state *peer_disk_state);
static bool got_contact_to_peer_data(enum drbd_disk_state *peer_disk_state);
static bool peer_returns_diskless(struct drbd_peer_device *peer_device,
@@ -196,9 +201,12 @@
bool rv = false;
int vnr;
+ if (resource->res_opts.on_no_quorum != ONQ_SUSPEND_IO)
+ return false;
+
rcu_read_lock();
idr_for_each_entry(&resource->devices, device, vnr) {
- if (device->susp_quorum[which]) {
+ if (!device->have_quorum[which]) {
rv = true;
break;
}
@@ -302,8 +310,8 @@
device_state_change->device = device;
memcpy(device_state_change->disk_state,
device->disk_state, sizeof(device->disk_state));
- memcpy(device_state_change->susp_quorum,
- device->susp_quorum, sizeof(device->susp_quorum));
+ memcpy(device_state_change->have_quorum,
+ device->have_quorum, sizeof(device->have_quorum));
if (test_and_clear_bit(HAVE_LDEV, &device->flags))
device_state_change->have_ldev = true;
@@ -378,7 +386,7 @@
&state_change->devices[n_device];
OLD_TO_NEW(device_state_change->disk_state);
- OLD_TO_NEW(device_state_change->susp_quorum);
+ OLD_TO_NEW(device_state_change->have_quorum);
}
n_peer_devices = state_change->n_devices * state_change->n_connections;
@@ -453,7 +461,7 @@
struct drbd_peer_device *peer_device;
if (device->disk_state[OLD] != device->disk_state[NEW] ||
- device->susp_quorum[OLD] != device->susp_quorum[NEW])
+ device->have_quorum[OLD] != device->have_quorum[NEW])
return true;
for_each_peer_device(peer_device, device) {
@@ -494,7 +502,7 @@
struct drbd_peer_device *peer_device;
device->disk_state[NEW] = device->disk_state[NOW];
- device->susp_quorum[NEW] = device->susp_quorum[NOW];
+ device->have_quorum[NEW] = device->have_quorum[NOW];
for_each_peer_device(peer_device, device) {
peer_device->disk_state[NEW] = peer_device->disk_state[NOW];
@@ -618,7 +626,7 @@
struct drbd_peer_device *peer_device;
device->disk_state[NOW] = device->disk_state[NEW];
- device->susp_quorum[NOW] = device->susp_quorum[NEW];
+ device->have_quorum[NOW] = device->have_quorum[NEW];
for_each_peer_device(peer_device, device) {
peer_device->disk_state[NOW] = peer_device->disk_state[NEW];
@@ -1837,7 +1845,7 @@
bool have_quorum = calc_quorum(device, NEW, NULL);
if (had_quorum && !have_quorum)
- device->susp_quorum[NEW] = true;
+ device->have_quorum[NEW] = false;
}
put_ldev(device);
}
@@ -2375,13 +2383,17 @@
static inline bool state_change_is_susp_quorum(struct drbd_state_change *state_change,
enum which_state which)
{
+ struct drbd_resource *resource = state_change->resource[0].resource;
int n_device;
+ if (resource->res_opts.on_no_quorum != ONQ_SUSPEND_IO)
+ return false;
+
for (n_device = 0; n_device < state_change->n_devices; n_device++) {
struct drbd_device_state_change *device_state_change =
&state_change->devices[n_device];
- if (device_state_change->susp_quorum[which])
+ if (!device_state_change->have_quorum[which])
return true;
}
@@ -2621,12 +2633,22 @@
}
}
-static void notify_peers_lost_primary(struct drbd_connection *lost_peer)
+void drbd_notify_peers_lost_primary(struct drbd_resource *resource)
{
- struct drbd_resource *resource = lost_peer->resource;
- struct drbd_connection *connection;
+ struct drbd_connection *connection, *lost_peer;
u64 im;
+ rcu_read_lock();
+ for_each_connection_rcu(lost_peer, resource) {
+ if (test_and_clear_bit(NOTIFY_PEERS_LOST_PRIMARY, &lost_peer->flags)) {
+ rcu_read_unlock();
+ goto found;
+ }
+ }
+ rcu_read_unlock();
+ return;
+found:
+
for_each_connection_ref(connection, im, resource) {
if (connection == lost_peer)
continue;
@@ -2800,7 +2822,7 @@
struct drbd_device_state_change *device_state_change = &state_change->devices[n_device];
struct drbd_device *device = device_state_change->device;
enum drbd_disk_state *disk_state = device_state_change->disk_state;
- bool *susp_quorum = device_state_change->susp_quorum;
+ bool *have_quorum = device_state_change->have_quorum;
bool effective_disk_size_determined = false;
bool one_peer_disk_up_to_date[2] = { };
bool device_stable[2];
@@ -3038,9 +3060,13 @@
if (disk_state[OLD] < D_UP_TO_DATE && repl_state[OLD] >= L_SYNC_SOURCE && repl_state[NEW] == L_ESTABLISHED)
send_new_state_to_all_peer_devices(state_change, n_device);
- /* Outdated myself, or became D_UP_TO_DATE tell peers */
- if (disk_state[NEW] >= D_INCONSISTENT && disk_state[NEW] != disk_state[OLD] &&
- repl_state[OLD] >= L_ESTABLISHED && repl_state[NEW] >= L_ESTABLISHED)
+ /* Outdated myself, or became D_UP_TO_DATE tell peers
+ * Do not do it, when the local node was forced from R_SECONDARY to R_PRIMARY,
+ * because that is part of the 2-phase-commit and that is necessary to trigger
+ * the initial resync. */
+ if ((disk_state[NEW] >= D_INCONSISTENT && disk_state[NEW] != disk_state[OLD] &&
+ repl_state[OLD] >= L_ESTABLISHED && repl_state[NEW] >= L_ESTABLISHED) &&
+ !(role[OLD] == R_SECONDARY && role[NEW] == R_PRIMARY))
send_state = true;
/* Skipped resync with peer_device, tell others... */
@@ -3116,7 +3142,7 @@
drbd_uuid_new_current(device, false);
}
- if (device->susp_quorum[NEW] && got_contact_to_peer_data(peer_disk_state) &&
+ if (!device->have_quorum[NEW] && got_contact_to_peer_data(peer_disk_state) &&
get_ldev(device)) {
bool have_quorum = calc_quorum(device, NEW, NULL);
if (have_quorum) {
@@ -3126,7 +3152,7 @@
begin_state_change(resource, &irq_flags, CS_VERBOSE);
_tl_restart(connection, RESEND);
- __change_io_susp_quorum(device, false);
+ __change_have_quorum(device, true);
end_state_change(resource, &irq_flags);
}
put_ldev(device);
@@ -3237,7 +3263,7 @@
drbd_md_sync_if_dirty(device);
- if (!susp_quorum[OLD] && susp_quorum[NEW])
+ if (have_quorum[OLD] && !have_quorum[NEW])
drbd_khelper(device, NULL, "quorum-lost");
}
@@ -3261,7 +3287,7 @@
if (peer_role[OLD] == R_PRIMARY &&
cstate[OLD] == C_CONNECTED && cstate[NEW] < C_CONNECTED) {
/* A connection to a primary went down, notify other peers about that */
- notify_peers_lost_primary(connection);
+ set_bit(NOTIFY_PEERS_LOST_PRIMARY, &connection->flags);
}
}
@@ -3275,6 +3301,8 @@
if (try_become_up_to_date)
drbd_post_work(resource, TRY_BECOME_UP_TO_DATE);
+ else
+ drbd_notify_peers_lost_primary(resource);
if (!still_connected)
mod_timer_pending(&resource->twopc_timer, jiffies);
@@ -3895,6 +3923,13 @@
if (have_peers && context->change_local_state_last)
twopc_phase2(resource, context->vnr, rv >= SS_SUCCESS, &request, reach_immediately);
+
+ if (context->flags & CS_INHIBIT_MD_IO) {
+ struct drbd_device *device =
+ container_of(context, struct change_disk_state_context, context)->device;
+ drbd_md_get_buffer(device, __func__);
+ }
+
end_remote_state_change(resource, &irq_flags, context->flags | CS_TWOPC);
if (rv >= SS_SUCCESS) {
change(context, PH_COMMIT);
@@ -3909,6 +3944,13 @@
} else {
abort_state_change(resource, &irq_flags);
}
+
+ if (context->flags & CS_INHIBIT_MD_IO) {
+ struct drbd_device *device =
+ container_of(context, struct change_disk_state_context, context)->device;
+ drbd_md_put_buffer(device);
+ }
+
if (have_peers && !context->change_local_state_last)
twopc_phase2(resource, context->vnr, rv >= SS_SUCCESS, &request, reach_immediately);
@@ -4164,7 +4206,7 @@
role_context->context.val.disk |= D_UP_TO_DATE;
}
} else if (role == R_SECONDARY) {
- device->susp_quorum[NEW] = false;
+ device->have_quorum[NEW] = true;
}
}
rcu_read_unlock();
@@ -4246,9 +4288,9 @@
connection->susp_fen[NEW] = value;
}
-void __change_io_susp_quorum(struct drbd_device *device, bool value)
+void __change_have_quorum(struct drbd_device *device, bool value)
{
- device->susp_quorum[NEW] = value;
+ device->have_quorum[NEW] = value;
}
void __change_disk_state(struct drbd_device *device, enum drbd_disk_state disk_state)
@@ -4299,8 +4341,8 @@
To avoid a race in receive_state, "clear" uuids while
holding req_lock. I.e. atomic with the state change */
peer_device->uuids_received = false;
- if (peer_device->disk_state[NOW] != D_UNKNOWN ||
- peer_device->repl_state[NOW] != L_OFF)
+ if (peer_device->disk_state[NOW] > D_DISKLESS &&
+ peer_device->disk_state[NOW] != D_UNKNOWN)
rv = true;
}
}
@@ -4368,11 +4410,6 @@
return change_cluster_wide_state(do_change_from_consistent, &context);
}
-struct change_disk_state_context {
- struct change_context context;
- struct drbd_device *device;
-};
-
static bool do_change_disk_state(struct change_context *context, enum change_phase phase)
{
struct drbd_device *device =
@@ -4418,6 +4455,10 @@
},
.device = device,
};
+
+ if (disk_state == D_DETACHING && !(flags & CS_HARD))
+ disk_state_context.context.flags |= CS_INHIBIT_MD_IO;
+
return change_cluster_wide_state(do_change_disk_state,
&disk_state_context.context);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_state.h new/drbd-9.0.8+git.c8bc3670/drbd/drbd_state.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_state.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_state.h 2017-06-19 15:49:34.000000000 +0200
@@ -38,6 +38,10 @@
CS_TWOPC = 1 << 9,
CS_IGN_OUTD_FAIL = 1 << 10,
CS_DONT_RETRY = 1 << 11, /* Disable internal retry. Caller has a retry loop */
+
+ /* Make sure no meta data IO is in flight, by calling
+ * drbd_md_get_buffer(). Used for graceful detach. */
+ CS_INHIBIT_MD_IO = 1 << 12,
};
extern void drbd_resume_al(struct drbd_device *device);
@@ -87,7 +91,7 @@
extern enum drbd_state_rv change_io_susp_user(struct drbd_resource *, bool, enum chg_state_flags);
extern void __change_io_susp_no_data(struct drbd_resource *, bool);
extern void __change_io_susp_fencing(struct drbd_connection *, bool);
-extern void __change_io_susp_quorum(struct drbd_device *, bool);
+extern void __change_have_quorum(struct drbd_device *, bool);
extern void __change_disk_state(struct drbd_device *, enum drbd_disk_state);
extern void __change_disk_states(struct drbd_resource *, enum drbd_disk_state);
@@ -135,4 +139,5 @@
change_cluster_wide_device_size(struct drbd_device *, sector_t, uint64_t, enum dds_flags,
struct resize_parms *);
+extern void drbd_notify_peers_lost_primary(struct drbd_resource *resource);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_state_change.h new/drbd-9.0.8+git.c8bc3670/drbd/drbd_state_change.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_state_change.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_state_change.h 2017-06-19 15:49:34.000000000 +0200
@@ -11,7 +11,7 @@
struct drbd_device_state_change {
struct drbd_device *device;
enum drbd_disk_state disk_state[2];
- bool susp_quorum[2];
+ bool have_quorum[2];
bool have_ldev;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_transport.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_transport.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_transport.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_transport.c 2017-06-19 15:49:34.000000000 +0200
@@ -206,6 +206,7 @@
err = init_listener(transport, addr, new_listener);
if (err) {
kfree(new_listener);
+ new_listener = NULL;
if (err == -EADDRINUSE && ++tries < 3) {
schedule_timeout_uninterruptible(HZ / 20);
continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_transport_tcp.c new/drbd-9.0.8+git.c8bc3670/drbd/drbd_transport_tcp.c
--- old/drbd-9.0.7rc2+git.36abd387/drbd/drbd_transport_tcp.c 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/drbd_transport_tcp.c 2017-06-19 15:49:34.000000000 +0200
@@ -317,6 +317,9 @@
void *buffer;
int rv;
+ if (!socket)
+ return -ENOTCONN;
+
if (flags & CALLER_BUFFER) {
buffer = *buf;
rv = dtt_recv_short(socket, buffer, size, flags & ~CALLER_BUFFER);
@@ -348,6 +351,9 @@
struct page *page;
int err;
+ if (!socket)
+ return -ENOTCONN;
+
drbd_alloc_page_chain(transport, chain, DIV_ROUND_UP(size, PAGE_SIZE), GFP_TRY);
page = chain->head;
if (!page)
@@ -767,7 +773,7 @@
struct dtt_listener *listener = container_of(drbd_listener, struct dtt_listener, listener);
struct socket *s_listen;
struct net_conf *nc;
- const char *what;
+ const char *what = "";
rcu_read_lock();
nc = rcu_dereference(transport->net_conf);
@@ -781,24 +787,24 @@
my_addr = *(struct sockaddr_storage *)addr;
- what = "sock_create_kern";
err = sock_create_kern(&init_net, my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP, &s_listen);
if (err) {
s_listen = NULL;
+ what = "sock_create_kern";
goto out;
}
s_listen->sk->sk_reuse = SK_CAN_REUSE; /* SO_REUSEADDR */
dtt_setbufsize(s_listen, sndbuf_size, rcvbuf_size);
- what = "bind before listen";
-
addr_len = addr->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6)
: sizeof(struct sockaddr_in);
err = s_listen->ops->bind(s_listen, (struct sockaddr *)&my_addr, addr_len);
- if (err < 0)
+ if (err < 0) {
+ what = "bind before listen";
goto out;
+ }
listener->s_listen = s_listen;
write_lock_bh(&s_listen->sk->sk_callback_lock);
@@ -807,10 +813,11 @@
s_listen->sk->sk_user_data = listener;
write_unlock_bh(&s_listen->sk->sk_callback_lock);
- what = "listen";
err = s_listen->ops->listen(s_listen, DRBD_PEERS_MAX * 2);
- if (err < 0)
+ if (err < 0) {
+ what = "listen";
goto out;
+ }
listener->listener.listen_addr = my_addr;
listener->listener.destroy = dtt_destroy_listener;
@@ -1090,9 +1097,11 @@
{
struct drbd_tcp_transport *tcp_transport =
container_of(transport, struct drbd_tcp_transport, transport);
-
struct socket *socket = tcp_transport->stream[stream];
+ if (!socket)
+ return;
+
socket->sk->sk_rcvtimeo = timeout;
}
@@ -1100,9 +1109,11 @@
{
struct drbd_tcp_transport *tcp_transport =
container_of(transport, struct drbd_tcp_transport, transport);
-
struct socket *socket = tcp_transport->stream[stream];
+ if (!socket)
+ return -ENOTCONN;
+
return socket->sk->sk_rcvtimeo;
}
@@ -1110,7 +1121,6 @@
{
struct drbd_tcp_transport *tcp_transport =
container_of(transport, struct drbd_tcp_transport, transport);
-
struct socket *socket = tcp_transport->stream[stream];
return socket && socket->sk;
@@ -1118,8 +1128,13 @@
static void dtt_update_congested(struct drbd_tcp_transport *tcp_transport)
{
- struct sock *sock = tcp_transport->stream[DATA_STREAM]->sk;
+ struct socket *socket = tcp_transport->stream[DATA_STREAM];
+ struct sock *sock;
+
+ if (!socket)
+ return;
+ sock = socket->sk;
if (sock->sk_wmem_queued > sock->sk_sndbuf * 4 / 5)
set_bit(NET_CONGESTED, &tcp_transport->transport.flags);
}
@@ -1130,11 +1145,13 @@
struct drbd_tcp_transport *tcp_transport =
container_of(transport, struct drbd_tcp_transport, transport);
struct socket *socket = tcp_transport->stream[stream];
-
mm_segment_t oldfs = get_fs();
int len = size;
int err = -EIO;
+ if (!socket)
+ return -ENOTCONN;
+
msg_flags |= MSG_NOSIGNAL;
dtt_update_congested(tcp_transport);
set_fs(KERNEL_DS);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd/linux/drbd_config.h new/drbd-9.0.8+git.c8bc3670/drbd/linux/drbd_config.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd/linux/drbd_config.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd/linux/drbd_config.h 2017-06-19 15:49:34.000000000 +0200
@@ -32,7 +32,7 @@
/* End of external module for 2.6.33 stuff */
-#define REL_VERSION "9.0.7-1"
+#define REL_VERSION "9.0.8-1"
#define PRO_VERSION_MIN 86
#define PRO_VERSION_MAX 112
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd-headers/linux/drbd.h new/drbd-9.0.8+git.c8bc3670/drbd-headers/linux/drbd.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd-headers/linux/drbd.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd-headers/linux/drbd.h 2017-06-19 15:49:34.000000000 +0200
@@ -88,6 +88,11 @@
OND_SUSPEND_IO
};
+enum drbd_on_no_quorum {
+ ONQ_IO_ERROR = OND_IO_ERROR,
+ ONQ_SUSPEND_IO = OND_SUSPEND_IO
+};
+
enum drbd_on_congestion {
OC_BLOCK,
OC_PULL_AHEAD,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd-headers/linux/drbd_genl.h new/drbd-9.0.8+git.c8bc3670/drbd-headers/linux/drbd_genl.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd-headers/linux/drbd_genl.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd-headers/linux/drbd_genl.h 2017-06-19 15:49:34.000000000 +0200
@@ -143,6 +143,7 @@
__u32_field_def(9, 0 /* OPTIONAL */, auto_promote_timeout, DRBD_AUTO_PROMOTE_TIMEOUT_DEF)
__u32_field_def(10, 0 /* OPTIONAL */, nr_requests, DRBD_NR_REQUESTS_DEF)
__s32_field_def(11, 0 /* OPTIONAL */, quorum, DRBD_QUORUM_DEF)
+ __u32_field_def(12, 0 /* OPTIONAL */, on_no_quorum, DRBD_ON_NO_QUORUM_DEF)
)
GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd-headers/linux/drbd_limits.h new/drbd-9.0.8+git.c8bc3670/drbd-headers/linux/drbd_limits.h
--- old/drbd-9.0.7rc2+git.36abd387/drbd-headers/linux/drbd_limits.h 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd-headers/linux/drbd_limits.h 2017-06-19 15:49:34.000000000 +0200
@@ -304,4 +304,7 @@
#define DRBD_QUORUM_DEF QOU_OFF /* kernel min/max includes symbolic values */
#define DRBD_QUORUM_SCALE '1' /* nodes */
+/* By default freeze IO, if set error all IOs as quick as possible */
+#define DRBD_ON_NO_QUORUM_DEF ONQ_SUSPEND_IO
+
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-9.0.7rc2+git.36abd387/drbd-kernel.spec new/drbd-9.0.8+git.c8bc3670/drbd-kernel.spec
--- old/drbd-9.0.7rc2+git.36abd387/drbd-kernel.spec 2017-05-22 14:34:52.000000000 +0200
+++ new/drbd-9.0.8+git.c8bc3670/drbd-kernel.spec 2017-06-19 15:49:34.000000000 +0200
@@ -1,10 +1,10 @@
Name: drbd-kernel
Summary: Kernel driver for DRBD
-Version: 9.0.7
+Version: 9.0.8
Release: 1%{?dist}
# always require a suitable userland
-Requires: drbd-utils >= 8.9.11
+Requires: drbd-utils >= 9.0.0
%global tarball_version %(echo "%{version}-%{?release}" | sed -e "s,%{?dist}$,,")
Source: http://oss.linbit.com/drbd/drbd-%{tarball_version}.tar.gz
@@ -103,6 +103,9 @@
rm -rf %{buildroot}
%changelog
+* Mon Jun 19 2017 Philipp Reisner <phil(a)linbit.com> - 9.0.8-1
+- New upstream release.
+
* Fri Mar 31 2017 Philipp Reisner <phil(a)linbit.com> - 9.0.7-1
- New upstream release.
++++++ drbd_git_revision ++++++
--- /var/tmp/diff_new_pack.Y5oLyz/_old 2017-06-23 09:18:46.578946338 +0200
+++ /var/tmp/diff_new_pack.Y5oLyz/_new 2017-06-23 09:18:46.578946338 +0200
@@ -1 +1 @@
-GIT-hash: 36abd387b6e4341a58117711b2e95777c1dad8ab
+GIT-hash: c8bc36701c7c7ffc2c208f620c6d89e4ec265704
1
0
Hello community,
here is the log from the commit of package python-py2pack for openSUSE:Factory checked in at 2017-06-23 09:18:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-py2pack (Old)
and /work/SRC/openSUSE:Factory/.python-py2pack.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-py2pack"
Fri Jun 23 09:18:14 2017 rev:41 rq:505629 version:0.8.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-py2pack/python-py2pack.changes 2017-05-27 13:14:31.376095914 +0200
+++ /work/SRC/openSUSE:Factory/.python-py2pack.new/python-py2pack.changes 2017-06-23 09:18:44.811196126 +0200
@@ -1,0 +2,5 @@
+Thu Jun 22 08:37:19 UTC 2017 - tbechtold(a)suse.com
+
+- Use update-alternatives for the py2pack executable
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-py2pack.spec ++++++
--- /var/tmp/diff_new_pack.7piqyd/_old 2017-06-23 09:18:45.375116443 +0200
+++ /var/tmp/diff_new_pack.7piqyd/_new 2017-06-23 09:18:45.375116443 +0200
@@ -26,21 +26,23 @@
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/py2pack/py2pack-%{version}…
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: fdupes
-BuildRequires: python-rpm-macros
-BuildRequires: %{python_module devel}
-BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module Sphinx}
+BuildRequires: %{python_module devel}
BuildRequires: %{python_module metaextract}
BuildRequires: %{python_module pbr}
+BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module sphinxcontrib-programoutput}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
Requires: python-Jinja2
Requires: python-metaextract
Requires: python-pbr
Requires: python-setuptools
Requires: python-six
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -52,6 +54,7 @@
%package -n %{name}-doc
Summary: Documentation for %{name}
+Group: Development/Languages/Python
Provides: %{python_module py2pack-doc = %{version}}
%description -n %{name}-doc
@@ -68,10 +71,17 @@
%install
%python_install
+%python_clone -a %{buildroot}%{_bindir}/py2pack
+
+%post
+%python_install_alternative py2pack
+
+%postun
+%python_uninstall_alternative py2pack
%files %{python_files}
%defattr(-,root,root,-)
-%python3_only %{_bindir}/py2pack
+%python_alternative %{_bindir}/py2pack
%{python_sitelib}/py2pack-%{version}-py*.egg-info
%{python_sitelib}/py2pack/
1
0
Hello community,
here is the log from the commit of package caasp-tools for openSUSE:Factory checked in at 2017-06-23 09:18:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/caasp-tools (Old)
and /work/SRC/openSUSE:Factory/.caasp-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "caasp-tools"
Fri Jun 23 09:18:12 2017 rev:7 rq:505616 version:0.21
Changes:
--------
--- /work/SRC/openSUSE:Factory/caasp-tools/caasp-tools.changes 2017-06-08 15:03:58.914735216 +0200
+++ /work/SRC/openSUSE:Factory/.caasp-tools.new/caasp-tools.changes 2017-06-23 09:18:44.031306326 +0200
@@ -1,0 +2,6 @@
+Thu Jun 22 09:55:58 CEST 2017 - kukuk(a)suse.de
+
+- suse_caasp cloud-init module: enable salt-minion on admin node
+ [bsc#1045350]
+
+-------------------------------------------------------------------
Old:
----
MicroOS-tools-0.20.tar.bz2
New:
----
MicroOS-tools-0.21.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ caasp-tools.spec ++++++
--- /var/tmp/diff_new_pack.MHM3k3/_old 2017-06-23 09:18:44.567230599 +0200
+++ /var/tmp/diff_new_pack.MHM3k3/_new 2017-06-23 09:18:44.567230599 +0200
@@ -17,7 +17,7 @@
Name: caasp-tools
-Version: 0.20
+Version: 0.21
Release: 0
Summary: Files and Scripts for SUSE CaaS Platform
License: GPL-2.0+
++++++ MicroOS-tools-0.20.tar.bz2 -> MicroOS-tools-0.21.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MicroOS-tools-0.20/usr/lib/python2.7/site-packages/cloudinit/config/cc_suse_caasp.py new/MicroOS-tools-0.21/usr/lib/python2.7/site-packages/cloudinit/config/cc_suse_caasp.py
--- old/MicroOS-tools-0.20/usr/lib/python2.7/site-packages/cloudinit/config/cc_suse_caasp.py 2017-06-07 17:53:44.475635036 +0200
+++ new/MicroOS-tools-0.21/usr/lib/python2.7/site-packages/cloudinit/config/cc_suse_caasp.py 2017-06-21 16:08:58.478547513 +0200
@@ -55,6 +55,7 @@
enable_service('container-feeder')
enable_service('etcd')
enable_service('kubelet')
+ enable_service('salt-minion')
elif system_role == 'cluster':
log.debug(("role cluster node found"))
if 'admin_node' not in caasp_cfg:
1
0