drbd: need to set socket bufsize early to take effect
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 25 May 2010 14:18:01 +0000 (16:18 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 1 Jun 2010 09:12:27 +0000 (11:12 +0200)
commit5dbf1673383f2f1554f0634fdfc390d59dc2c7d6
treea63a9ed3528b35f943100072b88add3fca72dbaf
parent344fa462e3246bd102059ccc3c59deef416676dd
drbd: need to set socket bufsize early to take effect

quoting tcp(7):
    On individual connections, the socket buffer size must be set prior to the
    listen(2) or connect(2) calls in order to have it take effect.

This adds a wrapper to do so, and uses it appropriately.
Improves performance in certain situations.

Note that because we cannot easily determine which socket will be
"meta" and wich "data" (bulk) socket, we adjust both sockets.
Previously, DRBD only adjusted the bufsizes of the "data" socket.

Thanks again to Eduard.Guzovsky@stratus.com.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/drbd/drbd_receiver.c