]> git.proxmox.com Git - pve-kernel-jessie.git/blob - drbdpatches/linux-4.2-compile-fix.patch
acba427f4d5b84774bec4e1f410547687f686581
[pve-kernel-jessie.git] / drbdpatches / linux-4.2-compile-fix.patch
1 Index: drbd-src/drbd/drbd_main.c
2 ===================================================================
3 --- drbd-src.orig/drbd/drbd_main.c
4 +++ drbd-src/drbd/drbd_main.c
5 @@ -2809,7 +2809,7 @@ static void drbd_cleanup(void)
6 * @congested_data: User data
7 * @bdi_bits: Bits the BDI flusher thread is currently interested in
8 *
9 - * Returns 1<<BDI_async_congested and/or 1<<BDI_sync_congested if we are congested.
10 + * Returns 1<<WB_async_congested and/or 1<<WB_sync_congested if we are congested.
11 */
12 static int drbd_congested(void *congested_data, int bdi_bits)
13 {
14 @@ -2824,14 +2824,14 @@ static int drbd_congested(void *congeste
15 }
16
17 if (test_bit(CALLBACK_PENDING, &device->resource->flags)) {
18 - r |= (1 << BDI_async_congested);
19 + r |= (1 << WB_async_congested);
20 /* Without good local data, we would need to read from remote,
21 * and that would need the worker thread as well, which is
22 * currently blocked waiting for that usermode helper to
23 * finish.
24 */
25 if (!get_ldev_if_state(device, D_UP_TO_DATE))
26 - r |= (1 << BDI_sync_congested);
27 + r |= (1 << WB_sync_congested);
28 else
29 put_ldev(device);
30 r &= bdi_bits;
31 @@ -2844,13 +2844,13 @@ static int drbd_congested(void *congeste
32 put_ldev(device);
33 }
34
35 - if (bdi_bits & (1 << BDI_async_congested)) {
36 + if (bdi_bits & (1 << WB_async_congested)) {
37 struct drbd_peer_device *peer_device;
38
39 rcu_read_lock();
40 for_each_peer_device_rcu(peer_device, device) {
41 if (test_bit(NET_CONGESTED, &peer_device->connection->transport.flags)) {
42 - r |= (1 << BDI_async_congested);
43 + r |= (1 << WB_async_congested);
44 break;
45 }
46 }
47 Index: drbd-src/drbd/drbd_nl.c
48 ===================================================================
49 --- drbd-src.orig/drbd/drbd_nl.c
50 +++ drbd-src/drbd/drbd_nl.c
51 @@ -4202,8 +4202,8 @@ static void device_to_statistics(struct
52 q = bdev_get_queue(device->ldev->backing_bdev);
53 s->dev_lower_blocked =
54 bdi_congested(&q->backing_dev_info,
55 - (1 << BDI_async_congested) |
56 - (1 << BDI_sync_congested));
57 + (1 << WB_async_congested) |
58 + (1 << WB_sync_congested));
59 put_ldev(device);
60 }
61 s->dev_size = drbd_get_capacity(device->this_bdev);
62 Index: drbd-src/drbd/drbd_transport_tcp.c
63 ===================================================================
64 --- drbd-src.orig/drbd/drbd_transport_tcp.c
65 +++ drbd-src/drbd/drbd_transport_tcp.c
66 @@ -373,7 +373,7 @@ static int dtt_try_connect(struct drbd_t
67 peer_addr = dtt_path(transport)->peer_addr;
68
69 what = "sock_create_kern";
70 - err = sock_create_kern(my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP, &socket);
71 + err = sock_create_kern(&init_net, my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP, &socket);
72 if (err < 0) {
73 socket = NULL;
74 goto out;
75 @@ -695,7 +695,7 @@ static int dtt_create_listener(struct dr
76 my_addr = dtt_path(transport)->my_addr;
77
78 what = "sock_create_kern";
79 - err = sock_create_kern(my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP, &s_listen);
80 + err = sock_create_kern(&init_net, my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP, &s_listen);
81 if (err) {
82 s_listen = NULL;
83 goto out;
84 Index: drbd-src/drbd/drbd_int.h
85 ===================================================================
86 --- drbd-src.orig/drbd/drbd_int.h
87 +++ drbd-src/drbd/drbd_int.h
88 @@ -40,6 +40,7 @@
89 #include <linux/idr.h>
90 #include <linux/lru_cache.h>
91 #include <linux/prefetch.h>
92 +#include <linux/backing-dev.h>
93 #include <linux/drbd_genl_api.h>
94 #include <linux/drbd.h>
95 #include <linux/drbd_config.h>