From: NeilBrown <neilb@suse.com>
To: rgoldwyn@suse.de, linux-raid@vger.kernel.org
Cc: Goldwyn Rodrigues <rgoldwyn@suse.com>, Guoqing Jiang <gqjiang@suse.com>
Subject: Re: [PATCH 5/6] md-cluster: Fix the remove sequence with the new MD reload code
Date: Tue, 10 Nov 2015 10:49:37 +1100 [thread overview]
Message-ID: <87bnb2spgu.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1446781819-25571-5-git-send-email-rgoldwyn@suse.de>
[-- Attachment #1: Type: text/plain, Size: 2207 bytes --]
On Fri, Nov 06 2015, rgoldwyn@suse.de wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> The remove disk message does not need metadata_update_start(), but
> can be an independent message.
This looks good.
Applied - thanks.
NeilBrown
>
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
> ---
> drivers/md/md-cluster.c | 2 +-
> drivers/md/md.c | 9 +--------
> 2 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
> index 9a36ad6..33f5d7a 100644
> --- a/drivers/md/md-cluster.c
> +++ b/drivers/md/md-cluster.c
> @@ -1018,7 +1018,7 @@ static int remove_disk(struct mddev *mddev, struct md_rdev *rdev)
> struct md_cluster_info *cinfo = mddev->cluster_info;
> cmsg.type = cpu_to_le32(REMOVE);
> cmsg.raid_slot = cpu_to_le32(rdev->desc_nr);
> - return __sendmsg(cinfo, &cmsg);
> + return sendmsg(cinfo, &cmsg);
> }
>
> static int gather_bitmaps(struct md_rdev *rdev)
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 65b6326..4222285 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -6045,15 +6045,11 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
> {
> char b[BDEVNAME_SIZE];
> struct md_rdev *rdev;
> - int ret = -1;
>
> rdev = find_rdev(mddev, dev);
> if (!rdev)
> return -ENXIO;
>
> - if (mddev_is_clustered(mddev))
> - ret = md_cluster_ops->metadata_update_start(mddev);
> -
> if (rdev->raid_disk < 0)
> goto kick_rdev;
>
> @@ -6064,7 +6060,7 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
> goto busy;
>
> kick_rdev:
> - if (mddev_is_clustered(mddev) && ret == 0)
> + if (mddev_is_clustered(mddev))
> md_cluster_ops->remove_disk(mddev, rdev);
>
> md_kick_rdev_from_array(rdev);
> @@ -6073,9 +6069,6 @@ kick_rdev:
>
> return 0;
> busy:
> - if (mddev_is_clustered(mddev) && ret == 0)
> - md_cluster_ops->metadata_update_cancel(mddev);
> -
> printk(KERN_WARNING "md: cannot remove active disk %s from %s ...\n",
> bdevname(rdev->bdev,b), mdname(mddev));
> return -EBUSY;
> --
> 1.8.5.6
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2015-11-09 23:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 3:50 [PATCH 1/6] md-cluster: Protect communication with mutexes rgoldwyn
2015-11-06 3:50 ` [PATCH 2/6] md-cluster: Avoid the resync ping-pong rgoldwyn
2015-11-09 23:39 ` NeilBrown
2015-11-06 3:50 ` [PATCH 3/6] md-cluster: remove a disk asynchronously from cluster environment rgoldwyn
2015-11-09 23:43 ` NeilBrown
2015-11-06 3:50 ` [PATCH 4/6] md-cluster: Defer MD reloading to mddev->thread rgoldwyn
2015-11-09 23:48 ` NeilBrown
2015-11-10 3:26 ` Goldwyn Rodrigues
2015-11-20 8:25 ` [v2 PATCH] " Guoqing Jiang
2015-11-06 3:50 ` [PATCH 5/6] md-cluster: Fix the remove sequence with the new MD reload code rgoldwyn
2015-11-09 23:49 ` NeilBrown [this message]
2015-11-06 3:50 ` [PATCH 6/6] md-cluster: Allow spare devices to be marked as faulty rgoldwyn
2015-11-09 23:51 ` NeilBrown
2015-11-09 23:31 ` [PATCH 1/6] md-cluster: Protect communication with mutexes NeilBrown
2015-11-10 3:23 ` Goldwyn Rodrigues
2015-11-12 21:59 ` NeilBrown
2015-11-20 8:27 ` [v2 PATCH 2/5] " 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=87bnb2spgu.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=gqjiang@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=rgoldwyn@suse.com \
--cc=rgoldwyn@suse.de \
/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 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).