Commit 7da3d203 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Shaohua Li

md-cluster: add CHANGE_CAPACITY message type

The msg type CHANGE_CAPACITY is introduced to support
resize clustered raid in later patch, and it is sent
after all the nodes have the same sync_size, receiver
node just need to set new capacity once received this
msg.
Reviewed-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 0ba95977
...@@ -104,6 +104,7 @@ enum msg_type { ...@@ -104,6 +104,7 @@ enum msg_type {
REMOVE, REMOVE,
RE_ADD, RE_ADD,
BITMAP_NEEDS_SYNC, BITMAP_NEEDS_SYNC,
CHANGE_CAPACITY,
}; };
struct cluster_msg { struct cluster_msg {
...@@ -579,6 +580,10 @@ static int process_recvd_msg(struct mddev *mddev, struct cluster_msg *msg) ...@@ -579,6 +580,10 @@ static int process_recvd_msg(struct mddev *mddev, struct cluster_msg *msg)
case METADATA_UPDATED: case METADATA_UPDATED:
process_metadata_update(mddev, msg); process_metadata_update(mddev, msg);
break; break;
case CHANGE_CAPACITY:
set_capacity(mddev->gendisk, mddev->array_sectors);
revalidate_disk(mddev->gendisk);
break;
case RESYNCING: case RESYNCING:
process_suspend_info(mddev, le32_to_cpu(msg->slot), process_suspend_info(mddev, le32_to_cpu(msg->slot),
le64_to_cpu(msg->low), le64_to_cpu(msg->low),
......
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