Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
> > Somebody already wrote a patch for that?
> See upstream kernel commit 703c270887bb510
>
> The patch should be very simple, just replace 'bdi_read_congested(bdi)'
> with 'inode_write_congested(inode)' or
> 'inode_write_congested(mapping->host)' if appropriate.
Thanks for that hint. It compiles with the following patch, do
I dont really know if that is correct?
Index: drbd-src/drbd/drbd_main.c
===================================================================
--- drbd-src.orig/drbd/drbd_main.c
+++ drbd-src/drbd/drbd_main.c
@@ -2809,7 +2809,7 @@ static void drbd_cleanup(void)
* @congested_data: User data
* @bdi_bits: Bits the BDI flusher thread is currently interested in
*
- * Returns 1<<BDI_async_congested and/or 1<<BDI_sync_congested if we are
congested.
+ * Returns 1<<WB_async_congested and/or 1<<WB_sync_congested if we are
congested.
*/
static int drbd_congested(void *congested_data, int bdi_bits)
{
@@ -2824,14 +2824,14 @@ static int drbd_congested(void *congeste
}
if (test_bit(CALLBACK_PENDING, &device->resource->flags)) {
- r |= (1 << BDI_async_congested);
+ r |= (1 << WB_async_congested);
/* Without good local data, we would need to read from remote,
* and that would need the worker thread as well, which is
* currently blocked waiting for that usermode helper to
* finish.
*/
if (!get_ldev_if_state(device, D_UP_TO_DATE))
- r |= (1 << BDI_sync_congested);
+ r |= (1 << WB_sync_congested);
else
put_ldev(device);
r &= bdi_bits;
@@ -2844,13 +2844,13 @@ static int drbd_congested(void *congeste
put_ldev(device);
}
- if (bdi_bits & (1 << BDI_async_congested)) {
+ if (bdi_bits & (1 << WB_async_congested)) {
struct drbd_peer_device *peer_device;
rcu_read_lock();
for_each_peer_device_rcu(peer_device, device) {
if (test_bit(NET_CONGESTED, &peer_device->connection->transport.flags)) {
- r |= (1 << BDI_async_congested);
+ r |= (1 << WB_async_congested);
break;
}
}
Index: drbd-src/drbd/drbd_nl.c
===================================================================
--- drbd-src.orig/drbd/drbd_nl.c
+++ drbd-src/drbd/drbd_nl.c
@@ -4202,8 +4202,8 @@ static void device_to_statistics(struct
q = bdev_get_queue(device->ldev->backing_bdev);
s->dev_lower_blocked =
bdi_congested(&q->backing_dev_info,
- (1 << BDI_async_congested) |
- (1 << BDI_sync_congested));
+ (1 << WB_async_congested) |
+ (1 << WB_sync_congested));
put_ldev(device);
}
s->dev_size = drbd_get_capacity(device->this_bdev);
Index: drbd-src/drbd/drbd_transport_tcp.c
===================================================================
--- drbd-src.orig/drbd/drbd_transport_tcp.c
+++ drbd-src/drbd/drbd_transport_tcp.c
@@ -373,7 +373,7 @@ static int dtt_try_connect(struct drbd_t
peer_addr = dtt_path(transport)->peer_addr;
what = "sock_create_kern";
- err = sock_create_kern(my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP, &socket);
+ err = sock_create_kern(&init_net, my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP,
&socket);
if (err < 0) {
socket = NULL;
goto out;
@@ -695,7 +695,7 @@ static int dtt_create_listener(struct dr
my_addr = dtt_path(transport)->my_addr;
what = "sock_create_kern";
- err = sock_create_kern(my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP,
&s_listen);
+ err = sock_create_kern(&init_net, my_addr.ss_family, SOCK_STREAM, IPPROTO_TCP,
&s_listen);
if (err) {
s_listen = NULL;
goto out;
Index: drbd-src/drbd/drbd_int.h
===================================================================
--- drbd-src.orig/drbd/drbd_int.h
+++ drbd-src/drbd/drbd_int.h
@@ -40,6 +40,7 @@
#include <linux/idr.h>
#include <linux/lru_cache.h>
#include <linux/prefetch.h>
+#include <linux/backing-dev.h>
#include <linux/drbd_genl_api.h>
#include <linux/drbd.h>
#include <linux/drbd_config.h>