aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-03-30 10:00:17 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:45:10 -0500
commit0c8e36d9b843be56e4e43d4ef3c3eb6a97205599 (patch)
tree5f593c0b3c4a4052382fa2d23dff87281786e2ad /include
parente658983af6e62304be785cd6b0ae756723057395 (diff)
drbd: Introduce protocol version 100 headers
The 8 byte header finally becomes too small. With the protocol 100 header we have 16 bit for the volume number, proper 32 bit for the data length, and 32 bit for further extensions in the future. Previous versions of drbd are using version 80 headers for all packets short enough for protocol 80. They support both header versions in worker context, but only version 80 headers in asynchronous context. For backwards compatibility, continue to use version 80 headers for short packets before protocol version 100. From protocol version 100 on, use the same header version for all packets. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/drbd.h1
-rw-r--r--include/linux/drbd_genl.h2
-rw-r--r--include/linux/drbd_limits.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 60d308819096..fe8d6ba31bcb 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -341,6 +341,7 @@ enum drbd_timeout_flag {
341 341
342#define DRBD_MAGIC 0x83740267 342#define DRBD_MAGIC 0x83740267
343#define DRBD_MAGIC_BIG 0x835a 343#define DRBD_MAGIC_BIG 0x835a
344#define DRBD_MAGIC_100 0x8620ec20
344 345
345/* how I came up with this magic? 346/* how I came up with this magic?
346 * base64 decode "actlog==" ;) */ 347 * base64 decode "actlog==" ;) */
diff --git a/include/linux/drbd_genl.h b/include/linux/drbd_genl.h
index 938e8560a833..10144d546a66 100644
--- a/include/linux/drbd_genl.h
+++ b/include/linux/drbd_genl.h
@@ -95,8 +95,6 @@ GENL_struct(DRBD_NLA_CFG_REPLY, 1, drbd_cfg_reply,
95 * and/or the replication group (aka resource) name, 95 * and/or the replication group (aka resource) name,
96 * and the volume id within the resource. */ 96 * and the volume id within the resource. */
97GENL_struct(DRBD_NLA_CFG_CONTEXT, 2, drbd_cfg_context, 97GENL_struct(DRBD_NLA_CFG_CONTEXT, 2, drbd_cfg_context,
98 /* currently only 256 volumes per group,
99 * but maybe we still change that */
100 __u32_field(1, GENLA_F_MANDATORY, ctx_volume) 98 __u32_field(1, GENLA_F_MANDATORY, ctx_volume)
101 __str_field(2, GENLA_F_MANDATORY, ctx_conn_name, 128) 99 __str_field(2, GENLA_F_MANDATORY, ctx_conn_name, 128)
102) 100)
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h
index 659a8eb38830..7f5149bef70e 100644
--- a/include/linux/drbd_limits.h
+++ b/include/linux/drbd_limits.h
@@ -19,6 +19,8 @@
19#define DRBD_MINOR_COUNT_MAX 256 19#define DRBD_MINOR_COUNT_MAX 256
20#define DRBD_MINOR_COUNT_DEF 32 20#define DRBD_MINOR_COUNT_DEF 32
21 21
22#define DRBD_VOLUME_MAX 65535
23
22#define DRBD_DIALOG_REFRESH_MIN 0 24#define DRBD_DIALOG_REFRESH_MIN 0
23#define DRBD_DIALOG_REFRESH_MAX 600 25#define DRBD_DIALOG_REFRESH_MAX 600
24 26