Hello community,

here is the log from the commit of package drbd for openSUSE:Factory checked in 
at 2017-04-28 09:14:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd (Old)
 and      /work/SRC/openSUSE:Factory/.drbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drbd"

Fri Apr 28 09:14:08 2017 rev:57 rq:491392 version:9.0.7rc2+git.0677d8b1

Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd/drbd.changes        2017-04-12 
18:03:30.741735863 +0200
+++ /work/SRC/openSUSE:Factory/.drbd.new/drbd.changes   2017-04-28 
09:14:11.778526958 +0200
@@ -1,0 +2,9 @@
+Wed Apr 26 09:03:00 UTC 2017 - [email protected]
+
+- Update to 9.0.7
+  Using 9.0.7rc2 for upgrading from rc1...
+- bsc#1028124, fix kernel compat
+- Fix a potenial split brain
+- Change the drbd-utils requirement to 8.9.11
+
+-------------------------------------------------------------------

Old:
----
  drbd-9.0.7rc1+git.093821cd.tar.bz2

New:
----
  drbd-9.0.7rc2+git.0677d8b1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ drbd.spec ++++++
--- /var/tmp/diff_new_pack.kzPsyF/_old  2017-04-28 09:14:12.522422056 +0200
+++ /var/tmp/diff_new_pack.kzPsyF/_new  2017-04-28 09:14:12.526421493 +0200
@@ -25,7 +25,7 @@
 %endif
 
 Name:           drbd
-Version:        9.0.7rc1+git.093821cd
+Version:        9.0.7rc2+git.0677d8b1
 Release:        0
 Summary:        DRBD driver for Linux
 License:        GPL-2.0
@@ -40,8 +40,8 @@
 BuildRequires:  kernel-source
 BuildRequires:  kernel-syms
 BuildRequires:  module-init-tools
