From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UZPrx-0002Kr-L4 for mharc-grub-devel@gnu.org; Mon, 06 May 2013 14:10:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZPrr-0002AR-Cg for grub-devel@gnu.org; Mon, 06 May 2013 14:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZPrp-0002VH-Dj for grub-devel@gnu.org; Mon, 06 May 2013 14:10:31 -0400 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:64150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZPrp-0002Uw-4r for grub-devel@gnu.org; Mon, 06 May 2013 14:10:29 -0400 Received: by mail-ea0-f170.google.com with SMTP id z7so1831183eaf.15 for ; Mon, 06 May 2013 11:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type; bh=AU78FDzbvHo+kZRaHq9mgTGoQ+6Rndbu7RoFUrlaDB8=; b=U0kTHl8e7k5QpcAmdreWGAsXGviBnjvs9wvzdRbDGb5nVnmtT0oLw+oGBeWAHZ5wp3 MyPE2yEHhWrTsZNhucQKTbr0ne9rone4cu9nzMljrhhaeoKKfdx9AvwyWEuNGRxsAATy MRJBSYP18MNIYfxglGHxPjLtrPWrPrqfHAIOWywButDJCMbMnRQvQwD8WZA9cbzaI5cP iJ/a1u8vLOE1uCWwBHXTT7LKgpuL8uUSo03hhHtRv4YbCzxDv9GzP9H1M8elhwYXTLLE Xh0X54lj98uHJfhgNwykYHkQy2WFOawJ+jYnPHx2KrwkLGtjyWkSHX8a1Fr9Z/Sei+JT /C6w== X-Received: by 10.14.208.132 with SMTP id q4mr54686342eeo.35.1367863828010; Mon, 06 May 2013 11:10:28 -0700 (PDT) Received: from debian.x201.phnet (245-188.1-85.cust.bluewin.ch. [85.1.188.245]) by mx.google.com with ESMTPSA id k43sm34865164een.2.2013.05.06.11.10.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 May 2013 11:10:26 -0700 (PDT) Message-ID: <5187F205.8000105@gmail.com> Date: Mon, 06 May 2013 20:10:13 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Massimo Maggi Subject: Re: [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo References: <510F96B1.6080509@massimo-maggi.eu> <5185928A.9060905@gmail.com> <5187C6B6.1060709@massimo-maggi.eu> In-Reply-To: <5187C6B6.1060709@massimo-maggi.eu> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig4FE45166DC83180ED7654EB0" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22a Cc: grub-devel@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2013 18:10:36 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4FE45166DC83180ED7654EB0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06.05.2013 17:05, Massimo Maggi wrote: > I confirm that the patch attached to this message was written by me > without copying/porting/ other code. >=20 > A commit message for this single patch could be: >=20 > The ZFS code actually present in GRUB2 is able to correctly read from > RAID-Z vdev's, but zfsinfo reports them as unknown vdev's. > This commit fixes zfsinfo to correctly report informations about RAID-Z= > vdev's. >=20 I meant other patches as well. Can you resend them as attachements? > Regards, > Massimo Maggi >=20 > On 05/05/2013 00:58, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >> The patches look ok. The patches it's based on look like original work= =2E >> 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 >>> --- >>> 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=3D(grub_strcmp(type,VDEV_TYPE_MIRROR) =3D=3D 0); >>> + char is_raidz=3D(grub_strcmp(type,VDEV_TYPE_RAIDZ) =3D=3D 0); >>> - if (grub_strcmp (type, VDEV_TYPE_MIRROR) =3D=3D 0) >>> + if (is_mirror || is_raidz) >>> { >>> int nelm, i; >>> nelm =3D 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 <=3D 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 =3D 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 >> >> >> >=20 --------------enig4FE45166DC83180ED7654EB0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlGH8hAACgkQNak7dOguQgndqAEAxDRj7n2KsEz2J1w4HrTkjh2I tbDJLgsnc7dI9ZPgjo4A/194WDdu75tRlku8Gogu/s3Ax60Yxd7ThrrLnb9ZVYP1 =vvd7 -----END PGP SIGNATURE----- --------------enig4FE45166DC83180ED7654EB0--