Date: Fri, 6 Feb 2004 13:12:44 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: current@freebsd.org Subject: Re: HEADSUP: disk_*(9) API change mega-patch Message-ID: <20040206121244.GN14639@garage.freebsd.pl> In-Reply-To: <39982.1075975367@critter.freebsd.dk> References: <39982.1075975367@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
--o+ZCuNqY+dEAKBWl Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 05, 2004 at 11:02:47AM +0100, Poul-Henning Kamp wrote: +> This is a mostly mechanical and largely untested patch, so please test +> carefully if you have the necessary hardware. +>=20 +> Kernel patch: +> http://phk.freebsd.dk/patch/disk.patch +>=20 +> Man-page update: +> http://phk.freebsd.dk/patch/disk_man.patch +>=20 +> Patch version: 2004-02-05.1 +>=20 +> This patch changes the disk_*(9) API so that ownership of the "struct +> disk" is moved from the device drivers to GEOM. This removes a lot +> of trouble from the disk_destroy(9) handling, which should be robust +> with this patch. +>=20 +> After this change the API works as follows: +>=20 +> allocated struct disk with disk_alloc(), store pointer in softc. +> populate fields, including d_unit and d_flags which were +> previous arguments to disk_create(). +> call disk_create() with the pointer. +>=20 +> call disk_destroy() to signal that the device has disappeared. +> NB: do not access struct disk in the driver anymore! +> return any outstanding requests with suitable error. +>=20 +> At the same time: eliminate unused arguments from disk_create(9) +>=20 +> Reverse sense of DISKFLAG_NOGIANT, to DISKFLAG_NEEDSGIANT. +>=20 +> Two weeks review It panics my system when I'm booting it with USB bar inserted or when I insert it after boot: Memory modified after free 0xc4174300(124) val=3Ddeadc0dd @ 0xc4174334 panic: Most recently used by devbuf --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --o+ZCuNqY+dEAKBWl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQFAI4S8ForvXbEpPzQRAol7AJ9Oce9Q5QclTAo3Yx1uoQww0V7mDACfThRQ 39+rq0w9w5k4metPznGIMAs= =80TY -----END PGP SIGNATURE----- --o+ZCuNqY+dEAKBWl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040206121244.GN14639>