aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2010-09-06 06:31:37 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 12:38:35 -0400
commita821cc4a9a8d9e67356f9a5cfc1206aa3cfd30f7 (patch)
treed63daf31b85cefc993e6345fcd3ef3f6faac6474
parent1d53f09e170e477de67babd7a10e277479260d51 (diff)
drbd: fix spurious protocol error
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>
-rw-r--r--drivers/block/drbd/drbd_receiver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index e4e4eddf04f2..983e49cbd233 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2085,7 +2085,8 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un
2085 "no local data.\n"); 2085 "no local data.\n");
2086 drbd_send_ack_rp(mdev, cmd == P_DATA_REQUEST ? P_NEG_DREPLY : 2086 drbd_send_ack_rp(mdev, cmd == P_DATA_REQUEST ? P_NEG_DREPLY :
2087 P_NEG_RS_DREPLY , p); 2087 P_NEG_RS_DREPLY , p);
2088 return TRUE; 2088 /* drain possibly payload */
2089 return drbd_drain_block(mdev, digest_size);
2089 } 2090 }
2090 2091
2091 /* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD 2092 /* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD