Debian Codegraph @

upstream/opensuse-tumbleweed/man2/ioctl_xfs_getresblks.2

raw
1 .\" Copyright (c) 2019, Oracle. All rights reserved.
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" SPDX-License-Identifier: GPL-2.0+
5 .\" %%%LICENSE_END
6 .TH IOCTL-XFS-GETRESBLKS 2 2019-06-17 "XFS"
7 .SH NAME
8 ioctl_xfs_getresblks \- query and set XFS free space reservation information
9 .SH SYNOPSIS
10 .br
11 .B #include <xfs/xfs_fs.h>
12 .PP
13 .BI "int ioctl(int " fd ", XFS_IOC_GET_RESBLKS, struct xfs_fsop_resblks *" arg );
14 .br
15 .BI "int ioctl(int " fd ", XFS_IOC_SET_RESBLKS, struct xfs_fsop_resblks *" arg );
16 .SH DESCRIPTION
17 Query or set the free space reservation information.
18 These blocks are reserved by the filesystem as a final attempt to prevent
19 metadata update failures due to insufficient space.
20 Only the system administrator can use these ioctls, because overriding the
21 defaults is extremely dangerous.
22 .PP
23 This functionality is intended only for use by XFS filesystem developers.
24 .PP
25 The reservation information is conveyed in a structure of the following form:
26 .PP
27 .in +4n
28 .nf
29 struct xfs_fsop_resblks {
30 __u64 resblks;
31 __u64 resblks_avail;
32 };
33 .fi
34 .in
35 .PP
36 .I resblks
37 is the number of blocks that the filesystem will try to maintain to prevent
38 critical out of space situations.
39 .PP
40 .I resblks_avail
41 is the number of reserved blocks remaining.
42 .SH RETURN VALUE
43 On error, \-1 is returned, and
44 .I errno
45 is set to indicate the error.
46 .PP
47 .SH ERRORS
48 Error codes can be one of, but are not limited to, the following:
49 .TP
50 .B EFSBADCRC
51 Metadata checksum validation failed while performing the query.
52 .TP
53 .B EFSCORRUPTED
54 Metadata corruption was encountered while performing the query.
55 .TP
56 .B EINVAL
57 The specified allocation group number is not valid for this filesystem.
58 .TP
59 .B EIO
60 An I/O error was encountered while performing the query.
61 .TP
62 .B EPERM
63 Caller does not have permission to call this ioctl.
64 .SH CONFORMING TO
65 This API is specific to XFS filesystem on the Linux kernel.
66 .SH SEE ALSO
67 .BR ioctl (2)