GEOM: orphaning open devices

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Jun 17 11:53:38 GMT 2004


In message <20040617132625.A58154 at pcle2.cc.univie.ac.at>, Lukas Ertl writes:
>Hi GEOM hackers,
>
>I have the following scenario: a mirrored setup with two disks and a 
>filesystem on top of it.  Now, if I yank one disk while the fs is not 
>mounted, everything works as expected: disk_destroy is called and the 
>orphaning events make their way up.
>
>However, if the fs is mounted and I yank the disk, I don't see an 
>orphaning event until the fs is unmounted again, so it seems disk_destroy 
>is blocked or rather g_wither_geom waits until the device is closed, which 
>makes it rather useless in a production area.

That is a lot of ground and very little information.

the way this is supposed to happen is that you yank the disk,
which should orphan geom_disk::whatever and your mirror class
should get an orphan event to act on, and de-access and detach
your consumer, and that should let the geom_disk::geom wither
away.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-geom mailing list