Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2015 11:57:07 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Willem Jan Withagen <wjw@digiware.nl>, fs@freebsd.org
Subject:   Re: resampeling of a ZVOL that has been resized
Message-ID:  <553DF9E3.1090609@yandex.ru>
In-Reply-To: <553B7200.7090002@digiware.nl>
References:  <55381127.4090603@digiware.nl> <5539B0C4.6070000@yandex.ru> <553B7200.7090002@digiware.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--aOfp1KQW1LkD2LC3WVA9wDLHbcxd9oaFr
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 25.04.2015 13:52, Willem Jan Withagen wrote:
> So it seems that although gpart understands that the ZVOL volume has
> grown, it does not take it far enough and set it to CORRUPTED and then
> let the user correct/grow it.

Can you try this patch?

Index: head/sys/geom/part/g_part_gpt.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- head/sys/geom/part/g_part_gpt.c	(revision 282044)
+++ head/sys/geom/part/g_part_gpt.c	(working copy)
@@ -760,7 +760,7 @@ g_part_gpt_resize(struct g_part_table *basetable,
 	struct g_part_gpt_entry *entry;

 	if (baseentry =3D=3D NULL)
-		return (EOPNOTSUPP);
+		return (g_part_gpt_recover(basetable));

 	entry =3D (struct g_part_gpt_entry *)baseentry;
 	baseentry->gpe_end =3D baseentry->gpe_start + gpp->gpp_size - 1;

--=20
WBR, Andrey V. Elsukov


--aOfp1KQW1LkD2LC3WVA9wDLHbcxd9oaFr
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJVPfnjAAoJEAHF6gQQyKF6q1AIAKPD/O4Yf2lhSFY8K3uYVVJd
JJB+yXpUzuRCFWo8xpir31XnOztwBPK3qD5gIibHWlpExqvTWz9G51OQSNz4W9BE
hwNFNe5r/tW0m9KvY3jG6GaOOJHBPHNOLskstdeHlzCPoJrlsRwxtk4hWDWgp3+l
FxvptQnxvetZ2WE/3EbEkLinH40apyAivNye7IA6DnCUYAh5E24LiQjRFwZ+dJ6u
GTBaKoRYNwDYRP7DiIUN24mwqlsbYo8gvK9eiWNRCRVU50HH7HH0KPhIO7eW7iS8
JpcPeX9Ca/qyYhRW5TxEYRewVF4QV4rFwjO8mYva/YBpF0C12RSR+FVYUIJlqJA=
=h1L9
-----END PGP SIGNATURE-----

--aOfp1KQW1LkD2LC3WVA9wDLHbcxd9oaFr--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?553DF9E3.1090609>