| 1 |
.\" Copyright (c) 2022-2024 Oracle. All rights reserved. |
| 2 |
.\" |
| 3 |
.\" %%%LICENSE_START(GPLv2+_DOC_FULL) |
| 4 |
.\" SPDX-License-Identifier: GPL-2.0-or-later |
| 5 |
.\" %%%LICENSE_END |
| 6 |
.TH IOCTL-XFS-RTGROUP-GEOMETRY 2 2022-08-18 "XFS" |
| 7 |
.SH NAME |
| 8 |
ioctl_xfs_rtgroup_geometry \- query XFS realtime group geometry information |
| 9 |
.SH SYNOPSIS |
| 10 |
.br |
| 11 |
.B #include <xfs/xfs_fs.h> |
| 12 |
.PP |
| 13 |
.BI "int ioctl(int " fd ", XFS_IOC_RTGROUP_GEOMETRY, struct xfs_rtgroup_geometry *" arg ); |
| 14 |
.SH DESCRIPTION |
| 15 |
This XFS ioctl retrieves the geometry information for a given realtime group. |
| 16 |
The geometry information is conveyed in a structure of the following form: |
| 17 |
.PP |
| 18 |
.in +4n |
| 19 |
.nf |
| 20 |
struct xfs_rtgroup_geometry { |
| 21 |
__u32 rg_number; |
| 22 |
__u32 rg_length; |
| 23 |
__u32 rg_sick; |
| 24 |
__u32 rg_checked; |
| 25 |
__u32 rg_flags; |
| 26 |
__u32 rg_reserved[27]; |
| 27 |
}; |
| 28 |
.fi |
| 29 |
.in |
| 30 |
.TP |
| 31 |
.I rg_number |
| 32 |
The caller must set this field to the index of the realtime group that the |
| 33 |
caller wishes to learn about. |
| 34 |
.TP |
| 35 |
.I rg_length |
| 36 |
The length of the realtime group is returned in this field, in units of |
| 37 |
filesystem blocks. |
| 38 |
.I rg_flags |
| 39 |
The caller can set this field to change the operational behavior of the ioctl. |
| 40 |
Currently no flags are defined, so this field must be zero. |
| 41 |
.TP |
| 42 |
.IR rg_reserved " and " rg_pad |
| 43 |
All reserved fields will be set to zero on return. |
| 44 |
.PP |
| 45 |
The fields |
| 46 |
.IR rg_sick " and " rg_checked |
| 47 |
indicate the relative health of various realtime group metadata: |
| 48 |
.IP \[bu] 2 |
| 49 |
If a given sick flag is set in |
| 50 |
.IR rg_sick , |
| 51 |
then that piece of metadata has been observed to be damaged. |
| 52 |
The same bit will be set in |
| 53 |
.IR rg_checked . |
| 54 |
.IP \[bu] |
| 55 |
If a given sick flag is set in |
| 56 |
.I rg_checked |
| 57 |
and is not set in |
| 58 |
.IR rg_sick , |
| 59 |
then that piece of metadata has been checked and is not faulty. |
| 60 |
.IP \[bu] |
| 61 |
If a given sick flag is not set in |
| 62 |
.IR rg_checked , |
| 63 |
then no conclusion can be made. |
| 64 |
.PP |
| 65 |
The following flags apply to these fields: |
| 66 |
.RS 0.4i |
| 67 |
.TP |
| 68 |
.B XFS_RTGROUP_GEOM_SICK_SUPER |
| 69 |
Realtime group superblock. |
| 70 |
.TP |
| 71 |
.B XFS_RTGROUP_GEOM_SICK_BITMAP |
| 72 |
Realtime bitmap for this group. |
| 73 |
.TP |
| 74 |
.B XFS_RTGROUP_GEOM_SICK_SUMMARY |
| 75 |
Realtime summary for this group. |
| 76 |
.TP |
| 77 |
.B XFS_RTGROUP_GEOM_SICK_RTRMAPBT |
| 78 |
Reverse mapping btree for this group. |
| 79 |
.RE |
| 80 |
.SH RETURN VALUE |
| 81 |
On error, \-1 is returned, and |
| 82 |
.I errno |
| 83 |
is set to indicate the error. |
| 84 |
.PP |
| 85 |
.SH ERRORS |
| 86 |
Error codes can be one of, but are not limited to, the following: |
| 87 |
.TP |
| 88 |
.B EFSBADCRC |
| 89 |
Metadata checksum validation failed while performing the query. |
| 90 |
.TP |
| 91 |
.B EFSCORRUPTED |
| 92 |
Metadata corruption was encountered while performing the query. |
| 93 |
.TP |
| 94 |
.B EINVAL |
| 95 |
The specified realtime group number is not valid for this filesystem. |
| 96 |
.TP |
| 97 |
.B EIO |
| 98 |
An I/O error was encountered while performing the query. |
| 99 |
.SH CONFORMING TO |
| 100 |
This API is specific to XFS filesystem on the Linux kernel. |
| 101 |
.SH SEE ALSO |
| 102 |
.BR ioctl (2) |