diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-01-26 12:45:11 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-09-28 04:26:28 -0400 |
commit | 9e204cddaf76d19ce0e84f025b0946110694dbfb (patch) | |
tree | 1aa2b56518366033498a404bb4b35954894851d9 /drivers/block/drbd/drbd_main.c | |
parent | 3e394da184ab32d2c345fd459e1eeb7b9586bb4e (diff) |
drbd: Move some functions to where they are used
Move drbd_update_congested() to drbd_main.c, and drbd_req_new() and
drbd_req_free() to drbd_req.c: those functions are not used anywhere
else.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
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. |