One more question: is here any way to know is consumer busy or not?

Poul-Henning Kamp phk at
Fri Dec 10 15:59:15 UTC 2010

In message <1136849868.20101210183322 at>, Lev Serebryakov writ
>Hello, Freebsd-geom.
>  The  same  idea about pre-reading in case of providers with multiple
>  consumers   (BTW,   I   think  that terminology here is swapped):

The provider offers access to a disk(-like) device, which the consumer
can use.

>  looks  good  to  issue  pre-read only if target consumer is idle. Is
>  here  any  way  to  determine  that? 

you can look at the nstart and nend elements of the g_consumer structure
to tell how many outstanding requests there are on that consumer.

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