Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2005 20:03:27 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Szalai Andras <andrew@djw.hu>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: geom orphan question 
Message-ID:  <5675.1129745007@critter.freebsd.dk>
In-Reply-To: Your message of "Wed, 19 Oct 2005 19:53:10 %2B0200." <20051019175310.GC76081@web.djw.hu> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20051019175310.GC76081@web.djw.hu>, Szalai Andras writes:

>I have spent few hours trying to understand geom. The I/O
>path is more or less okay, but I have problems with
>the orphanization procedure.
>
>For example, if you look into g_concat.c there is a 
>g_concat_orphan function that calls g_concat_remove_disk.
>In this function, gconcat
>
>1) orphans its own provider (g_orphan_provider),
>2) reset access counts (g_access), 
>3) detach consumer from the lower layer provider,
>4) destroy the consumer.
>
>In order to detach the consumer (step 3) you have to be sure 
>that there are no active requests (bios) between the consumer and
>provider. My question is how can I guarantee that there are 
>no active bios when I call g_detach?

There are counters in consumers and providers which can tell
you that.

The above code seems to play fast and loose with that aspect.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5675.1129745007>