3 quotactl \- manipulate disk quotas
6 .B #include <sys/quota.h>
7 .B #include <xfs/xqm.h>
9 .B long quotactl(int cmd, char \(**special, qid_t id, caddr_t addr)
13 .IX "filesystem" "quotactl() disk quotas" "" "\fLquotactl()\fP \(em disk quotas"
14 .IX "quotactl() disk quotas" "" "\fLquotactl()\fP \(em disk quotas"
15 .IX "disk quotas quotactl()" "" "disk quotas \(em \fLquotactl()\fP"
19 call manipulates disk quotas.
21 indicates a command to be applied to
27 To set the type of quota use the
31 is a pointer to a null-terminated string containing the path
32 name of the block special device for the filesystem being manipulated.
34 is the address of an optional, command specific, data structure
35 which is copied in or out of the system. The interpretation of
37 is given with each command below.
40 Turn on quotas for a filesystem.
42 is the identification number of the quota format to be used. Format numbers
43 are defined in the header file of appropriate format. Currently there are
44 two supported quota formats whose numbers are defined by constants
46 (original quota format) and
48 (new VFS v0 quota format).
50 points to the path name of file containing the quotas for the filesystem.
51 The quota file must exist; it is normally created with the
53 program. This call is restricted to the super-user.
56 Turn off quotas for a filesystem.
61 This call is restricted to the super-user.
64 Get disk quota limits and current usage for user or group
73 defines the entries in the structure which are set correctly. On
75 call all entries are valid. Only the super-user may get the quotas
76 of a user other than himself.
79 Set current quota information for user or group
88 defines which entries in the quota structure are valid and should be set. The constants for
90 field are defined in the
92 header file. This call obsoletes calls
96 in the previous quota interfaces. This call is restricted to the super-user.
99 Get information (like grace times) about quotafile.
101 should be a pointer to an
103 structure (defined in
107 field in the structure defines entries in it
110 call all entries are valid.
116 Set information about quotafile.
118 should be a pointer to
120 structure (defined in
124 defines which entries in the quota info structure are valid and should be set. The constants for
126 field are defined in the
128 header file. This call obsoletes calls
132 in the previous quota interfaces. Parameter
134 is ignored. This operation is restricted to super-user.
137 Get quota format used on the specified filesystem.
139 should be a pointer to a memory (4 bytes) where the format number will be stored.
142 Update the on-disk copy of quota usages for a filesystem.
145 is null then all filesystems with active quotas are sync'ed.
152 Get statistics and other generic information about quota subsystem.
154 should be a pointer to
156 structure (defined in
158 in which data should be stored.
162 are ignored. This call is obsolete and not supported by recent kernels.
164 .B /proc/sys/fs/quota/
165 carry the information instead.
167 For XFS filesystems making use of the XFS Quota Manager (XQM), the above commands are bypassed and the following commands are used:
170 Turn on quotas for an XFS filesystem.
171 XFS provides the ability to turn on/off quota limit enforcement
172 with quota accounting.
173 Therefore, XFS expects the addr to be a pointer to an unsigned int
174 that contains either the flags XFS_QUOTA_UDQ_ACCT and/or
175 XFS_QUOTA_UDQ_ENFD (for user quota), or XFS_QUOTA_GDQ_ACCT and/or
176 XFS_QUOTA_GDQ_ENFD (for group quota), as defined in
178 This call is restricted to the superuser.
181 Turn off quotas for an XFS filesystem.
182 As in Q_QUOTAON, XFS filesystems expect a pointer to an unsigned int
183 that specifies whether quota accounting and/or limit enforcement need
185 This call is restricted to the superuser.
188 Get disk quota limits and current usage for user
193 structure (defined in
195 Only the superuser may get the quotas of a user other than himself.
198 Set disk quota limits for user
203 structure (defined in
205 This call is restricted to the superuser.
210 structure containing XFS filesystem specific quota information.
211 This is useful in finding out how much space is spent to store quota
212 information, and also to get quotaon/off status of a given local XFS
216 Free the disk space taken by disk quotas.
217 Quotas must have already been turned off.
219 There is no command equivalent to
223 writes quota information to disk (in addition to the other filesystem
224 metadata it writes out).
236 to indicate the error.
246 The kernel has not been compiled with the
258 The file specified by
266 is not a block device.
269 The call is privileged and the caller was not the super-user.
272 No disc quota is found for the indicated user. Quotas have not been turned on for this filesystem.
277 .BR \s-1Q_SETQUOTA\s0 ,
279 may also set errno to:
282 Specified limits are out of range allowed by quota format.
287 .BR \s-1Q_QUOTAON\s0 ,
289 may also set errno to:
292 The quota file pointed to by
294 exists but is not a regular file.
296 The quota file pointed to by
298 exists but is not on the
299 filesystem pointed to by
303 The quota file is corrupted.
306 Specified quota format was not found.
310 attempted while another
312 has already taken place.