aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-03-26 20:55:17 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:25 +0100
commit9ed57dcbda37a1a1fb25ccda4206cc417e54e813 (patch)
tree90ba7da0f3a11df687b6e53b95460f77b4d58df9 /drivers/block/drbd/drbd_main.c
parent648e46b531006b069c66f171151819d10b423c26 (diff)
drbd: ignore volume number for drbd barrier packet exchange
Transfer log epochs, and therefore P_BARRIER packets, are per resource, not per volume. We must not associate them with "some random volume". Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 5529d392e5d..f8438d426d0 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1463,21 +1463,21 @@ int drbd_send_bitmap(struct drbd_conf *mdev)
return err;
}
-void drbd_send_b_ack(struct drbd_conf *mdev, u32 barrier_nr, u32 set_size)
+void drbd_send_b_ack(struct drbd_tconn *tconn, u32 barrier_nr, u32 set_size)
{
struct drbd_socket *sock;
struct p_barrier_ack *p;
- if (mdev->state.conn < C_CONNECTED)
+ if (tconn->cstate < C_WF_REPORT_PARAMS)
return;
- sock = &mdev->tconn->meta;
- p = drbd_prepare_command(mdev, sock);
+ sock = &tconn->meta;
+ p = conn_prepare_command(tconn, sock);
if (!p)
return;
p->barrier = barrier_nr;
p->set_size = cpu_to_be32(set_size);
- drbd_send_command(mdev, sock, P_BARRIER_ACK, sizeof(*p), NULL, 0);
+ conn_send_command(tconn, sock, P_BARRIER_ACK, sizeof(*p), NULL, 0);
}
/**