diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-03-24 12:11:33 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-17 19:15:44 -0400 |
commit | e89b591c3aba0af87f5248b15f56ce7a4f439c16 (patch) | |
tree | 311b6977d986e9549ee9193b4471fc937007c3f5 /drivers/block/drbd/drbd_main.c | |
parent | 02d9a94bbb0d4e0fec8db6735bdc4ccfaac8f0ce (diff) |
drbd: Implemented flags for the resize packet
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 65c2a65d3d64..a478dad82dae 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1240,7 +1240,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
1240 | os.disk == D_ATTACHING && ns.disk == D_NEGOTIATING) { | 1240 | os.disk == D_ATTACHING && ns.disk == D_NEGOTIATING) { |
1241 | kfree(mdev->p_uuid); /* We expect to receive up-to-date UUIDs soon. */ | 1241 | kfree(mdev->p_uuid); /* We expect to receive up-to-date UUIDs soon. */ |
1242 | mdev->p_uuid = NULL; /* ...to not use the old ones in the mean time */ | 1242 | mdev->p_uuid = NULL; /* ...to not use the old ones in the mean time */ |
1243 | drbd_send_sizes(mdev, 0); /* to start sync... */ | 1243 | drbd_send_sizes(mdev, 0, 0); /* to start sync... */ |
1244 | drbd_send_uuids(mdev); | 1244 | drbd_send_uuids(mdev); |
1245 | drbd_send_state(mdev); | 1245 | drbd_send_state(mdev); |
1246 | } | 1246 | } |
@@ -1763,7 +1763,7 @@ int drbd_send_sync_uuid(struct drbd_conf *mdev, u64 val) | |||
1763 | (struct p_header *)&p, sizeof(p)); | 1763 | (struct p_header *)&p, sizeof(p)); |
1764 | } | 1764 | } |
1765 | 1765 | ||
1766 | int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply) | 1766 | int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply, enum dds_flags flags) |
1767 | { | 1767 | { |
1768 | struct p_sizes p; | 1768 | struct p_sizes p; |
1769 | sector_t d_size, u_size; | 1769 | sector_t d_size, u_size; |
@@ -1775,7 +1775,6 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply) | |||
1775 | d_size = drbd_get_max_capacity(mdev->ldev); | 1775 | d_size = drbd_get_max_capacity(mdev->ldev); |
1776 | u_size = mdev->ldev->dc.disk_size; | 1776 | u_size = mdev->ldev->dc.disk_size; |
1777 | q_order_type = drbd_queue_order_type(mdev); | 1777 | q_order_type = drbd_queue_order_type(mdev); |
1778 | p.queue_order_type = cpu_to_be32(drbd_queue_order_type(mdev)); | ||
1779 | put_ldev(mdev); | 1778 | put_ldev(mdev); |
1780 | } else { | 1779 | } else { |
1781 | d_size = 0; | 1780 | d_size = 0; |
@@ -1787,7 +1786,8 @@ int drbd_send_sizes(struct drbd_conf *mdev, int trigger_reply) | |||
1787 | p.u_size = cpu_to_be64(u_size); | 1786 | p.u_size = cpu_to_be64(u_size); |
1788 | p.c_size = cpu_to_be64(trigger_reply ? 0 : drbd_get_capacity(mdev->this_bdev)); | 1787 | p.c_size = cpu_to_be64(trigger_reply ? 0 : drbd_get_capacity(mdev->this_bdev)); |
1789 | p.max_segment_size = cpu_to_be32(queue_max_segment_size(mdev->rq_queue)); | 1788 | p.max_segment_size = cpu_to_be32(queue_max_segment_size(mdev->rq_queue)); |
1790 | p.queue_order_type = cpu_to_be32(q_order_type); | 1789 | p.queue_order_type = cpu_to_be16(q_order_type); |
1790 | p.dds_flags = cpu_to_be16(flags); | ||
1791 | 1791 | ||
1792 | ok = drbd_send_cmd(mdev, USE_DATA_SOCKET, P_SIZES, | 1792 | ok = drbd_send_cmd(mdev, USE_DATA_SOCKET, P_SIZES, |
1793 | (struct p_header *)&p, sizeof(p)); | 1793 | (struct p_header *)&p, sizeof(p)); |