linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] md-cluster: call md_kick_rdev_from_array once ack failed
@ 2016-07-28  6:16 Guoqing Jiang
  2016-07-28  6:16 ` [PATCH 2/8] md-cluster: use FORCEUNLOCK in lockres_free Guoqing Jiang
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Guoqing Jiang @ 2016-07-28  6:16 UTC (permalink / raw)
  To: shli; +Cc: linux-raid, Guoqing Jiang

The new_disk_ack could return failure if WAITING_FOR_NEWDISK
is not set, so we need to kick the dev from array in case
failure happened.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
 drivers/md/md.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 2ed547f..743cd21 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6092,9 +6092,11 @@ static int add_new_disk(struct mddev *mddev, mdu_disk_info_t *info)
 			export_rdev(rdev);
 
 		if (mddev_is_clustered(mddev)) {
-			if (info->state & (1 << MD_DISK_CANDIDATE))
-				md_cluster_ops->new_disk_ack(mddev, (err == 0));
-			else {
+			if (info->state & (1 << MD_DISK_CANDIDATE)) {
+				err = md_cluster_ops->new_disk_ack(mddev, (err == 0));
+				if (err)
+					md_kick_rdev_from_array(rdev);
+			} else {
 				if (err)
 					md_cluster_ops->add_new_disk_cancel(mddev);
 				else
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-08-06  3:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28  6:16 [PATCH 1/8] md-cluster: call md_kick_rdev_from_array once ack failed Guoqing Jiang
2016-07-28  6:16 ` [PATCH 2/8] md-cluster: use FORCEUNLOCK in lockres_free Guoqing Jiang
2016-07-28  6:16 ` [PATCH 3/8] md-cluster: remove some unnecessary dlm_unlock_sync Guoqing Jiang
2016-07-28  6:16 ` [PATCH 4/8] md-cluster: introduce dlm_lock_sync_interruptible to fix tasks hang Guoqing Jiang
2016-08-01 22:20   ` Shaohua Li
2016-08-02  3:24     ` Guoqing Jiang
2016-08-02 22:36       ` Shaohua Li
2016-08-03  2:39         ` Guoqing Jiang
2016-08-06  3:59           ` Shaohua Li
2016-07-28  6:16 ` [PATCH 5/8] md: changes for MD_STILL_CLOSED flag Guoqing Jiang
2016-07-28  6:16 ` [PATCH 6/8] md-cluster: make resync lock also could be interruptted Guoqing Jiang
2016-08-01 22:29   ` Shaohua Li
2016-08-02  1:38     ` Guoqing Jiang
2016-07-28  6:16 ` [PATCH 7/8] md-cluster: clean related infos of cluster Guoqing Jiang
2016-07-28  6:16 ` [PATCH 8/8] md-cluster: remove EXPERIMENTAL info Guoqing Jiang
2016-08-01 21:58 ` [PATCH 1/8] md-cluster: call md_kick_rdev_from_array once ack failed Shaohua Li
2016-08-02  3:21   ` Guoqing Jiang
     [not found]   ` <579FF771.4060007@suse.com>
2016-08-02 22:17     ` Shaohua Li
2016-08-03  2:15       ` Guoqing Jiang
2016-08-03  2:26 ` [PATCH V2 " Guoqing Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).