drbd: Preallocate one page per drbd_socket as a receive buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 74637cc..932ba03 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -554,6 +554,8 @@
#error "PAGE_SIZE too small"
#endif
+#define DRBD_SOCKET_BUFFER_SIZE 4096
+
union p_polymorph {
struct p_header header;
struct p_handshake handshake;
@@ -803,7 +805,7 @@
/* this way we get our
* send/receive buffers off the stack */
union p_polymorph sbuf;
- union p_polymorph rbuf;
+ void *rbuf;
};
struct drbd_md {