-Requires:       drbd-utils >= 8.9.9
-Supplements:    drbd-utils >= 8.9.9
+Requires:       drbd-utils >= 8.9.11
+Supplements:    drbd-utils >= 8.9.11
 Obsoletes:      drbd-kmp < %{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExcludeArch:    i586 s390

++++++ _service ++++++
--- /var/tmp/diff_new_pack.kzPsyF/_old  2017-04-28 09:14:12.578414161 +0200
+++ /var/tmp/diff_new_pack.kzPsyF/_new  2017-04-28 09:14:12.578414161 +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.7rc1</param>
+    <param name="version">9.0.7rc2</param>
 -->
-    <param name="versionformat">9.0.7rc1+git.%h</param>
-    <param name="revision">093821cd3aae36ee123744cc27a2ce548e3a13e9</param>
+    <param name="versionformat">9.0.7rc2+git.%h</param>
+    <param name="revision">0677d8b1ce8a81bc8913391cf8ebd09ad30d32c0</param>
   </service>
 
   <service name="recompress" mode="disabled">

++++++ drbd-9.0.7rc1+git.093821cd.tar.bz2 -> drbd-9.0.7rc2+git.0677d8b1.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/ChangeLog 
new/drbd-9.0.7rc2+git.0677d8b1/ChangeLog
--- old/drbd-9.0.7rc1+git.093821cd/ChangeLog    2017-03-23 11:27:33.000000000 
+0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/ChangeLog    2017-04-11 13:12:22.000000000 
+0200
@@ -2,7 +2,7 @@
 ------
  For even more detail, use "git log" or visit http://git.drbd.org/.
 
-9.0.7rc1-1 (api:genl2/proto:86-112/transport:14)
+9.0.7-1 (api:genl2/proto:86-112/transport:14)
 --------
  * various fixes to the 2-phase-commit online resize
  * fix fencing and disk state transition and from Consistent; Now it is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/README 
new/drbd-9.0.7rc2+git.0677d8b1/README
--- old/drbd-9.0.7rc1+git.093821cd/README       2017-03-23 11:27:33.000000000 
+0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/README       2017-04-11 13:12:22.000000000 
+0200
@@ -1,16 +1,12 @@
 
-                                 DRBD
-                                ======
-                           by Philipp Reisner
-                           and Lars Ellenberg
-                     LINBIT Information Technologies
+                              DRBD
+                             ======
+                       by Philipp Reisner
+                       and Lars Ellenberg
+                    LINBIT HA Solutions GmbH
 
 Reference documentation is included in the documentation directory.
 
-Please refer to the web pages at
-
-  http://www.drbd.org/
-  http://www.drbd.org/docs/introduction/
-
-to find maintained information.
-
+Please see also:
+http://www.drbd.org
+http://docs.linbit.com/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/README.drbd-utils 
new/drbd-9.0.7rc2+git.0677d8b1/README.drbd-utils
--- old/drbd-9.0.7rc1+git.093821cd/README.drbd-utils    2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/README.drbd-utils    2017-04-11 
13:12:22.000000000 +0200
@@ -1,12 +1,12 @@
 =======================================================================
   With DRBD module version 8.4.5, we split out the management tools
   into their own repository at http://git.linbit.com/drbd-utils.git
-  (tarball at http://oss.linbit.com/drbd)
+  (tarball at http://links.linbit.com/drbd-download)
 
   That started out as "drbd-utils version 8.9.0",
   and provides compatible drbdadm, drbdsetup and drbdmeta tools
   for DRBD module versions 8.3, 8.4 and 9.
 
   Again: to manage DRBD 9 kernel modules and above,
-  you want drbd-utils >= 8.9.5 from above url.
+  you want drbd-utils >= 8.9.11 from above url.
 =======================================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/debian/changelog 
new/drbd-9.0.7rc2+git.0677d8b1/debian/changelog
--- old/drbd-9.0.7rc1+git.093821cd/debian/changelog     2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/debian/changelog     2017-04-11 
13:12:22.000000000 +0200
@@ -1,8 +1,8 @@
-drbd (9.0.7rc1-1) unstable; urgency=low
+drbd (9.0.7-1) unstable; urgency=low
 
   * New upstream release.
 
- -- Philipp Reisner <[email protected]>  Wed, 22 Mar 2017 16:12:32 +0100
+ -- Philipp Reisner <[email protected]>  Fri, 31 Mar 2017 16:13:06 +0100
 
 drbd (9.0.6-1) unstable; urgency=low
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/debian/control 
new/drbd-9.0.7rc2+git.0677d8b1/debian/control
--- old/drbd-9.0.7rc1+git.093821cd/debian/control       2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/debian/control       2017-04-11 
13:12:22.000000000 +0200
@@ -15,7 +15,7 @@
 Section: admin
 Depends: debhelper (>=7),
          dkms (>= 1.9.5),
-         drbd-utils (>= 8.9.9),
+         drbd-utils (>= 8.9.11),
          ${misc:Depends}
 Conflicts: drbd-module-source,
            drbd8-module-source
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/drbd_wrappers.h 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/drbd_wrappers.h
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/drbd_wrappers.h      
2017-03-23 11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/drbd_wrappers.h      
2017-04-11 13:12:22.000000000 +0200
@@ -1746,6 +1746,18 @@
 # endif
 #endif
 
+#ifndef COMPAT_HAVE_IDR_IS_EMPTY
+static int idr_has_entry(int id, void *p, void *data)
+{
+       return 1;
+}
+
+static inline bool idr_is_empty(struct idr *idr)
+{
+       return !idr_for_each(idr, idr_has_entry, NULL);
+}
+#endif
+
 /* RDMA related */
 #ifdef COMPAT_HAVE_IB_VERBS_H
 #ifndef COMPAT_HAVE_IB_CQ_INIT_ATTR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/linux/sched/signal.h 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/linux/sched/signal.h
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/linux/sched/signal.h 
1970-01-01 01:00:00.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/linux/sched/signal.h 
2017-04-11 13:12:22.000000000 +0200
@@ -0,0 +1 @@
+/* Just an empty file. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/tests/have_idr_is_empty.c
 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/tests/have_idr_is_empty.c
--- 
old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/tests/have_idr_is_empty.c
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/tests/have_idr_is_empty.c
    2017-04-11 13:12:22.000000000 +0200
@@ -0,0 +1,7 @@
+#include <linux/idr.h>
+
+void foo(void)
+{
+       struct idr *idr = NULL;
+       idr_is_empty(idr);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/uapi/linux/sched/types.h 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/uapi/linux/sched/types.h
--- 
old/drbd-9.0.7rc1+git.093821cd/drbd/drbd-kernel-compat/uapi/linux/sched/types.h 
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd-kernel-compat/uapi/linux/sched/types.h 
    2017-04-11 13:12:22.000000000 +0200
@@ -0,0 +1 @@
+/* Just an empty file. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_int.h 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_int.h
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_int.h      2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_int.h      2017-04-11 
13:12:22.000000000 +0200
@@ -32,6 +32,7 @@
 #include <linux/version.h>
 #include <linux/list.h>
 #include <linux/sched.h>
+#include <linux/sched/signal.h>
 #include <linux/bitops.h>
 #include <linux/slab.h>
 #include <linux/ratelimit.h>
@@ -253,7 +254,6 @@
 #include "drbd_interval.h"
 
 extern int drbd_wait_misc(struct drbd_device *, struct drbd_peer_device *, 
struct drbd_interval *);
-extern bool idr_is_empty(struct idr *idr);
 
 extern void lock_all_resources(void);
 extern void unlock_all_resources(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_main.c 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_main.c
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_main.c     2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_main.c     2017-04-11 
13:12:22.000000000 +0200
@@ -1431,7 +1431,7 @@
                          (unsigned long long)drbd_history_uuid(device, 1));
                put_ldev(device);
        } else {
-               drbd_info(device, "%s effective data uuid: %016llX\n",
+               drbd_info(device, "%s exposed data uuid: %016llX\n",
                          text,
                          (unsigned long long)device->exposed_data_uuid);
        }
@@ -1516,7 +1516,7 @@
                p->qlim->io_opt = cpu_to_be32(queue_io_opt(q));
                p->qlim->discard_enabled = blk_queue_discard(q);
                p->qlim->discard_zeroes_data = queue_discard_zeroes_data(q);
-#ifdef REQ_WRITE_SAME
+#ifdef COMPAT_WRITE_SAME_CAPABLE
                p->qlim->write_same_capable = 
!!q->limits.max_write_same_sectors;
 #else
                p->qlim->write_same_capable = 0;
@@ -2128,7 +2128,7 @@
                                         bio_iter_last(bvec, iter) ? 0 : 
MSG_MORE);
                if (err)
                        return err;
-               /* REQ_WRITE_SAME has only one segment */
+               /* WRITE_SAME has only one segment */
                if (bio_op(bio) == REQ_OP_WRITE_SAME)
                        break;
 
@@ -3453,15 +3453,15 @@
                return NULL;
        }
 
-       init_timer(&peer_device->start_resync_timer);
-       peer_device->start_resync_timer.function = start_resync_timer_fn;
-       peer_device->start_resync_timer.data = (unsigned long) peer_device;
+       setup_timer(&peer_device->start_resync_timer,
+                       start_resync_timer_fn,
+                       (unsigned long) peer_device);
 
        INIT_LIST_HEAD(&peer_device->resync_work.list);
        peer_device->resync_work.cb  = w_resync_timer;
-       init_timer(&peer_device->resync_timer);
-       peer_device->resync_timer.function = resync_timer_fn;
-       peer_device->resync_timer.data = (unsigned long) peer_device;
+       setup_timer(&peer_device->resync_timer,
+                       resync_timer_fn,
+                       (unsigned long) peer_device);
 
        INIT_LIST_HEAD(&peer_device->propagate_uuids_work.list);
        peer_device->propagate_uuids_work.cb = w_send_uuids;
@@ -3556,12 +3556,12 @@
        spin_lock_init(&device->pending_bitmap_work.q_lock);
        INIT_LIST_HEAD(&device->pending_bitmap_work.q);
 
-       init_timer(&device->md_sync_timer);
-       init_timer(&device->request_timer);
-       device->md_sync_timer.function = md_sync_timer_fn;
-       device->md_sync_timer.data = (unsigned long) device;
-       device->request_timer.function = request_timer_fn;
-       device->request_timer.data = (unsigned long) device;
+       setup_timer(&device->md_sync_timer,
+                       md_sync_timer_fn,
+                       (unsigned long) device);
+       setup_timer(&device->request_timer,
+                       request_timer_fn,
+                       (unsigned long) device);
 
        init_waitqueue_head(&device->misc_wait);
        init_waitqueue_head(&device->al_wait);
@@ -4330,6 +4330,7 @@
 
 static void __drbd_uuid_set_current(struct drbd_device *device, u64 val)
 {
+       drbd_md_mark_dirty(device);
        if (device->resource->role[NOW] == R_PRIMARY)
                val |= UUID_PRIMARY;
        else
@@ -5167,16 +5168,6 @@
        return 0;
 }
 
-static int idr_has_entry(int id, void *p, void *data)
-{
-       return 1;
-}
-
-bool idr_is_empty(struct idr *idr)
-{
-       return !idr_for_each(idr, idr_has_entry, NULL);
-}
-
 #ifndef __maybe_unused
 #define __maybe_unused                  __attribute__((unused))
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_nl.c 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_nl.c
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_nl.c       2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_nl.c       2017-04-11 
13:12:22.000000000 +0200
@@ -1761,7 +1761,7 @@
        struct drbd_connection *connection;
        unsigned int s = DRBD_MAX_BBIO_SECTORS;
 
-       /* when we introduced REQ_WRITE_SAME support, we also bumped
+       /* when we introduced WRITE_SAME support, we also bumped
         * our maximum supported batch bio size used for discards. */
        rcu_read_lock();
        for_each_connection_rcu(connection, resource) {
@@ -1825,13 +1825,19 @@
 
 static void decide_on_write_same_support(struct drbd_device *device,
                        struct request_queue *q,
-                       struct request_queue *b, struct o_qlim *o)
+                       struct request_queue *b, struct o_qlim *o,
+                       bool disable_write_same)
 {
-#ifndef REQ_WRITE_SAME
+#ifndef COMPAT_WRITE_SAME_CAPABLE
        drbd_dbg(device, "This kernel is too old, no WRITE_SAME support.\n");
 #else
        bool can_do = b ? b->limits.max_write_same_sectors : true;
 
+       if (can_do && disable_write_same) {
+               can_do = false;
+               drbd_info(device, "WRITE_SAME disabled by config\n");
+       }
+
        if (can_do && !(common_connection_features(device->resource) & 
DRBD_FF_WSAME)) {
                can_do = false;
                drbd_info(device, "peer does not support WRITE_SAME\n");
@@ -1892,6 +1898,7 @@
        struct request_queue *b = NULL;
        struct disk_conf *dc;
        bool discard_zeroes_if_aligned = true;
+       bool disable_write_same = false;
 
        if (bdev) {
                b = bdev->backing_bdev->bd_disk->queue;
@@ -1900,6 +1907,7 @@
                rcu_read_lock();
                dc = rcu_dereference(device->ldev->disk_conf);
                discard_zeroes_if_aligned = dc->discard_zeroes_if_aligned;
+               disable_write_same = dc->disable_write_same;
                rcu_read_unlock();
 
                blk_set_stacking_limits(&q->limits);
@@ -1909,7 +1917,7 @@
        /* This is the workaround for "bio would need to, but cannot, be split" 
*/
        blk_queue_segment_boundary(q, PAGE_SIZE-1);
        decide_on_discard_support(device, q, b, discard_zeroes_if_aligned);
-       decide_on_write_same_support(device, q, b, o);
+       decide_on_write_same_support(device, q, b, o, disable_write_same);
 
        if (b) {
                blk_queue_stack_limits(q, b);
@@ -2137,7 +2145,8 @@
        if (write_ordering_changed(old_disk_conf, new_disk_conf))
                drbd_bump_write_ordering(device->resource, NULL, 
WO_BIO_BARRIER);
 
-       if (old_disk_conf->discard_zeroes_if_aligned != 
new_disk_conf->discard_zeroes_if_aligned)
+       if (old_disk_conf->discard_zeroes_if_aligned != 
new_disk_conf->discard_zeroes_if_aligned
+       ||  old_disk_conf->disable_write_same != 
new_disk_conf->disable_write_same)
                drbd_reconsider_queue_parameters(device, device->ldev, NULL);
 
        drbd_md_sync_if_dirty(device);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_receiver.c 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_receiver.c
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_receiver.c 2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_receiver.c 2017-04-11 
13:12:22.000000000 +0200
@@ -37,6 +37,7 @@
 #include <linux/mm_inline.h>
 #include <linux/slab.h>
 #include <linux/pkt_sched.h>
+#include <uapi/linux/sched/types.h>
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
 #include <linux/vmalloc.h>
@@ -4802,7 +4803,7 @@
                struct drbd_resource *resource = device->resource;
 
                spin_lock_irq(&resource->req_lock);
-               if (resource->state_change_flags) {
+               if (resource->remote_state_change) {
                        drbd_info(peer_device, "Delaying update of exposed data 
uuid\n");
                        device->next_exposed_data_uuid = 
peer_device->current_uuid;
                } else
@@ -6100,21 +6101,9 @@
                        drbd_md_sync_if_dirty(peer_device->device);
 
                if (rv >= SS_SUCCESS && !(flags & CS_ABORT)) {
-                       struct drbd_device *device;
-                       int vnr;
-
                        if (affected_connection &&
                            mask.conn == conn_MASK && val.conn == C_CONNECTED)
                                conn_connect2(connection);
-
-                       idr_for_each_entry(&resource->devices, device, vnr) {
-                               u64 nedu = device->next_exposed_data_uuid;
-                               if (!nedu)
-                                       continue;
-                               if (device->disk_state[NOW] < D_INCONSISTENT)
-                                       drbd_set_exposed_data_uuid(device, 
nedu);
-                               device->next_exposed_data_uuid = 0;
-                       }
                }
        }
 
@@ -6966,6 +6955,7 @@
                        drbd_warn(peer_device, "received new current UUID: 
%016llX "
                                  "weak_nodes=%016llX\n", current_uuid, 
weak_nodes);
                        drbd_uuid_received_new_current(peer_device, 
current_uuid, weak_nodes);
+                       drbd_md_sync_if_dirty(device);
                }
                put_ldev(device);
        } else if (device->disk_state[NOW] == D_DISKLESS && resource->role[NOW] 
== R_PRIMARY) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_sender.c 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_sender.c
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_sender.c   2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_sender.c   2017-04-11 
13:12:22.000000000 +0200
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/drbd.h>
 #include <linux/sched.h>
+#include <linux/sched/signal.h>
 #include <linux/wait.h>
 #include <linux/mm.h>
 #include <linux/memcontrol.h>
@@ -71,6 +72,11 @@
        device = bio->bi_private;
        device->md_io.error = error;
 
+       /* special case: drbd_md_read() during drbd_adm_attach() */
+       if (device->ldev)
+               put_ldev(device);
+       bio_put(bio);
+
        /* We grabbed an extra reference in _drbd_md_sync_page_io() to be able
         * to timeout on the lower level device, and eventually detach from it.
         * If this io completion runs after that timeout expired, this
@@ -85,9 +91,6 @@
        drbd_md_put_buffer(device);
        device->md_io.done = 1;
        wake_up(&device->misc_wait);
-       bio_put(bio);
-       if (device->ldev) /* special case: drbd_md_read() during 
drbd_adm_attach() */
-               put_ldev(device);
 
        BIO_ENDIO_FN_RETURN;
 }
@@ -362,7 +365,7 @@
                sg_set_page(&sg, bvec BVD bv_page, bvec BVD bv_len, bvec BVD 
bv_offset);
                ahash_request_set_crypt(req, &sg, NULL, sg.length);
                crypto_ahash_update(req);
-               /* REQ_WRITE_SAME has only one segment,
+               /* WRITE_SAME has only one segment,
                 * checksum the payload only once. */
                if (bio_op(bio) == REQ_OP_WRITE_SAME)
                        break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_state.c 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_state.c
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_state.c    2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_state.c    2017-04-11 
13:12:22.000000000 +0200
@@ -530,7 +530,31 @@
        return rv;
 }
 
-static void __clear_remote_state_change(struct drbd_resource *resource) {
+static void apply_update_to_exposed_data_uuid(struct drbd_resource *resource)
+{
+       struct drbd_device *device;
+       int vnr;
+
+       idr_for_each_entry(&resource->devices, device, vnr) {
+               u64 nedu = device->next_exposed_data_uuid;
+               int changed = 0;
+
+               if (!nedu)
+                       continue;
+               if (device->disk_state[NOW] < D_INCONSISTENT)
+                       changed = drbd_set_exposed_data_uuid(device, nedu);
+
+               device->next_exposed_data_uuid = 0;
+               if (changed)
+                       drbd_info(device, "Executing delayed exposed data uuid 
update: %016llX\n",
+                                 (unsigned long 
long)device->exposed_data_uuid);
+               else
+                       drbd_info(device, "Cancelling delayed exposed data uuid 
update\n");
+       }
+}
+
+static void __clear_remote_state_change(struct drbd_resource *resource)
+{
        struct drbd_connection *connection, *tmp;
 
        resource->remote_state_change = false;
@@ -545,6 +569,9 @@
 
        wake_up(&resource->twopc_wait);
        queue_queued_twopc(resource);
+
+       /* Do things that where postponed to after two-phase commits finished */
+       apply_update_to_exposed_data_uuid(resource);
 }
 
 static enum drbd_state_rv ___end_state_change(struct drbd_resource *resource, 
struct completion *done,
@@ -2167,7 +2194,7 @@
                        mdf &= ~MDF_AL_CLEAN;
                        if (test_bit(CRASHED_PRIMARY, &device->flags))
                                mdf |= MDF_CRASHED_PRIMARY;
-                       if (device->resource->role[NEW] == R_PRIMARY)
+                       if (device->resource->role[NEW] == R_PRIMARY && 
disk_state[NEW] != D_DETACHING)
                                mdf |= MDF_PRIMARY_IND;
                        /* Do not touch MDF_CONSISTENT if we are D_FAILED */
                        if (disk_state[NEW] >= D_INCONSISTENT) {
@@ -3012,8 +3039,8 @@
                                
send_new_state_to_all_peer_devices(state_change, n_device);
 
                        /* Outdated myself, or became D_UP_TO_DATE tell peers */
-                       if (disk_state[OLD] >= D_OUTDATED && disk_state[NEW] >= 
D_OUTDATED &&
-                           disk_state[NEW] != disk_state[OLD] && 
repl_state[NEW] >= L_ESTABLISHED)
+                       if (disk_state[NEW] >= D_INCONSISTENT && 
disk_state[NEW] != disk_state[OLD] &&
+                           repl_state[OLD] >= L_ESTABLISHED && repl_state[OLD] 
>= L_ESTABLISHED)
                                send_state = true;
 
                        /* Skipped resync with peer_device, tell others... */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_transport_tcp.c 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_transport_tcp.c
--- old/drbd-9.0.7rc1+git.093821cd/drbd/drbd_transport_tcp.c    2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/drbd_transport_tcp.c    2017-04-11 
13:12:22.000000000 +0200
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/socket.h>
 #include <linux/pkt_sched.h>
+#include <linux/sched/signal.h>
 #include <linux/net.h>
 #include <linux/tcp.h>
 #include <linux/highmem.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-9.0.7rc1+git.093821cd/drbd/linux/drbd_config.h 
new/drbd-9.0.7rc2+git.0677d8b1/drbd/linux/drbd_config.h
--- old/drbd-9.0.7rc1+git.093821cd/drbd/linux/drbd_config.h     2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd/linux/drbd_config.h     2017-04-11 
13:12:22.000000000 +0200
@@ -32,7 +32,7 @@
 
 /* End of external module for 2.6.33 stuff */
 
-#define REL_VERSION "9.0.7rc1-1"
+#define REL_VERSION "9.0.7-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.7rc1+git.093821cd/drbd-kernel.spec 
new/drbd-9.0.7rc2+git.0677d8b1/drbd-kernel.spec
--- old/drbd-9.0.7rc1+git.093821cd/drbd-kernel.spec     2017-03-23 
11:27:33.000000000 +0100
+++ new/drbd-9.0.7rc2+git.0677d8b1/drbd-kernel.spec     2017-04-11 
13:12:22.000000000 +0200
@@ -1,10 +1,10 @@
 Name: drbd-kernel
 Summary: Kernel driver for DRBD
-Version: 9.0.7rc1
+Version: 9.0.7
 Release: 1%{?dist}
 
 # always require a suitable userland
-Requires: drbd-utils >= 8.9.9
+Requires: drbd-utils >= 8.9.11
 
 %global tarball_version %(echo "%{version}-%{?release}" | sed -e 
"s,%{?dist}$,,")
 Source: http://oss.linbit.com/drbd/drbd-%{tarball_version}.tar.gz
@@ -103,7 +103,7 @@
 rm -rf %{buildroot}
 
 %changelog
-* Wed Mar 22 2017 Philipp Reisner <[email protected]> - 9.0.7rc1-1
+* Fri Mar 31 2017 Philipp Reisner <[email protected]> - 9.0.7-1
 - New upstream release.
 
 * Fri Dec 23 2016 Philipp Reisner <[email protected]> - 9.0.6-1

++++++ drbd_git_revision ++++++
--- /var/tmp/diff_new_pack.kzPsyF/_old  2017-04-28 09:14:12.882371297 +0200
+++ /var/tmp/diff_new_pack.kzPsyF/_new  2017-04-28 09:14:12.882371297 +0200
@@ -1 +1 @@
-GIT-hash: 08cda190c4f544a0c4e15ba792bbf47c69707b42
+GIT-hash: 0677d8b1ce8a81bc8913391cf8ebd09ad30d32c0

++++++ preamble ++++++
--- /var/tmp/diff_new_pack.kzPsyF/_old  2017-04-28 09:14:12.910367349 +0200
+++ /var/tmp/diff_new_pack.kzPsyF/_new  2017-04-28 09:14:12.910367349 +0200
@@ -1,4 +1,5 @@
 Requires: kernel-%1 
+Requires: drbd-utils >= 8.9.11
+Supplements: drbd-utils >= 8.9.11
 Supplements: packageand(kernel-%1:%name)
 Recommends: drbd
-Recommends: drbd-utils


Reply via email to