From owner-freebsd-geom@FreeBSD.ORG Wed Jul 7 01:29:06 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25B9516A4CE for ; Wed, 7 Jul 2004 01:29:06 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id A952143D46 for ; Wed, 7 Jul 2004 01:29:05 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 871FAACAF1; Wed, 7 Jul 2004 03:29:04 +0200 (CEST) Date: Wed, 7 Jul 2004 03:29:04 +0200 From: Pawel Jakub Dawidek To: geom@freebsd.org Message-ID: <20040707012904.GP12007@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rElBCCUBH2Mj3Q5T" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: Current GEOM problems. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 01:29:06 -0000 --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--