1 .\" Author: Juli Mallett <jmallett@FreeBSD.org>
2 .\" Date: June 04, 2003
4 .\" Manual page for libufs functions:
12 .\" This file is in the public domain.
20 .Nm cgget , cgput , cgread , cgread1 , cgwrite , cgwrite1
21 .Nd read/write cylinder groups of UFS disks
27 .In ufs/ufs/ufsmount.h
32 .Fn cgget "int devfd" "struct fs *fs" "int cg" "struct cg *cgp"
34 .Fn cgput "int devfd" "struct fs *fs" "struct cg *cgp"
36 .Fn cgread "struct uufsd *disk"
38 .Fn cgread1 "struct uufsd *disk" "int cg"
40 .Fn cgwrite "struct uufsd *disk"
42 .Fn cgwrite1 "struct uufsd *disk" "int cg"
49 functions provide cylinder group reads for
57 functions provide cylinder group writes for
63 function reads the cylinder group specified by
65 into the buffer pointed to by
67 from the filesystem described by the
71 file descriptor that references the filesystem disk.
74 function is the only cylinder group read function that is safe to use
75 in threaded applications.
79 function writes the cylinder group specified by
81 to the filesystem described by the
85 file descriptor that references the filesystem disk.
88 function is the only cylinder group write function that is safe to use
89 in threaded applications.
92 function needs to be called only if the cylinder group has been
93 modified and the on-disk copy needs to be updated.
97 function reads from the cylinder group specified by
101 cylinder-group structure in a user-land UFS-disk structure.
104 field to the cylinder group number
109 function operates on sequential cylinder groups.
112 function is equivalent to calling
114 with a cylinder group specifier equivalent to the value of the current
116 field, and then incrementing the
122 function stores on disk the cylinder group held in the
124 cylinder-group structure in a user-land UFS-disk structure.
128 function provides no additional functionality over the
130 function as there is only one place that a given cylinder group
131 can correctly be written.
132 If the caller gets the
134 parameter wrong, the function fails with the error
136 This function remains only to provide backward compatibility.
140 function returns 0 if there are no more cylinder groups to read,
141 1 if there are more cylinder groups, and \-1 on error.
144 function returns 1 on success and \-1 on error.
145 The other functions return 0 on success and \-1 on error.
152 functions may fail and set
154 for any of the errors specified for the library function
162 functions may fail and set
164 for any of the errors specified for the library function
170 error if the cylinder group specified does not match the
171 cylinder group that it is requesting to write.
177 These functions first appeared as part of
182 .An Juli Mallett Aq Mt jmallett@FreeBSD.org
183 .An Marshall Kirk McKusick Aq Mt mckusick@FreeBSD.org