1IOCTL-XFS-GETRESBLKS(2) System Calls Manual IOCTL-XFS-GETRESBLKS(2)
2
3
4
6 ioctl_xfs_getresblks - query and set XFS free space reservation infor‐
7 mation
8
10 #include <xfs/xfs_fs.h>
11
12 int ioctl(int fd, XFS_IOC_GET_RESBLKS, struct xfs_fsop_resblks *arg);
13 int ioctl(int fd, XFS_IOC_SET_RESBLKS, struct xfs_fsop_resblks *arg);
14
16 Query or set the free space reservation information. These blocks are
17 reserved by the filesystem as a final attempt to prevent metadata
18 update failures due to insufficient space. Only the system administra‐
19 tor can use these ioctls, because overriding the defaults is extremely
20 dangerous.
21
22 This functionality is intended only for use by XFS filesystem develop‐
23 ers.
24
25 The reservation information is conveyed in a structure of the following
26 form:
27
28 struct xfs_fsop_resblks {
29 __u64 resblks;
30 __u64 resblks_avail;
31 };
32
33 resblks is the number of blocks that the filesystem will try to main‐
34 tain to prevent critical out of space situations.
35
36 resblks_avail is the number of reserved blocks remaining.
37
39 On error, -1 is returned, and errno is set to indicate the error.
40
42 Error codes can be one of, but are not limited to, the following:
43
44 EFSBADCRC
45 Metadata checksum validation failed while performing the query.
46
47 EFSCORRUPTED
48 Metadata corruption was encountered while performing the query.
49
50 EINVAL The specified allocation group number is not valid for this
51 filesystem.
52
53 EIO An I/O error was encountered while performing the query.
54
55 EPERM Caller does not have permission to call this ioctl.
56
58 This API is specific to XFS filesystem on the Linux kernel.
59
61 ioctl(2)
62
63
64
65XFS 2019-06-17 IOCTL-XFS-GETRESBLKS(2)