Accepting request 401378 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#983633, upgrade to ver9.0.2 to build against kernel 4.6/4.7-rc2 OBS-URL: https://build.opensuse.org/request/show/401378 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=34
This commit is contained in:
parent
18bba12a8c
commit
524400d0e7
6
_service
6
_service
@ -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.1</param>
|
||||
<param name="version">9.0.2</param>
|
||||
-->
|
||||
<param name="versionformat">9.0.1+git.%h</param>
|
||||
<param name="revision">86e443973082570aeb651848db89e0c7b995c306</param>
|
||||
<param name="versionformat">9.0.2+git.%h</param>
|
||||
<param name="revision">14d2eead95f99a7de1c0b3e3f335a30b8d486bcb</param>
|
||||
</service>
|
||||
|
||||
<service name="recompress" mode="disabled">
|
||||
|
34
compat-4.7-1dee3f59-align-nla-u64.patch
Normal file
34
compat-4.7-1dee3f59-align-nla-u64.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff -Naur drbd-9.0.2+git.14d2eea.orig/drbd-headers/linux/genl_magic_struct.h drbd-9.0.2+git.14d2eea/drbd-headers/linux/genl_magic_struct.h
|
||||
--- drbd-9.0.2+git.14d2eea.orig/drbd-headers/linux/genl_magic_struct.h 2016-06-09 08:08:48.682443819 +0800
|
||||
+++ drbd-9.0.2+git.14d2eea/drbd-headers/linux/genl_magic_struct.h 2016-06-09 21:58:38.138780397 +0800
|
||||
@@ -13,7 +13,7 @@
|
||||
# error "you need to define GENL_MAGIC_INCLUDE_FILE before inclusion"
|
||||
#endif
|
||||
|
||||
-#include <linux/netlink.h>
|
||||
+#include <net/netlink.h>
|
||||
#include <linux/genetlink.h>
|
||||
#include <linux/types.h>
|
||||
#include "compat.h"
|
||||
@@ -86,9 +86,21 @@
|
||||
__field(attr_nr, attr_flag, name, NLA_U32, __s32, \
|
||||
nla_get_u32, nla_put_u32, true)
|
||||
#endif
|
||||
+#ifdef COMPAT_HAVE_ALIGNED_NLA_U64_PAD
|
||||
#define __u64_field(attr_nr, attr_flag, name) \
|
||||
__field(attr_nr, attr_flag, name, NLA_U64, __u64, \
|
||||
nla_get_u64, nla_put_u64, false)
|
||||
+#else
|
||||
+
|
||||
+static inline int nla_put_u64_0pad(struct sk_buff *skb, int attrtype, u64 value)
|
||||
+{
|
||||
+ return nla_put_64bit(skb, attrtype, sizeof(u64), &value, 0);
|
||||
+}
|
||||
+
|
||||
+#define __u64_field(attr_nr, attr_flag, name) \
|
||||
+ __field(attr_nr, attr_flag, name, NLA_U64, __u64, \
|
||||
+ nla_get_u64, nla_put_u64_0pad, false)
|
||||
+#endif
|
||||
#define __str_field(attr_nr, attr_flag, name, maxlen) \
|
||||
__array(attr_nr, attr_flag, name, NLA_NUL_STRING, char, maxlen, \
|
||||
nla_strlcpy, nla_put, false)
|
10
compat-4.7-50225243-kill-nla_put_u64.patch
Normal file
10
compat-4.7-50225243-kill-nla_put_u64.patch
Normal file
@ -0,0 +1,10 @@
|
||||
diff -Naur drbd-9.0.2+git.14d2eea.orig/drbd/drbd-kernel-compat/tests/have_aligned_nla_u64_pad.c drbd-9.0.2+git.14d2eea/drbd/drbd-kernel-compat/tests/have_aligned_nla_u64_pad.c
|
||||
--- drbd-9.0.2+git.14d2eea.orig/drbd/drbd-kernel-compat/tests/have_aligned_nla_u64_pad.c 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ drbd-9.0.2+git.14d2eea/drbd/drbd-kernel-compat/tests/have_aligned_nla_u64_pad.c 2016-06-09 07:56:36.081322856 +0800
|
||||
@@ -0,0 +1,6 @@
|
||||
+#include <net/netlink.h>
|
||||
+
|
||||
+void foo(void)
|
||||
+{
|
||||
+ nla_put_u64(NULL, 0, 0);
|
||||
+}
|
31
compat-4.7-9902af79-i_mutex.patch
Normal file
31
compat-4.7-9902af79-i_mutex.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/drbd/drbd_debugfs.c b/drbd/drbd_debugfs.c
|
||||
index 91292c3..959a576 100644
|
||||
--- a/drbd/drbd_debugfs.c
|
||||
+++ b/drbd/drbd_debugfs.c
|
||||
@@ -1074,7 +1074,7 @@ static int drbd_single_open_peer_device(struct file *file,
|
||||
parent = file->f_path.dentry->d_parent;
|
||||
if (!parent || !parent->d_inode)
|
||||
goto out;
|
||||
- mutex_lock(&parent->d_inode->i_mutex);
|
||||
+ inode_lock(d_inode(parent));
|
||||
if (!simple_positive(file->f_path.dentry))
|
||||
goto out_unlock;
|
||||
|
||||
@@ -1083,7 +1083,7 @@ static int drbd_single_open_peer_device(struct file *file,
|
||||
|
||||
if (got_connection && got_device) {
|
||||
int ret;
|
||||
- mutex_unlock(&parent->d_inode->i_mutex);
|
||||
+ inode_unlock(d_inode(parent));
|
||||
ret = single_open(file, show, peer_device);
|
||||
if (ret) {
|
||||
kref_put(&connection->kref, drbd_destroy_connection);
|
||||
@@ -1097,7 +1097,7 @@ static int drbd_single_open_peer_device(struct file *file,
|
||||
if (got_device)
|
||||
kref_put(&device->kref, drbd_destroy_device);
|
||||
out_unlock:
|
||||
- mutex_unlock(&parent->d_inode->i_mutex);
|
||||
+ inode_unlock(d_inode(parent));
|
||||
out:
|
||||
return -ESTALE;
|
||||
}
|
24
compat-4.7-fe8fb75e-blk_queue_write_cache.patch
Normal file
24
compat-4.7-fe8fb75e-blk_queue_write_cache.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Naur drbd-9.0.2+git.14d2eea.orig/drbd/drbd-kernel-compat/drbd_wrappers.h drbd-9.0.2+git.14d2eea/drbd/drbd-kernel-compat/drbd_wrappers.h
|
||||
--- drbd-9.0.2+git.14d2eea.orig/drbd/drbd-kernel-compat/drbd_wrappers.h 2016-06-08 17:52:23.920376490 +0800
|
||||
+++ drbd-9.0.2+git.14d2eea/drbd/drbd-kernel-compat/drbd_wrappers.h 2016-06-08 21:14:33.692708703 +0800
|
||||
@@ -677,6 +677,10 @@
|
||||
#define blk_queue_max_hw_sectors(q, max) blk_queue_max_sectors(q, max)
|
||||
#endif
|
||||
|
||||
+#ifndef COMPAT_HAVE_BLK_QUEUE_FLUSH
|
||||
+#define blk_queue_flush(q, f) blk_queue_write_cache(q, true, true)
|
||||
+#endif
|
||||
+
|
||||
#ifndef COMPAT_HAVE_BLK_QUEUE_MAX_SEGMENTS
|
||||
static inline void blk_queue_max_segments(struct request_queue *q, unsigned short max_segments)
|
||||
{
|
||||
diff -Naur drbd-9.0.2+git.14d2eea.orig/drbd/drbd-kernel-compat/tests/have_blk_queue_flush.c drbd-9.0.2+git.14d2eea/drbd/drbd-kernel-compat/tests/have_blk_queue_flush.c
|
||||
--- drbd-9.0.2+git.14d2eea.orig/drbd/drbd-kernel-compat/tests/have_blk_queue_flush.c 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ drbd-9.0.2+git.14d2eea/drbd/drbd-kernel-compat/tests/have_blk_queue_flush.c 2016-06-08 21:13:40.324918430 +0800
|
||||
@@ -0,0 +1,6 @@
|
||||
+#include <linux/blkdev.h>
|
||||
+
|
||||
+void dummy(struct request_queue *q, unsigned int flush)
|
||||
+{
|
||||
+ blk_queue_flush(q, flush);
|
||||
+}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6332f7aaed6766936f72c5b4f219411d86353c76d6354b43e656326e568b057c
|
||||
size 282662
|
3
drbd-9.0.2+git.14d2eea.tar.bz2
Normal file
3
drbd-9.0.2+git.14d2eea.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e6b1003e42a0541b5a589d4576a8e4271e17aafbf595df40fd4b91cf87432d6e
|
||||
size 288998
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 8 06:03:05 UTC 2016 - nwang@suse.com
|
||||
|
||||
- bsc#983633, upgrade to ver9.0.2 to build against kernel 4.6/4.7
|
||||
- Add patch compat-4.7-9902af79-i_mutex.patch
|
||||
- Add patch compat-4.7-fe8fb75e-blk_queue_write_cache.patch
|
||||
- Add patch compat-4.7-50225243-kill-nla_put_u64.patch
|
||||
- Add patch compat-4.7-1dee3f59-align-nla-u64.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 8 14:44:21 UTC 2016 - nwang@suse.com
|
||||
|
||||
|
17
drbd.spec
17
drbd.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package drbd
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -23,7 +23,7 @@
|
||||
%endif
|
||||
|
||||
Name: drbd
|
||||
Version: 9.0.1+git.86e4439
|
||||
Version: 9.0.2+git.14d2eea
|
||||
Release: 0
|
||||
Summary: DRBD driver for Linux
|
||||
License: GPL-2.0
|
||||
@ -34,8 +34,13 @@ Source1: preamble
|
||||
#In kernel is: kernel/drivers/block/drbd/drbd.ko
|
||||
Source2: Module.supported
|
||||
Source3: drbd_git_revision
|
||||
Patch0: kernel-4.5-compat.patch
|
||||
Patch1: drbd-buildcompare.patch
|
||||
Patch0: drbd-buildcompare.patch
|
||||
Patch1: kernel-4.5-compat.patch
|
||||
Patch2: compat-4.7-9902af79-i_mutex.patch
|
||||
Patch3: compat-4.7-fe8fb75e-blk_queue_write_cache.patch
|
||||
#Patch4 should work together with Patch5
|
||||
Patch4: compat-4.7-50225243-kill-nla_put_u64.patch
|
||||
Patch5: compat-4.7-1dee3f59-align-nla-u64.patch
|
||||
BuildRequires: kernel-source
|
||||
BuildRequires: kernel-syms
|
||||
BuildRequires: module-init-tools
|
||||
@ -71,6 +76,10 @@ installed kernel.
|
||||
%setup -q -n drbd-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
mkdir source
|
||||
cp -a drbd/. source/. || :
|
||||
|
@ -1 +1 @@
|
||||
GIT-hash: 86e443973082570aeb651848db89e0c7b995c306
|
||||
GIT-hash: 14d2eead95f99a7de1c0b3e3f335a30b8d486bcb
|
||||
|
Loading…
Reference in New Issue
Block a user