drbd: explicitly clear unused dp_flags in drbd_send_block
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 8 Feb 2012 14:32:51 +0000 (15:32 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:15 +0000 (16:58 +0100)
We send left-over garbage from the previous packet in P_DATA_REPLY and
P_RS_DATA_REPLY packets. That's bad behaviour.

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

index 8b99f4e28ccc2cdc5ff03df07aad7853fda73eaa..c312a3bb936756899bb6c52cf32d77a0e3322f34 100644 (file)
@@ -1882,6 +1882,7 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packet cmd,
        p->sector = cpu_to_be64(peer_req->i.sector);
        p->block_id = peer_req->block_id;
        p->seq_num = 0;  /* unused */
+       p->dp_flags = 0;
        if (dgs)
                drbd_csum_ee(mdev, mdev->tconn->integrity_tfm, peer_req, p + 1);
        err = __send_command(mdev->tconn, mdev->vnr, sock, cmd, sizeof(*p) + dgs, NULL, peer_req->i.size);
This page took 0.026276 seconds and 5 git commands to generate.