[Drbd-dev] [PATCH 09/10] drbd: Remove volume numbers from struct p_header95

Kyle Moffett kyle at moffetthome.net
Fri Sep 23 19:28:24 CEST 2011


Hi!

On Fri, Sep 23, 2011 at 10:31, Philipp Reisner
<philipp.reisner at linbit.com> wrote:
> From: Andreas Gruenbacher <agruen at linbit.com>
>
> Signed-off-by: Philipp Reisner <philipp.reisner at linbit.com>
> Signed-off-by: Lars Ellenberg <lars.ellenberg at linbit.com>
> ---
[...snip...]
> diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
> index 3310986..99b467e 100644
> --- a/drivers/block/drbd/drbd_main.c
> +++ b/drivers/block/drbd/drbd_main.c
> @@ -717,11 +717,11 @@ static unsigned int prepare_header80(struct p_header80 *h, enum drbd_packet cmd,
>        return sizeof(struct p_header80);
>  }
>
> -static unsigned int prepare_header95(struct p_header95 *h, enum drbd_packet cmd, int size, int vnr)
> +static unsigned int prepare_header95(struct p_header95 *h, enum drbd_packet cmd, int size)
>  {
>        h->magic   = cpu_to_be16(DRBD_MAGIC_BIG);
>        h->command = cpu_to_be16(cmd);
> -       h->vol_n_len = cpu_to_be32(vnr << 24 | size);
> +       h->length = cpu_to_be32(size);
>        return sizeof(struct p_header95);
>  }

This patch needs a commit message indicating why it does not break
compatibility.  If you are guaranteed that the "vnr" passed into
prepare_header95 is always zero, then you should indicate why that is
true.

Cheers,
Kyle Moffett


More information about the drbd-dev mailing list