---
name: "ioctl_xfs_rtgroup_geometry"
section: "2"
platform: "linux"
package: "xfsprogs"
version: "7.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ioctl_xfs_rtgroup_geometry"
---

# ioctl\_xfs\_rtgroup\_geometry(2)

query XFS realtime group geometry information

## NAME

ioctl\_xfs\_rtgroup\_geometry - query XFS realtime group geometry information

## SYNOPSIS

**#include \<xfs/xfs\_fs.h\>**

**int ioctl(int** *fd***, XFS\_IOC\_RTGROUP\_GEOMETRY, struct xfs\_rtgroup\_geometry \****arg***);**

## DESCRIPTION

This XFS ioctl retrieves the geometry information for a given realtime group. The geometry information is conveyed in a structure of the following form:

```
struct xfs_rtgroup_geometry {
	__u32  rg_number;
	__u32  rg_length;
	__u32  rg_sick;
	__u32  rg_checked;
	__u32  rg_flags;
	__u32  rg_writepointer;
	__u32  rg_reserved[26];
};
```

- *rg\_number*

  The caller must set this field to the index of the realtime group that the caller wishes to learn about.

- *rg\_length*

  The length of the realtime group is returned in this field, in units of filesystem blocks. *rg\_flags* The caller can set this field to change the operational behavior of the ioctl. Currently no flags are defined, so this field must be zero.

- *rg\_writepointer*

  For zoned devices, return the writepointer block offset into the respective realtime group. This field is valid only if the XFS\_RTGROUP\_GEOM\_WRITEPOINTER flag is set in rg\_flags.

- *rg\_reserved* and *rg\_pad*

  All reserved fields will be set to zero on return.

The fields *rg\_sick* and *rg\_checked* indicate the relative health of various realtime group metadata:

- •

  If a given sick flag is set in *rg\_sick*, then that piece of metadata has been observed to be damaged. The same bit will be set in *rg\_checked*.

- •

  If a given sick flag is set in *rg\_checked* and is not set in *rg\_sick*, then that piece of metadata has been checked and is not faulty.

- •

  If a given sick flag is not set in *rg\_checked*, then no conclusion can be made.

The following flags apply to these fields:

- **XFS\_RTGROUP\_GEOM\_SICK\_SUPER**

  Realtime group superblock.

- **XFS\_RTGROUP\_GEOM\_SICK\_BITMAP**

  Realtime bitmap for this group.

- **XFS\_RTGROUP\_GEOM\_SICK\_SUMMARY**

  Realtime summary for this group.

- **XFS\_RTGROUP\_GEOM\_SICK\_RTRMAPBT**

  Reverse mapping btree for this group.

## RETURN VALUE

On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

Error codes can be one of, but are not limited to, the following:

- **EFSBADCRC**

  Metadata checksum validation failed while performing the query.

- **EFSCORRUPTED**

  Metadata corruption was encountered while performing the query.

- **EINVAL**

  The specified realtime group number is not valid for this filesystem.

- **EIO**

  An I/O error was encountered while performing the query.

## CONFORMING TO

This API is specific to XFS filesystem on the Linux kernel.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md)
