All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <gqjiang@suse.com>
To: Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/8] md-cluster: call md_kick_rdev_from_array once ack failed
Date: Mon, 1 Aug 2016 23:21:14 -0400	[thread overview]
Message-ID: <57A011AA.3000801@suse.com> (raw)
In-Reply-To: <20160801215828.GA18810@kernel.org>



On 08/01/2016 05:58 PM, Shaohua Li wrote:
> On Thu, Jul 28, 2016 at 02:16:45AM -0400, Guoqing Jiang wrote:
>> 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)) {
> if err != 0, we already do export_rdev, do we need to do md_kick_rdev_from_array in that case?

I suppose you mean the export_rdev before new_disk_ack, it doesn't need 
to call md_kick_rdev_from_array
since we don't bind rdev to array successfully.

                  err = bind_rdev_to_array(rdev, mddev);

                 if (err)
*export_rdev*(rdev);

                 if (mddev_is_clustered(mddev)) {
                         if (info->state & (1 << MD_DISK_CANDIDATE))
md_cluster_ops->new_disk_ack(mddev, (err == 0));

But it is possible that new_disk_ack returns -EINVAL, and the rdev is 
binded with array, so we should call
md_kick_rdev_from_array for the case.

Thanks,
Guoqing

  reply	other threads:[~2016-08-02  3:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57A011AA.3000801@suse.com \
    --to=gqjiang@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.