All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org, Massimo Maggi <me@massimo-maggi.eu>
Subject: Re: [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo
Date: Sun, 05 May 2013 00:58:18 +0200	[thread overview]
Message-ID: <5185928A.9060905@gmail.com> (raw)
In-Reply-To: <510F96B1.6080509@massimo-maggi.eu>

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

The patches look ok. The patches it's based on look like original work.
However your patches are corrupted by your mailer beyond recovery. Can
you resend them as attachements with changelog mentionning the origin?

On 04.02.2013 12:08, Massimo Maggi wrote:

> Author: Massimo Maggi <me@massimo-maggi.eu>
> ---
>  grub-core/fs/zfs/zfsinfo.c | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/grub-core/fs/zfs/zfsinfo.c b/grub-core/fs/zfs/zfsinfo.c
> index fdb587a..c96bf21 100644
> --- a/grub-core/fs/zfs/zfsinfo.c
> +++ b/grub-core/fs/zfs/zfsinfo.c
> @@ -132,21 +132,31 @@ print_vdev_info (char *nvlist, int tab)
>        grub_free (path);
>        return GRUB_ERR_NONE;
>      }
> +  char is_mirror=(grub_strcmp(type,VDEV_TYPE_MIRROR) == 0);
> +  char is_raidz=(grub_strcmp(type,VDEV_TYPE_RAIDZ) == 0);
>  -  if (grub_strcmp (type, VDEV_TYPE_MIRROR) == 0)
> +  if (is_mirror || is_raidz)
>      {
>        int nelm, i;
>         nelm = grub_zfs_nvlist_lookup_nvlist_array_get_nelm
>  	(nvlist, ZPOOL_CONFIG_CHILDREN);
>  +      if(is_mirror){
> +	 grub_puts_ (N_("This VDEV is a mirror"));
> +      }
> +      else if(is_raidz){
> +	 grub_uint64_t parity;
> +	 grub_zfs_nvlist_lookup_uint64(nvlist,"nparity",&parity);
> +	 grub_printf_ (N_("This VDEV is a RAIDZ%llu\n"),(unsigned long
> long)parity);
> +      }
>        print_tabs (tab);
>        if (nelm <= 0)
>  	{
> -	  grub_puts_ (N_("Incorrect mirror"));
> +	  grub_puts_ (N_("Incorrect VDEV"));
>  	  return GRUB_ERR_NONE;
>  	}
> -      grub_printf_ (N_("Mirror with %d children\n"), nelm);
> +      grub_printf_ (N_("VDEV with %d children\n"), nelm);
>        print_state (nvlist, tab);
>        for (i = 0; i < nelm; i++)
>  	{
> @@ -162,14 +172,14 @@ print_vdev_info (char *nvlist, int tab)
>  		 total element number. And the number itself is fine,
>  		 only the element isn't.
>  	      */
> -	      grub_printf_ (N_("Mirror element number %d isn't correct\n"), i);
> +	      grub_printf_ (N_("VDEV element number %d isn't correct\n"), i);
>  	      continue;
>  	    }
>   	  /* TRANSLATORS: it's the element carying the number %d, not
>  	     total element number. This is used in enumeration
>  	     "Element number 1", "Element number 2", ... */
> -	  grub_printf_ (N_("Mirror element number %d:\n"), i);
> +	  grub_printf_ (N_("VDEV element number %d:\n"), i);
>  	  print_vdev_info (child, tab + 1);
>   	  grub_free (child);
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2013-05-04 22:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1359973957.git.me@massimo-maggi.eu>
2013-02-04 11:08 ` [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo Massimo Maggi
2013-05-04 22:58   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-05-06 15:05     ` Massimo Maggi
2013-05-06 18:10       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-06 21:03         ` Massimo Maggi
2013-08-09  0:00           ` Massimo Maggi
2013-08-09  2:39             ` Andrey Borzenkov
2013-08-09 18:46               ` Massimo Maggi
2013-02-04 11:09 ` [PATCH 2/5] Accept pool version 5000 for feature flags Massimo Maggi
2013-02-04 11:09 ` [PATCH 3/5] Refactoring of function nvlist_find_value Massimo Maggi
2013-02-04 11:09 ` [PATCH 4/5] Check for feature flags needed to read from the pool Massimo Maggi
2013-02-04 11:10 ` [PATCH 5/5] LZ4 compression in ZFS Massimo Maggi

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=5185928A.9060905@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=me@massimo-maggi.eu \
    /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.