diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-13 09:32:44 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 12:38:51 -0400 |
commit | b18b37befb37810ce50e1a9b0a6206dfe363d827 (patch) | |
tree | 02c8c204225c9214141abc14982eee82b1d22411 /drivers/block | |
parent | e9e6f3ec535d7b7c9e2ca64ad691e743e7d3c2f0 (diff) |
drbd: Do not log an ASSERT for P_OV_REQUEST packets while C_CONNECTED
This might happen if on the VERIFY_S node the disk gets dropped.
Although this is an cluster wide state transition, the VERIFY_T node,
updates it connection state first. Then the ack packet for the
cluster wide state transition travels back, and the VERIFY_S node
stops to produce the P_OV_REQUEST packets.
There is absolutely nothing wrong with that.
Further, do not log "Can not satisfy peer's..." on the VERIFY_S
node in this case, but pretend that they had equal checksum.
[Bugz 327]
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 71775a9de21d..4dc6a8870526 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -2079,7 +2079,7 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un | |||
2079 | const sector_t capacity = drbd_get_capacity(mdev->this_bdev); | 2079 | const sector_t capacity = drbd_get_capacity(mdev->this_bdev); |
2080 | struct drbd_epoch_entry *e; | 2080 | struct drbd_epoch_entry *e; |
2081 | struct digest_info *di = NULL; | 2081 | struct digest_info *di = NULL; |
2082 | int size; | 2082 | int size, verb; |
2083 | unsigned int fault_type; | 2083 | unsigned int fault_type; |
2084 | struct p_block_req *p = &mdev->data.rbuf.block_req; | 2084 | struct p_block_req *p = &mdev->data.rbuf.block_req; |
2085 | 2085 | ||
@@ -2098,11 +2098,29 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un | |||
2098 | } | 2098 | } |
2099 | 2099 | ||
2100 | if (!get_ldev_if_state(mdev, D_UP_TO_DATE)) { | 2100 | if (!get_ldev_if_state(mdev, D_UP_TO_DATE)) { |
2101 | if (__ratelimit(&drbd_ratelimit_state)) | 2101 | verb = 1; |
2102 | switch (cmd) { | ||
2103 | case P_DATA_REQUEST: | ||
2104 | drbd_send_ack_rp(mdev, P_NEG_DREPLY, p); | ||
2105 | break; | ||
2106 | case P_RS_DATA_REQUEST: | ||
2107 | case P_CSUM_RS_REQUEST: | ||
2108 | case P_OV_REQUEST: | ||
2109 | drbd_send_ack_rp(mdev, P_NEG_RS_DREPLY , p); | ||
2110 | break; | ||
2111 | case P_OV_REPLY: | ||
2112 | verb = 0; | ||
2113 | dec_rs_pending(mdev); | ||
2114 | drbd_send_ack_ex(mdev, P_OV_RESULT, sector, size, ID_IN_SYNC); | ||
2115 | break; | ||
2116 | default: | ||
2117 | dev_err(DEV, "unexpected command (%s) in receive_DataRequest\n", | ||
2118 | cmdname(cmd)); | ||
2119 | } | ||
2120 | if (verb && __ratelimit(&drbd_ratelimit_state)) | ||
2102 | dev_err(DEV, "Can not satisfy peer's read request, " | 2121 | dev_err(DEV, "Can not satisfy peer's read request, " |
2103 | "no local data.\n"); | 2122 | "no local data.\n"); |
2104 | drbd_send_ack_rp(mdev, cmd == P_DATA_REQUEST ? P_NEG_DREPLY : | 2123 | |
2105 | P_NEG_RS_DREPLY , p); | ||
2106 | /* drain possibly payload */ | 2124 | /* drain possibly payload */ |
2107 | return drbd_drain_block(mdev, digest_size); | 2125 | return drbd_drain_block(mdev, digest_size); |
2108 | } | 2126 | } |
@@ -2157,10 +2175,6 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un | |||
2157 | break; | 2175 | break; |
2158 | 2176 | ||
2159 | case P_OV_REQUEST: | 2177 | case P_OV_REQUEST: |
2160 | if (mdev->state.conn >= C_CONNECTED && | ||
2161 | mdev->state.conn != C_VERIFY_T) | ||
2162 | dev_warn(DEV, "ASSERT FAILED: got P_OV_REQUEST while being %s\n", | ||
2163 | drbd_conn_str(mdev->state.conn)); | ||
2164 | if (mdev->ov_start_sector == ~(sector_t)0 && | 2178 | if (mdev->ov_start_sector == ~(sector_t)0 && |
2165 | mdev->agreed_pro_version >= 90) { | 2179 | mdev->agreed_pro_version >= 90) { |
2166 | mdev->ov_start_sector = sector; | 2180 | mdev->ov_start_sector = sector; |