diff options
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 701f231cf4bf..5da1df023a49 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -2528,6 +2528,13 @@ static int we_should_drop_the_connection(struct drbd_conf *mdev, struct socket * | |||
2528 | return drop_it; /* && (mdev->state == R_PRIMARY) */; | 2528 | return drop_it; /* && (mdev->state == R_PRIMARY) */; |
2529 | } | 2529 | } |
2530 | 2530 | ||
2531 | static void drbd_update_congested(struct drbd_conf *mdev) | ||
2532 | { | ||
2533 | struct sock *sk = mdev->tconn->data.socket->sk; | ||
2534 | if (sk->sk_wmem_queued > sk->sk_sndbuf * 4 / 5) | ||
2535 | set_bit(NET_CONGESTED, &mdev->flags); | ||
2536 | } | ||
2537 | |||
2531 | /* The idea of sendpage seems to be to put some kind of reference | 2538 | /* The idea of sendpage seems to be to put some kind of reference |
2532 | * to the page into the skb, and to hand it over to the NIC. In | 2539 | * to the page into the skb, and to hand it over to the NIC. In |
2533 | * this process get_page() gets called. | 2540 | * this process get_page() gets called. |