Deleted Added
full compact
g_consumer.9 (127371) g_consumer.9 (129381)
1.\"
2.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
1.\"
2.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/share/man/man9/g_consumer.9 127371 2004-03-24 14:25:46Z pjd $
25.\" $FreeBSD: head/share/man/man9/g_consumer.9 129381 2004-05-18 11:33:37Z le $
26.\"
27.Dd January 16, 2004
28.Dt g_consumer 9
29.Os
30.Sh NAME
31.Nm g_new_consumer ,
32.Nm g_destroy_consumer
33.Nd "GEOM consumers management"
34.Sh SYNOPSIS
35.In geom/geom.h
36.Ft "struct g_consumer *"
37.Fn g_new_consumer "struct g_geom *gp"
38.Ft void
39.Fn g_destroy_consumer "struct g_consumer *cp"
40.Sh DESCRIPTION
26.\"
27.Dd January 16, 2004
28.Dt g_consumer 9
29.Os
30.Sh NAME
31.Nm g_new_consumer ,
32.Nm g_destroy_consumer
33.Nd "GEOM consumers management"
34.Sh SYNOPSIS
35.In geom/geom.h
36.Ft "struct g_consumer *"
37.Fn g_new_consumer "struct g_geom *gp"
38.Ft void
39.Fn g_destroy_consumer "struct g_consumer *cp"
40.Sh DESCRIPTION
41The GEOM consumer is the backdoor through which a geom connects to
41A GEOM consumer is the backdoor through which a geom connects to
42another GEOM provider and through which I/O requests are sent.
43.Pp
44The
45.Fn g_new_consumer
42another GEOM provider and through which I/O requests are sent.
43.Pp
44The
45.Fn g_new_consumer
46function creates a new consumer releated to geom
46function creates a new consumer on geom
47.Fa gp .
47.Fa gp .
48The consumer is unusable prior attaching to a provider and gaining access
49to it.
50To serve its purpose, the consumer has to be attached to a provider
51with the
48Before using the new consumer, it has to be attached to a provider with
52.Xr g_attach 9
49.Xr g_attach 9
53function.
50and opened with
51.Xr g_access 9 .
54.Pp
55The
56.Fn g_destroy_consumer
52.Pp
53The
54.Fn g_destroy_consumer
57function destroys given consumer and cancels all related pending events.
55function destroys the given consumer and cancels all related pending events.
58This function is the last stage of killing an unwanted consumer.
59.Pp
60.Sh RESTRICTIONS/CONDITIONS
61.Fn g_new_consumer :
62.Bl -item -offset indent
63.It
56This function is the last stage of killing an unwanted consumer.
57.Pp
58.Sh RESTRICTIONS/CONDITIONS
59.Fn g_new_consumer :
60.Bl -item -offset indent
61.It
64The geom related to the created consumer must have the
62The geom
63.Fa gp
64has to have
65.Fa start
66and
67.Fa access
65.Fa start
66and
67.Fa access
68fields defined.
68methods defined.
69.It
70The topology lock has to be held.
71.El
72.Pp
73.Fn g_destroy_consumer :
74.Bl -item -offset indent
75.It
69.It
70The topology lock has to be held.
71.El
72.Pp
73.Fn g_destroy_consumer :
74.Bl -item -offset indent
75.It
76The consumer can not be attached.
76The consumer must not be attached to a provider.
77.It
78The access count has to be 0.
79.It
80The topology lock has to be held.
81.El
82.Sh RETURN VALUES
83.Fn g_new_consumer
84returns a pointer to the newly created consumer.

--- 54 unchanged lines hidden ---
77.It
78The access count has to be 0.
79.It
80The topology lock has to be held.
81.El
82.Sh RETURN VALUES
83.Fn g_new_consumer
84returns a pointer to the newly created consumer.

--- 54 unchanged lines hidden ---