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.
18 .Nm cgget , cgput , cgread , cgread1 , cgwrite , cgwrite1
19 .Nd read/write cylinder groups of UFS disks
25 .In ufs/ufs/ufsmount.h
30 .Fn cgget "int devfd" "struct fs *fs" "int cg" "struct cg *cgp"
32 .Fn cgput "int devfd" "struct fs *fs" "struct cg *cgp"
34 .Fn cgread "struct uufsd *disk"
36 .Fn cgread1 "struct uufsd *disk" "int cg"
38 .Fn cgwrite "struct uufsd *disk"
40 .Fn cgwrite1 "struct uufsd *disk" "int cg"
47 functions provide cylinder group reads for
55 functions provide cylinder group writes for
61 function reads the cylinder group specified by
63 into the buffer pointed to by
65 from the filesystem described by the
69 file descriptor that references the filesystem disk.
72 function is the only cylinder group read function that is safe to use
73 in threaded applications.
77 function writes the cylinder group specified by
79 to the filesystem described by the
83 file descriptor that references the filesystem disk.
86 function is the only cylinder group write function that is safe to use
87 in threaded applications.
90 function needs to be called only if the cylinder group has been
91 modified and the on-disk copy needs to be updated.
95 function reads from the cylinder group specified by
99 cylinder-group structure in a user-land UFS-disk structure.
102 field to the cylinder group number
107 function operates on sequential cylinder groups.
110 function is equivalent to calling
112 with a cylinder group specifier equivalent to the value of the current
114 field, and then incrementing the
120 function stores on disk the cylinder group held in the
122 cylinder-group structure in a user-land UFS-disk structure.
126 function provides no additional functionality over the
128 function as there is only one place that a given cylinder group
129 can correctly be written.
130 If the caller gets the
132 parameter wrong, the function fails with the error
134 This function remains only to provide backward compatibility.
138 function returns 0 if there are no more cylinder groups to read,
139 1 if there are more cylinder groups, and \-1 on error.
142 function returns 1 on success and \-1 on error.
143 The other functions return 0 on success and \-1 on error.
150 functions may fail and set
152 for any of the errors specified for the library function
160 functions may fail and set
162 for any of the errors specified for the library function
168 error if the cylinder group specified does not match the
169 cylinder group that it is requesting to write.
175 These functions first appeared as part of
180 .An Juli Mallett Aq Mt jmallett@FreeBSD.org
181 .An Marshall Kirk McKusick Aq Mt mckusick@FreeBSD.org