Commit b8ca846e authored by Goldwyn Rodrigues's avatar Goldwyn Rodrigues

md-cluster: Wake up suspended process

When the suspended_area is deleted, the suspended processes
must be woken up in order to complete their I/O.
Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
parent 09995411
...@@ -366,11 +366,13 @@ static void __remove_suspend_info(struct md_cluster_info *cinfo, int slot) ...@@ -366,11 +366,13 @@ static void __remove_suspend_info(struct md_cluster_info *cinfo, int slot)
} }
} }
static void remove_suspend_info(struct md_cluster_info *cinfo, int slot) static void remove_suspend_info(struct mddev *mddev, int slot)
{ {
struct md_cluster_info *cinfo = mddev->cluster_info;
spin_lock_irq(&cinfo->suspend_lock); spin_lock_irq(&cinfo->suspend_lock);
__remove_suspend_info(cinfo, slot); __remove_suspend_info(cinfo, slot);
spin_unlock_irq(&cinfo->suspend_lock); spin_unlock_irq(&cinfo->suspend_lock);
mddev->pers->quiesce(mddev, 2);
} }
...@@ -381,7 +383,7 @@ static void process_suspend_info(struct mddev *mddev, ...@@ -381,7 +383,7 @@ static void process_suspend_info(struct mddev *mddev,
struct suspend_info *s; struct suspend_info *s;
if (!hi) { if (!hi) {
remove_suspend_info(cinfo, slot); remove_suspend_info(mddev, slot);
return; return;
} }
s = kzalloc(sizeof(struct suspend_info), GFP_KERNEL); s = kzalloc(sizeof(struct suspend_info), GFP_KERNEL);
...@@ -397,6 +399,7 @@ static void process_suspend_info(struct mddev *mddev, ...@@ -397,6 +399,7 @@ static void process_suspend_info(struct mddev *mddev,
__remove_suspend_info(cinfo, slot); __remove_suspend_info(cinfo, slot);
list_add(&s->list, &cinfo->suspend_list); list_add(&s->list, &cinfo->suspend_list);
spin_unlock_irq(&cinfo->suspend_lock); spin_unlock_irq(&cinfo->suspend_lock);
mddev->pers->quiesce(mddev, 2);
} }
static void process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg) static void process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg)
......
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