Commit f02d4d0a authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: drbd_send_sizes(): Return 0 upon success and an error code otherwise

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 9c1b7f72
...@@ -938,7 +938,6 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags fl ...@@ -938,7 +938,6 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags fl
struct p_sizes p; struct p_sizes p;
sector_t d_size, u_size; sector_t d_size, u_size;
int q_order_type, max_bio_size; int q_order_type, max_bio_size;
int ok;
if (get_ldev_if_state(mdev, D_NEGOTIATING)) { if (get_ldev_if_state(mdev, D_NEGOTIATING)) {
D_ASSERT(mdev->ldev->backing_bdev); D_ASSERT(mdev->ldev->backing_bdev);
...@@ -962,8 +961,7 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags fl ...@@ -962,8 +961,7 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags fl
p.queue_order_type = cpu_to_be16(q_order_type); p.queue_order_type = cpu_to_be16(q_order_type);
p.dds_flags = cpu_to_be16(flags); p.dds_flags = cpu_to_be16(flags);
ok = !drbd_send_cmd(mdev, &mdev->tconn->data, P_SIZES, &p.head, sizeof(p)); return drbd_send_cmd(mdev, &mdev->tconn->data, P_SIZES, &p.head, sizeof(p));
return ok;
} }
/** /**
......
...@@ -764,7 +764,7 @@ int drbd_connected(int vnr, void *p, void *data) ...@@ -764,7 +764,7 @@ int drbd_connected(int vnr, void *p, void *data)
&mdev->own_state_mutex; &mdev->own_state_mutex;
ok &= !drbd_send_sync_param(mdev); ok &= !drbd_send_sync_param(mdev);
ok &= drbd_send_sizes(mdev, 0, 0); ok &= !drbd_send_sizes(mdev, 0, 0);
ok &= !drbd_send_uuids(mdev); ok &= !drbd_send_uuids(mdev);
ok &= !drbd_send_state(mdev); ok &= !drbd_send_state(mdev);
clear_bit(USE_DEGR_WFC_T, &mdev->flags); clear_bit(USE_DEGR_WFC_T, &mdev->flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment