Deleted Added
full compact
g_access.9 (131594) g_access.9 (131689)
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_access.9 131594 2004-07-04 20:55:50Z ru $
25.\" $FreeBSD: head/share/man/man9/g_access.9 131689 2004-07-06 08:21:12Z ru $
26.\"
27.Dd January 16, 2004
26.\"
27.Dd January 16, 2004
28.Dt g_access 9
28.Dt G_ACCESS 9
29.Os
30.Sh NAME
31.Nm g_access
32.Nd "control access to GEOM consumers and their providers"
33.Sh SYNOPSIS
34.In geom/geom.h
35.Ft int
36.Fn g_access "struct g_consumer *cp" "int dcr" "int dcw" "int dce"

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

47.Fa dce
48represent relative read, write, and exclusive access count changes.
49Read and write access counts are self explanatory, and
50exclusive access counts deny write access to other interested parties.
51A provider's access count is the sum of the access counts of all
52attached consumers.
53.Pp
54After attaching a consumer to a provider with
29.Os
30.Sh NAME
31.Nm g_access
32.Nd "control access to GEOM consumers and their providers"
33.Sh SYNOPSIS
34.In geom/geom.h
35.Ft int
36.Fn g_access "struct g_consumer *cp" "int dcr" "int dcw" "int dce"

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

47.Fa dce
48represent relative read, write, and exclusive access count changes.
49Read and write access counts are self explanatory, and
50exclusive access counts deny write access to other interested parties.
51A provider's access count is the sum of the access counts of all
52attached consumers.
53.Pp
54After attaching a consumer to a provider with
55.Fn g_attach ,
55.Xr g_attach 9 ,
56the
57.Fn g_access
58function has to be called on the consumer before starting I/O requests.
59.Sh RESTRICTIONS/CONDITIONS
60The consumer has to be attached to a provider.
61.Pp
62The intended change must not result in a negative access count.
63.Pp
56the
57.Fn g_access
58function has to be called on the consumer before starting I/O requests.
59.Sh RESTRICTIONS/CONDITIONS
60The consumer has to be attached to a provider.
61.Pp
62The intended change must not result in a negative access count.
63.Pp
64No\-operation is not permitted
64No-operation is not permitted
65.Fa ( dcr
66=
67.Fa dcw
68=
69.Fa dce
70=
65.Fa ( dcr
66=
67.Fa dcw
68=
69.Fa dce
70=
71.Va 0 ) .
71.Li 0 ) .
72.Pp
72.Pp
73The provider's geom must have an access method defined (e.g.\& gp->access).
73The provider's geom must have an access method defined (e.g.,
74.Va gp->access ) .
74.Pp
75The topology lock has to be held.
76.Sh RETURN VALUES
77The
78.Fn g_access
79function returns 0 if successful; otherwise an error code is returned.
80Note that
81.Fn g_access

--- 83 unchanged lines hidden ---
75.Pp
76The topology lock has to be held.
77.Sh RETURN VALUES
78The
79.Fn g_access
80function returns 0 if successful; otherwise an error code is returned.
81Note that
82.Fn g_access

--- 83 unchanged lines hidden ---