From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
Cc: linux-raid@vger.kernel.org, tomasz.majchrzak@intel.com,
aleksey.obitotskiy@intel.com, pawel.baldysiak@intel.com,
artur.paszkiewicz@intel.com, maksymilian.kunt@intel.com
Subject: Re: [PATCH v2] Fix RAID metadata check
Date: Thu, 22 Sep 2016 11:35:32 -0400 [thread overview]
Message-ID: <wrfjtwd82bi3.fsf@redhat.com> (raw)
In-Reply-To: <1474527731-29542-1-git-send-email-mariusz.dabrowski@intel.com> (Mariusz Dabrowski's message of "Thu, 22 Sep 2016 09:02:11 +0200")
Mariusz Dabrowski <mariusz.dabrowski@intel.com> writes:
> mdadm recognizes devices with partition table as part of an RAID array
> and invalid warning message is displayed. After this fix proper warning
> messages are being displayed for MBR/GPT disks and devices with RAID
> metadata.
>
> Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
> ---
> util.c | 27 ++++++++++++++++-----------
> 1 file changed, 16 insertions(+), 11 deletions(-)
Looks good, applied!
Thanks,
Jes
> diff --git a/util.c b/util.c
> index 8b52242..a238a21 100644
> --- a/util.c
> +++ b/util.c
> @@ -710,17 +710,22 @@ int check_raid(int fd, char *name)
>
> if (!st)
> return 0;
> - st->ss->load_super(st, fd, name);
> - /* Looks like a raid array .. */
> - pr_err("%s appears to be part of a raid array:\n",
> - name);
> - st->ss->getinfo_super(st, &info, NULL);
> - st->ss->free_super(st);
> - crtime = info.array.ctime;
> - level = map_num(pers, info.array.level);
> - if (!level) level = "-unknown-";
> - cont_err("level=%s devices=%d ctime=%s",
> - level, info.array.raid_disks, ctime(&crtime));
> + if (st->ss->add_to_super != NULL) {
> + st->ss->load_super(st, fd, name);
> + /* Looks like a raid array .. */
> + pr_err("%s appears to be part of a raid array:\n", name);
> + st->ss->getinfo_super(st, &info, NULL);
> + st->ss->free_super(st);
> + crtime = info.array.ctime;
> + level = map_num(pers, info.array.level);
> + if (!level)
> + level = "-unknown-";
> + cont_err("level=%s devices=%d ctime=%s",
> + level, info.array.raid_disks, ctime(&crtime));
> + } else {
> + /* Looks like GPT or MBR */
> + pr_err("partition table exists on %s\n", name);
> + }
> return 1;
> }
prev parent reply other threads:[~2016-09-22 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 7:02 [PATCH v2] Fix RAID metadata check Mariusz Dabrowski
2016-09-22 15:35 ` Jes Sorensen [this message]
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=wrfjtwd82bi3.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=aleksey.obitotskiy@intel.com \
--cc=artur.paszkiewicz@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=maksymilian.kunt@intel.com \
--cc=mariusz.dabrowski@intel.com \
--cc=pawel.baldysiak@intel.com \
--cc=tomasz.majchrzak@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 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.