From: NeilBrown <neilb@suse.de>
To: Adam Kwolek <adam.kwolek@intel.com>
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: Re: [PATCH 1/4] imsm: FIX: Cannot create volume
Date: Tue, 14 Jun 2011 12:07:04 +1000 [thread overview]
Message-ID: <20110614120704.54a58bbe@notabene.brown> (raw)
In-Reply-To: <20110609162912.690.5879.stgit@gklab-128-013.igk.intel.com>
On Thu, 09 Jun 2011 18:29:12 +0200 Adam Kwolek <adam.kwolek@intel.com> wrote:
> getinfo_super_imsm_volume() clears entire 'info' structure before filling with new
> information. Disk number and raid_disk can be required later by caller
> but it is lost.
>
> Restore disk number information in getinfo_super_imsm_volume() call.
I need a better explanation than this.
When is getinfo_super_imsm or getinfo_super_imsm_volume *ever* called in a
situation where 'info' contains a meaningful value for disk.number???
I could not find it.
Alternately, explain what goes wrong with the current code (yes, I could
probably test it myself ... but if you send a patch you should justify it).
So for now this patch has not been applied.
Thanks,
NeilBrown
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>
> super-intel.c | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 5c840ec..e094b85 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -2075,11 +2075,18 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
> unsigned int component_size_alligment;
> int map_disks = info->array.raid_disks;
>
> - memset(info, 0, sizeof(*info));
> if (prev_map)
> map_to_analyse = prev_map;
>
> dl = super->disks;
> + while (dl) {
> + if (dl->index == info->disk.number)
> + break;
> + dl = dl->next;
> + }
> + if (!dl)
> + dl = super->disks;
> + memset(info, 0, sizeof(*info));
>
> info->container_member = super->current_vol;
> info->array.raid_disks = map->num_members;
> @@ -2147,6 +2154,8 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
> if (dl) {
> info->disk.major = dl->major;
> info->disk.minor = dl->minor;
> + info->disk.number = dl->index;
> + info->disk.raid_disk = dl->index;
> }
>
> info->data_offset = __le32_to_cpu(map_to_analyse->pba_of_lba0);
next prev parent reply other threads:[~2011-06-14 2:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 16:29 [PATCH 0/4] IMSM Checkpointing Bug Fix Series (2) Adam Kwolek
2011-06-09 16:29 ` [PATCH 1/4] imsm: FIX: Cannot create volume Adam Kwolek
2011-06-14 2:07 ` NeilBrown [this message]
2011-06-14 9:21 ` Kwolek, Adam
2011-06-09 16:29 ` [PATCH 2/4] " Adam Kwolek
2011-06-14 2:35 ` NeilBrown
2011-06-09 16:29 ` [PATCH 3/4] imsm: FIX: Use function to obtain array layout Adam Kwolek
2011-06-09 16:29 ` [PATCH 4/4] imsm: FIX: Disable automatic metadata rollback for broken reshape Adam Kwolek
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=20110614120704.54a58bbe@notabene.brown \
--to=neilb@suse.de \
--cc=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=wojciech.neubauer@intel.com \
/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).