HEADSUP: disk_*(9) API change mega-patch
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Feb 6 04:10:43 PST 2004
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.
+>
+> Kernel patch:
+> http://phk.freebsd.dk/patch/disk.patch
+>
+> Man-page update:
+> http://phk.freebsd.dk/patch/disk_man.patch
+>
+> Patch version: 2004-02-05.1
+>
+> 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.
+>
+> After this change the API works as follows:
+>
+> 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.
+>
+> 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.
+>
+> At the same time: eliminate unused arguments from disk_create(9)
+>
+> Reverse sense of DISKFLAG_NOGIANT, to DISKFLAG_NEEDSGIANT.
+>
+> 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=deadc0dd @ 0xc4174334
panic: Most recently used by devbuf
--
Pawel Jakub Dawidek http://www.FreeBSD.org
pjd at FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040206/0a85c9ed/attachment.bin
More information about the freebsd-current
mailing list