From: Guoqing Jiang <GQJiang@suse.com>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: neilb@suse.de, linux-raid@vger.kernel.org
Subject: Re: [PATCH 4/4] md-cluster: re-add
Date: Fri, 10 Apr 2015 17:43:02 +0800 [thread overview]
Message-ID: <55279B26.1090402@suse.com> (raw)
In-Reply-To: <20150408192414.GA9693@shrek.lan>
Hi Goldwyn,
> diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
> index d036c83..afffbee 100644
> --- a/drivers/md/md-cluster.c
> +++ b/drivers/md/md-cluster.c
> @@ -50,6 +50,7 @@ struct md_cluster_info {
> /* dlm lock space and resources for clustered raid. */
> dlm_lockspace_t *lockspace;
> int slot_number;
> + int total_slots;
>
There are two "nodes" in bitmap_info and bitmap_super_t, is it possible
to use
the existed nodes? Instead of introduce a new member in md_cluster_info.
drivers/md/bitmap.c:440: sb->nodes =
cpu_to_le32(bitmap->mddev->bitmap_info.nodes);
drivers/md/bitmap.c:552: int nodes = 0;
drivers/md/bitmap.c:610: nodes = le32_to_cpu(sb->nodes);
drivers/md/bitmap.c:688: bitmap->mddev->bitmap_info.nodes = nodes;
> @@ -653,6 +671,7 @@ static int join(struct mddev *mddev, int nodes)
> ret = -ERANGE;
> goto err;
> }
> + cinfo->total_slots = nodes;
>
The nodes is got from "nodes = le32_to_cpu(sb->nodes);", right?
> cinfo->sb_lock = lockres_init(mddev, "cmd-super",
> NULL, 0);
> if (!cinfo->sb_lock) {
> @@ -900,6 +919,34 @@ static int remove_disk(struct mddev *mddev, struct md_rdev *rdev)
> return __sendmsg(cinfo, &cmsg);
> }
>
> +static int gather_bitmaps(struct md_rdev *rdev)
> +{
> + int sn, err;
> + sector_t lo, hi;
> + struct cluster_msg cmsg;
> + struct mddev *mddev = rdev->mddev;
> + struct md_cluster_info *cinfo = mddev->cluster_info;
> + struct mdp_superblock_1 *sb = page_address(rdev->sb_page);
> + char *uuid = sb->device_uuid;
> +
> + for (sn = 0; sn < cinfo->total_slots; sn++) {
>
The last place which used total_slots.
Thanks,
Guoqing
next prev parent reply other threads:[~2015-04-10 9:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 19:24 [PATCH 4/4] md-cluster: re-add Goldwyn Rodrigues
2015-04-08 23:55 ` NeilBrown
2015-04-10 3:49 ` Goldwyn Rodrigues
2015-04-10 9:43 ` Guoqing Jiang [this message]
2015-04-10 13:37 ` Goldwyn Rodrigues
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=55279B26.1090402@suse.com \
--to=gqjiang@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--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).