drbd: Removed outdated comments and code that envisioned VNRs in header 95
authorAndreas Gruenbacher <agruen@linbit.com>
Tue, 22 Mar 2011 12:17:47 +0000 (13:17 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:45:10 +0000 (16:45 +0100)
Since have now header 100, that has space for 16 bit volume numbers,
the high byte of the length in header 95 is no longer reserved for
8 bit volume numbers.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_receiver.c

index bf1aad683387c0acd4703e609b06f3e745cc0c5b..43e9490fabeb24782bc63076f11b17fb41d8fc20 100644 (file)
@@ -304,7 +304,7 @@ struct p_header80 {
 struct p_header95 {
        u16       magic;        /* use DRBD_MAGIC_BIG here */
        u16       command;
-       u32       length;       /* Use only 24 bits of that. Ignore the highest 8 bit. */
+       u32       length;
 } __packed;
 
 struct p_header100 {
index 5d9112cefcd727d015e1c8b399f6af9af35f2ce9..e1aef12e5091f3aa0a25273af39b4c42707a3cec 100644 (file)
@@ -721,7 +721,7 @@ static unsigned int prepare_header95(struct p_header95 *h, enum drbd_packet cmd,
 {
        h->magic   = cpu_to_be16(DRBD_MAGIC_BIG);
        h->command = cpu_to_be16(cmd);
-       h->length  = cpu_to_be32(size);
+       h->length = cpu_to_be32(size);
        return sizeof(struct p_header95);
 }
 
index 311b95453cb7e29d008ef3d2cd74773290e02661..f846e55c174033ed5e4ce998e637ca459d02839f 100644 (file)
@@ -996,10 +996,9 @@ static int decode_header(struct drbd_tconn *tconn, void *header, struct packet_i
        } else if (header_size == sizeof(struct p_header95) &&
                   *(__be16 *)header == cpu_to_be16(DRBD_MAGIC_BIG)) {
                struct p_header95 *h = header;
-
                pi->cmd = be16_to_cpu(h->command);
-               pi->size = be32_to_cpu(h->length) & 0x00ffffff;
-               pi->vnr  = 0;
+               pi->size = be32_to_cpu(h->length);
+               pi->vnr = 0;
        } else if (header_size == sizeof(struct p_header80) &&
                   *(__be32 *)header == cpu_to_be32(DRBD_MAGIC)) {
                struct p_header80 *h = header;