geom orphan question

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Oct 19 11:41:56 PDT 2005


In message <20051019181231.GD76081 at web.djw.hu>, Szalai Andras writes:
>Hi,
>
>On Wed, Oct 19, 2005 at 08:03:27PM +0200, Poul-Henning Kamp wrote:
>> In message <20051019175310.GC76081 at web.djw.hu>, Szalai Andras writes:
>[...]
>
>> There are counters in consumers and providers which can tell
>> you that.
>> 
>> The above code seems to play fast and loose with that aspect.
>
>But it means that I have to do something similar to this?
>
>while (nstart != end) { wait... }
>g_detach(...)

That would require a thread you can sleep in.

A better way is to catch it in your bio_done, and fire off an
event to do the cleanup.

-- 
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