]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drbd: fix spurious protocol error
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 6 Sep 2010 10:31:37 +0000 (12:31 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 16:38:35 +0000 (18:38 +0200)
If we cannot satisfy a request (because our disk just broke),
we still need to drain the payload.  Or we'll get a protocol error
when interpreting the payload as DRBD packet header.

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

index e4e4eddf04f2d9b3ae22eedade318e12c4104f68..983e49cbd2336642da28bf7f4594741b231e11ad 100644 (file)
@@ -2085,7 +2085,8 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un
                            "no local data.\n");
                drbd_send_ack_rp(mdev, cmd == P_DATA_REQUEST ? P_NEG_DREPLY :
                                 P_NEG_RS_DREPLY , p);
-               return TRUE;
+               /* drain possibly payload */
+               return drbd_drain_block(mdev, digest_size);
        }
 
        /* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD