1IOCTL-XFS-FSCOUNTS(2) System Calls Manual IOCTL-XFS-FSCOUNTS(2)
2
3
4
6 ioctl_xfs_fscounts - query XFS summary counter information
7
9 #include <xfs/xfs_fs.h>
10
11 int ioctl(int fd, XFS_IOC_FSCOUNTS, struct xfs_fsop_counts *arg);
12
14 Query the raw filesystem summary counters. Unlike statvfs(3), the val‐
15 ues returned here are the raw values, which do not reflect any alter‐
16 ations or limits set by project quotas. The counter information is
17 conveyed in a structure of the following form:
18
19 struct xfs_fsop_counts {
20 __u64 freedata;
21 __u64 freertx;
22 __u64 freeino;
23 __u64 allocino;
24 };
25
26 The fields of this structure are as follows:
27
28 freedata is the number of free filesystem blocks on the data device.
29
30 freertx is the number of free extents on the realtime device.
31
32 freeino is the number of inode records that are not in use within the
33 space that has been allocated for them.
34
35 allocino is the number of inode records for which space has been allo‐
36 cated.
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
56 This API is specific to XFS filesystem on the Linux kernel.
57
59 ioctl(2)
60
61
62
63XFS 2019-06-17 IOCTL-XFS-FSCOUNTS(2)