From: NeilBrown <neilb@suse.de>
To: Maciej Naruszewicz <maciej.naruszewicz@intel.com>
Cc: linux-raid@vger.kernel.org, maciej.patelczyk@intel.com
Subject: Re: [PATCH 1/6] imsm: Add --export option for --detail-platform
Date: Tue, 2 Oct 2012 16:28:22 +1000 [thread overview]
Message-ID: <20121002162822.1f9df652@notabene.brown> (raw)
In-Reply-To: <20120926114243.328.15028.stgit@gklab-128-174.igk.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2687 bytes --]
On Wed, 26 Sep 2012 13:42:43 +0200 Maciej Naruszewicz
<maciej.naruszewicz@intel.com> wrote:
> This option will provide most of information we can get via
> mdadm --detail-platform [-e format] in the key=value format.
> Example output:
>
> $ mdadm --detail-platform
> Platform : Intel(R) Matrix Storage Manager
> Version : 9.5.0.1037
> RAID Levels : raid0 raid1 raid10 raid5
> Chunk Sizes : 4k 8k 16k 32k 64k 128k
> 2TB volumes : supported
> 2TB disks : not supported
> Max Disks : 7
> Max Volumes : 2 per array, 4 per controller
> I/O Controller : /sys/devices/pci0000:00/0000:00:1f.2 (SATA)
>
> $ mdadm --detail-platform --export
> MD_FIRMWARE_TYPE=imsm
> IMSM_VERSION=9.5.0.1037
> IMSM_SUPPORTED_RAID_LEVELS=raid0 raid1 raid10 raid5
> IMSM_SUPPORTED_CHUNK_SIZES=4k 8k 16k 32k 64k 128k
> IMSM_2TB_VOLUMES=yes
> IMSM_2TB_DISKS=no
> IMSM_MAX_DISKS=7
> IMSM_MAX_VOLUMES_PER_ARRAY=2
> IMSM_MAX_VOLUMES_PER_CONTROLLER=4
>
> Signed-off-by: Maciej Naruszewicz <maciej.naruszewicz@intel.com>
> ---
> Detail.c | 8 +++++--
> ReadMe.c | 4 ++-
> mdadm.8.in | 2 +-
> mdadm.c | 2 +-
> mdadm.h | 3 ++
> super-intel.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 82 insertions(+), 7 deletions(-)
>
> diff --git a/Detail.c b/Detail.c
> index f633d93..b0c31e6 100644
> --- a/Detail.c
> +++ b/Detail.c
> @@ -616,7 +616,7 @@ out:
> return rv;
> }
>
> -int Detail_Platform(struct superswitch *ss, int scan, int verbose)
> +int Detail_Platform(struct superswitch *ss, int scan, int verbose, int export)
> {
> /* display platform capabilities for the given metadata format
> * 'scan' in this context means iterate over all metadata types
> @@ -624,7 +624,9 @@ int Detail_Platform(struct superswitch *ss, int scan, int verbose)
> int i;
> int err = 1;
>
> - if (ss && ss->detail_platform)
> + if (ss && export && ss->export_detail_platform)
> + err = ss->export_detail_platform(verbose);
> + else if (ss && ss->detail_platform)
> err = ss->detail_platform(verbose, 0);
> else if (ss) {
> if (verbose > 0)
> @@ -650,6 +652,8 @@ int Detail_Platform(struct superswitch *ss, int scan, int verbose)
> if (verbose > 0)
> pr_err("%s metadata is platform independent\n",
> meta->name ? : "[no name]");
> + } else if (export){
> + err |= meta->export_detail_platform(verbose);
> } else
> err |= meta->detail_platform(verbose, 0);
> }
I changed this to:
} else if (export && meta->export_detail_platform) {
otherwise looks good,
thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-10-02 6:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 11:42 [mdadm,v1 PATCH 0/6] Extend mdadm [...] --export Maciej Naruszewicz
2012-09-26 11:42 ` [PATCH 1/6] imsm: Add --export option for --detail-platform Maciej Naruszewicz
2012-10-02 6:28 ` NeilBrown [this message]
2012-09-26 11:42 ` [PATCH 2/6] imsm: Add --controller-path " Maciej Naruszewicz
2012-10-02 6:36 ` NeilBrown
2012-10-02 10:54 ` Maciej Naruszewicz
2012-09-26 11:42 ` [PATCH 3/6] Fix return code " Maciej Naruszewicz
2012-10-02 6:38 ` NeilBrown
2012-09-26 11:44 ` [PATCH 4/6] Synchronize size calculation in human_size and human_size_brief Maciej Naruszewicz
2012-10-02 6:40 ` NeilBrown
2012-09-26 11:44 ` [PATCH 5/6] Display size with human_size_brief with a chosen prefix Maciej Naruszewicz
2012-10-02 6:41 ` NeilBrown
2012-09-26 11:44 ` [PATCH 6/6] Add MD_ARRAY_SIZE for --examine --export Maciej Naruszewicz
2012-10-02 6:42 ` NeilBrown
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=20121002162822.1f9df652@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=maciej.naruszewicz@intel.com \
--cc=maciej.patelczyk@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).