Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 2004 03:29:04 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        geom@freebsd.org
Subject:   Current GEOM problems.
Message-ID:  <20040707012904.GP12007@darkness.comp.waw.pl>

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

--rElBCCUBH2Mj3Q5T
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi.

Because those bugs prevent me from moving forward, I'm sending again
problems that currently exists in GEOM.

1. Wrong KASSERT()s in geom_subr.c:

	KASSERT(dcr <=3D 0, ("spoiled but dcr =3D %d", dcr));
	KASSERT(dcw <=3D 0, ("spoiled but dcw =3D %d", dcw));
	KASSERT(dce <=3D 0, ("spoiled but dce =3D %d", dce));

Let's see why: We have two provider: md0 and md0.nop. Consumer related
to md0.nop is connected to md0. Now if new class is loaded GEOM gives
md0 for taste first. Let's say that md0 is what we were looking for,
so we open it for writing (it is marked as beeing spoiled). Now GEOM
gives md0.nop for taste, I open md0.nop for reading and NOP class opens
md0 for reading and panic, because all consumers connected to md0 were
marked as beeing spoiled.

So we could use:

	http://people.freebsd.org/~pjd/patches/geom_subr.c.17.patch

Or we can jusr replace those KASSERT()s with:

	if (dcr > 0 || dcw > 0 || dce > 0)
		return (EPERM);

2. Every class which use geom_slice cannot be unload when it has geoms
   (actually providers), because g_slice_destroy_geom() calls
   g_slice_spoiled() and g_slice_spoiled() calls g_wither_geom().
   If there are providers, geom will not be imediately destroyed,
   but orphan event will be send, so next time when g_slice_destroy_geom()
   will be called for the same geom it will panic, because gp->softc is
   NULL.

3. Problem which I reported not long ago: once_is_enough should be
   replaced.

When those bugs are going to be fixed? How can I help?

--=20
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd@FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

--rElBCCUBH2Mj3Q5T
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA61HgForvXbEpPzQRAl3RAKCE31CEb7UQ75hB9yK+8t5KMJE9swCg80BB
XstSJVAN8nk1V3Nc7X//S0c=
=7z6N
-----END PGP SIGNATURE-----

--rElBCCUBH2Mj3Q5T--



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