Index: man4/geom.4 =================================================================== --- man4/geom.4 (revision 188913) +++ man4/geom.4 (working copy) @@ -249,7 +249,7 @@ which will propagate all the way down through the mesh. It will then detach and destroy its geom. .It -The geom whose provider is now attached will destroy the provider, +The geom whose provider is now detached will destroy the provider, detach and destroy its consumer and destroy its geom. .It This process percolates all the way down through the mesh, until @@ -431,6 +431,18 @@ .It 0x80 Pq Dv G_F_CTLDUMP Dump contents of gctl requests. .El +.Sh SEE ALSO +.Xr disk 9 , +.Xr DECLARE_GEOM_CLASS 9 , +.Xr g_access 9 , +.Xr g_attach 9 , +.Xr g_bio 9 , +.Xr g_consumer 9 , +.Xr g_data 9 , +.Xr g_event 9 , +.Xr g_geom 9 , +.Xr g_provider 9 , +.Xr g_provider_by_name 9 .Sh HISTORY This software was developed for the .Fx Index: man9/Makefile =================================================================== --- man9/Makefile (revision 188913) +++ man9/Makefile (working copy) @@ -575,7 +575,9 @@ devstat.9 devstat_end_transaction.9 \ devstat.9 devstat_remove_entry.9 \ devstat.9 devstat_start_transaction.9 -MLINKS+=disk.9 disk_create.9 \ +MLINKS+=disk.9 disk_alloc.9 \ + disk.9 disk_create.9 \ + disk.9 disk_gone.9 \ disk.9 disk_destroy.9 MLINKS+=domain.9 DOMAIN_SET.9 \ domain.9 net_add_domain.9 \ Index: man9/disk.9 =================================================================== --- man9/disk.9 (revision 188913) +++ man9/disk.9 (working copy) @@ -40,6 +40,8 @@ .Ft void .Fn disk_create "struct disk *disk" "int version" .Ft void +.Fn disk_gone "struct disk *disk" +.Ft void .Fn disk_destroy "struct disk *disk" .Sh DESCRIPTION The disk storage API permits kernel device drivers providing access to @@ -65,6 +67,11 @@ fill in the fields and call .Fn disk_create when the device is ready to service requests. +.Fn disk_gone +orphans all of the providers associated with the drive, setting an error +condition of ENXIO in each one. +In addition, it prevents a re-taste on last close for writing if an error +condition has been set in the provider. After calling .Fn disk_destroy , the device driver is not allowed to access the contents of