Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2017 20:00:37 +0100
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r314359 - in head: sbin/geom/class/part sys/geom/part
Message-ID:  <20170227190037.GA77465@x-wing>
In-Reply-To: <201702271754.v1RHs1LI096908@repo.freebsd.org>
References:  <201702271754.v1RHs1LI096908@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 27, 2017 at 05:54:01PM +0000, Mariusz Zaborski wrote:
> Author: oshogbo
> Date: Mon Feb 27 17:54:01 2017
> New Revision: 314359
> URL: https://svnweb.freebsd.org/changeset/base/314359
>=20
> Log:
>   Add sysctl to control auto resize of the GEOM metadata.
>  =20
>   Reviewed by:	AllanJude
>   Differential Revision:	https://reviews.freebsd.org/D9603
Sorry, I think I should add:
Discussed with: ae

Sorry about that,
Mariusz Zaborski
>=20
> Modified:
>   head/sbin/geom/class/part/gpart.8
>   head/sys/geom/part/g_part.c
>=20
> Modified: head/sbin/geom/class/part/gpart.8
> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sbin/geom/class/part/gpart.8	Mon Feb 27 17:50:38 2017	(r314358)
> +++ head/sbin/geom/class/part/gpart.8	Mon Feb 27 17:54:01 2017	(r314359)
> @@ -1146,6 +1146,18 @@ variables can be used to control the beh
>  GEOM class.
>  The default value is shown next to each variable.
>  .Bl -tag -width indent
> +.It Va kern.geom.part.auto_resize: No 1
> +This variable controls automatic resize behavior of
> +.Nm
> +GEOM class.
> +When this variable is enable and new size of provider is detected, the s=
chema
> +metadata is resized but all changes are not saved to disk, until
> +.Cm gpart commit
> +is run to confirm changes.
> +This behavior is also reported with diagnostic message:
> +.Sy "GEOM_PART: (provider) was automatically resized."
> +.Sy "Use `gpart commit (provider)` to save changes or `gpart undo (provi=
der)`"
> +.Sy "to revert them."
>  .It Va kern.geom.part.check_integrity : No 1
>  This variable controls the behaviour of metadata integrity checks.
>  When integrity checks are enabled, the
>=20
> Modified: head/sys/geom/part/g_part.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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/geom/part/g_part.c	Mon Feb 27 17:50:38 2017	(r314358)
> +++ head/sys/geom/part/g_part.c	Mon Feb 27 17:54:01 2017	(r314359)
> @@ -135,6 +135,10 @@ static u_int check_integrity =3D 1;
>  SYSCTL_UINT(_kern_geom_part, OID_AUTO, check_integrity,
>      CTLFLAG_RWTUN, &check_integrity, 1,
>      "Enable integrity checking");
> +static u_int auto_resize =3D 1;
> +SYSCTL_UINT(_kern_geom_part, OID_AUTO, auto_resize,
> +    CTLFLAG_RW, &auto_resize, 1,
> +    "Enable auto resize");
> =20
>  /*
>   * The GEOM partitioning class.
> @@ -2095,6 +2099,9 @@ g_part_resize(struct g_consumer *cp)
>  	G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, cp->provider->name));
>  	g_topology_assert();
> =20
> +	if (auto_resize =3D=3D 0)
> +		return;
> +
>  	table =3D cp->geom->softc;
>  	if (table->gpt_opened =3D=3D 0) {
>  		if (g_access(cp, 1, 1, 1) !=3D 0)
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"

--nFreZHaLTZJo0R7j
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkD1x0xkJXVVY1Gwf38KEGuLGxWQFAli0d1UACgkQ38KEGuLG
xWSFrw//cVyObvZYWjDaBooj//IQ+FVBUuKgruGrghs2qKsfhYKjZfdsZZfsRou2
pepUlkH1fh1xHeYj42Pbnp2EDhqoQUJPqib8uwEKVtR80ji2AfB5UVC4fzQfMWfe
lpbMiQWW0UEbKVRwoOgZLPUN/5Gp8wXTUUTM0jkATMrZ50Zxtls11315PYtTLXtz
zbjK474Nhypd/M8zuEhoqgs3Rq/kT3TbgeLF5HD75mFRNsNlPkEUCYMhbkuKKg8M
ObwYZMplCr72iDqSxq4eEqLu9NcEaVOllDQ2qozXoc/8OC6G9adt4vblgBwuA6qw
ZH0mOS9wNwgDhJLcJJcNy+ex93E9xEjhonfexoSpSOVNLumPnEcC4ktI3WMbI/yX
Z1HENRelgtqULn0cktVTSGxo6NTOXBN3LskkwIwCq+kD/gVHZiHtVeUv+uCqwbeA
1EfhJM4YpEdbPxoEpM3dW3FK6JtU5Bbr+d5wMWavquxlbhKnhi0m3iNOtZ8kxUAh
lFId1uoDxCjKLkYWfgiIvekWr+9uZZlQMjxv1LeR+QKCPLBMjV72Nl8LYuTnEVXm
lnkbmOPTcxvVWwBpyMo3DVzr1shEfRtE/9Yt26iJyScHfefgCoFg9PsM8okuuet2
wB0mAPdtbbj5+4IZYH2KwKTrgzK9EOyQndDq9fvcW9u4pbMQ7Hs=
=BJD7
-----END PGP SIGNATURE-----

--nFreZHaLTZJo0R7j--



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